Problem: Double-clicking a shell script opens it in the Featherpad editor by default instead of running the script. This is by design as a security measure to prevent accidentally running scripts when you didn't intend to, but it's not the behavior that many users expect or want.
Solution: Go to Settings/Mime Type Editor in the "start" menu and search for x-shell
Double-click on application/x-shellscript
Click on Use a custom command and type in bash then click Open
he result will look like this
Afterward all shell scripts will run by double-clicking on them as long as they're executable.
HOWTO: make shell scripts run on double-click in Xfce
HOWTO: make shell scripts run on double-click in Xfce
Last edited by JayM on Wed Dec 02, 2020 7:16 am, edited 5 times in total.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
- Captain Brillo
- Posts: 106
- Joined: Mon Jan 07, 2019 12:29 am
Re: Shell scripts don't run upon double-clicking
Thanks, JayM, that's really handy - it was bugging me too.
GAFA-free zone
Re: HOWTO: make shell scripts run on double-click in Xfce
Is it possible to make bash scripts 'Run in Terminal' (as offered in Ubuntu) by default instead of just running ??
PaulM
PaulM
Re: HOWTO: make shell scripts run on double-click in Xfce
Double-clicking a script In PCManFM will invoke a choice to a) open - or b) execute - or c) execute in terminal.
Have no idea whether this would be possible in Thunar.
This is one of the reasons why I switched to PCManFM (the qt version) as default file manager in Fluxbox
Have no idea whether this would be possible in Thunar.
This is one of the reasons why I switched to PCManFM (the qt version) as default file manager in Fluxbox
You do not have the required permissions to view the files attached to this post.
Sony Vaio VPCF23P (2010), Intel Core i7-2670, 6gb RAM, 240GB SSD, MX23 based Fluxbox 1.3.7+
-
- Posts: 97
- Joined: Sat May 22, 2021 12:37 am
Re: HOWTO: make shell scripts run on double-click in Xfce
That is OK for advanced users who know what they are doing, but removes an extra layer of security.JayM wrote: ↑Fri Feb 22, 2019 2:05 am Problem: Double-clicking a shell script opens it in the Featherpad editor by default instead of running the script. This is by design as a security measure to prevent accidentally running scripts when you didn't intend to, but it's not the behavior that many users expect or want.
Solution: Go to Settings/Mime Type Editor in the "start" menu and search for x-shell
Double-click on application/x-shellscript
Click on Use a custom command and type in bash then click Open
he result will look like this
Afterward all shell scripts will run by double-clicking on them as long as they're executable.
Note for newbies: Please don't do that if you don't know what you are doing. You take full responsibility for what you do.
Re: HOWTO: make shell scripts run on double-click in Xfce
Thanks ceesians, install 'pcmanfm-qt' in Mx Linux 19.4 and make sure the scripts have the correct 'shebang' as the first line (#!/bin/bash) and it does indeed offer the 'run' and 'run in terminal' options as I wanted. If the script does not have the correct first line it doesn't work.