run script in Porteus 4.0 Xfce
run script in Porteus 4.0 Xfce
I use Porteus 4.0 Xfce.
If I double click on a script, the mousepad opens.
But I don't want to edit the script, I want to run it.
I can do it only in a complicated way:
Right mouse button and select "open terminal here"
And then I have to type: ./name_of_the_script.sh
How can I reach: doubleclick = run script
Is there any possibility of setting it somewhere?
Many thanks for the help
If I double click on a script, the mousepad opens.
But I don't want to edit the script, I want to run it.
I can do it only in a complicated way:
Right mouse button and select "open terminal here"
And then I have to type: ./name_of_the_script.sh
How can I reach: doubleclick = run script
Is there any possibility of setting it somewhere?
Many thanks for the help
- ncmprhnsbl
- DEV Team
- Posts: 3936
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
run script in Porteus 4.0 Xfce
maybe this:
http://docs.xfce.org/xfce/thunar/hidden-settings
xfce4-settings-editor:
see: /misc-exec-shell-scripts-by-default > set to true
http://docs.xfce.org/xfce/thunar/hidden-settings
xfce4-settings-editor:
see: /misc-exec-shell-scripts-by-default > set to true
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
-
- Full of knowledge
- Posts: 2069
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
run script in Porteus 4.0 Xfce
Or...
create a txt file with following content:
rename the file to exo-terminal-emulator.desktop and copy it into /usr/share/applications/
now open /home/guest/.config/mimeapps.list (use mousepad) and look for a line
[Added Associations]
application/x-shellscript= and add exo-terminal-emulator.desktop; to this line e.g.
application/x-shellscript=mousepad.desktop;exo-terminal-emulator.desktop;
To make it the default action add
[Default Applications]
application/x-shellscript=exo-terminal-emulator.desktop
in the mimeapps.list file
create a txt file with following content:
Code: Select all
[Desktop Entry]
Version=1.0
Type=Application
Exec=exo-open --launch TerminalEmulator
Icon=utilities-terminal
StartupNotify=true
Terminal=false
Name=Terminal Emulator
NoDisplay=true
now open /home/guest/.config/mimeapps.list (use mousepad) and look for a line
[Added Associations]
application/x-shellscript= and add exo-terminal-emulator.desktop; to this line e.g.
application/x-shellscript=mousepad.desktop;exo-terminal-emulator.desktop;
To make it the default action add
[Default Applications]
application/x-shellscript=exo-terminal-emulator.desktop
in the mimeapps.list file
run script in Porteus 4.0 Xfce
Many thanks for the quick help.
The solution is (in the terminal):
The solution is (in the terminal):
Code: Select all
xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true
- francois
- Contributor
- Posts: 6435
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
run script in Porteus 4.0 Xfce
Great!
Just as I was going to reply.
Fulalas was supposed to fix that, but it seems not.
Just as I was going to reply.
Fulalas was supposed to fix that, but it seems not.
Prendre son temps, profiter de celui qui passe.
-
- Full of knowledge
- Posts: 2069
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
run script in Porteus 4.0 Xfce
@ francois
It is much safer to open a script file in a text editor by default
than to execute by default, right?
Think of the "average" user or an inadvertently clicked script file...
It is much safer to open a script file in a text editor by default
than to execute by default, right?
Think of the "average" user or an inadvertently clicked script file...
-
- Shogun
- Posts: 282
- Joined: 10 Jan 2016, 17:26
- Distribution: Porteus 5.0 rc3 xfce
- Location: Denver, Colorado
run script in Porteus 4.0 Xfce
Donald, your solution seems rather involved; a utility to automate the procedure would be nice. What is required to do this for the root account? It would also be nice if Thunar could be made to offer script execution from the right-click menu (as opposed to becoming the default action for double-clicking).
-
- Full of knowledge
- Posts: 2069
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
run script in Porteus 4.0 Xfce
Hi rchase
( don't forget to create exo-terminal-emulator.desktop and copy it into /usr/share/applications/ )
You can change the Name=Terminal Emulator in the exo-terminal-emulator.desktop file
Example -- changed to Execute:
(picture shows the script file right-click menu )
Default (double-click) action is open in mousepad but you have the right-click option to execute the file.
Same as described above but in /root/.config/mimeapps.listWhat is required to do this for the root account?
( don't forget to create exo-terminal-emulator.desktop and copy it into /usr/share/applications/ )
Add in mimeapps.listIt would also be nice if Thunar could be made to offer script execution from the right-click menu
Code: Select all
[Added Associations]
application/x-shellscript=mousepad.desktop;exo-terminal-emulator.desktop;
[Default Applications]
application/x-shellscript=mousepad.desktop
Example -- changed to Execute:
(picture shows the script file right-click menu )
Default (double-click) action is open in mousepad but you have the right-click option to execute the file.
- francois
- Contributor
- Posts: 6435
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
run script in Porteus 4.0 Xfce
I conclude that Porteus is more secure than it has ever been with 4.0.!
I cannot disagree.
I cannot disagree.
Prendre son temps, profiter de celui qui passe.
- francois
- Contributor
- Posts: 6435
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
run script in Porteus 4.0 Xfce
No one could be against virtue. Donald is an informed superuser after all.
Prendre son temps, profiter de celui qui passe.
- francois
- Contributor
- Posts: 6435
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: run script in Porteus 4.0 Xfce
@donald:
After thinking about it for a few months, I must say I disagree. After all, script activation in thunar with a double click were there since porteus birth (Dec 2010). There has been no major complaints about it.
My advice is that this type of practice is less harmful than smoking pot on a weekly basis.
I will be sending you some if you pm me your address.
After thinking about it for a few months, I must say I disagree. After all, script activation in thunar with a double click were there since porteus birth (Dec 2010). There has been no major complaints about it.
My advice is that this type of practice is less harmful than smoking pot on a weekly basis.
I will be sending you some if you pm me your address.
Prendre son temps, profiter de celui qui passe.
-
- Full of knowledge
- Posts: 2069
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: run script in Porteus 4.0 Xfce
I will be sending you some if you pm me your address.
Thanks for the offer, but I'm afraid I have to decline.
It would be discovered with great certainty at the import and my peaceful life
would be massively disturbed if the police stormed into my apartment at 5 a.m. to arrest me.