Linux – How to get x11vnc to run at startup on openSuSE 12.1

bootlinuxopensusevncxorg

I'm trying to get x11vnc to run at startup with openSuse but not having much luck. Here's what I did so far.

I edited /etc/X11/xdm/Xsetup and added the following lines to the end, right before exit 0:

#run x11vnc automatically
/usr/bin/x11vnc -rfbauth /usr/bin/vnc/passwd -o /var/log/x11vnc.log -forever -bg

I created the `/usr/bin/vnc/passwd file using:

sudo x11vnc -storepasswd /usr/bin/vnc/passwd

When I reboot, I do a ps -A | grep x11 and do not see the process running. I also see no /var/log/x11vnc.log file created. I can run the command from bash directory and it works fine. I have a feeling this script is never getting run at startup.

I also created a new file called /etc/kde4/kdm/Xsetup and put the two lines from above in there, and same behavior.

The file permissions are:

-rw------- 1 root root 8 Apr 26 22:26 /usr/bin/vnc/passwd
-rwxr-xr-x 1 root root 5691 Apr 26 22:01 /etc/X11/xdm/Xsetup

Any ideas?

UPDATE

I've even tried just echo'ing Hello World to a text file in Xsetup which also does nothing. It seems this script simply doesn't get run at boot.

UPDATE 2:

I upgraded to 12.1, however none of my attempts have worked either.

Best Answer

Here is what I could find, either should work:


To fix x11vnc:

Enter these commands at a console as the user:

mkdir ~/.vnc
x11vnc -storepasswd "password" ~/.vnc/passwd

Put this in the ~/.x11vncrc file replacing user with your username:

display :0
rfbauth /home/user/.vnc/passwd
forever
bg

Now to autostart it each time the user logs in:

ln -s /usr/bin/x11vnc ~/.kde/Autostart/x11vnc

Now reboot or restart the desktop session.

(src)


YaST:

From the KDE desktop, select the YaST icon, enter the root password, and select OK; then select Network Services > Remote Administration.

Select Allow Remote Administration; then select Finish

(src)