Talkback for article: 186, January2001

A serial line shutdown button with control LED

Back to:

From: John Cooper [ date: 2001-01-05 ]
Could this not be intergrated with the UPS software in someway so that this could all be controlled by inittab?

From: Scot Wilcoxon <scot(at)> [ date: 2001-01-06 ]
UPS systems have been using similar methods for a while, with a relay reporting when main power has failed.

I have used a mouse on several keyboardless servers to allow shutdown or restart. Type "man gpm" and read "SPECIAL COMMANDS". It's already there.

I really like the LED feedback on this device.
From: Ron Boney <rboney(at)> [ date: 2001-01-25 ]
I like this project. I may try it. But I think will find one of those key swithches that I should have lying around. If I used a push button I just know that I would bump it at the worst possible moment.
From: Johan Östensson <johan.ostensson(at)> [ date: 2001-02-09 ]
Hehe just finished this, and it works :)
From: Sam Horrocks <samhorrocks(at)> [ date: 2001-02-11 ]
Sometimes my system is so messed up thrashing to disk it becomes extremely
slow, and you can't even execute any commands. This is the time when I
need a shutdown button like this, but my concern is that since this method
involves a user-level process, it won't be able to run and shut down the
computer because it's thrashing so much.

W2K has a feature where if you press the power button on the front of
the computer it executes a very quick shutdown and then powers off.
Of course it requires a "soft" power switch. Ideally I'd like to do this
with linux - in other words use the soft power switch to execute a
shutdown command. Does anyone know how to do this?
From: Dan Cyr <dan(at)> [ date: 2001-02-11 ]
Thanks Scott! I just tested the mouse -S function, and it works great, this is cool stuff.

I do like the button/led way as well, I have plans to make one switch take the whole server farm down. It won't be hard to do, it's just not on the top of the pile right now. ;-)
From: Ken [ date: 2001-02-12 ]
Love it, neat idea for idiot boxes.
From: Mirko Doelle <mdoelle(at)> [ date: 2001-02-12 ]
We published a much more advanced version in the german Linux Magazin 09/2000, you can find an (german) online version at:

It will also be published in an translated english version in the Linux Magazine March 2001 (Issue 6), will be probably online within a few weeks.

The advanced version I built has 5 keys and two LED (one dual LED) for status information, additionaly there is a control programm on our FTP-Server.

Have a lot of fun...
From: Larry Platzek <larryp(at)> [ date: 2001-02-22 ]
What will the correct site name be for updated english version be? ? If this is right it does not show it for March 2001
I just want to be sure I am looking in the right place or be informed
of the right place to look.
Thank you.
From: guido socher <guido(at)> [ date: 2001-03-07 ]
Hello Larry,
I have no clue where the English version will be but I can read the German
text and tell you that this version uses exactly the same mechanism but
checks 3 more input lines. In addition to CD it uses DSR, CTS and RI

All you need to do is use the code from this article and modify it where
it checks the button status and add an if statement.

Then you can act on these additional buttons. They use it to unmount
the cdrom and eject it.

I think I don't need that on my server because I would do that from remote
or I would just wait for the shutdown to complete. The cdrom is anyhow
unmounted during shutdown and all cdrom drives have an eject button
that will work once the disk is unmounted. This hardware presented in
my article is smaller and easier to install.

It't up to you. The cool thing about GPL software is that you can study
it understand it and modify it as you like.


On Tue, Mar 06, 2001, (Larry Platzek) wrote:
> Would it be possibl to get the updated article mentioned in the talk
> back section? The Linux Magizin did not put article online in english.
> --
> Larry Platzek
From: Gerald Waugh <gerald(at)> [ date: 2001-06-29 ]
Looks great.
I want to use the code to modify my APC power bakup unit, so I don't need to buy their $39.00 cable for Linux. I will use the standard serial cable.
From: Adriano Rocco <Adrianorocco(at)> [ date: 2001-08-20 ]
I hope nobody flames me ....but it would be nice if somebody could tell me where to find an app like this that works with Win9x
From: Rich Mason [ date: 2001-09-05 ]
This works great. Now all i need is to find one of those Dr Evil Style buttons switches with a lid. You know, the sort they use on the movies to start WWIII or launch missiles or other dramatic stuff. Anyone got any ideas where to get one?

From: Patrick Fikes <pfikes(at)> [ date: 2001-11-03 ]
I moved the standard ATX power plug jummper on the motherboard to the serial comm port 2 (pins 7-8) which are RTS and CTS. I set the RTS pin at initialization and read CTS to determine switch closure.

This set up requires no cable or button and is indistingushable from outside the computer. In several applications i moved the reset button to the power switch, to keep functionality.

Originally I modified the APCUPSD software to monitor and shut down the system via a button press. I did a system reboot if the button was pressed and released. I did a system halt if button was held for >5 seconds. The Halt command in init.d was changed to "halt -p". The enclosure speaker was used for feedback. For my application I had to hack out a lot of functioanlity. It could have served a shutdown out the local net. It did send out a shut down notice to all online users.

I am going to look through this software and see if it is a cleaner start to the same functionality.

Patick Fikes

From: Remi Suinot [ date: 2001-12-11 ]
Just for information (and for fun :)
I have create a similar project.

(page is in French)
From: Pete <petedahl(at)> [ date: 2002-01-03 ]
I use a Reiser file system on my firewall. I simply turn off
my machine like an appliance, there is no need to shutdown
properly. If the power goes out, there is never a need to fsck
the disk. It comes up ok every time. Your solution is still
needed for those times when the machine is hard to get to
physically (like in the attic).
From: lcdtastatur [ date: 2002-01-10 ]
the same on Parallelport with 15 keys and LCD

for under 25$

From: jeroen [ date: 2002-01-27 ]
I just made it and it works pretty fine
From: [ date: 2002-02-23 ]
dear sir
« if you can send me the usefull information that how can i member in your magizine»
I look forward to hearing from you soon.
Farshid Askari
From: markus <markus.bauer(at)> [ date: 2002-04-01 ]
ja is geil, werd ich auch mal bastln !
From: Axel <a.jacobs(at)> [ date: 2002-04-22 ]
We've created a CD burning and file sharing appliance for the research unit. The button is used to start the burning process (and for shut-down). The user guide is under, tech stuff under .
From: Peter Pfrang <peter.pfrang(at)> [ date: 2002-10-06 ]
I had a similar project (up to 7 Command Buttons):
regards peter
From: Simon [ date: 2002-10-21 ]
Even cooler, use a redunant button on the front of the computer (say a turbo button) and connect that to some junk inside the box. Much neater.

However I was thinking of using the parellel port; then your serials are left for controlling modems etc.
From: wweiradio <wweiradio(at)> [ date: 2002-10-25 ]
It is good.But do you know how to cope with your machine when it shows a "login:" on the screen without a keyboard?
I mean if we make a method to start linux box without requesting login,then we can make keyborad really unnecessary.
Is that right?
From: guido [ date: 2002-10-25 ]
Hi wweiradio,
you can disable console login prompt in /etc/inittab. But there
is no point doing this. It is good to have the login promt in case
you want to connect one day a keyboard to login locally instead of
remote login via ssh.

From: Tristan Shores <tristan(at)data911> [ date: 2003-01-30 ]
Are you aware of any retail products or design guides for graceful shutdown of Windows operating systems remotely thru the serial port??

From: indera <inderaramdin(at)hotmail> [ date: 2003-04-09 ]
i need the diagram and defination of the different parts of the computer.
From: Jürgen <djg(at)> [ date: 2003-06-20 ]
Very useful and good idea. I have sold this little electronics together, but i've a problem with the software.

i installed it under "debian":

cp /etc/init.d/sled
ln -s ../init.d/sled S99sled

But when i start the server it start also the "sled" and shuts it down in the same moment. I can't do anything.

please help me, what can i do?
my email is:

thanks a lot and 've a nice day ;)
greets Jürgen
From: Auda [ date: 2003-07-04 ]
I would check your wiring to the switch maybe you have it connected so that the switch is closed and so it shuts down instantly ?

From: Stefan Puschek <stefan<dot>puschek<at>t-online<dot>de> [ date: 2003-07-30 ]
It works just fine!!! But does anybody know something similar to shut down Novell Netware???


From: chris [ date: 2003-08-12 ]
This is why I like Linux. Nice little solution to the problem of running headless servers. Who wants to have to walk all the back to the office to do a shutdown.
From: Al R <alberor (at) ucia . gov> [ date: 2003-09-18 ]

Great tool! We run a lights-out, locked-up, server room and cannot get to the room within 5 minutes. If our air conditioning (10 ton unit) fails, the 320 Opteron processors only have a few minutes... I connected a thermostat as my "switch" and set it to trigger on 80F.

In fact, since most motherboards have two serial ports, you can run one thermostat at 75F on ttyS0 and send an email to warn of "warm condition". If the temp reaches 80F, the other instance of sled on ttyS1 will shut down the system.

Later we will incorporate lm-sensors to look for hotspots and fan failures. Till then, we have a great protective feature. Clusters do not last very long with two Opterons in a 1U formfactor and no AC!

Thanks again- Al

From: Dr. Cyber <Dr-Cyber(at)> [ date: 2003-10-08 ]
can you explain me how I can make this:

You must now manually create links from /etc/rc.d/rc3.d/S99sled
and /etc/rc.d/rc5.d/S99sled to /etc/rc.d/init.d/sled_rc

From: wweiradio <wweiradio(at)> [ date: 2003-10-10 ]
thanks guido .
i use open to run my application automatically without login;

hi Dr.Cyber

you can use:
$ ln -s /etc/rc.d/init.d/sled_rc /etc/rc.d/rc3.d/S99sled

$ ln -s /etc/rc.d/init.d/sled_rc /etc/rc.d/rc5.d/S99sled

good luck
From: Coen <vanhartingsveldt(at)> [ date: 2003-11-07 ]
ik begin net met het uitzoeken hoe bijv. een autotje kan laten rijden met m'n seriele poort.

Waar kan nog meer schakelingetjes vinden?
(Om m'n poort niet op te blazen, want dat is volgens mij best mogelijk als je het niet goed doet.)

From: Patrick <patrick(at)> [ date: 2003-12-09 ]
We used this circuit to mount two external buttons on a box that could be used to act as the same as two onscreen button (Okay and Cancel). In some applications we are unable to use the onscreen butttons so we wanted to be able to control the program with the external buttons. We have written the program to run on a PDA running a version of WindowsCE. Basically we look to see when the circuit is broken to execute the command. We are experiencing problems whereby the external buttons will cease to function or work intermittently. Sometimes we have to reboot. It's as if it stops responding. Not sure if you have any suggestions on the setup of this.

From: Vesqs <vesqs(at)> [ date: 2004-05-28 ]
I built the device inside the 9-pin serial connector case. I reliased that I dont need to have the switch connected all the time and now I only keep it connected, when I need my server to shut down.
Wonderful piece of hardware. Thanks
From: ashyak [ date: 2004-06-24 ]

for the windows freakz here, i have done it :-)
The normal Sled hardware (2 LEDs & 1 key) works with Windows 2000 and Windows XP.
The software is written in visual basic 6.
The features/usage are:
-put sled.exe in autostart
-when the pc boot up, a short jingle sounds through the pc speaker, for every tone the two LEDs flashes by turns.
-the green LED present the active key
-if you press the key, both both LEDs turn off, after a short while both LEDs turn on. Now you can press the key secondly and the system will shutdown. If you not press secondly the key, after a short while, only the green LED will show the active key.

I have no time to create a homepage, for more information or even the sourcecode/binaries, ask me in ICQ: --> 58840684


From: Martijn <martijn_at_nuonsolarteam_dot_com> [ date: 2004-06-29 ]
I am trying to get a 15-button print to work on my serial port. This scheme uses pins 1,6,8,9 for signals, ping 4 for voltage and 5 for power indication.
I would like to create/download a script in linux (preferrably written in bash) that monitors the ports status and assign commands to each of the 15 buttons. Most of them will be used to control an mp3 player, some for other functions. I would be pleased if someone could help me out.
From: bob [ date: 2005-02-15 ]
Simple and useful. Thanks!
From: chandrasekar <chandrasekar(at)> [ date: 2005-12-13 ]
Hi All,
I am running filesystem using Debian package. I want to disable the login. Can any one tell me how to disable the login, so that when the system boots, it should come to the bash prompt ?


From: Benjamin Schmidt [ date: 2006-04-22 ]
Only a big thank for your well written article!!
From: Henrique <ika_338(at)> [ date: 2006-07-17 ]
Hi there, nice project!
What line of the C code I need to change to get more time that 3seg?


From: Travis Hein <info(at)travnet(dot)org> [ date: 2006-08-06 ]
My second serial port was a header on the motherboard and was not being used. So I liberated the 25 pin D-SUB end from the serial ribbon with 10 pin header connector that came with my motherboard.

Then I wasn't too keen on drilling holes in my 2 U server.
Since the serial port header was near the expansion slot cover plates, I built the circuit onto a small punch board and cut holes in the blank expansion slot cover plate.

Aside from my handywork with the glue gun, it looks pretty slick. I guess this helps to make the switch sort of hidden too.

44 talkbacks in English
Other talkbacks:   Turkce Russian Italiano Francais

Due to the increased amount of web spam we have deciced to removed the talkback posting possibility. You can read old talkbacks but you can no longer post new ones.

Back to

Please contact webmaster(at) if you have any questions with regards to this talkback

lftalkback version 3.10