0

I want to add a launcher icon to execute a shell script. The script has execute permissions for all users. I've created a file called wake.desktop in ~/.local/share/applications/:

[Desktop Entry]
Exec=gksudo /home/myuser/enablewake.sh
Icon=/home/myuser/icon1.png
Encoding=UTF-8
Terminal=true
Name=EnableWake
Type=Application

This is the script:

#!/bin/bash
# Enable Wake on IR for USB bus 3 port 1 (MCE Remote) 
echo enabled > /sys/bus/usb/devices/3-1/power/wakeup

Unfortunately there's no entry in my launcher. How can I get a shortcut to this shell script on my launcher?

2
  • OK I've added 'gksudo' to the Exec= (and removed the sudo from the script), and also added #!/bin/bash to the top of the shell script. Still nothing in the Launcher Dec 1 '17 at 22:07
  • (and removed the stray "." in the Exec command) Dec 1 '17 at 22:08
1

First, you should address the issues raised by @dessert. Once you have done that, open the Dash and search for "wake". It should appear and you can click-and-drag it to the launcher.

1
  • Thanks - I've managed to find it and click and drag it to the launcher Dec 1 '17 at 22:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.