[lxc-users] tmux in attached containers?

S.Çağlar Onur caglar at 10ur.org
Mon May 11 20:26:00 UTC 2015


On Mon, May 11, 2015 at 4:19 PM,  <florent at peterschmitt.fr> wrote:
> 11 mai 2015 20:40 "Casey Marshall" <casey.marshall at canonical.com> a écrit:
>> Hi,
>> How can I get tmux working in an attached LXC container?
>>
>> I've tried using tmux in the shell with "lxc-attach", as well as with "lxc exec ... /bin/bash" with
>> the LXD client. It just exits rc=1.
>>
>> I could install openssh-server inside the container, import my keys, etc. but that seems like
>> unnecessary overhead if I could just attach.
>>
>> Is there something I can set up in the config or profile to get tmux working?
>>
>> Thanks,
>> --
>> Casey Marshall <casey.marshall at canonical.com>
>
> Hum. Just tried with a Debian Wheezy under LXC 1.1.2 (Ubuntu 15). Works like a charm.
>
> lxc-attach -n pure-debian-7 tmux # insert bla bla here, detach tmux
> lxc-attach -n pure-debian-7 tmux a # attach without --clear-env
> lxc-attach -n pure-debian-7 --clear-env env TERM=xterm tmux a # attach with --clear-env, must set TERM variable.
>
>
> Maybe related to your container's OS and/or LXC version? Give more informations.

I believe Casey is using an older version of LXC and this started to
work after Stéphane pushed [1]

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

[1] https://github.com/lxc/lxc/commit/82e28fe049a89a425c5e322c1b5a62ffc4834c11

Cheers,
-- 
S.Çağlar Onur <caglar at 10ur.org>


More information about the lxc-users mailing list