Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It might be possible to assign a function key to a macro but I'd go with shivaa alias or make a script.
I think the thread starter's problem is that the screen goes dark. You can't do anything useful with scripts or aliases when your screen is blank, because you don't even know if your terminal window has focus while your are typing. If there actually is an open terminal window in the first place ...
That may be true. I assumed the lamp going out on a terminal would have little effect on keys pressed. If it went into some other fault then we can't guess.
I'd think about setting the power button to do a graceful shutdown if possible. Laptops may not have full support for acpi or apm to do this.
CTRL-ALT-DEL works even when not logged in. I use it to shutdown after logging off all users.
Magic-sysreq is meant for developers who hang their machines. It is very low level, and is not easy to use.
If magic-sysreq is compiled into the kernel (it is not on Slackware), then the appropriate key presses are (you cannot do this with one hand, and is difficult even with two hands):
Alt+SysReq+e : end all processes
Alt+SysReq+i : kill all processes
Alt+SysReq+s : sync
Alt+SysReq+u : unmount
Alt+SysReq+o : shutdown computer
Last edited by selfprogrammed; 07-09-2013 at 07:04 PM.
many many thanks for all the hints and the tipps. GREAT to hear that.
Quote:
Originally Posted by joe_2000
I think the thread starter's problem is that the screen goes dark. You can't do anything useful with scripts or aliases when your screen is blank, because you don't even know if your terminal window has focus while your are typing. If there actually is an open terminal window in the first place ...
you hit the point. this is the problem. i would benefit with / through a shortcut that resets the whole system.
probably the notebook does not support those WAYS OF rebooting.
but i will dig deeper into all the hints you and all the great supporters made.
I think the easiest thing would be to create a script to shut down the machine, something like "sudo shutdown -h now", after making the proper modifications to the sudoers file to allow you to run shutdown without a password.
Then you can use your desktop environment's tools to assign a specific keyboard combination to that script, something like ctrl+alt+s. If you can't find or don't like the DE's keyboard shortcut GUI, you can always use xbindkeys instead.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.