You are not logged in.

#1 2019-03-07 18:19:15

Xieshichen
Member
Registered: 2012-01-17
Posts: 13

[SOLVED] My shebang programs stopped working in KDE

My KDE "Link to Application" icons have stopped working for my shebang files.

For example if create a simple executable file.

#!/usr/bin/bash
cd /home/scott/Documents/xxx
echo 'yyy' > yyy.dat

Then create a "Link to Application"

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=/home/dummy/Documents/xxx/xxx.sh
GenericName[en_US]=
GenericName=
Icon=exec
MimeType=
Name[en_US]=Link to Application
Name=Link to Application
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

The desktop file does not run when I click on it.

Last edited by Xieshichen (2019-03-17 23:36:57)

Offline

#2 2019-03-07 19:34:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] My shebang programs stopped working in KDE

Is the file executable?


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-03-07 20:10:29

papajoke
Member
From: france
Registered: 2014-10-10
Posts: 45

Re: [SOLVED] My shebang programs stopped working in KDE

use good shebang ! not "!#"

Last edited by papajoke (2019-03-07 20:13:26)


LTS - Fish - Kde - intel M100 - 16Go RAM - ssd

Offline

#4 2019-03-07 20:10:29

Xieshichen
Member
Registered: 2012-01-17
Posts: 13

Re: [SOLVED] My shebang programs stopped working in KDE

Yes, it is executable. Script works fine when './xxx.sh' is run at the command prompt.
My python2 and python3  'link to applications' icons also stopped working.

Offline

#5 2019-03-07 20:15:26

Xieshichen
Member
Registered: 2012-01-17
Posts: 13

Re: [SOLVED] My shebang programs stopped working in KDE

Sorry, '!#' was just a typo in my note.

Offline

#6 2019-03-07 20:20:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [SOLVED] My shebang programs stopped working in KDE

When did they stop working?  Was something upgraded?  Can a downgrade get the desired behavior back?  If so, which package and which versions differentiate the working from non-working condtion?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2019-03-07 21:33:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,586

Re: [SOLVED] My shebang programs stopped working in KDE

Try "#!/bin/bash" in case the launcher checks /etc/shells

Offline

#8 2019-03-07 22:54:25

Xieshichen
Member
Registered: 2012-01-17
Posts: 13

Re: [SOLVED] My shebang programs stopped working in KDE

I think it stopped working [2019-02-19 10:26] [ALPM] upgraded plasma-meta (5.14-1 -> 5.15-1).  I did a full pacman -Syu  today.
I tried #!/bin/bash but no luck.

I am hesitant to downgrade kde because of the number of packages. The icons have worked for a long time
I am able to get basic link to file or directory working, if I add /usr/bin/bash to the 'file type options' and choose to open with bash.

Offline

#9 2019-03-08 09:03:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,586

Offline

#10 2019-03-17 23:34:28

Xieshichen
Member
Registered: 2012-01-17
Posts: 13

Re: [SOLVED] My shebang programs stopped working in KDE

Thanks so much for your help. I will mark this one as solved. Use a launcher and  the scripts run fine, and the Wiki for the win.

One take away Do Not remove the *.Desktop file patterns.

Offline

Board footer

Powered by FluxBB