[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xdg
Subject:    Re: Help needed: specification of current directory for shell
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-03-25 16:20:33
Message-ID: 200403251720.33499.bastian () kde ! org
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed March 24 2004 12:40, Michael Jeltsch wrote:
> I came across a strange behaviour of .desktop files when used in KDE 3 as
> service menus for Konqueror (Suse Linux 9): When I specify a shell script
> for "Exec", the current directory of the shell script seems to be allways
> my home directory. This is kind of strange when URLs or file lists are
> forwarded to the shell script. E.g. when renaming files with mv in my shell
> script, they are moved to my home directory instead of just renamed...
> Setting "Path" inside the .desktop file does not help in this case (because
> the "Type" is not Application and thus probably ignored). I need to
> integrate my shell scripts into the desktop.

If you only handle single files (e.g. %f or %u) you can use %d to get the 
directory. Unfortunately %d doesn't work in combination with multiple files 
(%U or %F)

You can use "dirname" in your script to extract the directory from the 
filename.

Hope that helps.

Cheers,
Waldo
- -- 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
^ bastian@kde.org | Is your software SUSE LINUX READY? | bastian@suse.com
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAYwbRN4pvrENfboIRAt7YAKClW9w6rOzXwyTbRG8FdHWLuhU5/QCfQ5lG
vGy1rYP70ANkaIQj3Pmregk=
=SqY7
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic