Using key binding to launch application or folder
Posted 21 August 2012 - 07:02 AM
To the point: Running 2.0.1 Bodhi as HTPC with PC remote. Would like to assign remote buttons to specific apps. In key binding editor, can choose "command" \ "application" in right column, but do not know what command to put in. Please, could someone provide an explicit and working example for a command for opening an application, and another for opening a folder? I've been tearing the google inside out, trying to find a simple answer (not a reference to a script the size of the new testament supposedly holding somewhere an example), to no avail.
Remote is actually recognized on the system (Asus 701 4G) as wireless keyboard and mouse so key binding works in general (for "Close window", "Show desktop", etc.).
And now to the compliments: Thanks Bodhi developers for creating what I find as the most attractive novice-friendly linux! Just love it! Tried it both on tablet and desktop, works great on both!
Thanks so much,
Posted 21 August 2012 - 07:44 AM
For pcmanfm -> "any key binding you want for" -> choose command in right & just keep in parameters :usr/bin/pcmanfm
For me & a folder; I bookmark it in pcmanfm with its own name...
Posted 21 August 2012 - 10:01 AM
EDIT: When I first posted this I couldn't find an option in pcmanfm to open a particular directory, but I've since figured out a way to do it. In the 'Command' input box on the Key Bindings screen (from the linked directions above) put something like 'cd /home/<username>/school/chemistry && pcmanfm' replacing the path to the directory with the one you actually want opened.
As far as commands for other applications, probably your best bet is to open a terminal and start typing what you think is probably the name of the command (usually they're pretty obvious) and then hit Tab twice. For instance, for Firefox type 'firef<Tab><Tab>'. If there's only one match it will autocomplete after hitting Tab the first time and that's the name of the command you want. If there's more than one match the second Tab will list all the possible matches, then you can complete it and hit Enter to make sure it opens the program you want. Type that command into the Command input in Key Bindings.
Posted 21 August 2012 - 05:43 PM
Perhaps it has to do with the fact the physical keyboard on the netbook is very compact - many keys with multi function, somehow messes the binding editor good intentions...
Thanks for the elaborated explanations Mark!
Posted 21 August 2012 - 11:17 PM
Also, for pcmanfm, like many programs, you can put the file (in this case a directory) that you want to open directly after the command -- ie:
pcmanfm /home/rootand it will open it.
Posted 22 August 2012 - 08:08 AM
There's a bug not allowing typing into the command keybindings. Is that what's happening to you?
Also, for pcmanfm, like many programs, you can put the file (in this case a directory) that you want to open directly after the command -- ie:pcmanfm /home/rootand it will open it.
Thanks, I saw the bug not allowing to write a command - I write in leaf and c&p into the field.
Posted 22 August 2012 - 08:16 AM
1. Task: to configure PC remote buttons on this remote [link], to work as desired on a linux machine, and specifically on Bodhi Linux (which I think is the most suitable for an HTPC).
2. As one user kindly explains in the aforementioned link, this remote is actually not a remote at all, and does not work with LIRC. It is recognized on the system as a wireless keyboard and mouse. Buttons send keyboard keys combinations.
3. This is a great advantage, since you can avoid installing LIRC and use the Bodhi Linux key binding editor to set buttons.
4. Avoid being in NumLock while editing buttons. To make sure, open the key binding editor, press Add, then press Left on the remote (marked with "4ghi"). If you are NOT on NumLock, you should see in the editor a new line on the left culomn that reads "Left". If instead you get a line that reads "G", you are still on NumLock. Press Numlock again, longer, repeat the check, untill the Left button is recognized as "Left". Unverified hypothesis: The Remote's "NumLock" is not a numlock at all - it's actually an internal switch, affecting the remote but not the computer. Changes what IR signal is sent. The button is not recognized at all by the key binding editor. Just a speculation - didn't want to get off the sofa and check : )
5. If you have more than one keyboard layout on the system (e.g., Hebrew and English), make sure you are on English while setting buttons. The settings will be "forgotten" once you finish working with the binding editor and change to another keyboard layout. You need to set the buttons again for each layout - or just make sure you're in English as a default (this is what I do - didn't have the patience to do the whole process again)
6. For some reason, not every button can be assigned to every function. The button for the default browser (Explorer icon), I managed to assign only to Midori - the pre-installed browser on Bodhi Linux. The mail button could be assigned to Opera. Some buttons are recognized as multimedia buttons - they are the "limitted" ones. When the button is recognized as "alt + F", for example, or any "natural" (non-multimedia) combination, it can be assigned to everything you choose to assign it to.
7. Unverified hypothesis: don't try to assign functions to remote buttons while a proper wireless keyboard is attached to the machine.
8. See above posts for details on making a button launch a program.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users