Hi, a strange problem has appeared with my installation Leap 15.1.
When I attempt to start a program by clicking either the file or an icon linking to it, i just get the file opening in Kate, or, if it’s a desktop icon, the Desktop Entry, e.g.
This happens even though the file properties are set to ‘is executable’ and the access permissions are set to ‘Can view and Modify’. Python programs like the above have the correct shebang at the top.
This happens with most programs, except those where the first tab of the Properties window lists the file as Type: executable.
In all cases the program can be launched from the terminal, e.g. in the above case by entering ./Start.py. Start menu programs start normally.
Does anyone have any idea what’s going on? It’s really very irritating.
Hi Malcolm,
That example file was the one that was automatically generated when i used the ‘Link to Application’ command from the right-click menu in a folder. It seems that if you leave some of the fields in the Application tab of the resulting dialogue unfilled, it leaves a blank after the equals sign.
If it’s a program I’ve written, I prefer to keep the icon in the program folder, it just makes it easier to keep track of the things.
No, the same thing happens even when directly clicking the executable file, so for the example above you get Start.py opening in Kate:
#!bin/python3.6
import sys
from PyQt5 import QtGui, Qt
from PyQt5.QtWidgets import QApplication, QSplashScreen
from JobTracker import MainWindow
if __name__ == "__main__":
app = QApplication(sys.argv)
splash_pix = QtGui.QPixmap("./Icons/icon_start.png")
splash = QSplashScreen(splash_pix, Qt.Qt.WindowStaysOnTopHint)
splash.setMask(splash_pix.mask())
splash.show()
app.processEvents()
myapp = MainWindow()
myapp.show()
splash.finish(myapp)
sys.exit(app.exec_())
Or, for QCad, say:
#!/bin/bash
#
# QCAD startup script
#
DIR=${0%/*}
binary="$DIR/qcad-bin"
# Many Linux distributions try to use a style plugin that
# is not available as 32bit version, links against another
# version of Qt or is otherwise incompatible. For this
# reason, this script forces the style to the integrated
# plastique style of Qt.
# The style may be changed here or removed to use the
# default style:
LD_LIBRARY_PATH="$DIR" "$binary" -style plastique "$@"
Hi
I imagine all was working ok with respect to desktop icons before you created the shortcut? I wonder if the mime entry being blank screwed something up…
Do you have a file;
cat ~/.local/share/applications/mimeinfo.cache
Note I’m on GNOME here, but should still be the same…
@Malcolm, the shortcuts were created long ago and everything has worked fine until a few days ago. I do have the mimeinfo.cache file - much of its contents refer to wine, I’ll come back to that in a moment.
@wolfi, It’s actually “Ask for confirmation in all KDE applications when:” … “Executing scripts or desktop files” in my installation, and checking it works! Admittedly I (obviously) have to select “Execute” in the pop-up, but that’s a minor issue which I can happily live with (and might actually be convenient on occasions when I want to select a file but not execute it).
I had a look at the settings on my laptop, which also has Leap 15.1 and which has been working correctly, and “Ask for confirmation in all KDE applications when:” … “Executing scripts or desktop files” isn’t checked, yet programs run. It’s all very strange, the only thing I’ve done recently which might involve some change in settings was a lot of messing around with Wine/PlayOnLinux, etc. in an ultimately unsuccessful attempt to get Adobe Digital Editions to work. It’s hard to see that there could be any connection, but if anyone knows differently, I’d be interested to know.
Apparently the exact text changed in later versions…
Admittedly I (obviously) have to select “Execute” in the pop-up, but that’s a minor issue which I can happily live with (and might actually be convenient on occasions when I want to select a file but not execute it).
I had a look at the settings on my laptop, which also has Leap 15.1 and which has been working correctly, and “Ask for confirmation in all KDE applications when:” … “Executing scripts or desktop files” isn’t checked, yet programs run.
Well, there are actually 3(!) possible settings:
Always ask for confirmation (the default)
Open in application
Execute
The settings in older dolphin versions were slightly wrong (or rather incomplete) unfortunately.
Anyway, you can get rid of the dialog by activating the “Don’t ask me again” checkbox, the button you click (i.e. Execute or Open) will then be used everytime without asking.
That’s maybe how you ended up in this situation in the first place, or why your laptop executes without asking.
Btw, the setting is stored in ~/.config/kiorc.
E.g. it contains something like this:
[Executable scripts]
behaviourOnLaunch=execute
(this means it will always execute without asking, can also be “open” and “alwaysAsk”)
My ~/.config/kiorc dates from August 2016. Could be a spurious malfunction. One user had a support call when the desktop disappeared all of sudden. On restart it insisted on using folder Desktop instead of (german) Schreibtisch. Never succeeded in reverting this behavior, but moved the old home and started with a pristine one.
Annoyingly, I first changed the setting using the Dolphin settings dialogue so I don’t know what kiorc had said before, or even whether it had existed prior to my making the change to “Executing scripts or desktop files”.