How to fix Thunar not having option to run scripts

Forum rules
Before you post please read how to get help
Locked
User avatar
xenopeek
Level 24
Level 24
Posts: 23101
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

How to fix Thunar not having option to run scripts

Post by xenopeek » Wed Aug 12, 2015 1:49 am

Linux Mint 17.2 ships with Thunar 1.6.10. You may have noticed you can no longer run executable text files (scripts) by double-clicking them in your file manager. It will always open the file in a text editor. There is no longer an option in the preferences windows of Thunar to change this behavior.

This behavior and you not being able to change it through Thunar preferences was an intentional change in Thunar 1.6.5. See the release notes at https://github.com/xfce-mirror/thunar/b ... /NEWS#L133 and the bug comments at https://bugzilla.xfce.org/show_bug.cgi?id=7596#c15. As I understand it this is a security measure. I'm not aware of what future plans for this are.

There is a hidden setting you can set to override this. Open "Settings Editor" from your menu or run the command xfce4-settings-editor. With the channel thunar selected in the left sidebar, click on New and add with:
name = /misc-exec-shell-scripts-by-default (mind the leading slash!)
type = Boolean
value = TRUE

(Other hidden Thunar settings documented here: http://docs.xfce.org/xfce/thunar/hidden-settings)

Double-clicking a script will run it and you can still edit it by right-clicking it and selecting to open it with your text editor. Possibly there is an alternative solution for this with a custom action script, perhaps somebody can add that if they know how.
Image

User avatar
Quexos
Level 2
Level 2
Posts: 72
Joined: Wed Jul 29, 2015 9:49 pm

Re: How to fix Thunar not having option to run scripts

Post by Quexos » Fri Aug 14, 2015 12:24 am

Thanks for this info. I was having trouble getting Pale Moon browser to install from the .sh file, and the PPA method is an out dated version.

Garik
Level 1
Level 1
Posts: 3
Joined: Fri Sep 04, 2015 5:53 am

Re: How to fix Thunar not having option to run scripts

Post by Garik » Fri Sep 04, 2015 1:30 pm

1. Go to "All settings" - > (System) Editor MIME types.
2. Search "shell" (application/x-shellscript)
3. Double click (Select application)
4. To specify the command manually and enter "bash" (without ").
Attachments
Screenshort_2015-09-04_20-40-30.png
view

tgwilt
Level 2
Level 2
Posts: 71
Joined: Fri Jun 08, 2018 2:26 am
Location: Florida, USA

Re: How to fix Thunar not having option to run scripts

Post by tgwilt » Sun Jul 29, 2018 7:31 pm

Quexos wrote:
Fri Aug 14, 2015 12:24 am
Thanks for this info. I was having trouble getting Pale Moon browser to install from the .sh file, and the PPA method is an out dated version.
Believe me, I am not trying to sound snarky or exude an "I'm smarter than you" attitude.

Learning how to use some basic shell commands is always in your own best interest in Linux, FreeBSD, OpenBSD, Solaris, AIX, or any *nix like environment. In the case you stated above, I would open a shell, sudo su, then run the install.sh script like this "./install.sh" All of that supposes that the script needs to run as root in order to work, and you are in the same directory as the script.

A book I found very useful back in the day was "Teach yourself Unix in 24 hours" available on Amazon. In addition to helping you learn some basic shell comands, it had on of the finest tutorials on using the dreaded vi editor (my personal favorite) that I've ever seen.

Again, I am NOT trying to sound snarky or be the smartest person in the room (impossible for me to have that position). Just stressing that it's pretty important to understand some rudimentary shell commands on any *nix like environment, and that includes Linux.

Best,
Tom
Last edited by karlchen on Mon Jul 30, 2018 3:04 am, edited 1 time in total.
Reason: Thread had been dead for 3 years, before it received this reply. Locking the thread.

Locked

Return to “Xfce”