8

I am an absolute starter on Linux and I am operating on an OpenSUSE Leap 42.1 and here is my situation:

I was given a task to build a PC with very similar configs and properties to one already in operation. The steps I took are based on very brief instructions from a colleague and on going through the files from the already-built computer.

I was able to correctly set up the autostart for x11vnc server by creating a symbolic link from the executable to the "autostart-scripts" folder:

ln -s /usr/bin/x11vnc /home/"myusernamefolder"/.config/autostart-scripts/x11vnc

However, my problem is password-related... Using the terminal, I store the desired password as follows:

x11vnc -storepasswd "mypassword" /home/"myusernamefolder"/.vnc/passwd

Then, I create the following file:

edit /home/"myusernamefolder"/.x11vncrc

Containing the following:

display :0
rfbauth /home/"myusernamefolder"/.vnc/passwd
forever
bg

Then, when I try to remote access from another computer, there is an authentication error, as if the password I type on the VNC client does not correspond to the one I stored on the server... I already tried not setting up a password and not creating the file above and the remote access happens successfully, but I really need this remote access to have a password.

Any tips? Can you see where I went wrong?

Thanks in advance.

1 Answer 1

14

I was able to correctly set up the autostart for x11vnc server by creating a symbolic link from the executable to the "autostart-scripts" folder:

Creating a symbolic is not needed.

Store your password in /home/user/.vnc/passwd

Encrypted

x11vnc -storepasswd mypassword /home/user/.vnc/passwd

Clear Text

echo mypassword > /home/user/.vnc/password

Create an autostart script at /home/user/.config/autostart/x11vnc.desktop. Desktop files in this directory are executed as soon as the GUI loads.

x11vnc.desktop

[Desktop Entry]
Name=X11VNC Server
Comment=Share this desktop by VNC
Icon=computer
Type=Application
NoDisplay=false
Hidden=false
X-GNOME-Autostart-Delay=0
Exec=x11vnc -forever -shared -display :0 -rfbauth /home/user/.vnc/passwd

Look at last line

Use this if password is in Encrypted form

Exec=x11vnc -forever -shared -display :0 -rfbauth /home/user/.vnc/passwd

Clear Text saved in file

Exec=x11vnc -forever -shared -display :0 -passwdfile /home/user/.vnc/passwd

Clear Text via Command Line (not recommended)

Exec=x11vnc -forever -shared -display :0 -passwd mypassword

  • forever option is used to make x11vnc server persistent. It won't exit after the first connection get disconnected.
  • shared options is used to allow more than 1 connections on same display
2
  • is /home/user/ to be replaced by whatever is my $HOME?
    – Demis
    Jul 17, 2022 at 22:50
  • Your answer still works after 5 years with Lubuntu + LxQt + x11vnc + Jump Desktop for Mac OS.
    – Kevin P.
    Dec 31, 2022 at 3:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .