LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-21-2005, 04:38 AM   #1
bulls_i
LQ Newbie
 
Registered: Oct 2005
Location: Canada
Distribution: FC4, Ubuntu 5.10
Posts: 4

Rep: Reputation: 0
Activating VNC-server from putty (ssh)


Hello.

Question: I have a PC running Ubuntu that I would like to use without monitor, keyboard, mouse (so basically, just the tower). I would like to use vncviewer to graphically access it from my other PC. (Running FC4 or XP).

Problem: vnc-server does not start unless a user has logged in to Ubuntu (which requires keyboard and monitor, at least).

I am able to log into it using ssh x.x.x.x (from FC4) or puTTy (from xp) before actually logging into Ubuntu. Is there a way I can run vnc-server remotely?

If i use ssh, and run

vnc-server -depth 16 -geometry 1024x768

(or something like that) I get an error that says

"gtk-warning, cannot open display"


Thanks to all.

(I apologize if this question is answered somewhere else, I'm new here [and new to linux])
 
Old 10-21-2005, 11:28 AM   #2
sats
LQ Newbie
 
Registered: Sep 2005
Location: india
Posts: 13

Rep: Reputation: 0
looged in to your remote machine using your id run vncserver it will gives u the inforamtion about on which display that VNC server get started
now used your vnc viewer to connect to you remote machine and used the disaplay specified when u runned the vncserver on remote mavhine.
 
Old 10-21-2005, 02:03 PM   #3
bulls_i
LQ Newbie
 
Registered: Oct 2005
Location: Canada
Distribution: FC4, Ubuntu 5.10
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks sats, but when I log in remotely (using ssh) and then try to run the server, i get:


"gtk-warning, cannot open display"


I dont think you can start vnc-server remotely.
Does someone maybe know of a way to change the startup sequence so that vnc-server is run BEFORE the login screen, instead of just after?

Thanks again.
 
Old 10-21-2005, 06:31 PM   #4
Andrei-V
LQ Newbie
 
Registered: Oct 2005
Location: Romania
Distribution: Mandrake
Posts: 1

Rep: Reputation: 0
You'll need to start an X server, remotely. Send "xinit", "X", "startx", see whatever works, and send it in background (ctrl+z, type bg) or open another parallel session.

With an X server running, set your display variable to it.
export DISPLAY="localhost:0"

And then run the vnc server, and perhaps an xterm/gnome-session/whatever too, to put on it.
 
Old 10-21-2005, 07:52 PM   #5
bulls_i
LQ Newbie
 
Registered: Oct 2005
Location: Canada
Distribution: FC4, Ubuntu 5.10
Posts: 4

Original Poster
Rep: Reputation: 0
Works.

Here's a detail breakdown of how it happened (for the next guy)

When Ubuntu loads, it's waiting for a user and password. No keyboard is connected. I connect remotely using SSH as user bulls.
(bulls has root privileges from sudo).

first, i deleted the file /tmp/.X0-lock (that needs to be done before you can startx)
then i said startx (in the ubuntu monitor, we get bulls' desktop)

then i exit ssh and say

vncviewer x.x.x.x


(This assumes that bulls already has vnc-server enabled)

If bulls doesnt have vnc-server enabled, you must enable it first from ssh, before exiting, by saying

vnc-server

(in ubuntu, for some reason, this is /usr/lib/vino/vino-server)

Then, like before, exit ssh and say vncviewer x.x.x.x.


Thanks alot Andrei and sats!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
VNC over SSH. Windows client - Linux Server c_mitulescu Linux - Networking 30 05-20-2007 11:20 PM
Help with VNC and PuTTY rfkhickory Linux - Newbie 5 04-14-2004 10:16 PM
SSH using putty rkemp Linux - Networking 3 03-06-2004 05:04 PM
VNC with Putty Tunnel port ziggie216 Linux - Software 10 12-02-2003 08:32 PM
VNC with Putty Tunnel LinuxHaven Linux - Security 15 08-30-2003 01:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:22 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