Score:1

How to make shortcut for .sh file?

in flag

I have a file called RunRoR.sh i have enabled it to be executed and run as a software but when i double click it it doesn't do anything so in order to run it i have to do

~$ sh RunRoR.sh

Can i create a short cut or something?

Score:2
mx flag

You could create a .desktop file and place it into ~/.local/share/applications it would then appear in the searchable applications list.

Create the file: nano ~/.local/share/applications/RunRoR.desktop

Paste inside:

[Desktop Entry]
Name=RunRoR
Comment=Runs RunRoR.sh
Exec=sh ~/RunRoR.sh
Path=~
Icon=~/RunRoR.ico

Terminal=false
Type=Application
Categories=Utility;

Name is what will show up in the applications list.

Comment is just a description to help identify it.

Exec is the command that will be run.

Path is an optional working directory.

Icon is an optional icon file, remove this line if you don't have one.

Terminal specifies whether the command will run in a terminal window.

Type helps categorise the application in the type of .desktop file.

Categories is a list of applicable categories to help categorise the shortcut.

If your script generates output you want to see, then you could instead have the .desktop file launch a terminal and run the command, use the below exec command: Exec=gnome-terminal -t RunRoR --hide-menubar -- sh ~/RunRoR.sh

N0rbert avatar
zw flag
If RoR is Ruby on Rails, then `Terminal=true` would be useful to watch logs.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.