philosophy :: psychology :: theology :: technology
When you’re setting up VNC on your Linux box, after you’ve installed it, you should be able to run a server and immediately log in. It’s a good idea to run “vncserver” with at least the following arguments:
If, for instance, I want for vncserver to start on display 1, I would do “:1″ on the command line after the name of the program itself.
So to recap, the full command line would read thus:
$ vncserver :1 -geometry 1024x768 -depth 16 -cc 4
Now, when you log in for the first time, you might be surprised to find yourself staring at a simple command line window sitting on a barren checkerboard background; and if you run a program from the command line, it pops up with an outline window that you must manually place with the mouse! This is what a Motif setup looks like, and is the most bare-bones graphical user interface available. You’re not actually running Motif, though, you’re running TWM, a highly sparse window manager for POSIX-compliant operating systems (Linux and UNIX are two major ones). This is because, for whatever reason, your Xstartup file wasn’t copied correctly to VNC, so vncserver wrote its own little startup file. If you want to see what it looks like, you can do a “cat ~/.vnc/xstartup” from the commandline when you’re logged in, and the last line on there you’ll see will have “twm&“, which basically tells the window manager you’re looking at right now to run itself.
To correct this problem, assuming you already have a startup file for the X Window System (if you can log in locally to your box and it’s all nice and pretty and comes up with a GNOME or KDE system, you’re fine), you’ll just need a solid text editor (like Emacs or vi, though the former is FAR SUPERIOR). You can stay in your TWM commandline or log in through SSH and execute the following commands to rectify this situation.
FIRST, back up your existing VNC xstartup file:
$ mv ~/.vnc/xstartup ~/.vnc/xstartup.BAK
SECOND, initialize your text editor with a replacement copy of xstartup:
$ emacs ~/.vnc/xstartup
THIRD, place into the file the following text:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
Save and close the file (”C-x C-s C-x C-c” in Emacs), and kill the current VNC server. Assuming that your display is 1, the command follows:
$ vncserver -kill :1
Then, restart the VNC server thus (or however you usually do):
$ vncserver :1 -geometry 1024x768 -depth 16 -cc 4
Log in to your server through VNC—behold! There have you your precious GUI!
When you’re setting up VNC on your Linux box, after you’ve installed it, you should be able to run a server and immediately log in. It’s a good idea to run “vncserver” with at least the following arguments:
If, for instance, I want for vncserver to start on display 1, I would do “:1″ on the command line after the name of the program itself.
So to recap, the full command line would read thus:
$ vncserver :1 -geometry 1024x768 -depth 16 -cc 4
Now, when you log in for the first time, you might be surprised to find yourself staring at a simple command line window sitting on a barren checkerboard background; and if you run a program from the command line, it pops up with an outline window that you must manually place with the mouse! This is what a Motif setup looks like, and is the most bare-bones graphical user interface available. You’re not actually running Motif, though, you’re running TWM, a highly sparse window manager for POSIX-compliant operating systems (Linux and UNIX are two major ones). This is because, for whatever reason, your Xstartup file wasn’t copied correctly to VNC, so vncserver wrote its own little startup file. If you want to see what it looks like, you can do a “cat ~/.vnc/xstartup” from the commandline when you’re logged in, and the last line on there you’ll see will have “twm&“, which basically tells the window manager you’re looking at right now to run itself.
To correct this problem, assuming you already have a startup file for the X Window System (if you can log in locally to your box and it’s all nice and pretty and comes up with a GNOME or KDE system, you’re fine), you’ll just need a solid text editor (like Emacs or vi, though the former is FAR SUPERIOR). You can stay in your TWM commandline or log in through SSH and execute the following commands to rectify this situation.
FIRST, back up your existing VNC xstartup file:
$ mv ~/.vnc/xstartup ~/.vnc/xstartup.BAK
SECOND, initialize your text editor with a replacement copy of xstartup:
$ emacs ~/.vnc/xstartup
THIRD, place into the file the following text:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
Save and close the file (”C-x C-s C-x C-c” in Emacs), and kill the current VNC server. Assuming that your display is 1, the command follows:
$ vncserver -kill :1
Then, restart the VNC server thus (or however you usually do):
$ vncserver :1 -geometry 1024x768 -depth 16 -cc 4
Log in to your server through VNC—behold! There have you your precious GUI!
[powered by WordPress.]
For the discussion of current and historical trends in the liberal arts, information technology, and religious thought. "Of all human pursuits, the pursuit of wisdom is the more perfect, the more sublime, the more useful, and the more agreeable."
Think.
ThinkBlog.org has been on the web since August 2003, with 292,449 words in 846 posts.
It is presently 10:39:46 on 18 May 2008, server side. All content except where otherwise noted Copyright © 2000-2006 Michael Phillips.
33 queries. 1.244 seconds