After upgrading ubuntu 19 to 20.04.1, gnome-terminal always starts with '/' as working directory

After upgrading Ubuntu from 19.04 to 20.04.1, gnome-terminal always opens with / as working directory when lanched by name at a command prompt or in a desktop file, but NOT when launched from a button 'preferenced' to the dock or from the applications menu.

I had (and still have) a shortcut on my desktop that should open a terminal in a project directory, with this command in the .desktop file:

Exec=gnome-terminal --working-directory="~/git/ams-rpicm"

It still opens a terminal window like it used to, but with "/" as working directory.

Launching instances of gnome-terminal from another terminal window, I found that it's always the same, whether I include the --working-directory switch or not, and whatever path I specify in that switch: it always opens with "/" as working directory.

Does anyone have an idea what might cause this? It worked as expected in 19.04 just an hour ago.

The answer in open in terminal is not working after upgrading to 19.10 doesn't apply here, I already checked that.

1
задан 1 July 2020 в 14:46

1 ответ

Похоже, что все изменилось. Вы не можете использовать расширение bash-tilde. Более того, вы не можете использовать относительный путь.

Чтобы обойти эту проблему, не используйте расширение bash tilde. Вместо этого используйте абсолютный путь или переменную среды при условии, что он доступен.

Таким образом, по умолчанию разверните тильду по полному пути, например

Exec=gnome-terminal --working-directory="/home/yourlogin/git/ams-rpicm"

, где yourlogin - это имя вашей домашней папки. совпадает с вашим именем пользователя.

0
ответ дан 30 July 2020 в 22:16

Другие вопросы по тегам:

Похожие вопросы: