You are not logged in.

#1 2013-09-16 04:55:02

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

[SOLVED] Start urxvt new clients that keep the last working directory?

Hi,

I switched back to urxvt recently and I am again using it in a daemon-client mode.  I seem to remember before when I start a new client, it will automatically change to the working directory of the last client.  But now it does not do that any more?  How could I get this behavior back if it ever existed?  Or any other way to achieve this?  Thanks.

EDIT:

If I start another urxvt client inside one client, the new client will inherit the current working directory of the old one.  The problem is that I am using urxvt in daemon-client mode in xmonad.  I want to have the effect that when I spawn a new urxvt client using the xmonad keying binding for this action, the new client also inherits the current working directory of the old one.  I would expect if the last working client could somehow send the infor about its current working directory to the daemon and store there, then when a new client is started, it could get this info from the daemon and then change to the same directory.  I seem to remember before urxvt did this.  Maybe I misremember it.  But anyway, is this possible?

Last edited by plmday (2013-09-16 09:20:36)


Arch, the Portal of Linux

Offline

#2 2013-09-16 05:14:36

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Start urxvt new clients that keep the last working directory?

from urxvt's man page

chdir: path
Sets the working directory for the shell (or the command specified via -e). The path must be an absolute path
and it must exist for urxvt to start. If it isn't specified then the current working directory will be used;
option -cd.

maybe this is the option you are looking for?

Last edited by x33a (2013-09-16 05:15:13)

Offline

#3 2013-09-16 06:15:22

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: [SOLVED] Start urxvt new clients that keep the last working directory?

@x33a: Thanks for your reply.  I tried, it does not work.  I think this option is only useful to start urxvt with a specific directory.  By default, it is the user home, but we can set it to, say the root /, with this option.  But it does not allow to dynamically start a urxvt client with the current working directory of last client under focus.  (I have edited the question to add more details.)


Arch, the Portal of Linux

Offline

#4 2013-09-16 07:26:16

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Start urxvt new clients that keep the last working directory?

Well not exactly what you are looking for, but, tmux does this by default.

Edit: Maybe give one of these a try

http://unix.stackexchange.com/questions … one-from-a

Last edited by x33a (2013-09-16 07:36:07)

Offline

#5 2013-09-16 09:20:21

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: [SOLVED] Start urxvt new clients that keep the last working directory?

Thanks for the link.  I picked the solution there.


Arch, the Portal of Linux

Offline

#6 2013-09-16 16:26:53

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: [SOLVED] Start urxvt new clients that keep the last working directory?

@plmday which solution did you use?

Offline

Board footer

Powered by FluxBB