LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-29-2008, 03:51 PM   #1
ckr
Member
 
Registered: Jul 2004
Posts: 45

Rep: Reputation: 15
Connecting using VNC between 2 Ubuntu boxes...


Hi All,
I set up and have VNC running between two of my Ubuntu machines, but there is one tiny little problem that kinda makes things difficult.

It appears that I have to have been logged into the target machine before I can connect. If I'm not logged in, no connection. Anyway around this?

Thanks

Last edited by ckr; 01-29-2008 at 04:06 PM.
 
Old 01-29-2008, 05:10 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
I set up and have VNC running between two of my Ubuntu machines
Well done
Quote:
If I'm not logged in, no connection. Anyway around this?
Of course:
On my "server" I start an instance of vnc at boot. That way, I can always connect to my "server desktop" from another pc. It works like this:

On my server I have added the lines
Code:
# Start vnc server for tredegar on :1
su - tredegar -c "cd /home/tredegar/ && vncserver :1 -geometry 1024x768 -depth 24" &
to the end of the file /etc/rc.local but before the exit(0) line!

So when the server boots, it starts a desktop for me (tredegar) on :1
Then then I can remotely connect to it with this:
Code:
vncviewer servername:1
I then created a desktop link to application (Make this "Run in terminal" - because I have to provide a password for vnc in that terminal)

One click, give PW, and I'm connected to my server desktop. Sweet
You are fixed now?
 
Old 01-29-2008, 05:17 PM   #3
ckr
Member
 
Registered: Jul 2004
Posts: 45

Original Poster
Rep: Reputation: 15
Way cool. I'll have to check that out and give it a try. Thanks a ton!
 
  


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
Help Connecting 2 Linux Boxes gpfromnc Linux - Networking 8 08-18-2007 10:10 AM
VNC: Connecting from Windows to Ubuntu not working Micro420 Ubuntu 2 06-08-2007 05:35 PM
connecting two linux boxes together jeffbk Linux - Networking 2 05-08-2007 12:12 PM
connecting 3 boxes sycamorex Linux - Networking 2 01-22-2007 07:03 AM
need advice to run vnc (2 linux boxes) ssh OK arjay Debian 18 08-30-2005 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:24 PM.

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