Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-01-23 15:40:42

KitchM
Member
Registered: 2009-08-15
Posts: 131

Working Directory

I would like to know the official explanation for the launcher option entitled "Working Directory:".

I am having a problem with a Firefox install that cannot find the correct location for its profile list and do not know it this is something that can be fixed by the use of this option.

I'm using Xubuntu 18 with Xfce 4.12.

Last edited by KitchM (2019-01-23 15:44:28)

Offline

#2 2019-01-24 00:39:00

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,112

Re: Working Directory

path to the directory in which to execute the preferred application for category .

Source: https://bluesabre.org/docs/exo/exo-Exec … tions.html.

Also, from "man exo-open":

--working-directory directory
    When using the --launch option and this option is specified as well, the application will be run in the given directory. This is primarily useful when running the preferred TerminalEmulator from another application and you want the command in the terminal window to be run in a specific directory.

Offline

#3 2019-01-24 01:07:31

KitchM
Member
Registered: 2009-08-15
Posts: 131

Re: Working Directory

I'm having trouble understanding the words used there.  Can you give an example?

Offline

#4 2019-01-24 01:07:34

alcornoqui
Member
Registered: 2014-07-28
Posts: 359

Re: Working Directory

I think "working directory" corresponds to "Path" in the FreeDesktop spec, as one of the recognized desktop entry keys:

Path: If entry is of type Application, the working directory to run the program in.

But my guess is that your problem is different, more like this:

How to run Firefox when your profile is missing or inaccessible

Online

#5 2019-01-24 01:18:59

KitchM
Member
Registered: 2009-08-15
Posts: 131

Re: Working Directory

Thanks, but that link is about "If you moved, renamed, or deleted your Firefox profile folder" and I have not.  The directory still exists in the .mozilla/firefox area and the profile ini file is still there with the original profiles all listed as they were.

I admit that the Ubuntu upgrade is crap and wiped out my productivity for over a week now by loosing all links to most of the programs that were installed and even eliminated some programs without so much as a by your leave.  However, I should be able to manually force the re-installed program to look into the directory with which it should be associated.

Offline

#6 2019-01-24 01:20:57

KitchM
Member
Registered: 2009-08-15
Posts: 131

Re: Working Directory

By the way, it is obvious to me that the idea of a "path" is confusing in this context because there is a path in the command line as well as in the working directory line.  Is that not so?

Offline

#7 2019-01-24 01:39:51

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,112

Re: Working Directory

KitchM wrote:

I'm having trouble understanding the words used there.  Can you give an example?

Create a test directory in /tmp (/tmp/test), with two files in it:
ttt with the following content:

#!/bin/bash
cat test.txt

test.txt with the following content:

This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test

...and make the ttt file executable:

chmod +x ttt

Test #1
From a terminal window, cd to the /tmp/test directory and run "./ttt". You will see the output.

Test #2
From your home directory, run "/tmp/test/ttt". You will not see the input because it cannot find the test.txt file in the current directory.

Test #3
Create a launcher and specify as the command: "xfce4-terminal -H -e /tmp/test/ttt". Click the launcher. You will not see the output (this is similar to Test 2 above - the default working directory for launchers is your $HOME directory).

Test #4
In the launcher's working directory box, enter "/tmp/test". Click the launcher. You will now see the output.

Hope this helps.

By the way, it is obvious to me that the idea of a "path" is confusing in this context because there is a path in the command line as well as in the working directory line.  Is that not so?

The thing to keep in mind is that for the launchers, the default working directory (if not otherwise specified) is your $HOME directory.

Offline

#8 2019-01-24 02:01:20

KitchM
Member
Registered: 2009-08-15
Posts: 131

Re: Working Directory

Yes, that is a huge help.  Thank you.

I assumed something like that should work.  Tomorrow I'll go back over it again and see if I had a typo or something in my first attempt to solve my problem.

Offline

Board footer

Powered by FluxBB