Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I autostart my VNC server on my Knoppix installation?

share|improve this question
1  
What are you running Knoppix from? A liveCD? –  BloodPhilia Mar 12 '11 at 20:16
add comment

1 Answer

up vote 2 down vote accepted

Create a file called ~/.config/autostart/xvnc.desktop.

Place within it this text:

[Desktop Entry]
Name=XVNC Server
Exec=/usr/local/bin/xvnc.sh
Icon=
Type=Application

Now su to root and do the following.

Create a file called /usr/local/bin/xvnc.sh and place within it the following text:

#!/bin/bash
xhost +
x11vnc -display :0 -forever -passwd "foobar" &

And run chmod +x /usr/local/bin/xvnc/sh.

Exit from root.


This will allow connections as long as the server is running, and access to be granted by the password "foobar" as LXDE is started.

share|improve this answer
    
mmm... the problem is .xinitrc doesn't exists...! –  stighy Mar 12 '11 at 21:14
    
@stighy What's your window manager? I may be able to pinpoint your WM's startup file for you. –  new123456 Mar 12 '11 at 22:09
    
My window manager is Lxde –  stighy Mar 13 '11 at 18:17
    
thank you very much! –  stighy Mar 16 '11 at 20:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.