You are not logged in.
Pages: 1
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
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?
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
exo-open works. Thanks.
Gentoo-Linux
Offline
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
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
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Some other question in that context, I like to add kdocker to have a tray icon:
kdocker exo-open /home/mb/.local/share/applications/msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_1.desktop
But it does not find the window.
I also tried
kdocker --name "Microsoft Teams" exo-open /home/mb/.local/share/applications/msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_1.desktop
Why does this fail?
The .desktop file comes from a PWA installation for MS Teams. Writing my own wrapper script with the exec from the .desktop file works:
kdocker /opt/microsoft/msedge-dev/microsoft-edge-dev "--profile-directory=Profile 1" --app-id=cifhbcnohmdccbgoicgdjpfamggdegmo "--app-url=https://teams.microsoft.com/v2/?clientType=pwa"
Gentoo-Linux
Offline
The problem with the first code is that exo-open itself is a wrapper script that starts another program. So basically, kdocker uses the pid of the wrapper script which no longer exists after it starts its app.
The problem with the second code is that "--name" is not a valid option for the kdocker program, plus exo-open is a wrapper script.
The code from number 3, though you call it a wrapper script, works because you pass the name of an executable to kdocker.
This might be helpful as well.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Pages: 1
[ Generated in 0.013 seconds, 9 queries executed - Memory usage: 560.48 KiB (Peak: 561.33 KiB) ]