pepe-aravaca
December 26th, 2014, 01:08 PM
PROBLEM:
I want a shell script to be lauched whenever a specific key combination is pressed (e.g.: "<Ctrl>/") but I can NOT get it work :cry:
ENVIRONMENT:
It is an old computer running Ubuntu Lucid 10.04 and Gnome-session 2.30.0 and a 2.6.32-26-generic kernel. It shows a very limited gnome desktop lauched as user "usuario" so it is configured with a remote console.
DONE SO FAR:
From the console as user "ususario":
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_10 "<Ctrl>/"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_10 "/usr/bin/test18.sh"
Contents of /usr/bin/test18.sh (permits are 755):
#!/bin/bash
sleep 1
LANG="en.UTF-8"
echo "OK" > /home/usuario/result.out
RESULT OF TESTS:
The test file /home/usuario/result.out is not created when the key combination "Ctrl" and "/" are pressed simultanously, but the script works when launched from the console.
QUESTION:
What am I missing? :confused:
Thanks in advance.
I want a shell script to be lauched whenever a specific key combination is pressed (e.g.: "<Ctrl>/") but I can NOT get it work :cry:
ENVIRONMENT:
It is an old computer running Ubuntu Lucid 10.04 and Gnome-session 2.30.0 and a 2.6.32-26-generic kernel. It shows a very limited gnome desktop lauched as user "usuario" so it is configured with a remote console.
DONE SO FAR:
From the console as user "ususario":
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_10 "<Ctrl>/"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_10 "/usr/bin/test18.sh"
Contents of /usr/bin/test18.sh (permits are 755):
#!/bin/bash
sleep 1
LANG="en.UTF-8"
echo "OK" > /home/usuario/result.out
RESULT OF TESTS:
The test file /home/usuario/result.out is not created when the key combination "Ctrl" and "/" are pressed simultanously, but the script works when launched from the console.
QUESTION:
What am I missing? :confused:
Thanks in advance.