The content of `keyboard.desktop` is shown below: ``` [Desktop Entry] Encoding=UTF-8 Version=0.9.4 Type=Application Name=colemak keyboard Comment= Exec=bash /home/albert/bin/colemak.sh OnlyShowIn=XFCE; StartupNotify=false Terminal=true Hidden=false ``` Extract the core logic from https://git.xfce.org/xfce/xfce4-session/tree/scripts/xinitrc.in.in#n162, and run it in a shell: ```shell $ cmd=`grep -E "^Exec=" keyboard.desktop | cut -d'=' -f2`; test "$cmd" && which "$cmd" ; echo $? 1 ``` I suppose the spec is https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html, and it states that passing arguments are supported. (Surely, I can work around this problem by dropping the preceding `bash`.)
This does not just affect ~/.config/autostart/*.desktop files; my /usr/local/share/applications/*.desktop files are also not working (unless they happen to not use command line arguments).
I created a new launcher (Exec=mousepad /home/user/Notes.txt) and moved it to the autostart directory. On the next login I had a open Mousepad window showing the Notes.txt.
After reading the bug description again I understand now that the issue is in the fallback code. Proposed fix: cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2` cmd_noargs=`echo "$cmd" | cut -d' ' -f1` if test "$cmd_noargs" && which "$cmd_noargs" >/dev/null 2>&1; then $cmd & fi
> On the next login I had a open Mousepad window showing the Notes.txt. I am curious how that happened. Thanks fort the proposed fix.
This part of scripts/xinitrc.in.in is only executed when running xfce without xfce4-session (corner case I guess), and need to be fixed. It parses manually the .desktop entries :( It should work when using xfce4-session (normal start), but I can't test right now… exec = xfce_rc_read_entry (rc, "Exec", NULL); [...] if (!xfce_spawn_command_line_on_screen (gdk_screen_get_default (), exec, terminal, startup_notify, &error)) {
I confirm that "Exec=bash /home/skunnyk/testme.sh" in autostart works when I use xfce4-session
I try to understand in which case this part on xinitrc code is used (i.e: run xfce4-session xinitrc without… xfce4-session ?!) See my comment in https://bugzilla.xfce.org/show_bug.cgi?id=14681#c2
xfce4-session is required now (bug 14681). This bug can be closed.
*** This bug has been marked as a duplicate of bug 14681 ***