LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   help having xbindkeys working at the login screen... (https://www.linuxquestions.org/questions/linux-software-2/help-having-xbindkeys-working-at-the-login-screen-4175580014/)

masavini 05-17-2016 11:34 AM

help having xbindkeys working at the login screen...
 
hi,
i installed linux mint (17.3 - cinnamon edition) on an intel nuc and use it as media player...
during installation i encrypted the home folder for better privacy.
i also installed lirc to control the pc with an ir remote, and it perfectly works.

the final step is try to login using the tv remote.
i installed xdotool and created a script to type the pwd chars and "enter". the script is in /usr/local/bin, so it is readable before login (with the home folder still encrypted).
then i installed xbindkeys and set up a tv remote shortcut to call the xdotool script and enter the password.

at this point, i can't have xbindkeys working at the login screen.
i tried and add it to crontab of both regular and root users with:
Code:

@reboot /usr/bin/xbindkeys -f /etc/xbindkeys
but i guess it tries to start too early, when X is not set yet.

so i tried and mess with /etc/init/mdm.conf, but no result...

do you have any suggestion?

Habitual 05-17-2016 12:04 PM

Try
Code:

/usr/bin/xbindkeys -f /etc/xbindkeys
in /etc/rc.local ?

Just like you see it.

masavini 05-17-2016 12:18 PM

just done... does not work at the login screen nor after the login (if i type the shortcut in a text editor, i can't see the password).
if i run xbindkeys after the login, i can see the password typed in the text editor on shortcut press...

masavini 05-17-2016 12:32 PM

i tried and hook xbindkeys into /etc/mdm/PreSession/Default: the shortcut won't work at the login screen, but will work after the login.

masavini 05-17-2016 02:00 PM

bingo!

found the right hook in /etc/mdm/Init/Default: just added
Code:

DISPLAY=:0 /usr/bin/xbindkeys -f /etc/xbindkeys
at the end of the file, before "exit 0"...
now the shortcut works at the login screen, as well!

Habitual 05-17-2016 02:13 PM

Good job and Well done!


All times are GMT -5. The time now is 08:51 PM.