Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-02-06 15:15:34

AbyssWalker
Member
Registered: 2025-02-06
Posts: 1
Windows 7Firefox 132.0

How to prevent scripts from executing by Double Click on XFCE Desktop?

Hi everyone,

I’ve been testing Kali Linux with the XFCE desktop environment and have encountered an issue with script execution behavior that I’d like to resolve.

Here’s the scenario:

  • I created a script (helloworld.sh) and made it executable using chmod +x.

  • I configured Mousepad as the default application for #!/bin/bash scripts.

  • When I double-click the script from any folder (Thunar), it opens in Mousepad as expected.

However, if I place the same script on the Desktop and double-click it, the script executes instead of opening in Mousepad.

This behavior is problematic because I often keep scripts on my Desktop for quick access, and accidental execution is a bit risky.

What I’ve Tried (Without Success):

  • Setting /misc-exec-shell-scripts-by-default to THUNAR_EXECUTE_SHELL_SCRIPT_NEVER (this only affects Thunar, not the Desktop).

  • Avoiding placing scripts on the Desktop (not a practical solution for my workflow).

  • Manually opening scripts with an editor via right-click > "Open With Editor" (not a seamless solution).

With that in mind, how can I configure the system to force scripts on the Desktop to always open in my default editor (Mousepad) instead of executing when double-clicked?

Any insights, solutions, or workarounds would be greatly appreciated!

Thanks in advance!

zNVThew.png

Offline

#2 2025-02-06 18:46:46

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 657
AndroidChrome 132.0

Re: How to prevent scripts from executing by Double Click on XFCE Desktop?

Chmod -x to remove the executive permission. You don't want it to run them don't let it.


I AM CANADIAN!
Siduction
Debian Sid
Xfce 4.20 with Wayland/Labwc

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 8 queries executed - Memory usage: 522.3 KiB (Peak: 522.93 KiB) ]