Table of Contents
A system without the monitor is called a "headless" system. What I want to build is a bare-bone server, which not only without a monitor, but no mouse or keyboard either. I just did it. Not a big deal at all — No fancy Vnc or Samba servers at all, just setup sshd server properly and off you go.
In brief, here is what I setup properly for headless/bare-bone server to work:
Setup its host name properly from my workstation:
echo '192.168.0.102 dmz dmz' >> /etc/hosts
Establish (passwordless) ssh connection from my workstation to the server. Ref: http://xpt.sourceforge.net/techdocs/nix/conn/ssh/ssh02-OpenSSHAuthentications/
$ ssh root@dmz Last login: Thu Jun 5 17:41:00...
That's it. A headless/bare-bone system in Linux is not a big deal at all, as long as you know how to start things from the command line. If you prefer an X Desktop instead, to launch X applications via menu, read on. File transfers between the workstation and the server is via (passwordless) scp.
Once you've got to this stage, there is no need to switch monitor, mouse and keyboard between the two system any more. Feel free to install (or configure) any thing else you deem necessary (e.g., samba or nfs, etc).
Notes:
To allow X11Forwarding, sshd_config on the remote server should be set up like this:
X11Forwarding yes X11DisplayOffset 10
ssh_config on the local machine should contain the following:
ForwardAgent yes ForwardX11 yes
The last command in my /etc/rc.d/rc.local is the following. It sounds like the ding-dong door bell, which indicates me: "the headless server is ready".
beep -f 493.9 -l 200 -D 20 -n -f 392.0 -l 400
About the beep command, it is from the beep Debian package:
beep does what you'd expect: it beeps. But unlike printf "\a" beep allows you to control pitch, duration, and repetitions. Its job is to live inside shell/perl scripts and allow more granularity than one has otherwise. It is controlled completely through command line options. It's not supposed to be complex, and it isn't - but it makes system monitoring (or whatever else it gets hacked into) much more informative. Homepage: http://johnath.com/beep/
documented on: 2008-06-05, xpt
compiled from http://www.linuxquestions.org/questions/slackware-14/remote-x-windows-how-to-setup-641945/
If you're trying to work on your son's computer from your computer, you can
always start a remote X session over ssh. You shouldn't need any xhost mumbo
jumbo to do it either. Starting from runlevel 3 (just because I don't know
how to get this working from runlevel 4 because I don't use it), run Once logged in through ssh, type 'startx', and the default window manager or desktop environment should start — and you've got a full remote X session. You *may* also be able to run GDM or something from the xinit window, but I'm not sure since I've never used it. Then you can use his computer from yours and work on getting Face Browser to work (which looks pretty nifty after a quick Google).
| ||
-- T3slider wrote on 05-13-08 |
Here is my solution that works well. First, as it was said above, be sure that X11Forwarding is enabled on both remote and local machines. Then, using terminal (switch to tty6 to do the followings, but you can do it from kde or any other graphical environment as well):
export DISPLAY=:1 X :1 &
It exports the DISPLAY variable to be :1 and then starting X on display:1. At this moment you'll be taken to just fired up X, so switch back to your terminal and:
ssh remotelogin@remotemachine /usr/bin/startkde
and once more you'll be taken to X on display:1, but now with remote kde session showing on local machine. You can then try launching other apps afterward. If you use GDM on the remote machine, you can replace the startkde command with '/usr/bin/gdm', even if you use KDM on your local machine.
05-14-08, atelszewski
documented on: 2008-06-06, xpt