This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Opening bash script files from Konqueror/Dolphin

Tags: None
(comma "," separated)
w2agz
Registered Member
Posts
2
Karma
0
When I click on a *.sh bash script file in Konqueror/Dolphin, I want it to open in Kwrite and not start executing. I've been messing around with System Settings/Configure file extensions trying to get this action as the default for *.sh, but nothing works. When I want to run a bash script, I'll do it from Konsole.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You need to remove the executable permissions from the file for this to occur I believe.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
MichelDufrenoy
Registered Member
Posts
2
Karma
0
OS
I would also like to be able to configure Dolphin to open KWrite, instead of running a shell script.

In fact, this behavior appears to be configurable, but is broken:

If you select a script, right-click, choose Open With --> Other, there is an option to "Remember application association for this type of file".

While this change works the one time and there is a message stating that it is "Updating system configuration", subsequent double-clicks on the scripts will run the the script.
User avatar
google01103
Manager
Posts
6668
Karma
25
MichelDufrenoy wrote:<snip>
While this change works the one time and there is a message stating that it is "Updating system configuration", subsequent double-clicks on the scripts will run the the script.

This does change the default defined open with app, check your right click open with menu but executing executables seems to take precedence if the file is executable


OpenSuse Leap 42.1 x64, Plasma 5.x

w2agz
Registered Member
Posts
2
Karma
0
One observation...I was able to get the "click" operation on a *.sh file to open with kwrite, whether or not the object file was marked executable, under KDE 3.5, but not, so far, with KDE 4.0, so maybe there's a bug here. I haven't had time to check yet whether this same "issue" exists for *.pl executables.
MichelDufrenoy
Registered Member
Posts
2
Karma
0
OS
I had the memory that it use to be possible to configure it to open KWrite or, perhaps, Kate.
druid
Registered Member
Posts
1
Karma
0
Hi, On KDE you go to the start button then the favorites section then choose configure desktop

Once in there click on the advanced tab (on top) and choose File Associations
To change a file ending .sh which is executable you choose x-shellscript from within the applications section of the file association tree (expanded) (I found this by putting sh in the search box)

Choose what you want to open with "open with" and what order to display the choices

The choice you put on top of the "open with" list is applied with a single click on the file in dolphin

Also have a look at http://www.novell.com/documentation/ope ... deuser.pdf

Hope this helps


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]