Administrator
|
Is it possible to launch .desktop files from the command line?
This is probably a pretty silly question. The reason I want to do it has to do with this "issue" - I figured that if I could tell xbindkeys to run a .desktop file, maybe I can get launch feedback for that application.
Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.
10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts |
KDE Developer
|
xdg-open is the name of the command that handles .desktop files (xdg-utils package on debian)
|
KDE Developer
|
Or "kioclient exec"
Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Administrator
|
Haven't tried it yet, but it sounds like the answers I was looking for. Thanks!
Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.
10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts |
Registered Member
|
"$ man xdg-open"
Is xdg-open supposed to launch the command specified in the *.desktop file or open an editor associated with text files to edit the *.desktop file? |
Administrator
|
Based on my tests, xdg-open will run the command specified in the *.desktop file - rather than opening the *.desktop file in a text editor. This will automatically occur if it is owned by root, or executable. If it is neither of those two, then the user will be asked to approve the command to run as a security mechanism.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Ok, looks like it's a bug in kde-open, because `kde-open .local/share/applications/Heroes\ of\ Might\ and\ Magic\ III.desktop` opens a text editor.
https://bugs.launchpad.net/ubuntu/+sour ... bug/378783 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668817 Running Kubuntu 13.10 |
Administrator
|
Can you check the permissions of "~/.local/share/applications/Heroes\ of\ Might\ and\ Magic\ III.desktop" to see if it is executable?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I am not at home right now, but afair it's not executable. All the desktop files created manually via "Edit applications..." are not executable. Even those installed automatically:
And running `kde-open ~/.local/share/applications/sqlworkbench.sh.desktop` opens a text editor. |
Administrator
|
If you were to change the permissions of those *.desktop files to make them executable, I suspect the behaviour of kde-open would change to executing the desktop file instead.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Nope:
In both cases it just opens an editor. |
Administrator
|
I'm out of ideas then - there must have been a behaviour change at some point between our respective KDE versions.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Evergrowing, Google [Bot]