LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2009, 07:17 AM   #1
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Rep: Reputation: 0
How to auto start vnc4server on Debian 5 x64?


Hey everyone,

I have two questions.

i) I'm running Lenny x64 with Xfce 4.6 and I'd like to get vnc4server to start when the server boots. Currently I have to type 'vnc4server :1 -geometry 1920x1178 -depth 32 -pixelformat rgb565' over SSH to start the server.

Surely this can be done on bootup?


ii) To enable cut and paste, I need to type 'vncconfig -display=nsxxxxxx.ovh.net:1' over SSH.

Can vncconfig also be loaded at bootup?

Thank you.
 
Old 11-23-2009, 11:43 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Put this into the server's /etc/rc.local file, on the line(s) before the final exit 0
Code:
su - sandygws -c "cd /home/sandygws/ && vncserver :1 -geometry 1920x1178 -depth 32" 2>/dev/null &
You'll have to change the red bits to whatever your username is.
You can do the same for your other command.

rc.local is run at boot, and so will start an instance of your vnc server at boot time. It'll then just "sit there" until you connect to it.

You will want to look at running vnc through ssh if your vnc server's IP and port is accessible from outside your LAN (it's a big security hole).
 
Old 11-23-2009, 01:42 PM   #3
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you for the reply tredegar .. you figured it out!

The following now runs vnc4server at startup:

Code:
su - [username] -c "cd /home/[username]/ && vnc4server :1 -geometry 1920x1178 -depth 32 -pixelformat rgb565" 2>/dev/null &


I still can't get the second command to work however. I've tried adding each of the following to the /etc/rc.local file - immediately after the vnc4server code above:

Code:
su - [username] -c "cd /home/[username]/ && vncconfig -display=nsxxxxxx.ovh.net:1" 2>/dev/null &
&

Code:
vncconfig -display=nsxxxxxx.ovh.net:1
-Neither produces the small popup window 'VNC config' on the Xfce desktop which enables 'Accept clipboard from viewers', 'Send clipboard to viewers' and 'Send primary selection to viewers'.



It still appears if I manually activate it over SSH with:

Code:
vncconfig -display=nsxxxxxx.ovh.net:1

What am I doing wrong?
 
Old 11-27-2009, 02:49 PM   #4
sandygws
LQ Newbie
 
Registered: Nov 2009
Location: London, UK
Posts: 11

Original Poster
Rep: Reputation: 0
Can anyone help?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SUSE 11.0 beta 2 X64 KDE 4 Can't Auto hide Toolbar / bottom panel 1kyle SUSE / openSUSE 10 09-06-2016 03:38 PM
vnc4server on ubuntu Joe Donner Ubuntu 13 08-09-2010 11:20 PM
How do I auto start modules that aren't auto loaded on boot? darkbluedrew Debian 2 09-18-2005 09:10 AM
eth0 Auto Connect, How to auto start on logon cornish Linux - Networking 2 05-09-2005 12:02 PM
how to auto start services at startup in debian? legolin Debian 3 12-28-2003 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration