Every time I want to run a .sh file, Ubuntu asks whether I want to Run in Terminal/Display/Run it. Is there a way to set default action for some sh files?
-- I am using Ubuntu 12.04 without any special changes.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityOpen Nautilus, then go to Edit -> Preferences. Open Behavior
tab and you'll find the options to set the file manager behavior when you open executable text files.
remember action for this file
?
Jul 27, 2012 at 14:49
Making each .desktop
files for Run in Terminal or Display or Run , you can set default action for each sh files.
Execute authority is given to each .desktop files.
Filename : sample-term.desktop
[Desktop Entry]
Type=Application
Name=Run in terminal
Exec='/fullpath_to_script/sample1.sh'
Terminal=true
Click this file, it will be able to run sample1.sh in terminal.
Filename : sample-edit.desktop
[Desktop Entry]
Type=Application
Name=Edit script
Exec=gedit '/fullpath_to_script/sample2.sh'
Terminal=false
Click this file, it will be able to edit sample2.sh by gedit
.
Filename : sample-run.desktop
[Desktop Entry]
Type=Application
Name=Run script
Exec='/fullpath_to_script/sample3.sh'
Terminal=false
Click this file, it will be able to run sample3.sh.