In dolphin, if you double click a file name, or right click and select Open with ... something, the "desktop entry" .desktop file is used to start whatever programme is needed. If you right click the file, select Properties, click File Type Options, you can edit the desktop entry and on the Application tab specify the "Work Path" for the action.
I can't find a simple way to use the directory of the file being opened. With this blank my home directory is used.
This is governed by Desktop Entry Specification, but KDE have extended that a little, at least in that the .desktop file can have "Path[$e]=" instead of just "Path=", to cause environment variables to be expanded for the entry. I can find no specs for these KDE extensions; googling for "desktop entry path kde" does not tell me, there's too many tangents possible with those search terms. Does anyone know where the KDE extensions might be documented?
Now one can change the command to
and that works, but %d is deprecated and undocumented, and
works too, but the spec says one should have only one of %f, %F, %u or %U appearing in the command, and that only once. I could also use a wrapper shell script to achieve the same.
But it should be simple, and is expected by those moving from Windows and OS X.
Regards, John Little
I can't find a simple way to use the directory of the file being opened. With this blank my home directory is used.
This is governed by Desktop Entry Specification, but KDE have extended that a little, at least in that the .desktop file can have "Path[$e]=" instead of just "Path=", to cause environment variables to be expanded for the entry. I can find no specs for these KDE extensions; googling for "desktop entry path kde" does not tell me, there's too many tangents possible with those search terms. Does anyone know where the KDE extensions might be documented?
Now one can change the command to
Code:
cd %d;[I]whatever[/I] %F
Code:
x="%f";cd "${x%/*}";[I]whatever[/I] %F
But it should be simple, and is expected by those moving from Windows and OS X.
Regards, John Little
Comment