1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

how to assign hotkeys to programs or bash scripts (desktop)?

Thu Mar 16, 2017 3:27 pm

hi,
how is it possible to assign hotkeys to programs or bash scripts in order to start them, which I have put on my desktop ?
e.g., ctrl+alt+F8, ctrl+alt+F10, alt+z, a.s.o. ?

User avatar
TracyLBaker
Posts: 39
Joined: Sat Feb 18, 2017 3:44 pm
Location: Phoenix, AZ

Re: how to assign hotkeys to programs or bash scripts (deskt

Thu Mar 16, 2017 4:14 pm

I've not done this, but it look likes it is explained well here:

http://www.epiguru.com/2012/06/how-to-c ... and-xvkbd/

and another explanation here:

http://unix.stackexchange.com/questions ... sh-scripts

Code: Select all

apt-cache search xbindkeys
and

Code: Select all

apt-cache search xbindkeys-config
both show the packages are available for the Pi.
Red Hat Academy Professor - Estrella Mountain Community College
5 Pi 3 Model B+s: 1 headless media/NFS/SMB server - Raspbian Jessie, 1 Kali Linux w/fruitywifi, 1 headless CentOS 7 webserver (Apache, SELinux, firewalld, autofs, etc...), 2 in waiting

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: how to assign hotkeys to programs or bash scripts (deskt

Fri Mar 17, 2017 11:35 am

thank you, I actually was hoping one could make an entry in kind of file properties as it works for Windows, renouncing the launch of extra programs running then in the background.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: how to assign hotkeys to programs or bash scripts (deskt

Fri Mar 17, 2017 12:21 pm

i changed only the [print] screen..and added the [Alt][print]
nano .config/openbox/lxde-pi-rc.xml

Code: Select all

    <keybind key="A-Print">
      <action name="Execute">
        <command>scrot -u Desktop/share/%Y-%m-%d_%H-%M-%S_snap.png</command>
      </action>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <command>scrot Desktop/share/%Y-%m-%d_%H-%M-%S_snap.png</command>
      </action>
    </keybind>
to start scrot and make pictures of screen or active window in my samba shared /Desktop/share/ dir.
i think this is the right place as there you will find what key is used already??

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: how to assign hotkeys to programs or bash scripts (deskt

Sat Mar 18, 2017 8:24 am

thank you, I will also consider that, although I must admit that this openbox solution is also far more complicated than I expected a solution to be. Just an entry in the file properties itself would be the most convenient solution, but I see that this not available for Jessie.

User avatar
scruss
Posts: 1768
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: how to assign hotkeys to programs or bash scripts (deskt

Sat Mar 18, 2017 2:17 pm

Yes, OpenBox/LXDE are pretty lightweight systems, so editing files it has to be.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 29 guests