How to execute a script just by double clicking like .EXE files in Windows?
up vote
101
down vote
favorite
How can I make a bash script executable by double clicking just like .exe
files in Windows? I tried creating a launcher and assigning the script to it, but there are two consequences:
- the terminal twinkles, disappears, and nothing is done.
- you must specify to run in terminal in order to work.
I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.
Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?
launcher scripts executable
add a comment |
up vote
101
down vote
favorite
How can I make a bash script executable by double clicking just like .exe
files in Windows? I tried creating a launcher and assigning the script to it, but there are two consequences:
- the terminal twinkles, disappears, and nothing is done.
- you must specify to run in terminal in order to work.
I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.
Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?
launcher scripts executable
I think you may just be writing your desktop file poorly. Can you post (verbatim) the .desktop launcher that you wrote?
– Jjed
May 18 '12 at 15:25
Also, have you seen this? askubuntu.com/q/34597/24694
– Jjed
May 18 '12 at 15:27
Its just a launcher where you assign name and command to do its not that big idea
– user61928
May 19 '12 at 6:38
Also note, that scripts in linux are not called bash but shell afaik.
– cauon
Oct 5 '12 at 8:58
3
muru tipped me off to this, worked for me: askubuntu.com/questions/286621/…
– draoi
Nov 16 '15 at 23:56
add a comment |
up vote
101
down vote
favorite
up vote
101
down vote
favorite
How can I make a bash script executable by double clicking just like .exe
files in Windows? I tried creating a launcher and assigning the script to it, but there are two consequences:
- the terminal twinkles, disappears, and nothing is done.
- you must specify to run in terminal in order to work.
I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.
Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?
launcher scripts executable
How can I make a bash script executable by double clicking just like .exe
files in Windows? I tried creating a launcher and assigning the script to it, but there are two consequences:
- the terminal twinkles, disappears, and nothing is done.
- you must specify to run in terminal in order to work.
I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.
Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?
launcher scripts executable
launcher scripts executable
edited Apr 13 '17 at 12:23
Community♦
1
1
asked May 18 '12 at 12:37
user61928
I think you may just be writing your desktop file poorly. Can you post (verbatim) the .desktop launcher that you wrote?
– Jjed
May 18 '12 at 15:25
Also, have you seen this? askubuntu.com/q/34597/24694
– Jjed
May 18 '12 at 15:27
Its just a launcher where you assign name and command to do its not that big idea
– user61928
May 19 '12 at 6:38
Also note, that scripts in linux are not called bash but shell afaik.
– cauon
Oct 5 '12 at 8:58
3
muru tipped me off to this, worked for me: askubuntu.com/questions/286621/…
– draoi
Nov 16 '15 at 23:56
add a comment |
I think you may just be writing your desktop file poorly. Can you post (verbatim) the .desktop launcher that you wrote?
– Jjed
May 18 '12 at 15:25
Also, have you seen this? askubuntu.com/q/34597/24694
– Jjed
May 18 '12 at 15:27
Its just a launcher where you assign name and command to do its not that big idea
– user61928
May 19 '12 at 6:38
Also note, that scripts in linux are not called bash but shell afaik.
– cauon
Oct 5 '12 at 8:58
3
muru tipped me off to this, worked for me: askubuntu.com/questions/286621/…
– draoi
Nov 16 '15 at 23:56
I think you may just be writing your desktop file poorly. Can you post (verbatim) the .desktop launcher that you wrote?
– Jjed
May 18 '12 at 15:25
I think you may just be writing your desktop file poorly. Can you post (verbatim) the .desktop launcher that you wrote?
– Jjed
May 18 '12 at 15:25
Also, have you seen this? askubuntu.com/q/34597/24694
– Jjed
May 18 '12 at 15:27
Also, have you seen this? askubuntu.com/q/34597/24694
– Jjed
May 18 '12 at 15:27
Its just a launcher where you assign name and command to do its not that big idea
– user61928
May 19 '12 at 6:38
Its just a launcher where you assign name and command to do its not that big idea
– user61928
May 19 '12 at 6:38
Also note, that scripts in linux are not called bash but shell afaik.
– cauon
Oct 5 '12 at 8:58
Also note, that scripts in linux are not called bash but shell afaik.
– cauon
Oct 5 '12 at 8:58
3
3
muru tipped me off to this, worked for me: askubuntu.com/questions/286621/…
– draoi
Nov 16 '15 at 23:56
muru tipped me off to this, worked for me: askubuntu.com/questions/286621/…
– draoi
Nov 16 '15 at 23:56
add a comment |
9 Answers
9
active
oldest
votes
up vote
118
down vote
I tested this and it worked fine. Ensure your script begins with the correct hash-bang, e.g. #!/bin/bash
Then follow these steps:
Hit Alt+F2, type dconf-editor
and hit Enter.
In dconfg-editor goto: org ➤ gnome ➤ nautilus ➤ preferences
Click on executable-text-activation
and from drop down menu select:
launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.
Close dconf-editor. Thats it!
Source: How do I run executable scripts in Nautilus?
Answer courtesy of Basharat Sial.
Update
You also need to change permission of file. Right click and set "Allow executing file as program"
This worked great. Just a note, the "drop down menu" is reached by clicking on the value listed to the right ofexecutable-text-activation
(default value isdisplay
).
– ryanjdillon
Aug 14 '13 at 10:50
3
for those who cannot call the app, you need to install it first withsudo apt-get install dconf-editor
– whale_steward
Mar 14 '15 at 6:35
1
This works everywhere except on the Desktop. How can I make it work on the Desktop as well? I'm using Xubuntu 14.10.
– shrx
Mar 28 '15 at 17:17
Is there a way to do this in LXDE (for Lubuntu)?
– childofsoong
May 2 '15 at 20:05
This works great under slax unix to -- see slax.org for the really great Unix system you can boot off of a thumb drive.
– raddevus
Dec 5 '15 at 22:42
|
show 5 more comments
up vote
66
down vote
On the newer versions, on nautilus (files), go to Edit > preferences > Behaviour tab > and change the settings for executable text file.
3
Now 'Files -> Preferences'. (17.04)
– niry
Sep 27 '17 at 20:23
Sweet! The way to go imho.
– codepleb
Oct 12 '17 at 6:11
How to see output ?
– Amr Lotfy
Aug 29 at 1:00
add a comment |
up vote
8
down vote
In Ubuntu and all Unix based OSes, afaik, nothing is set as executable by default. There are two ways of doing this.
Right click on the script or file you want to execute. Go to Properties then to the Permissions Tab. Click the check box that says Execute.
Open a Terminal
cd
into the directory where the file is found. Typechmod ugo+x filename
. This will set the file to execute.
Now your users can double click to their hearts content.
2
It still will ask you what to do with run in terminal or display or run ... So its not what i need
– user61928
May 19 '12 at 6:34
Only this answer worked on Gnome Ubuntu 17.04 for making desktop file executeable
– Kunok
Apr 14 '17 at 21:06
add a comment |
up vote
3
down vote
I think creating a *.desktop file is missing here:
$ cat shortcut-for-my-script.desktop
[Desktop Entry]
Type=Application
Terminal=true
Name=Click-Script
Icon=utilities-terminal
Exec=gnome-terminal -e "bash -c './script.sh;$SHELL'"
Categories=Application;
If you create more than one *.desktop file for one script you are able to create multiple configurations by passing different parameters, which is a very comfortable and user-friendly way.
add a comment |
up vote
3
down vote
If you're using XFce then you can make script executed in Thunar by executing this command:
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default
--create --type bool --set true
or by using gui xfce4-settings-editor
and creating the same property
add a comment |
up vote
1
down vote
You have to check 3 points :
- Nautilus / Nemo configuration : https://askubuntu.com/a/286651/301025
- The script file must be executable: https://askubuntu.com/a/275714/301025
The file system must allow execution :
- Type
mount
in a console - Check if your file system has the
noexec
flag - Remove the
noexec
flag by editing/etc/fstab
and remount the modified system (eg. a reboot works)
- Type
add a comment |
up vote
0
down vote
When you create a launch in Desktop to a SHEL script or Whatever, in command line, don't forget to signal the script, to be executed in background.
The script will die when he finished is job.
1
i did that but what prob is the terminal just twinkles and nothing happens
– user61928
May 19 '12 at 6:36
add a comment |
up vote
0
down vote
Based on umask
defualt value, you haven't execute permissions for files by default and must change mod to gain execute permissions, something like this:
chmod u+x filename
1
Broth Ali sure i did it its obvious to do that
– user61928
May 19 '12 at 6:35
add a comment |
up vote
-1
down vote
Specially for Android Studio You can follow my original answer here:
To Create Desktop Launcher:
- Click on
Create Desktop Entry..
from Tools menu.
It will be prompt for password, enter password of your current login.
Finally it will be display notification in Android Studio screen like:
- You can see in Applications => Programming => Android Studio, and you may see on desktop also after restarting system.
Thank you. :)
add a comment |
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
118
down vote
I tested this and it worked fine. Ensure your script begins with the correct hash-bang, e.g. #!/bin/bash
Then follow these steps:
Hit Alt+F2, type dconf-editor
and hit Enter.
In dconfg-editor goto: org ➤ gnome ➤ nautilus ➤ preferences
Click on executable-text-activation
and from drop down menu select:
launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.
Close dconf-editor. Thats it!
Source: How do I run executable scripts in Nautilus?
Answer courtesy of Basharat Sial.
Update
You also need to change permission of file. Right click and set "Allow executing file as program"
This worked great. Just a note, the "drop down menu" is reached by clicking on the value listed to the right ofexecutable-text-activation
(default value isdisplay
).
– ryanjdillon
Aug 14 '13 at 10:50
3
for those who cannot call the app, you need to install it first withsudo apt-get install dconf-editor
– whale_steward
Mar 14 '15 at 6:35
1
This works everywhere except on the Desktop. How can I make it work on the Desktop as well? I'm using Xubuntu 14.10.
– shrx
Mar 28 '15 at 17:17
Is there a way to do this in LXDE (for Lubuntu)?
– childofsoong
May 2 '15 at 20:05
This works great under slax unix to -- see slax.org for the really great Unix system you can boot off of a thumb drive.
– raddevus
Dec 5 '15 at 22:42
|
show 5 more comments
up vote
118
down vote
I tested this and it worked fine. Ensure your script begins with the correct hash-bang, e.g. #!/bin/bash
Then follow these steps:
Hit Alt+F2, type dconf-editor
and hit Enter.
In dconfg-editor goto: org ➤ gnome ➤ nautilus ➤ preferences
Click on executable-text-activation
and from drop down menu select:
launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.
Close dconf-editor. Thats it!
Source: How do I run executable scripts in Nautilus?
Answer courtesy of Basharat Sial.
Update
You also need to change permission of file. Right click and set "Allow executing file as program"
This worked great. Just a note, the "drop down menu" is reached by clicking on the value listed to the right ofexecutable-text-activation
(default value isdisplay
).
– ryanjdillon
Aug 14 '13 at 10:50
3
for those who cannot call the app, you need to install it first withsudo apt-get install dconf-editor
– whale_steward
Mar 14 '15 at 6:35
1
This works everywhere except on the Desktop. How can I make it work on the Desktop as well? I'm using Xubuntu 14.10.
– shrx
Mar 28 '15 at 17:17
Is there a way to do this in LXDE (for Lubuntu)?
– childofsoong
May 2 '15 at 20:05
This works great under slax unix to -- see slax.org for the really great Unix system you can boot off of a thumb drive.
– raddevus
Dec 5 '15 at 22:42
|
show 5 more comments
up vote
118
down vote
up vote
118
down vote
I tested this and it worked fine. Ensure your script begins with the correct hash-bang, e.g. #!/bin/bash
Then follow these steps:
Hit Alt+F2, type dconf-editor
and hit Enter.
In dconfg-editor goto: org ➤ gnome ➤ nautilus ➤ preferences
Click on executable-text-activation
and from drop down menu select:
launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.
Close dconf-editor. Thats it!
Source: How do I run executable scripts in Nautilus?
Answer courtesy of Basharat Sial.
Update
You also need to change permission of file. Right click and set "Allow executing file as program"
I tested this and it worked fine. Ensure your script begins with the correct hash-bang, e.g. #!/bin/bash
Then follow these steps:
Hit Alt+F2, type dconf-editor
and hit Enter.
In dconfg-editor goto: org ➤ gnome ➤ nautilus ➤ preferences
Click on executable-text-activation
and from drop down menu select:
launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.
Close dconf-editor. Thats it!
Source: How do I run executable scripts in Nautilus?
Answer courtesy of Basharat Sial.
Update
You also need to change permission of file. Right click and set "Allow executing file as program"
edited Nov 27 at 12:18
Vikramaditya Kukreja
34
34
answered Jun 8 '13 at 20:23
stevenmc
1,304178
1,304178
This worked great. Just a note, the "drop down menu" is reached by clicking on the value listed to the right ofexecutable-text-activation
(default value isdisplay
).
– ryanjdillon
Aug 14 '13 at 10:50
3
for those who cannot call the app, you need to install it first withsudo apt-get install dconf-editor
– whale_steward
Mar 14 '15 at 6:35
1
This works everywhere except on the Desktop. How can I make it work on the Desktop as well? I'm using Xubuntu 14.10.
– shrx
Mar 28 '15 at 17:17
Is there a way to do this in LXDE (for Lubuntu)?
– childofsoong
May 2 '15 at 20:05
This works great under slax unix to -- see slax.org for the really great Unix system you can boot off of a thumb drive.
– raddevus
Dec 5 '15 at 22:42
|
show 5 more comments
This worked great. Just a note, the "drop down menu" is reached by clicking on the value listed to the right ofexecutable-text-activation
(default value isdisplay
).
– ryanjdillon
Aug 14 '13 at 10:50
3
for those who cannot call the app, you need to install it first withsudo apt-get install dconf-editor
– whale_steward
Mar 14 '15 at 6:35
1
This works everywhere except on the Desktop. How can I make it work on the Desktop as well? I'm using Xubuntu 14.10.
– shrx
Mar 28 '15 at 17:17
Is there a way to do this in LXDE (for Lubuntu)?
– childofsoong
May 2 '15 at 20:05
This works great under slax unix to -- see slax.org for the really great Unix system you can boot off of a thumb drive.
– raddevus
Dec 5 '15 at 22:42
This worked great. Just a note, the "drop down menu" is reached by clicking on the value listed to the right of
executable-text-activation
(default value is display
).– ryanjdillon
Aug 14 '13 at 10:50
This worked great. Just a note, the "drop down menu" is reached by clicking on the value listed to the right of
executable-text-activation
(default value is display
).– ryanjdillon
Aug 14 '13 at 10:50
3
3
for those who cannot call the app, you need to install it first with
sudo apt-get install dconf-editor
– whale_steward
Mar 14 '15 at 6:35
for those who cannot call the app, you need to install it first with
sudo apt-get install dconf-editor
– whale_steward
Mar 14 '15 at 6:35
1
1
This works everywhere except on the Desktop. How can I make it work on the Desktop as well? I'm using Xubuntu 14.10.
– shrx
Mar 28 '15 at 17:17
This works everywhere except on the Desktop. How can I make it work on the Desktop as well? I'm using Xubuntu 14.10.
– shrx
Mar 28 '15 at 17:17
Is there a way to do this in LXDE (for Lubuntu)?
– childofsoong
May 2 '15 at 20:05
Is there a way to do this in LXDE (for Lubuntu)?
– childofsoong
May 2 '15 at 20:05
This works great under slax unix to -- see slax.org for the really great Unix system you can boot off of a thumb drive.
– raddevus
Dec 5 '15 at 22:42
This works great under slax unix to -- see slax.org for the really great Unix system you can boot off of a thumb drive.
– raddevus
Dec 5 '15 at 22:42
|
show 5 more comments
up vote
66
down vote
On the newer versions, on nautilus (files), go to Edit > preferences > Behaviour tab > and change the settings for executable text file.
3
Now 'Files -> Preferences'. (17.04)
– niry
Sep 27 '17 at 20:23
Sweet! The way to go imho.
– codepleb
Oct 12 '17 at 6:11
How to see output ?
– Amr Lotfy
Aug 29 at 1:00
add a comment |
up vote
66
down vote
On the newer versions, on nautilus (files), go to Edit > preferences > Behaviour tab > and change the settings for executable text file.
3
Now 'Files -> Preferences'. (17.04)
– niry
Sep 27 '17 at 20:23
Sweet! The way to go imho.
– codepleb
Oct 12 '17 at 6:11
How to see output ?
– Amr Lotfy
Aug 29 at 1:00
add a comment |
up vote
66
down vote
up vote
66
down vote
On the newer versions, on nautilus (files), go to Edit > preferences > Behaviour tab > and change the settings for executable text file.
On the newer versions, on nautilus (files), go to Edit > preferences > Behaviour tab > and change the settings for executable text file.
answered Nov 1 '14 at 23:33
Anon
66152
66152
3
Now 'Files -> Preferences'. (17.04)
– niry
Sep 27 '17 at 20:23
Sweet! The way to go imho.
– codepleb
Oct 12 '17 at 6:11
How to see output ?
– Amr Lotfy
Aug 29 at 1:00
add a comment |
3
Now 'Files -> Preferences'. (17.04)
– niry
Sep 27 '17 at 20:23
Sweet! The way to go imho.
– codepleb
Oct 12 '17 at 6:11
How to see output ?
– Amr Lotfy
Aug 29 at 1:00
3
3
Now 'Files -> Preferences'. (17.04)
– niry
Sep 27 '17 at 20:23
Now 'Files -> Preferences'. (17.04)
– niry
Sep 27 '17 at 20:23
Sweet! The way to go imho.
– codepleb
Oct 12 '17 at 6:11
Sweet! The way to go imho.
– codepleb
Oct 12 '17 at 6:11
How to see output ?
– Amr Lotfy
Aug 29 at 1:00
How to see output ?
– Amr Lotfy
Aug 29 at 1:00
add a comment |
up vote
8
down vote
In Ubuntu and all Unix based OSes, afaik, nothing is set as executable by default. There are two ways of doing this.
Right click on the script or file you want to execute. Go to Properties then to the Permissions Tab. Click the check box that says Execute.
Open a Terminal
cd
into the directory where the file is found. Typechmod ugo+x filename
. This will set the file to execute.
Now your users can double click to their hearts content.
2
It still will ask you what to do with run in terminal or display or run ... So its not what i need
– user61928
May 19 '12 at 6:34
Only this answer worked on Gnome Ubuntu 17.04 for making desktop file executeable
– Kunok
Apr 14 '17 at 21:06
add a comment |
up vote
8
down vote
In Ubuntu and all Unix based OSes, afaik, nothing is set as executable by default. There are two ways of doing this.
Right click on the script or file you want to execute. Go to Properties then to the Permissions Tab. Click the check box that says Execute.
Open a Terminal
cd
into the directory where the file is found. Typechmod ugo+x filename
. This will set the file to execute.
Now your users can double click to their hearts content.
2
It still will ask you what to do with run in terminal or display or run ... So its not what i need
– user61928
May 19 '12 at 6:34
Only this answer worked on Gnome Ubuntu 17.04 for making desktop file executeable
– Kunok
Apr 14 '17 at 21:06
add a comment |
up vote
8
down vote
up vote
8
down vote
In Ubuntu and all Unix based OSes, afaik, nothing is set as executable by default. There are two ways of doing this.
Right click on the script or file you want to execute. Go to Properties then to the Permissions Tab. Click the check box that says Execute.
Open a Terminal
cd
into the directory where the file is found. Typechmod ugo+x filename
. This will set the file to execute.
Now your users can double click to their hearts content.
In Ubuntu and all Unix based OSes, afaik, nothing is set as executable by default. There are two ways of doing this.
Right click on the script or file you want to execute. Go to Properties then to the Permissions Tab. Click the check box that says Execute.
Open a Terminal
cd
into the directory where the file is found. Typechmod ugo+x filename
. This will set the file to execute.
Now your users can double click to their hearts content.
edited May 18 '12 at 12:58
Eliah Kagan
81k20226364
81k20226364
answered May 18 '12 at 12:47
SomKit
30717
30717
2
It still will ask you what to do with run in terminal or display or run ... So its not what i need
– user61928
May 19 '12 at 6:34
Only this answer worked on Gnome Ubuntu 17.04 for making desktop file executeable
– Kunok
Apr 14 '17 at 21:06
add a comment |
2
It still will ask you what to do with run in terminal or display or run ... So its not what i need
– user61928
May 19 '12 at 6:34
Only this answer worked on Gnome Ubuntu 17.04 for making desktop file executeable
– Kunok
Apr 14 '17 at 21:06
2
2
It still will ask you what to do with run in terminal or display or run ... So its not what i need
– user61928
May 19 '12 at 6:34
It still will ask you what to do with run in terminal or display or run ... So its not what i need
– user61928
May 19 '12 at 6:34
Only this answer worked on Gnome Ubuntu 17.04 for making desktop file executeable
– Kunok
Apr 14 '17 at 21:06
Only this answer worked on Gnome Ubuntu 17.04 for making desktop file executeable
– Kunok
Apr 14 '17 at 21:06
add a comment |
up vote
3
down vote
I think creating a *.desktop file is missing here:
$ cat shortcut-for-my-script.desktop
[Desktop Entry]
Type=Application
Terminal=true
Name=Click-Script
Icon=utilities-terminal
Exec=gnome-terminal -e "bash -c './script.sh;$SHELL'"
Categories=Application;
If you create more than one *.desktop file for one script you are able to create multiple configurations by passing different parameters, which is a very comfortable and user-friendly way.
add a comment |
up vote
3
down vote
I think creating a *.desktop file is missing here:
$ cat shortcut-for-my-script.desktop
[Desktop Entry]
Type=Application
Terminal=true
Name=Click-Script
Icon=utilities-terminal
Exec=gnome-terminal -e "bash -c './script.sh;$SHELL'"
Categories=Application;
If you create more than one *.desktop file for one script you are able to create multiple configurations by passing different parameters, which is a very comfortable and user-friendly way.
add a comment |
up vote
3
down vote
up vote
3
down vote
I think creating a *.desktop file is missing here:
$ cat shortcut-for-my-script.desktop
[Desktop Entry]
Type=Application
Terminal=true
Name=Click-Script
Icon=utilities-terminal
Exec=gnome-terminal -e "bash -c './script.sh;$SHELL'"
Categories=Application;
If you create more than one *.desktop file for one script you are able to create multiple configurations by passing different parameters, which is a very comfortable and user-friendly way.
I think creating a *.desktop file is missing here:
$ cat shortcut-for-my-script.desktop
[Desktop Entry]
Type=Application
Terminal=true
Name=Click-Script
Icon=utilities-terminal
Exec=gnome-terminal -e "bash -c './script.sh;$SHELL'"
Categories=Application;
If you create more than one *.desktop file for one script you are able to create multiple configurations by passing different parameters, which is a very comfortable and user-friendly way.
answered Oct 2 '15 at 7:22
h0ch5tr4355
372516
372516
add a comment |
add a comment |
up vote
3
down vote
If you're using XFce then you can make script executed in Thunar by executing this command:
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default
--create --type bool --set true
or by using gui xfce4-settings-editor
and creating the same property
add a comment |
up vote
3
down vote
If you're using XFce then you can make script executed in Thunar by executing this command:
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default
--create --type bool --set true
or by using gui xfce4-settings-editor
and creating the same property
add a comment |
up vote
3
down vote
up vote
3
down vote
If you're using XFce then you can make script executed in Thunar by executing this command:
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default
--create --type bool --set true
or by using gui xfce4-settings-editor
and creating the same property
If you're using XFce then you can make script executed in Thunar by executing this command:
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default
--create --type bool --set true
or by using gui xfce4-settings-editor
and creating the same property
edited Apr 18 '17 at 15:50
answered Jan 14 '17 at 20:49
jcubic
45931021
45931021
add a comment |
add a comment |
up vote
1
down vote
You have to check 3 points :
- Nautilus / Nemo configuration : https://askubuntu.com/a/286651/301025
- The script file must be executable: https://askubuntu.com/a/275714/301025
The file system must allow execution :
- Type
mount
in a console - Check if your file system has the
noexec
flag - Remove the
noexec
flag by editing/etc/fstab
and remount the modified system (eg. a reboot works)
- Type
add a comment |
up vote
1
down vote
You have to check 3 points :
- Nautilus / Nemo configuration : https://askubuntu.com/a/286651/301025
- The script file must be executable: https://askubuntu.com/a/275714/301025
The file system must allow execution :
- Type
mount
in a console - Check if your file system has the
noexec
flag - Remove the
noexec
flag by editing/etc/fstab
and remount the modified system (eg. a reboot works)
- Type
add a comment |
up vote
1
down vote
up vote
1
down vote
You have to check 3 points :
- Nautilus / Nemo configuration : https://askubuntu.com/a/286651/301025
- The script file must be executable: https://askubuntu.com/a/275714/301025
The file system must allow execution :
- Type
mount
in a console - Check if your file system has the
noexec
flag - Remove the
noexec
flag by editing/etc/fstab
and remount the modified system (eg. a reboot works)
- Type
You have to check 3 points :
- Nautilus / Nemo configuration : https://askubuntu.com/a/286651/301025
- The script file must be executable: https://askubuntu.com/a/275714/301025
The file system must allow execution :
- Type
mount
in a console - Check if your file system has the
noexec
flag - Remove the
noexec
flag by editing/etc/fstab
and remount the modified system (eg. a reboot works)
- Type
edited Apr 13 '17 at 12:25
Community♦
1
1
answered May 17 '15 at 10:14
sangorys
20625
20625
add a comment |
add a comment |
up vote
0
down vote
When you create a launch in Desktop to a SHEL script or Whatever, in command line, don't forget to signal the script, to be executed in background.
The script will die when he finished is job.
1
i did that but what prob is the terminal just twinkles and nothing happens
– user61928
May 19 '12 at 6:36
add a comment |
up vote
0
down vote
When you create a launch in Desktop to a SHEL script or Whatever, in command line, don't forget to signal the script, to be executed in background.
The script will die when he finished is job.
1
i did that but what prob is the terminal just twinkles and nothing happens
– user61928
May 19 '12 at 6:36
add a comment |
up vote
0
down vote
up vote
0
down vote
When you create a launch in Desktop to a SHEL script or Whatever, in command line, don't forget to signal the script, to be executed in background.
The script will die when he finished is job.
When you create a launch in Desktop to a SHEL script or Whatever, in command line, don't forget to signal the script, to be executed in background.
The script will die when he finished is job.
answered May 18 '12 at 12:42
Octávio Filipe Gonçalves
10.5k41422
10.5k41422
1
i did that but what prob is the terminal just twinkles and nothing happens
– user61928
May 19 '12 at 6:36
add a comment |
1
i did that but what prob is the terminal just twinkles and nothing happens
– user61928
May 19 '12 at 6:36
1
1
i did that but what prob is the terminal just twinkles and nothing happens
– user61928
May 19 '12 at 6:36
i did that but what prob is the terminal just twinkles and nothing happens
– user61928
May 19 '12 at 6:36
add a comment |
up vote
0
down vote
Based on umask
defualt value, you haven't execute permissions for files by default and must change mod to gain execute permissions, something like this:
chmod u+x filename
1
Broth Ali sure i did it its obvious to do that
– user61928
May 19 '12 at 6:35
add a comment |
up vote
0
down vote
Based on umask
defualt value, you haven't execute permissions for files by default and must change mod to gain execute permissions, something like this:
chmod u+x filename
1
Broth Ali sure i did it its obvious to do that
– user61928
May 19 '12 at 6:35
add a comment |
up vote
0
down vote
up vote
0
down vote
Based on umask
defualt value, you haven't execute permissions for files by default and must change mod to gain execute permissions, something like this:
chmod u+x filename
Based on umask
defualt value, you haven't execute permissions for files by default and must change mod to gain execute permissions, something like this:
chmod u+x filename
answered May 18 '12 at 14:13
Ali Dehghani
34649
34649
1
Broth Ali sure i did it its obvious to do that
– user61928
May 19 '12 at 6:35
add a comment |
1
Broth Ali sure i did it its obvious to do that
– user61928
May 19 '12 at 6:35
1
1
Broth Ali sure i did it its obvious to do that
– user61928
May 19 '12 at 6:35
Broth Ali sure i did it its obvious to do that
– user61928
May 19 '12 at 6:35
add a comment |
up vote
-1
down vote
Specially for Android Studio You can follow my original answer here:
To Create Desktop Launcher:
- Click on
Create Desktop Entry..
from Tools menu.
It will be prompt for password, enter password of your current login.
Finally it will be display notification in Android Studio screen like:
- You can see in Applications => Programming => Android Studio, and you may see on desktop also after restarting system.
Thank you. :)
add a comment |
up vote
-1
down vote
Specially for Android Studio You can follow my original answer here:
To Create Desktop Launcher:
- Click on
Create Desktop Entry..
from Tools menu.
It will be prompt for password, enter password of your current login.
Finally it will be display notification in Android Studio screen like:
- You can see in Applications => Programming => Android Studio, and you may see on desktop also after restarting system.
Thank you. :)
add a comment |
up vote
-1
down vote
up vote
-1
down vote
Specially for Android Studio You can follow my original answer here:
To Create Desktop Launcher:
- Click on
Create Desktop Entry..
from Tools menu.
It will be prompt for password, enter password of your current login.
Finally it will be display notification in Android Studio screen like:
- You can see in Applications => Programming => Android Studio, and you may see on desktop also after restarting system.
Thank you. :)
Specially for Android Studio You can follow my original answer here:
To Create Desktop Launcher:
- Click on
Create Desktop Entry..
from Tools menu.
It will be prompt for password, enter password of your current login.
Finally it will be display notification in Android Studio screen like:
- You can see in Applications => Programming => Android Studio, and you may see on desktop also after restarting system.
Thank you. :)
edited Apr 13 '17 at 12:23
Community♦
1
1
answered Feb 17 '16 at 6:46
Pratik Butani
130110
130110
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f138908%2fhow-to-execute-a-script-just-by-double-clicking-like-exe-files-in-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think you may just be writing your desktop file poorly. Can you post (verbatim) the .desktop launcher that you wrote?
– Jjed
May 18 '12 at 15:25
Also, have you seen this? askubuntu.com/q/34597/24694
– Jjed
May 18 '12 at 15:27
Its just a launcher where you assign name and command to do its not that big idea
– user61928
May 19 '12 at 6:38
Also note, that scripts in linux are not called bash but shell afaik.
– cauon
Oct 5 '12 at 8:58
3
muru tipped me off to this, worked for me: askubuntu.com/questions/286621/…
– draoi
Nov 16 '15 at 23:56