Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-03-20 05:19:42

Mo_B
Member
From: Germany
Registered: 2016-03-04
Posts: 44

How to start .desktop files?

Hi,

what is the correct way to start a ~/.local/share/applications/*.desktop file? Just make it u+x or use xdg-open? I like to use it as keyboard shortcut. Currently I can only start it from the Applications Menu or by Albert launcher.

xdg-open doesn't work: UNable to detect the URI-scheme of '~/.local/share/applications/chrome-.....desktop'

Made it chmod u+x: 'Failed to execute child process...'

Sure I could just copy all the command line from the .desktop file into a keyboard shortcut, but that's what the .desktop file is meant for. Also I like updates there to be reflected in the shortcut.


Gentoo-Linux

Offline

#2 2023-03-20 10:31:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,025

Re: How to start .desktop files?

xdg-open or exo-open should both work.

Is it just the chrome desktop file that it doesn't work, or all .desktop files? Can you post back the contents of the ~/.local/share/applications/chrome-.....desktop file?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-04-04 06:17:39

Mo_B
Member
From: Germany
Registered: 2016-03-04
Posts: 44

Re: How to start .desktop files?

exo-open works. Thanks.


Gentoo-Linux

Offline

#4 2023-06-06 07:15:16

Mo_B
Member
From: Germany
Registered: 2016-03-04
Posts: 44

Re: How to start .desktop files?

I see, inside the .desktop file there is the xdg-open shebang:

cat ~/.local/share/applications/chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_2.desktop

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Microsoft Teams
Exec=/opt/google/chrome/google-chrome "--profile-directory=Profile 2" --app-id=cifhbcnohmdccbgoicgdjpfamggdegmo
Icon=chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_2
StartupWMClass=crx_cifhbcnohmdccbgoicgdjpfamggdegmo
NoDisplay=false

That was created when I installed the MS Teams PWA,  using a separate Chrome profile.
I can start that from Applications Menu or Whisker Menu.

Going the Xfce way with exo-open I can also call it like exo-open ~/.local/share/applications/chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_2.desktop.
But if I create a shortcut with that command, I get

Unable to detect the URI-scheme of '~/.local/share/applications/chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_2.desktop'.

What I'm doing wrong here to create a keyboard shortcut?
The same happens when creating a shortcut using xdg-open.


Gentoo-Linux

Offline

#5 2023-06-06 23:06:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,025

Re: How to start .desktop files?

It looks like the keyboard shortcut can't process the '~'. Use the full path to the file:

exo-open /home/YOURUSERID/.local/share/applications/chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_2.desktop

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB