Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-21-2005, 04:38 AM
|
#1
|
LQ Newbie
Registered: Oct 2005
Location: Canada
Distribution: FC4, Ubuntu 5.10
Posts: 4
Rep:
|
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])
|
|
|
10-21-2005, 11:28 AM
|
#2
|
LQ Newbie
Registered: Sep 2005
Location: india
Posts: 13
Rep:
|
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.
|
|
|
10-21-2005, 02:03 PM
|
#3
|
LQ Newbie
Registered: Oct 2005
Location: Canada
Distribution: FC4, Ubuntu 5.10
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
10-21-2005, 06:31 PM
|
#4
|
LQ Newbie
Registered: Oct 2005
Location: Romania
Distribution: Mandrake
Posts: 1
Rep:
|
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.
|
|
|
10-21-2005, 07:52 PM
|
#5
|
LQ Newbie
Registered: Oct 2005
Location: Canada
Distribution: FC4, Ubuntu 5.10
Posts: 4
Original Poster
Rep:
|
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!!!
|
|
|
All times are GMT -5. The time now is 03:22 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|