Page 1 of 2
run script in Porteus 4.0 Xfce
Posted: 26 Jul 2018, 11:08
by Kulle
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
run script in Porteus 4.0 Xfce
Posted: 26 Jul 2018, 13:03
by ncmprhnsbl
maybe this:
http://docs.xfce.org/xfce/thunar/hidden-settings
xfce4-settings-editor:
see: /misc-exec-shell-scripts-by-default > set to true
run script in Porteus 4.0 Xfce
Posted: 26 Jul 2018, 14:58
by donald
Or...
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
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
run script in Porteus 4.0 Xfce
Posted: 26 Jul 2018, 15:19
by Kulle
Many thanks for the quick help.
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
run script in Porteus 4.0 Xfce
Posted: 27 Jul 2018, 02:12
by francois
Great!
Just as I was going to reply.
Fulalas was supposed to fix that, but it seems not.
run script in Porteus 4.0 Xfce
Posted: 27 Jul 2018, 07:12
by donald
@ 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...
run script in Porteus 4.0 Xfce
Posted: 27 Jul 2018, 17:00
by rchase
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).
run script in Porteus 4.0 Xfce
Posted: 28 Jul 2018, 05:04
by donald
Hi rchase
What is required to do this for the root account?
Same as described above but in /root/.config/mimeapps.list
( don't forget to create
exo-terminal-emulator.desktop and copy it into /usr/share/applications/ )
It would also be nice if Thunar could be made to offer script execution from the right-click menu
Add in mimeapps.list
Code: Select all
[Added Associations]
application/x-shellscript=mousepad.desktop;exo-terminal-emulator.desktop;
[Default Applications]
application/x-shellscript=mousepad.desktop
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.
run script in Porteus 4.0 Xfce
Posted: 29 Jul 2018, 02:28
by francois
I conclude that Porteus is more secure than it has ever been with 4.0.!
I cannot disagree.
run script in Porteus 4.0 Xfce
Posted: 29 Jul 2018, 03:42
by Ed_P
run script in Porteus 4.0 Xfce
Posted: 31 Jul 2018, 23:11
by francois
About what are you
run script in Porteus 4.0 Xfce
Posted: 31 Jul 2018, 23:22
by Ed_P
francois wrote: ↑29 Jul 2018, 02:28
I cannot disagree.
run script in Porteus 4.0 Xfce
Posted: 01 Aug 2018, 00:24
by francois
No one could be against virtue. Donald is an informed superuser after all.
Re: run script in Porteus 4.0 Xfce
Posted: 14 Dec 2018, 03:39
by francois
@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.
Re: run script in Porteus 4.0 Xfce
Posted: 14 Dec 2018, 04:58
by donald
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.