How to fix Thunar not having option to run scripts

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

How to fix Thunar not having option to run scripts

Post by xenopeek »

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: 85
Joined: Wed Jul 29, 2015 9:49 pm

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

Post by Quexos »

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

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

Post by Garik »

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 ").
tgwilt
Level 3
Level 3
Posts: 131
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 »

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”