Sat 21 Jul 2012 11:50:43 AM UTC, original submission:
I'm using a fresh jailkit-2.15 installation on Debian squeeze ("Linux version 2.6.32-5-xen-amd64 (Debian 2.6.32-45) (dannf@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 08:57:29 UTC 2012").
When starting nano or lynx in a jailed shell I got errors like "Error opening terminal: unknown.". Using "export TERM=xterm" led to "Error opening terminal: xterm.". After some research I found out that xterm is optional and must be enabled with jk_init. The [xterm] lines were commented out in /etc/jailkit/jk_init.ini, so I uncommented them.
root@xxxxxx:/home/xxx# jk_init -v /home/jail xterm
/home/jail/usr/bin/xterm already exists, will not touch it
/home/jail/etc/terminfo/README already exists, will not touch it
Device /home/jail/dev/pts/0 does exist already
Device /home/jail/dev/pts/1 does exist already
Device /home/jail/dev/pts/2 does exist already
Device /home/jail/dev/pts/3 does exist already
Traceback (most recent call last):
File "/usr/sbin/jk_init", line 240, in <module>
main()
File "/usr/sbin/jk_init", line 237, in main
activateConfig(config, jail, args)
File "/usr/sbin/jk_init", line 157, in activateConfig
ji.handle_cfg_section(config,jail,cfg,section)
File "/usr/sbin/jk_init", line 142, in handle_cfg_section
jk_lib.copy_device(chroot,tmp,config['verbose'])
File "/usr/share/jailkit/jk_lib.py", line 550, in copy_device
sb = os.stat(path)
OSError: [Errno 2] No such file or directory: '/dev/ptyb4'
I stripped the devices that don't exist in Squeeze until there were no errors (devices = /dev/pts/0, /dev/pts/1, /dev/pts/2, /dev/pts/3, /dev/tty, /dev/tty0, /dev/tty4).
The output of the last run of jk_init -v /home/jail xterm is:
/home/jail/usr/bin/xterm already exists, will not touch it
/home/jail/etc/terminfo/README already exists, will not touch it
Device /home/jail/dev/pts/0 does exist already
Device /home/jail/dev/pts/1 does exist already
Device /home/jail/dev/pts/2 does exist already
Device /home/jail/dev/pts/3 does exist already
Device /home/jail/dev/tty does exist already
Creating device /home/jail/dev/tty0
Creating device /home/jail/dev/tty4
But unfortunately nano won't work (Error opening terminal: xterm).
Thanks for your help/Bij voorbaat dank!
|