Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-02-01 16:09:54

jsp
Member
Registered: 2011-12-30
Posts: 3

launcher "working directory" does not work for bash script

I have a test script that reads:

    #!/bin/bash
    pwd
    read x

when I run it from the command line i get

    [jsp@psy86 blah] 1024:$ ./test.sh
    /home/jsp/projects/blah

however, if I create an XFCE 4.8.6 launcher like this:

[jsp@psy86 blah] 1025:$ cat ~/Desktop/test.desktop

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=test
    Comment=
    Exec=/home/jsp/projects/blah/test.sh
    Icon=
    Path=/home/jsp/projects/blah
    Terminal=true
    StartupNotify=false
    GenericName=

and double click it, it outputs the root directory:

    /

Why doesn't it output /home/jsp/projects/blah?

Last edited by jsp (2012-02-01 16:49:32)

Offline

#2 2012-02-01 16:40:24

jsp
Member
Registered: 2011-12-30
Posts: 3

Re: launcher "working directory" does not work for bash script

Note that this launcher is on my Desktop.  However, if I create a launcher in the XFCE panel, it works!  That is, when I double click it, I get:

    /home/jsp/projects/blah

instead of

    /

The .desktop files look very similar.  Their Exec and Path fields are identical.

Here is the panel launcher.  It has a few more fields than the desktop launcher (Categories, OnlyShowIn):

[jsp@psy86 ~] 1041:$ cat .config/xfce4/panel/launcher-20/13281135821.desktop

[Desktop Entry]
Version=1.0
Type=Application
Exec=/home/jsp/projects/blah/test.sh
Icon=
StartupNotify=false
Terminal=true
Categories=Utility;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
Name=test
Comment=
X-XFCE-Source=file:///usr/share/applications/xfrun4.desktop
Path=/home/jsp/projects/blah

Last edited by jsp (2012-02-01 16:49:16)

Offline

#3 2013-07-22 18:35:35

digital20watt
Member
Registered: 2013-07-22
Posts: 1

Re: launcher "working directory" does not work for bash script

Hey,

Was there a fix found for this? I have this exact same issue with XFCE 4.8 that comes with Debian Wheezy 7.1.0 (released June 2013). The Path= (Working Directory) is not honored when running the .desktop file from desktop, only from panel.

I also ran into another similar issue described here: http://markmail.org/thread/dpohsw5xz2eguqqh I fixed that one manually by editing /usr/bin/xfce4-terminal.wrapper (which affects x-terminal-emulator on Debian), but even after fixing that, I still get the issue described in this forum post here. And now I'm out of ideas.

(You can easily replicate this using the Debian Wheezy 7.0.0 live CD w/XFCE : http://cdimage.debian.org/debian-cd/cur … bt-hybrid/ )

Last edited by digital20watt (2013-07-22 18:42:00)

Offline

Board footer

Powered by FluxBB