Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open terminator [2.0.1] in same working directory #262

Closed
gkatev opened this issue Oct 23, 2020 · 9 comments · Fixed by #270
Closed

Open terminator [2.0.1] in same working directory #262

gkatev opened this issue Oct 23, 2020 · 9 comments · Fixed by #270
Labels
question Further information is requested

Comments

@gkatev
Copy link

gkatev commented Oct 23, 2020

In 1.92, terminator opens in the same working directory as the "parent", whereas in 2.0.1, it always opens in $HOME.
I believe the functionality should be how it was in 1.92, the same way it is in gnome-terminal (and others?).
How to reproduce:

From a terminal, cd to /usr (or any directory other than $HOME).
Enter 'terminator' command.
In 1.92, the new window will be started in /usr. In 2.0.1, it will be started in $HOME.

Simple use case:
When launching a terminal from the file manager, you want it to be started at the current folder.

@mattrose
Copy link
Member

This is how it works for me. If I open terminator from another terminal emulator, it opens in the directory I launched it from?

What OS are you using?

@mattrose mattrose added the question Further information is requested label Oct 23, 2020
@gkatev
Copy link
Author

gkatev commented Oct 23, 2020

Oh, ok! I'm on Arch Linux.
If you can't reproduce this yourself, you could point me to the relevant place in the code and I can look around.

@napcok
Copy link
Contributor

napcok commented Oct 24, 2020

Same issue here,
terminator-git from AUR -> https://aur.archlinux.org/packages/terminator-git/
Tested in PCManFM and Thunar file managers, terminator always starts at $HOME, regardless current directory.

@mattrose
Copy link
Member

I've poked the Arch packager to see if he can reproduce.

Can you check to see if vte-common is installed? I don't see a dependency for it, but it does help with this.

@mattrose
Copy link
Member

The relevant code is here https://github.com/gnome-terminator/terminator/blob/master/terminatorlib/cwd.py if you don't have the OSC-7 escape sequence installed, and is called from https://github.com/gnome-terminator/terminator/blob/master/terminatorlib/terminal.py#L236 if you want to investigate further.

@napcok
Copy link
Contributor

napcok commented Oct 24, 2020

Can you check to see if vte-common is installed? I don't see a dependency for it, but it does help with this.

Yes, vte-common is installed.

@mattrose
Copy link
Member

If you modify the file manager to run terminator -u --working-directory=%s it should work. This gives me some ideas as well.

@mattrose
Copy link
Member

Can you run terminator -d --debug-methods parse_options --working-directory /tmp/ and paste the output?

@napcok
Copy link
Contributor

napcok commented Oct 27, 2020

napcok@mabox ~ $ terminator -d --debug-methods parse_options --working-directory /tmp/ noclass::parse_options: OptionParse::parse_options: command line options: {'version': None, 'maximise': None, 'fullscreen': None, 'borderless': None, 'hidden': None, 'forcedtitle': None, 'geometry': None, 'command': None, 'config': '/home/napcok/.config/terminator/config', 'configjson': None, 'execute': None, 'working_directory': '/tmp/', 'forcedicon': None, 'role': None, 'layout': 'default', 'select': None, 'profile': None, 'nodbus': None, 'debug': 1, 'debug_classes': None, 'debug_methods': 'parse_options', 'new_tab': None, 'dummy': None}

bobwhitelock added a commit to bobwhitelock/dotfiles that referenced this issue Feb 11, 2021
This used to be the behaviour, but seems Terminator
2.0.1 changed to default to using `$HOME` instead, breaking this.

See gnome-terminator/terminator#262.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants