Re: Use of krenew with tmux

2010-08-31 Thread Nicholas Marriott
it doesn't do nothing, it just looks like it does :-) it starts the server and the server then exits because you haven't created any sessions it could act like new i suppose but it probably isn't worth the effort On Tue, Aug 31, 2010 at 10:20:49AM +0200, Mika Fischer wrote: > But if you just cal

Re: Use of krenew with tmux

2010-08-31 Thread Mika Fischer
But if you just call "tmux start" with an empty config file it does nothing and that's supposed to be so? Best, Mika On Tue, Aug 31, 2010 at 10:18, Nicholas Marriott wrote: > start-server is to create a server without creating any sessions, eg if > you create them in the configuration file > >

Re: Use of krenew with tmux

2010-08-31 Thread Nicholas Marriott
start-server is to create a server without creating any sessions, eg if you create them in the configuration file On Tue, Aug 31, 2010 at 10:13:06AM +0200, Mika Fischer wrote: > Something like the following seems to work: > -

Re: Use of krenew with tmux

2010-08-31 Thread Mika Fischer
Something like the following seems to work: -- $ cat krenew-tmux-wrapper #!/bin/bash if [ $(tmux ls 2>/dev/null | wc -l) -gt 0 ]; then exit 1 fi tmux kill-server >/dev/null 2>&1 tmux new -d while [ $(tmux ls 2>/d

Re: Use of krenew with tmux

2010-08-30 Thread Mika Fischer
Yes, but this cloning the credentials cache and changing the environment works only when giving a command to execute. When I give "tmux new -d" as the command, krenew will immediately exit and remove the cloned credentials cache, because tmux forks and exits. So this is not a real solution. I gues

Re: Use of krenew with tmux

2010-08-30 Thread Nicholas Marriott
If it changes the environment before forking, tmux should pick it up as well. You'll need to do something different to monitor for tmux exiting and make krenew exit. On Mon, Aug 30, 2010 at 06:24:48PM +0200, Mika Fischer wrote: > Yes, I'm sure. It is possible because krenew is the parent of the

Re: Use of krenew with tmux

2010-08-30 Thread Mika Fischer
Yes, I'm sure. It is possible because krenew is the parent of the "screen -Dm", so it can change its environment before forking. $ echo $KRB5CCNAME FILE:/tmp/krb5cc_11543_McyAWZ $ krenew -- bash $ echo $KRB5CCNAME /tmp/krb5cc_11543_j2DI5W Best, Mika On Mon, Aug 30, 2010 at 18:19, Nicholas Marri

Re: Use of krenew with tmux

2010-08-30 Thread Nicholas Marriott
On Mon, Aug 30, 2010 at 04:56:36PM +0200, Mika Fischer wrote: > Hi Nicholas, > > A few reasons: > - Cloning the credentials cache is important when you use ssh, because > ssh will delete the original credentials cache on logout. Cloning the > credentials cache is only possible when krenew is given

Re: Use of krenew with tmux

2010-08-30 Thread Mika Fischer
Hi Nicholas, A few reasons: - Cloning the credentials cache is important when you use ssh, because ssh will delete the original credentials cache on logout. Cloning the credentials cache is only possible when krenew is given a command to execute. - Because of the cloning krenew needs to change the

Re: Use of krenew with tmux

2010-08-30 Thread Mika Fischer
Hi Martti, On Mon, Aug 30, 2010 at 16:24, Martti Kühne wrote: >> It is possible to use screen together with krenew, by starting a >> screen session like this: >> krenew -b -- screen -D -m >> >> This starts a detached screen session but does not fork, so that >> krenew works properly. > > This is

Re: Use of krenew with tmux

2010-08-30 Thread Nicholas Marriott
hi why not just run krenew separately from tmux? On Mon, Aug 30, 2010 at 03:59:20PM +0200, Mika Fischer wrote: > Hi, > > in environments with Kerberos and especially NFS with Kerberos, it is > important to keep the Kerberos credentials valid by renewing them at > the proper time. Doubly so with

Use of krenew with tmux

2010-08-30 Thread Mika Fischer
Hi, in environments with Kerberos and especially NFS with Kerberos, it is important to keep the Kerberos credentials valid by renewing them at the proper time. Doubly so with screen or tmux sessions since they typically run for a longer time. There is the tool krenew which does this automatically