You are not logged in.

#1 2026-01-04 13:42:00

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

[SOLVED] Desktop files fails to open application,but exec commandworks

Hello all,

I recently tried some fenagling to get my media keys to work with foobar2000 (ran using wine) and had to edit my desktop file for the software to get it to work. As soon as I did so, I could no longer launch the software using the desktop file. Returning the file to its previous state no longer works either.

The output of desktop-file-validate my/desktop/file is blank.

The output of dex my/desktop/file is as follows:

07a0:fixme:msvcrt:_set_abort_behavior _WRITE_CALL_REPORTFAULT unhandled

Obviously, this hints that the issue is WINE related. I tried following the directions from this WINE forum post to downgrade Windows version to 7, but to no avail https://forum.winehq.org/viewtopic.php?t=35166.

My desktop file is as follows:

[Desktop Entry]
Type=Application
Name=foobar2000
Exec=beefweb_mpris
Icon=foobar2000

Following the wiki, I boiled the desktop file down to the bare minimum to get it to run and produced that. beefweb_mpris is a python wrapper script that enables media key integration via MPRIS support in foobar2000. Can be found here https://github.com/ther0n/beefweb_mpris. My foobar2000 exec file is as follows:

#!/bin/sh
cd ~/.local/share/foobar2000/
if [ "$1" != "" ]; then
filename=`echo z:$1 | sed 's/\\//\\\\/g'`
WINEPREFIX=~/.local/share/wineprefix/fb2k wine foobar2000.exe "$filename" &
else
WINEPREFIX=~/.local/share/wineprefix/fb2k wine foobar2000.exe &
fi

which is adapted from this guide on the hydrogen audio forums https://hydrogenaudio.org/index.php/topic,54933.0.html. I have also used this command as the exec command in my desktop file, but this returned the same error.

The commands beefweb_mpris as well as the one that I use to invoke foobar2000 work just fine when run from terminal. The desktop file is the only thing that does not work.

Last edited by Negapmahs (2026-01-08 20:43:46)

Offline

#2 2026-01-04 14:29:39

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

add a "printenv > /tmp/foobar.env" to the script, run it either way and compare the environments.

Offline

#3 2026-01-04 16:54:58

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

I couldn't add that specific line to the script, as it is a python rather than a shell script, but I ran the command in my terminal before and after invoking beefweb_mpris to see what happens. Here are the outputs:

@kanagawa-root=/home/negapmahs/.config/tmux/plugins/tmux-kanagawa
COLORTERM=truecolor
CONDA_CHANGEPS1=no
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
DESKTOP_SESSION=cinnamon
DISPLAY=:0
EDITOR=nano
GDMSESSION=cinnamon
GHOSTTY_BIN_DIR=/usr/bin
GHOSTTY_RESOURCES_DIR=/usr/share/ghostty
GHOSTTY_SHELL_FEATURES=cursor,path,title
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GNOME_KEYRING_CONTROL=/run/user/1000/keyring
GTK3_MODULES=xapp-gtk3-module
GTK_IM_MODULE=fcitx
GTK_MODULES=canberra-gtk-module
HOME=/home/negapmahs
LANG=en_US.UTF-8
LOGNAME=negapmahs
MAIL=/var/spool/mail/negapmahs
MANGOHUD=1
MOTD_SHOWN=pam
OLDPWD=/home/negapmahs
PATH=/home/negapmahs/.config/scripts:/scripts:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/negapmahs/.local/bin:/home/negapmahs/.local/bin
PROMPT_EOL_MARK=
PWD=/home/negapmahs
QT_IM_MODULE=fcitx
SESSION_MANAGER=local/negapmahs-arch:@/tmp/.ICE-unix/1268,unix/negapmahs-arch:/tmp/.ICE-unix/1268
SHELL=/bin/zsh
SHLVL=1
TERM=tmux-256color
TERMINFO=/usr/share/terminfo
TERM_PROGRAM=tmux
TERM_PROGRAM_VERSION=3.6a
TMUX=/tmp/tmux-1000/default,2978,0
TMUX_PANE=%0
TMUX_PLUGIN_MANAGER_PATH=/home/negapmahs/.config/tmux/plugins/
USER=negapmahs
WINDOWID=79691780
XAUTHORITY=/home/negapmahs/.Xauthority
XDG_CACHE_HOME=/home/negapmahs/.cache
XDG_CONFIG_HOME=/home/negapmahs/.config
XDG_CURRENT_DESKTOP=X-Cinnamon
XDG_DATA_DIRS=/home/negapmahs/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_DATA_HOME=/home/negapmahs/.local/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/negapmahs
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=cinnamon
XDG_SESSION_ID=2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7
XMODIFIERS=@im=fcitx
_=/usr/bin/printenv
FZF_DEFAULT_OPTS=--style minimal --color 16 --layout=reverse --height 30% --preview='bat -p --color=always {}'
FZF_CTRL_R_OPTS=--style minimal --color 16 --info inline --no-sort --no-preview
FFF_HIDDEN=1
FFF_FILE_ICON=1
FFF_GIT_CHANGES=1
FFF_FILE_DETAILS=0
FFF_LS_COLORS=1
FFF_CD_ON_EXIT=0
VIRTUAL_ENV_DISABLE_PROMPT=12
@kanagawa-root=/home/negapmahs/.config/tmux/plugins/tmux-kanagawa
COLORTERM=truecolor
CONDA_CHANGEPS1=no
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
DESKTOP_SESSION=cinnamon
DISPLAY=:0
EDITOR=nano
GDMSESSION=cinnamon
GHOSTTY_BIN_DIR=/usr/bin
GHOSTTY_RESOURCES_DIR=/usr/share/ghostty
GHOSTTY_SHELL_FEATURES=cursor,path,title
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GNOME_KEYRING_CONTROL=/run/user/1000/keyring
GTK3_MODULES=xapp-gtk3-module
GTK_IM_MODULE=fcitx
GTK_MODULES=canberra-gtk-module
HOME=/home/negapmahs
LANG=en_US.UTF-8
LOGNAME=negapmahs
MAIL=/var/spool/mail/negapmahs
MANGOHUD=1
MOTD_SHOWN=pam
OLDPWD=/home/negapmahs
PATH=/home/negapmahs/.config/scripts:/scripts:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_per>
PROMPT_EOL_MARK=
PWD=/home/negapmahs
QT_IM_MODULE=fcitx
SESSION_MANAGER=local/negapmahs-arch:@/tmp/.ICE-unix/1268,unix/negapmahs-arch:/tmp/.ICE-unix/1268
SHELL=/bin/zsh
SHLVL=1
TERM=tmux-256color
TERMINFO=/usr/share/terminfo
TERM_PROGRAM=tmux
TERM_PROGRAM_VERSION=3.6a
TMUX=/tmp/tmux-1000/default,2978,0
TMUX_PANE=%3
TMUX_PLUGIN_MANAGER_PATH=/home/negapmahs/.config/tmux/plugins/
USER=negapmahs
WINDOWID=79691780
XAUTHORITY=/home/negapmahs/.Xauthority
XDG_CACHE_HOME=/home/negapmahs/.cache
XDG_CONFIG_HOME=/home/negapmahs/.config
XDG_CURRENT_DESKTOP=X-Cinnamon
XDG_DATA_DIRS=/home/negapmahs/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_DATA_HOME=/home/negapmahs/.local/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/negapmahs
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=cinnamon
XDG_SESSION_ID=2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7
XMODIFIERS=@im=fcitx
_=/usr/bin/printenv
FZF_DEFAULT_OPTS=--style minimal --color 16 --layout=reverse --height 30% --preview='bat -p --color=always {}'
FZF_CTRL_R_OPTS=--style minimal --color 16 --info inline --no-sort --no-preview
FFF_HIDDEN=1
FFF_FILE_ICON=1
FFF_GIT_CHANGES=1
FFF_FILE_DETAILS=0
FFF_LS_COLORS=1
FFF_CD_ON_EXIT=0
VIRTUAL_ENV_DISABLE_PROMPT=12

At least to my eyes, they are identical.

Last edited by Negapmahs (2026-01-04 16:55:22)

Offline

#4 2026-01-04 17:06:33

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

You're ultimately running this and it's what's executing wine, right?

#!/bin/sh
cd ~/.local/share/foobar2000/
if [ "$1" != "" ]; then
filename=`echo z:$1 | sed 's/\\//\\\\/g'`
WINEPREFIX=~/.local/share/wineprefix/fb2k wine foobar2000.exe "$filename" &
else
WINEPREFIX=~/.local/share/wineprefix/fb2k wine foobar2000.exe &
fi

Offline

#5 2026-01-04 17:22:20

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Oh, duh. My bad for not realising. Well, here are the outputs.

Using beefweb_mpris

@kanagawa-root=/home/negapmahs/.config/tmux/plugins/tmux-kanagawa
SHELL=/bin/zsh
SESSION_MANAGER=local/negapmahs-arch:@/tmp/.ICE-unix/1322,unix/negapmahs-arch:/tmp/.ICE-unix/1322
WINDOWID=77594628
GHOSTTY_BIN_DIR=/usr/bin
COLORTERM=truecolor
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
FFF_CD_ON_EXIT=0
TERM_PROGRAM_VERSION=3.6a
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GTK_IM_MODULE=fcitx
TMUX=/tmp/tmux-1000/default,2592,0
GNOME_KEYRING_CONTROL=/run/user/1000/keyring
XDG_DATA_HOME=/home/negapmahs/.local/share
XDG_CONFIG_HOME=/home/negapmahs/.config
TMUX_PLUGIN_MANAGER_PATH=/home/negapmahs/.config/tmux/plugins/
XMODIFIERS=@im=fcitx
DESKTOP_SESSION=cinnamon
CONDA_CHANGEPS1=no
EDITOR=nano
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/negapmahs/.local/share/foobar2000
XDG_SESSION_DESKTOP=cinnamon
LOGNAME=negapmahs
XDG_SESSION_TYPE=x11
XAUTHORITY=/home/negapmahs/.Xauthority
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/negapmahs
FFF_FILE_DETAILS=0
MOTD_SHOWN=pam
GHOSTTY_SHELL_FEATURES=cursor,path,title
MANGOHUD=1
HOME=/home/negapmahs
LANG=en_US.UTF-8
FZF_CTRL_R_OPTS=--style minimal --color 16 --info inline --no-sort --no-preview
XDG_CURRENT_DESKTOP=X-Cinnamon
VIRTUAL_ENV_DISABLE_PROMPT=12
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CACHE_HOME=/home/negapmahs/.cache
GHOSTTY_RESOURCES_DIR=/usr/share/ghostty
XDG_SESSION_CLASS=user
TERMINFO=/usr/share/terminfo
TERM=tmux-256color
USER=negapmahs
TMUX_PANE=%0
FFF_HIDDEN=1
FFF_LS_COLORS=1
PROMPT_EOL_MARK=
DISPLAY=:0
SHLVL=2
FFF_GIT_CHANGES=1
QT_IM_MODULE=fcitx
XDG_VTNR=7
XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
GTK3_MODULES=xapp-gtk3-module
XDG_DATA_DIRS=/home/negapmahs/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
PATH=/home/negapmahs/.config/scripts:/scripts:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/negapmahs/.local/bin:/home/negapmahs/.local/bin
GDMSESSION=cinnamon
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
FZF_DEFAULT_OPTS=--style minimal --color 16 --layout=reverse --height 30% --preview='bat -p --color=always {}'
MAIL=/var/spool/mail/negapmahs
OLDPWD=/home/negapmahs
FFF_FILE_ICON=1
TERM_PROGRAM=tmux
_=/usr/bin/printenv

Using dex /my/desktop/file which magically started working after I took a nap.

@kanagawa-root=/home/negapmahs/.config/tmux/plugins/tmux-kanagawa
SHELL=/bin/zsh
SESSION_MANAGER=local/negapmahs-arch:@/tmp/.ICE-unix/1322,unix/negapmahs-arch:/tmp/.ICE-unix/1322
WINDOWID=77594628
GHOSTTY_BIN_DIR=/usr/bin
COLORTERM=truecolor
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
FFF_CD_ON_EXIT=0
TERM_PROGRAM_VERSION=3.6a
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GTK_IM_MODULE=fcitx
TMUX=/tmp/tmux-1000/default,2592,0
GNOME_KEYRING_CONTROL=/run/user/1000/keyring
XDG_DATA_HOME=/home/negapmahs/.local/share
XDG_CONFIG_HOME=/home/negapmahs/.config
TMUX_PLUGIN_MANAGER_PATH=/home/negapmahs/.config/tmux/plugins/
XMODIFIERS=@im=fcitx
DESKTOP_SESSION=cinnamon
CONDA_CHANGEPS1=no
EDITOR=nano
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/negapmahs/.local/share/foobar2000
XDG_SESSION_DESKTOP=cinnamon
LOGNAME=negapmahs
XDG_SESSION_TYPE=x11
XAUTHORITY=/home/negapmahs/.Xauthority
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/negapmahs
FFF_FILE_DETAILS=0
MOTD_SHOWN=pam
GHOSTTY_SHELL_FEATURES=cursor,path,title
MANGOHUD=1
HOME=/home/negapmahs
LANG=en_US.UTF-8
FZF_CTRL_R_OPTS=--style minimal --color 16 --info inline --no-sort --no-preview
XDG_CURRENT_DESKTOP=X-Cinnamon
VIRTUAL_ENV_DISABLE_PROMPT=12
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CACHE_HOME=/home/negapmahs/.cache
GHOSTTY_RESOURCES_DIR=/usr/share/ghostty
XDG_SESSION_CLASS=user
TERMINFO=/usr/share/terminfo
TERM=tmux-256color
USER=negapmahs
TMUX_PANE=%0
FFF_HIDDEN=1
FFF_LS_COLORS=1
PROMPT_EOL_MARK=
DISPLAY=:0
SHLVL=2
FFF_GIT_CHANGES=1
QT_IM_MODULE=fcitx
XDG_VTNR=7
XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
GTK3_MODULES=xapp-gtk3-module
XDG_DATA_DIRS=/home/negapmahs/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
PATH=/home/negapmahs/.config/scripts:/scripts:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/negapmahs/.local/bin:/home/negapmahs/.local/bin
GDMSESSION=cinnamon
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
FZF_DEFAULT_OPTS=--style minimal --color 16 --layout=reverse --height 30% --preview='bat -p --color=always {}'
MAIL=/var/spool/mail/negapmahs
OLDPWD=/home/negapmahs
FFF_FILE_ICON=1
TERM_PROGRAM=tmux
_=/usr/bin/printenv

Seems like there isn't a difference between the two.

Offline

#6 2026-01-04 17:25:41

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Seems like there isn't a difference between the two.

magically started working after I took a nap.

It's because bugs are afraid of me wink

This of course renders any test pointless, the best thing I can suggest is to call back if the issue returns.

Offline

#7 2026-01-04 17:28:23

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Ah, I forgot to mention, but the desktop file is not executable from Nemo, and does not show up in my application menu (I am using Cinnamon Desktop Manager). I get the nondescript error message "There was an error launching this application". Using dex works fine. Idk at this point lol.

Hopefully me going about my day and coming back later fixes the issue, haha.

Offline

#8 2026-01-04 17:35:14

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Please upload the actual desktop service file somewhere (0x0.st is fine)

Offline

#9 2026-01-04 17:42:48

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Sorry, I am a bit confused by what you mean with "desktop service file". Is that the display manager service? Here is the output of

systemctl --type=service --state=running

in case that helps. Or is it just the .desktop file? Please excuse my ignorance.

  UNIT                      LOAD   ACTIVE SUB     DESCRIPTION
  accounts-daemon.service   loaded active running Accounts Service
  colord.service            loaded active running Manage, Install and Generate Color Profiles
  cronie.service            loaded active running Command Scheduler
  dbus-broker.service       loaded active running D-Bus System Message Bus
  grub-btrfsd.service       loaded active running Regenerate grub-btrfs.cfg
  lightdm.service           loaded active running Light Display Manager
  logid.service             loaded active running Logitech Configuration Daemon
  mullvad-daemon.service    loaded active running Mullvad VPN daemon
  named.service             loaded active running Internet domain name server
  NetworkManager.service    loaded active running Network Manager
  polkit.service            loaded active running Authorization Manager
  rtkit-daemon.service      loaded active running RealtimeKit Scheduling Policy Service
  sshd.service              loaded active running OpenSSH Daemon
  systemd-journald.service  loaded active running Journal Service
  systemd-logind.service    loaded active running User Login Management
  systemd-timesyncd.service loaded active running Network Time Synchronization
  systemd-udevd.service     loaded active running Rule-based Manager for Device Events and Files
  systemd-userdbd.service   loaded active running User Database Manager
  udisks2.service           loaded active running Disk Manager
  upower.service            loaded active running Daemon for power management
  user@1000.service         loaded active running User Manager for UID 1000

Offline

#10 2026-01-04 17:45:13

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

https://wiki.archlinux.org/title/Desktop_entries
The thing that you can run w/ dex but not from nemo.

Offline

#11 2026-01-04 17:59:40

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

The .desktop file is what you're asking for. It is in the original post, but I'll paste its contents again here.

[Desktop Entry]
Type=Application
Name=foobar2000
Exec=beefweb_mpris
Icon=foobar2000

Here is the 0x0.st link https://0x0.st/PoQM.desktop

Offline

#12 2026-01-04 18:25:29

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Sorry, I thought that was just a boilded down version and not what you're currently using.
Do you get a printenv output from nemo?

type -a beefweb_mpris

Offline

#13 2026-01-04 18:29:40

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

I do not get a printenv output. I put the print env at the very end of the script, though.

The output of what you sent is

beefweb_mpris is /home/user/.local/bin/beefweb_mpris
beefweb_mpris is /home/user/.local/bin/beefweb_mpris

Offline

#14 2026-01-04 18:40:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

I suspect that's not part of the $PATH in the nemo context. Change the desktop service and try to execute it by its absolute path.

Offline

#15 2026-01-04 18:52:52

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

It is definitely part of the $PATH as other desktop files stored there launch. I've also done what you said regarding the absolute path already and it did not change anything.

Offline

#16 2026-01-04 18:56:13

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

It's not about where the .desktop file is stored.

tr '\0' '\n' < /proc/$(pidof nemo)/environ | grep PATH

Offline

#17 2026-01-05 12:32:56

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Apologies for the late reply, got a bit busy. Here is the output of that command.

XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Offline

#18 2026-01-05 13:47:52

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Does not include "/home/user/.local/bin/", either fix  the desktop service, extend the PATH environment of the session or move beefweb_mpris into a global PATH (/usr/local/bin)

[Desktop Entry]
Type=Application
Name=foobar2000
Exec=/home/user/.local/bin/beefweb_mpris # but I suspect "user" is a placeholder?
Icon=foobar2000

https://wiki.archlinux.org/title/Environment_variables

Offline

#19 2026-01-06 07:42:44

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

So I did what you suggested. I put beefweb_mpris into /usr/bin, and then I also tried explicitly specifying /home/user/.local/bin/beefweb_mpris (yes "user" is a placeholder). The desktop entry now shows up in the cinnamon application menu correctly. However, it does not launch when selected. The mouse cursor does turn into the wheel indicating something is happening. There is no output in journalctl, however.

Offline

#20 2026-01-06 10:25:39

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

You didn't do both and are now trying to explicitly start the former path?
Does dex still work?
In doubt it depends on some other environment or even a stdout.
/usr/local/bin/beefweb_mpris.sh

#!/bin/sh
/usr/local/bin/beefweb_mpris > /tmp/beefweb_mpris.dbg 2>&1

Don't forget to "chmod +x /usr/local/bin/beefweb_mpris.sh" and then run that script instead of beefweb_mpris in the desktop service
/tmp/beefweb_mpris.dbg might indicate what it doesn't like.
If the file doesn't show up, beefweb_mpris.sh isn't executed at all

Offline

#21 2026-01-06 12:59:59

Negapmahs
Member
Registered: 2026-01-04
Posts: 11

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

Alright, so following your directions and doing some additional troubleshooting based on the error log printed out solved this issue.\

First, I got this:

Traceback (most recent call last):
  File "/usr/local/bin/beefweb_mpris", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/user/.local/share/venv/beefweb_mpris/lib/python3.13/site-packages/beefweb_mpris/main.py", line 39, in main
    foobar2000 = Popen([config['foobar2000-command']])
  File "/usr/lib/python3.13/subprocess.py", line 1039, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/subprocess.py", line 1991, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'fb2k'

The last line hinted to me that the script "fb2k" was not in $PATH. I then moved fb2k to /usr/local/bin, and FINALLY the desktop file executed the program.

Anyways, thanks a lot for helping, Seth.

Last edited by Negapmahs (2026-01-06 13:09:34)

Offline

#22 2026-01-06 16:58:40

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Desktop files fails to open application,but exec commandworks

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB