Running Debian with no mouse/keyboard/monitor
Posted by summitwulf on Wed 1 Feb 2006 at 08:47
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.
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 | Reply to this comment ]
http://www.debian-administration.org/articles/322
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
Johannes
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | 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 | Reply to this comment ]
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
[ Parent | Reply to this comment ]
I have a Soekris single board computer running Debian sarge off a compactflash with a read-only filesystem, and I manage it solely with ssh, screen, and serial.
Andy
[ Parent | Reply to this comment ]
Anybody else encountered those?
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
[ Parent | Reply to this comment ]
Option "AllowMouseOpenFail" "True"
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
change the line KLOGD=" "
to KLOGD="-c 5"
and the messages should stop spitting to console.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
Good luck.
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
http://www.bestweb.com.ua/en/blog/52-running-x-server-on-debian-u buntu-without-a-physically-connected-monitor
[ Parent | Reply to this comment ]