0

About a week ago (maybe after an update) the starting directory of xfce4-terminal changed from ~ to ~/Documents when launched from the panel. I'm pretty sure that wasn't because of anything I have done: there are no cd commands in ~/.bashrc (and that should not be necessary) and the launcher did not contain anything in the field 'Working Directory' (I put $HOME there just to try, but that does not work either).

$ grep cd ~/.bashrc
$ grep Desktop .config/xfce4/terminal/terminalrc
$

I'm runnning Ubuntu 20.04, has anyone had this same thing happen in Ubuntu?

7
  • Does the same happen during SSH? Add the output of getent passwd username to the question. Nov 8, 2021 at 12:38
  • Under Edit → Preferences → General, is Working directory set? Nov 8, 2021 at 12:42
  • @schrodigerscatcuriosity yes I tried $HOME and /home/<username> but it seems to be overruled by something else?
    – alle_meije
    Nov 8, 2021 at 12:55
  • @NasirRiley no, when I'm in my home directory and type ssh localhost I just end up in the home directory again. And, maybe stranger: If I am in my home directory and launch xfce4-terminal from there, it also starts in the home directory. I have removed the launcher and added a new one, with the terminal emulator, but it still starts in ~\Documents.
    – alle_meije
    Nov 8, 2021 at 13:04
  • What is the launcher pointing to?
    – terdon
    Nov 8, 2021 at 13:05

1 Answer 1

2

Looks like the xfce4-terminal defaults to opening in whatever directory it was launched from. I just installed it on my Arch system, and confirmed the behavior. So I looked at its Preferences section (Edit => Preferences) and saw:

screenshot of xfce4-terminal preferences

So, just set that field to /home/yourUser and it should work.

It should, but at least on my system it does not! I tried this and the setting seems to be ignored which makes me think this is a bug in the program. You should let the developers know by filing a bug report, or you can wait until it is corrected.

In the meantime, as a workaround for your launcher, you can change the launcher so that it executes:

xfce4-terminal --default-working-directory=/home/yourUser

That should make new terminals open as expected.

1
  • Thanks -- will do! I did notice this as well, not sure if it was a bug or that there was some other directory setting that could still overrule everything.
    – alle_meije
    Nov 8, 2021 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .