GAppInfo and the working directory


I've found little information on how to set the working directory for
applications started via GAppInfo on the net. The only mail I stumbled
across was this one:

It says there are no plans at all to support modifying the working
directory through GAppLaunchContext because the result of the
launch operation is unpredictable due of the variety of ways to spawn
applications (fork, exec, D-Bus, crazy Windows stuff).

But still, I don't think this level of control is not enough to provide
a good user experience in certain situations. 

One such situation is when a user opens an application from a file
manager by double-clicking on a file. Now, some applications maintain
an internal representation of a working directory (e.g. by assuming
that if opened with a file parameter, the supposed-to-be working
directory is the dirname of the input file). But others, like
GVIM --yes, I know, geek example -- don't. 

Generally, if someone opens an application from within a file manager,
he or she would expect the current file manager directory to be the
working directory, so I think there is a need for passing it to

Any opinions on this? 

We already have parameters for GdkAppLaunchContext that are not
supported on all platforms, e.g. gdk_app_launch_context_set_desktop()
won't work on Windows. So I don't see what speaks against adding
a working directory parameter that is supposed to work on some
platforms only. But maybe there are better options. 

Alex, if you happen to read this: How does Nautilus do it? (Yes, I
admit, I'm too lazy to browse the source right now. ;))

I'd really be interested in feedback and opinions on this matter as I'm
kinda unhappy not having this feature in Thunar after the port to GIO.


Attachment: signature.asc
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]