Re: [dev] [abduco] Read-only connect to session from other user

From: Marc André Tanner <mat_AT_brain-dump.org>
Date: Thu, 14 Aug 2014 22:15:02 +0200

On Thu, Aug 14, 2014 at 07:16:55PM +0000, Ben Golding wrote:
> As you pointed out, '-ar' behaves as '-a', connecting in read-write mode
> without any warning. Using '-a -r' connects in read-only mode.

Yes I might change the command line parsing code to also accept the former.

> > > As the other user, I run 'abduco -ar ~bgolding/${HOSTNAME}.abduco'
> > ^
> > I think here is your problem, ~ will expand in the context of your
> > second user whereas the socket was created in the home directory of
> > the first user.
>
> AFAIK ~bgolding expands to bgolding's home dir, regardless who is the current user....

Intersting, didn't know that. I assumed ~ would always be replaced with the
home directory of the current user, independent of the context.

$ echo ~; echo ~root; echo ~invalid
/home/marc
/root
~invalid

> So far I found abduco a good replacement for dtach (not that I had any issues with dtach).
> The only difference I noticed, my screen doesn't refresh on connect. I need to hit Ctrl-L.
> I guess this might be a result of a deliberate design decision:
>
> http://lists.suckless.org/dev/1403/20372.html
> "...it only supports 1 redraw mechanism (based on SIGWINCH) instead of 3..."

Yes abduco always sends SIGWINCH to the underlying process whereas dtach
by default sends CTRL+L. The former should work fine with most applications
and for the others running them under dvtm might be an option.

 abduco -c foo dvtm tcsh

Though that seems to show a black window upon exiting from tcsh. After another
key press a dvtm window running your default shell appears.

Cheers,
Marc

-- 
 Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
Received on Thu Aug 14 2014 - 22:15:02 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 14 2014 - 22:24:07 CEST