Skip to content

Instantly share code, notes, and snippets.

@mangoliou
Last active June 1, 2023 06:49
Show Gist options
  • Save mangoliou/407d6a39a60d128610c20c4143f39f0d to your computer and use it in GitHub Desktop.
Save mangoliou/407d6a39a60d128610c20c4143f39f0d to your computer and use it in GitHub Desktop.
x11vnc `stack smashing detected` solution.
# Install x-related to compile x11vnc from source code.
sudo apt-get update
sudo apt-get install -y libxtst-dev libssl-dev libjpeg-dev
# Grep source code.
wget http://x11vnc.sourceforge.net/dev/x11vnc-0.9.14-dev.tar.gz
gzip -dc x11vnc-0.9.14-dev.tar.gz | tar -xvf -
cd x11vnc-0.9.14/
./configure --prefix=/usr/local CFLAGS='-g -O2 -fno-stack-protector -Wall'
# Make and Make install.
make
make install
# Grep lighdm auth file.
ps wwwwaux | grep auth
# Run x11vnc.
/usr/local/bin/x11vnc -auth /var/run/lightdm/root/:0 -display :0 -xkb -forever -shared -rfbport 20000
# Use the chrome vnc client. Login Ubuntu and press ESC. Problems solved.
@emcek
Copy link

emcek commented Sep 28, 2021

I got problem with ubuntu 18.04 and vnc-0.9.16:

# ./autogen.sh
:
:
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
./configure: line 4101: PKG_PROG_PKG_CONFIG: command not found
checking for RAND_file_name in -lcrypto... yes
checking for crypt... no
checking for crypt in -lcrypt... yes
./configure: line 4254: syntax error near unexpected token `OPENSSL,'
./configure: line 4254: `		PKG_CHECK_MODULES(OPENSSL, openssl >= 1.0.0,'

fix with:

sudo apt install pkg-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment