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

symlinks resolved when opening new window or tab #16

Closed
realh opened this issue Jan 4, 2009 · 3 comments
Closed

symlinks resolved when opening new window or tab #16

realh opened this issue Jan 4, 2009 · 3 comments

Comments

@realh
Copy link
Owner

realh commented Jan 4, 2009

Symlinks appear to be resolved when a new window or tab is opened. For example, if my working directory is ~/quick/Mongolian, which is a symlink to /data/Documents/Homework/Indiana/Mongolian, and I open a new window or tab, the working directory within that session becomes /data/Documents/Homework/Indiana/Mongolian. The same is true if the working directory is a subdirectory of ~/quick/Mongolian.

Reported by: jonorthwash

Original Ticket: "roxterm/bugs/15":https://sourceforge.net/p/roxterm/bugs/15

@realh
Copy link
Owner Author

realh commented Jan 5, 2009

I don't think I can do anything about that. It gets the cwd by reading it from /proc//cwd which points to the resolved location if you got there via a link. But you have made me realise that there are problems in the code for doing this so I should fix it.

Original comment by: realh

@realh
Copy link
Owner Author

realh commented Jan 5, 2009

It's interesting that xterm appears to have the correct behaviour when a new window is opened. Maybe you could implement it into ROXTerm however xterm does it?

Original comment by: jonorthwash

@realh
Copy link
Owner Author

realh commented Jan 5, 2009

The main difference is that xterm uses a separate instance for each window so each one inherits the cwd from its parent without having to do anything. All ROXTerm windows share a single instance even if you run each one from the command line, unless you use the --separate flag. This means they have to have their working directory set explicitly, otherwise they'd all be stuck with whatever was the cwd when the original instance was run.

When a second instance is run from a command it reads the cwd and sends a dbus request to the original instance to open a new window with that directory and all the other options. It seems that getcwd() and g_get_current_dir() both follow symlinks, but I stumbled across GNU's get_current_dir_name() which appears not to, so I've changed roxterm to use that when it's available.

In short, opening a new window by running a roxterm command should now set the cwd the way you want, but I can't change what happens to it when using the New Window/Tab menu items. Please checkout the latest svn.

Original comment by: realh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant