Ending LXDE by Keyboard

Please post all general support questions for LXDE here.
wieselflink
Posts: 5
Joined: Thu May 14, 2009 11:18 am

Ending LXDE by Keyboard

Postby wieselflink » Wed Apr 11, 2012 8:35 am

Hi,

maybe a simple question ad somebody can tell / write / give me the necessary key-stroke :?:

I simply want to end LXDE & shutdown the computer

- NOT - by moving the mouse to the little red button in the right lower corner and press this button !

i want to end LXDE - by typing a key-stroke - that makes the same as if i move the mouse to the red little button and decide - in German - Ausschalten - which means - shutdown the computer, because everything is done. . . . .

Any hints ? - Thanks :P

rockdoctor
Posts: 116
Joined: Tue Nov 11, 2008 4:51 pm

Re: Ending LXDE by Keyboard

Postby rockdoctor » Wed Apr 11, 2012 9:53 pm

Since the logout icon on my system executes /usr/bin/lxde-logout, which is a shell script containing a single line:

Code: Select all

lxsession-logout --banner "/usr/share/pixmaps/fedora-logo-small.png" --side=top

You could create an openbox keyboard shortcut to execute either program.
Geology - It's not rocket science, it's rock science!

wieselflink
Posts: 5
Joined: Thu May 14, 2009 11:18 am

Re: Ending LXDE by Keyboard

Postby wieselflink » Thu Apr 12, 2012 9:07 am

Hi and good morning from a sunny Schmidhofen in the deep-south-west corner of Germany 8-)
where France ( the so called mountains Vogesen for nice free paragliding - vol libre - called in france language are only ~ 60 km ) and Swiss ( for making money ~ 55 km ) are very, very near :P

Thanks for the simple line :!:

It´s better than to do it until now and so i will " install " this little icon/script on my desktop :-)

If anybody knows a keyboard combination to shutdown directly - thanks in advance

Sorry for my spelling i hope everybody can read it :?:

M_Mynaardt
Posts: 72
Joined: Wed Dec 15, 2010 9:37 pm
Location: Victoria, BC, Canada

Re: Ending LXDE by Keyboard

Postby M_Mynaardt » Thu Apr 12, 2012 1:07 pm

wieselflink wrote:Hi and good morning from a sunny Schmidhofen in the deep-south-west corner of Germany 8-)
where France ( the so called mountains Vogesen for nice free paragliding - vol libre - called in france language are only ~ 60 km ) and Swiss ( for making money ~ 55 km ) are very, very near :P

Thanks for the simple line :!:

It´s better than to do it until now and so i will " install " this little icon/script on my desktop :-)

If anybody knows a keyboard combination to shutdown directly - thanks in advance

Sorry for my spelling i hope everybody can read it :?:


Your English is fine; it's my first language and I know it's a bit of a tricky language at times!

I'm interested in that command to shut down LXDE with a simple hot-key thing. But I need to look to see how to add a hot-key in the Open Box file; I've only done that once or twice and I know you have to be very careful with that file so you don't make a mess of things!

What I want to do is be able to hit "Alt-X" to bring up the log off menu. I like using hot-key combinations for common tasks like that. I'll try to look in my notes on how to add a hot-key combination to the Openbox file so I remember how that's done (safely).

Additional - I don't know how my last post got posted, like SIX times. Copies have been deleted!
:roll:
~*~ M_Mynaardt ~*~

LXDE is your computer's Friend!
Always trust LXDE!

M_Mynaardt
Posts: 72
Joined: Wed Dec 15, 2010 9:37 pm
Location: Victoria, BC, Canada

Re: Ending LXDE by Keyboard

Postby M_Mynaardt » Fri Apr 13, 2012 5:47 pm

I got it figured out! I'm so clever I should be twins! Or something along those lines...
8-)

But anyway...

I managed to set up my keyboard to start the log out menu with the following hot-key combination; Ctrl+Alt+x

This executes the app "lxsession-logout"

Now in order to make this work, you have to go into ~/.config/openbox folder. Then open the folder named "[distro]-rc.xml". And be very careful with this one, because it's easy to mess up things if you make a mistake or two!

Next, find the keyboard area to set hot keys. It's between the markers <keyboard> and </keyboard>

I used the following code to set the hot-key as I want it:

Code: Select all

    <!-- Ctrl-Alt-x to execute the logout command -->
    <keybind key="C-A-x">
      <action name="Execute">
        <command>lxsession-logout</command>
      </action>
    </keybind>


I could have used the command shutdown instead of lxsession-logout. However, that would shut the computer down immediately and I'd run the risk of being careless and closing an app before saving my work. But you should be able to use the shutdown command, I should think. I just like to err on the side of caution.

If you want to find more information on customizing your hot-keys and all that, I found this helpful site on this topic;
http://en.gentoo-wiki.com/wiki/Openbox#Create_custom_keyboard_shortcuts

Hope that's helpful! I used this sort of thing to add hot-keys to my Lubuntu set-up so that I have hot-keys to start my browser, email client, text editor, and to lock my screen.

If it makes any difference, I did this in Lubuntu. The commands might differ with distros not built on Ubuntu.

Enjoy!
:ugeek:
~*~ M_Mynaardt ~*~

LXDE is your computer's Friend!
Always trust LXDE!


Return to “General Help”

Who is online

Users browsing this forum: No registered users and 4 guests