Yes.  A couple of steps are involved.  Please bear with me. 

1)  Ctrl-Alt-Delete should be bound to "exit logout" by default.
If not, in bindings.cfg, below the line that says "Aclass
KEYBINDINGS global", add a line that says:

KeyDown   CA   Delete exit logout

I think you then need to run restart from the menus to have this
change take effect.


2) In the Settings -> Session dialog,  Check both:

    [x] Enable Logout Dialog

and

    [x] Enable Reboot/Halt on Logout


This should cause Ctrl-Alt-Delete to open up an small window with
options to shutdown, reboot, etc.   You can also check this by
running "eesh exit logout" at the command prompt.  Be careful
though because if "Logout Dialog" is not checked then this will
instantly log you out.  If the Delete Key in the numeric keypad
does not work try the other Delete Key (for now).

3) Next, you have to ensure that a normal user can run the
commands for shutting down and rebooting.   The commands that e16
uses can be found by running "eesh show | grep reboot" and "eesh
show | grep halt".  You can change the programs it will call
with:

   $ eesh misc.session.cmd_reboot $REBOOT_CMD
   $ eesh misc.session.cmd_halt   $HALT_CMD

For example, I had to give this commands absolute paths to get
them to work.  The actual commands may be distro dependent.

Both techniques to allow a normal user to shutdown and reboot are
given here (suid & sudoers file):
http://linux.byexamples.com/archives/315/how-to-shutdown-and-reboot-without-sudo-password/


4) Finally, if you want the keypad delete key to work as well as
the normal delete key (if it doesn't already), you can use
xmodmap to map the key.  Run xev from a terminal window.
Press the keypad delete key and you should see something like:

KeyPress event, serial 32, synthetic NO, window 0x2800001,
    root 0x121, subw 0x0, time 18275900, (131,84), root:(1002,595),
    state 0x10, keycode 91 (keysym 0xffae, KP_Decimal), same_screen YES,
    XKeysymToKeycode returns keycode: 129
    XLookupString gives 1 bytes: (2e) "."
    XmbLookupString gives 1 bytes: (2e) "."
    XFilterEvent returns: False

What you are looking for is the keycode.  In the example above it
is 91.  Then create/edit ~/.Xmodmap and add the line:

keycode 91 = Delete

Run "xmodmap ~/.Xmodmap" to have this take effect.   Finally,
create a ~/.e16/Init directory and add a file called 10-xmodmap
that contains a script to run xmodmap:

#!/bin/bash

xmodmap $HOME/.Xmodmap

Make sure the script is executable:

    $ chmod a+x ~/.r16/Init/10-xmodmap

This will cause xmodmap to be run every time e16 starts.

You might not need all of these instructions but I tried to cover
all of the bases.  It is also possible to make a customized
window for logging out using a shell script that calls gtkdialog.

I made a submenu from the settings menu that gives me options to
shutdown, reboot, and logout.  I find that this gives me enough
safety without the annoyance of having to click through a window
every time.


Peace, James


Find a teacher, tame the roving mind, choose a lifestyle that
allows you to practice.
                                             -- Lojong Slogan

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to