Shell script file association bug

When opening a shell script file that has no .sh at the end of its name, file associations break a bit, It won’t open by left click, but instead with middle-click that should be reserved for secondary action. Even though when right clicking, it shows that file associations are set up like I want and when checking properties of the file, dolphin can determine that it is a shel script file.

files affected for me include: /etc/grub.d/
curiously actions work just fine in /etc/grub.d/backup/etc_grub_d/

Is this a known bug, or is this something with my setup?

1 Like

When opening a shell script file that has no .sh at the end of its name, file associations break a bit,

This isn’t clear to me.

It won’t open by left click, but instead with middle-click that should be reserved for secondary action.

What is happening ?
What would be expected ?
Do you use single-click to open ?

Is this a known bug, or is this something with my setup?

We have bug trackers to let anyone figure it out by themselves…
But here it is not precise.

in: /etc/grub.d/ the mouse actions are shifted one over
but in /etc/grub.d/backup/etc_grub_d/, a subfolder, it works fine

happens with single and double click

4 mb file limit, here is a demo: Download Screencast_20250331_173007.webp | LimeWire

Maybe to recognize script you have to add first line like:
#!/bin/bash
In my system this helps. File has extension .bsh or .sh is not starting but line from above making it start.

A loop video is a pain to follow, we need to be able to pause frame by frame.

This seems to happen only a couple of files 00_header 06_grub… , the video is too fast to really follow through.

or #!/bin/sh as the other files.
Without seeing their content, impossible to say for certain.

That might user-right relative as launching scripts necessitates scripts to be executable.

Without seeing their content, impossible to say for certain.

what are you referring to?

The files for which the file association does not work.

The files for which the file association does not work.

But those files should be available on your system as well, granted you use grub.

located in: /etc/grub.d/

I don’t have this file 06_grub-customizer...

With this name I don’t think that’s standard and that’s particular to your system.

Please fix your file or share it.

all the shell files in that folder have this problem for me, all of them have #!/bin/sh, changing it to #!/bin/bash did not resolve it for me

here are its contents of 06_grub-customizer:

#!/bin/sh
	
	if [ "x${GRUB_BACKGROUND}" != "x" ] ; then
		if [ "x${GRUB_COLOR_NORMAL}" != "x" ] ; then
		echo "set color_normal=${GRUB_COLOR_NORMAL}"
		fi
	
		if [ "x${GRUB_COLOR_HIGHLIGHT}" != "x" ] ; then
		echo "set color_highlight=${GRUB_COLOR_HIGHLIGHT}"
		fi
	fi

Something to note by default left click on a executable scripts will launch it.

It should prompt for confirmation but that confirmation can be disabled.
I think that’s your case.
Since those scripts won’t do anything outside of the their case they fail silently.
We’d want to have some message if the scripts does not succeed.
But here their execution might work fine.

1 Like