This site is now 100% read-only, and retired.

Running Debian with no mouse/keyboard/monitor

Posted by summitwulf on Wed 1 Feb 2006 at 08:47

I have built a firewall using Debian Sarge, Shorewall etc. on a VIA EPIA PD6000. I'm very happy with the performance, but I would like to get rid of the keyboard, mouse and monitor and administer the system remotely using VNC, SSH, etc. However, disconnecting the keyboard and mouse causes the X-server to fail (it seems). I've set the BIOS to ignore keyboard errors, but is there a clean and correct way to make the system operate without the keyboard and mouse attached?

Although I'm proficient with electronics (I'm an electronics engineer) I don't want to use a hardware solution (i.e. something that plugs into the mouse and keyboard connectors and 'fakes' being the missing hardware).

I feel sure there must be a clean way to solve this. Does anyone have a solution or any good ideas?

Many thanks,

SW.

 

 


Re: Running Debian with no mouse/keyboard/monitor
Posted by shufla (83.16.xx.xx) on Wed 1 Feb 2006 at 09:51
Hello,

AFAIR you'll be interested in vncserver. For instance that solution:
http://forums.fedoraforum.org/archive/index.php/t-1606.html

Which I use on headless servers and inside virtualized (xen/vserver/ovz) systems without any problems.

Best Regards,
Luke

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Aike (217.76.xx.xx) on Wed 1 Feb 2006 at 10:10
No need to link to fedoraforum.org, there is a Debian Administration howto about this!

http://www.debian-administration.org/articles/322


[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (84.194.xx.xx) on Wed 1 Feb 2006 at 10:33
lol Why using VNC ... you don't need to set up a desktop on every server! Or do you want to play OpenGL games on your (powerful) servers? ;)

Just use SSH. I don't use anything else. You can do ALL the administration with it. Just login and execute your commands ...

Fred
Linox.BE

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (145.85.xx.xx) on Wed 1 Feb 2006 at 10:40
And if you still want to do some graphical configuration, simply install webmin (the debian package is unfortunately not so up-to-date).

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by shufla (83.16.xx.xx) on Wed 1 Feb 2006 at 11:32
Hello,

Well - it depends. If your server is, hm, just a server - there is no need for X. But sometimes servers do provide some GUI based programs - just like in my company - all workstations are on Windows, but there are so many X or Linux centered tools, which run on server :)

Luke

PS. Sorry for that fedora forum, but that's another apporach with xinetd. ;)

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (193.171.xx.xx) on Wed 1 Feb 2006 at 16:27
You can still use ssh. Just enable X-forwarding via the "-X" switch and your GUI-Programs run within your local Xserver.

Johannes

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by summitwulf (128.171.xx.xx) on Wed 1 Feb 2006 at 23:19
[ View Weblogs ]
Hello,

Yes, I am using the Debian package 'Remote Desktop' which I imagine is based on VNC - it looks exactly like it and I can connect to it with VNC.

However the problem appears to be that X complains if it cannot find the keyboard and mouse at startup - or even if I unplug either after login (although I should confirm that). It then says that it is misconfigured and 'will disable' itself until the problem is fixed. Finally it drops me to a command line environment, which I guess is not such a bad thing for it to do.

Regards,

SW

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Steve (82.41.xx.xx) on Wed 1 Feb 2006 at 10:47
[ View Weblogs ]

You can remove the settings used to specify the mouse, and this will allow XFree86/X.org to start - however I'm not sure what this will do with regards to VNS.

The relevent section I have for my mouse is this:

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/input/mice"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"       "true"
        Option          "ZAxisMapping"          "4 5"
EndSection

For the keyboard I have this:

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "keyboard"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "gb"
EndSection

You can certainly remove the mouse entry (which will be different to mine most likely) and still have a usable X11 setup - whether VNC will still run is a different question. Should be easy enough to test though.

You might find the article on giving Xen servers VNC useful as it describes the setup of GDM/KDM to directly serve a desktop with VNC...Steve

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by lfousse (152.81.xx.xx) on Wed 1 Feb 2006 at 11:11
You don't need X in the first place so that's one problem solved :-)

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (194.126.xx.xx) on Wed 1 Feb 2006 at 11:21
Amazing that no-one suggested THIS yet:

xvfb provides an X server that can run on machines with no display hardware
and no physical input devices. It emulates a dumb framebuffer using virtual
memory. The primary use of this server was intended to be server testing,
but other novel uses for it have been found, including testing clients
against unusual depths and screen configurations, doing batch processing with
Xvfb as a background rendering engine, load testing, as an aid to porting the
X server to a new platform, and providing an unobtrusive way to run
applications that don't really need an X server but insist on having one
anyway.
.
This package also contains a convenience script called xvfb-run which
simplifies the automated execution of X clients in a virtual server
environment. This convenience script requires the use of the xauth
program from xbase-clients, hence the suggestion of xbase-clients.

So go ahead and apt-get install xvfb

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (69.139.xx.xx) on Sat 4 Feb 2006 at 15:59
It is amazing the you suggested that.

There is no need to be that complicated, or waste system resources on xvfb. Simply don't run the Xserver.

You can still use X clients with ssh and X forwarding.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (198.45.xx.xx) on Fri 13 Jul 2007 at 16:36
There are still very valid uses of a virtual frame buffer on a server where running X11 over SSH would not be so wise. The best example is some of our web Java stuff running on Sun. The java engine renderes on the fly custom images and it being a little old needs to be able to connect to an X11 server to do the rendering. The real hitch here: these sun servers have *no* video card at all, and would be incapable of running a traditional X11 server to allow java to do its rendering work. In this kind of situation, xvfb is a must, and a very ligh weigh alterative to running a full X11 server even if we could run one (ie, usually with xvfb, you *don't* have anything like gnome or kde running in it).

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (85.64.xx.xx) on Wed 1 Feb 2006 at 16:13
I've seen some VIA Epias that will fail to reboot properly if the keyboard was not plugged in at boot time.

Anybody else encountered those?

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by lindenle (128.174.xx.xx) on Wed 1 Feb 2006 at 17:08
[ View Weblogs ]
Usually there is an option in the bios to halt or not halt on a keyboard error (i.e. no keyboard present).

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by summitwulf (128.171.xx.xx) on Wed 1 Feb 2006 at 23:30
[ View Weblogs ]
I'll double check this on my PD6000 and ME6000, but as I recall the boot process goes fine until it has advanced far enough so that Debian (or X, really) is checking for the keyboard and mouse - then it produces an error message about misconfiguration, which is understandable as it was told to expect a keyboard and mouse and they are missing. Mind you, I have set my BIOS to ignore keyboard errors, so maybe that's why it proceeds.

So the boot/reboot doesn't fail if the keyboard and mouse is missing I don't think, it's just that I can't just unplug them and have X ignore it. And I imagine because this error interrupts the boot process, I wouldn't be able to log in even via SSH, although this is something else I will have to confirm.

It seems as though - as several people have pointed out - my fundamental mistake was to install a graphical environment in the first place.

SW

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by scott (83.100.xx.xx) on Sun 5 Feb 2006 at 06:44

You either need to configure X to not run a local server (this will stop it moaning about mice and keyboards), or just stop xdm/kdm/gdm from running at boot time.

  • (Assuming you're running xdm) the file /etc/X11/xdm/xservers tells xdm how many servers to start locally.

    By default, there should be just one line uncommented saying something like:

    :0 local /usr/X11R6/bin/X vt7 -dpi 100 -nolisten tcp

    just comment this line out. Then you'll want to restart xdm

    # /etc/init.d/xdm restart
    or reboot or something.
  • Alternatively, just stop xdm (kdm/gdm, whichever) from running at boot
    # update-rc.d xdm stop 0123456

xvnc should work fine for your remote configuration needs, but as others have said, there is something to be said for the command line approach

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by noahdain (24.184.xx.xx) on Thu 2 Feb 2006 at 02:19
have an epia cl here, running headless.

you should just have to go into the bios and make sure it not stop for any errors, keyboard included.

iirc, on an award bios, it should be the config page on the upper left of the initial menu screen.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (213.22.xx.xx) on Wed 1 Feb 2006 at 23:07
Well, vnc doesn't require a "local" mouse or keyboard, so if you're talking about a local X-server, why should you have it running ?

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by harry_the_eskimo (203.49.xx.xx) on Thu 2 Feb 2006 at 03:33
Not too sure about getting X going without a keyboard, but to get it to start without using a mouse add the following to the ServerLayout section of your XF86Config-4:

Option "AllowMouseOpenFail" "True"

[ Parent ]

XDMBC?
Posted by Anonymous (84.133.xx.xx) on Thu 2 Feb 2006 at 12:00
I see no reason to want X on a firewall but if your mileage varies: Why not enable XDMBC in yout favourite display manager and disable all local xservers?

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (68.42.xx.xx) on Fri 3 Feb 2006 at 23:01
Don't install X (or remove it if you have), install ssh, and plug in the power cord and your network cable. You're all set.

My webserver is setup like this behind my TV somewhere. I haven't looked at the machine in months, but I work on it almost everyday.

There is a server stuffed in a closet 180 miles from me, with no keyboard/mouse/monitor hookup at a local library I interned for. That computer is still running strong on Debian stable. I haven't looked at that machine in well over a year, and I doubt anyone else has either.

[ Parent ]

The UNIX pineers fixed this with Plan 9
Posted by Anonymous (203.158.xx.xx) on Sun 5 Feb 2006 at 13:09
The original UNIX pioneers (Ken Thompson & Dennis Ritchie), address this 'problem' with Plan 9. The solved it with bind, private name space and 9P. Read about them here.

With 9P there is no difference if something is local or remote, they both can be accessed and mounted the same way. With 'everything is a file' you can mount a remote /dev file server, and bind it's /dev/keyboard to anywhere you want, like the computer you want to access with a remote file system.

A cool thing is Plan 9 has /dev/tcp, unlike Unix where networking was added later, and wasn't a file server, rather some ugly binary hack. Lets say you only have one computer with Internet access, and want it on another one. What you do is mount the remote file system (very easy with private name spaces, unlike in UNIX, where it is a global name space), and bind it's /dev/tcp to yours. Now you have a gateway to the Internet with just a few CLI commands. This would require running another application to do so in UNIX, but is only a simple command away in Plan 9.

I am current in the middle of packaging Inferno, basically Plan 9 next generation. It was designed to either run on top of other operating systems, or native mode. It has the same design a Plan 9, so everything I said above can also be done in it.

-- ems

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (89.49.xx.xx) on Mon 6 Feb 2006 at 15:58
Set the BIOS to continue booting on all errors. That is the clean way to boot a headless x86-box.

Ignore any comment suggesting VNC or X11 for remote management. You are building a firewall, so make sure you don't have anything installed that isn't expressly required for this sole purpose. Use SSH or a serial console to manage it remotely.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by summitwulf (72.130.xx.xx) on Tue 7 Feb 2006 at 09:47
[ View Weblogs ]
Well, I did this and everything is now working fine. No graphical environment, no keyboard, no mouse. I'm using SSH for remote administration.

The only issue I have left to resolve is a trivial one about Shorewall spewing messages to the console, but that is hardly a major issue.

Thanks to everyone who contributed replies - I learnt a lot from you all!

SW

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (67.177.xx.xx) on Sun 19 Feb 2006 at 10:57
in /etc/init.d/klogd

change the line KLOGD=" "
to KLOGD="-c 5"

and the messages should stop spitting to console.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by summitwulf (72.130.xx.xx) on Mon 20 Feb 2006 at 02:38
[ View Weblogs ]
This worked perfectly, thank you.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (213.44.xx.xx) on Fri 17 Feb 2006 at 21:30
I also have a Debian firewall. One strange thing about your setting is X. Why would you need X on a firewall?
For mouse and keyboard you may have to set up an option in the bios to ignore them. I know some BIOSes permit this.
Eric

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (70.154.xx.xx) on Wed 10 May 2006 at 18:01
It's amazing how someone asks a simple question about using their server without a display/keyboard/mouse and there are like 50 posts saying "USE THE COMMAND LINE YOU N00B!" (more or less)

is there a way to run Debian's version of X without having a keyboard and mouse?

With how I plan on using this server, a GUI would be extremely nice to have around.

VNC is already setup, SSH is setup, the computer gets past BIOS without an issue
but it fails when it tries to load X.

There didn't seem to be a reply that full fixes this issue.

(i don't have XDM and that other one just disables the mouse, not keyboard)

Thanks for any help.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (201.21.xx.xx) on Tue 17 Oct 2006 at 21:41
I read the whole page and did not find the answer.

I am in fact using sarge with X on a touchscreen and I want to run X without a keyboard. BTW, the "allowmousefail" works, but I need something to skip the keyboard problem. It seems that it tries to open with the keyboard several times and then it finally gives up and starts up fine without X.

Any help will be trully appreciated.

Regards

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (71.135.xx.xx) on Fri 29 Dec 2006 at 09:16
If you want to run the system with a GUI without a keyboard/mouse/monitor, set it up like you would a system with a keyboard/mouse/monitor, then set up a vnc-server that will allow you to use a vnc client to access your desktop remotely. Then set the system to run level 3 (text mode) and viola, you should still be able to vnc into the system as if X was working. VNC server sets up the X server to run on another screen that is accessible remotely. A local Xserver instance does not need to be running.

Good luck.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by enemy_z (83.151.xx.xx) on Sun 17 Dec 2006 at 21:53
I managed to get my X server to start with neither my keyboard or mouse attached using the following entries in my XF86Config-4 file under debian stable:
Section "ServerFlags"
        Option  "AllowMouseOpenFail"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device" "/dev/input/mice"
        Option          "Protocol" "ImPS/2"
        Option          "Emulate3Buttons" "true"
        Option          "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "void"
        Option          "CoreKeyboard"
        Option          "XkbRules" "xfree86"
        Option          "XkbModel" "pc104"
        Option          "XkbLayout" "gb"
EndSection
However, gnome does start with a few error messages that I haven't bothered to work out how to remove. Hope this helps.

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by Anonymous (85.157.xx.xx) on Thu 28 Dec 2006 at 15:59
I used on one computer a fake monitor. It is quite easy to build, you need only three resistors. Here is a schematic for it: http://madmodders.se/moddningar/dummy/index.html

[ Parent ]

Re: Running Debian with no mouse/keyboard/monitor
Posted by hutchia (24.254.xx.xx) on Wed 25 Mar 2009 at 22:40
I had a same problem with Debian and it took a long while to figure out the VERY SIMPLE fix.

Boot would stall when no monitor was found.

Here is why and how to fix:

The Video drivers now auto-detect monitor, and in particular its available modes. It will only do this with monitor connected. I spend long time looking for work around here - but this was wasted time.

Xorg software stalls during boot when it gets video error because it prompts user to look at log file and/or continue. There are some scripts that get invoked when error occurs. I was very tempted to rewrite these so they did not require for keyboard input on error.

Then it came to me!

The Xorg software was set up to create XSERVER on console (ie normal monitor/keyboard) - expecting this to be used as Xterminal to access applications locally or elsewhere.

Though I am using an XServer, it's not local. In my case I was running GNOME desktop so a check on the login setup (login window prefs, security,configure x-server) shows VT0 listed as Xserver. Removing this entry FIXED THE PROBLEM!

Machine now boots and can be accessed remotely using X.

If desired,an Xserver can still be run on machine after connecting monitor - just log in and type startx.

[ Parent ]