bugJailkit - Bugs: bug #36906, jk_init xterm broken on Debian...

 
 

bug #36906: jk_init xterm broken on Debian Squeeze

Submitted by:  None
Submitted on:  Sat 21 Jul 2012 11:50:43 AM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 22 Nov 2013 10:13:00 PM UTC, comment #3:

Hello ;

You should probably add the path /lib/terminfo in the terminfo section (this is already done in upstream sources (cvs) and also the TERM environment variable in the jk_chrootsh.ini, i.e:

# See man jk_chrootsh
[DEFAULT]
env= TERM, PATH

Then the error message "Error opening terminal: unknown." should disappear.

Declercq Laurent <nuxwin>
Tue 02 Jul 2013 03:52:35 PM UTC, comment #2:

Simple fix: Need to manually download ncurses-base.deb file from packages.debian.org, open it with mc and extract CONTENTS/ into the jail root. Paths are missing from terminfo jk_init.ini section, but I am too lazy to find out what exactly. That is a quick fix and worked for me.

Ivan Ivanov <pumpal>
Thu 02 Aug 2012 07:11:45 PM UTC, comment #1:

the terminfo database is probably missing in the jail. /usr/share/terminfo

Olivier Sessink <oli4>
Project Administrator
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!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nuxwin (Posted a comment)
  • -unavailable- added by pumpal (Posted a comment)
  • -unavailable- added by oli4 (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Nov 2015 09:46:07 PM UTColi4Open/ClosedOpen=>Closed
    Thu 02 Aug 2012 08:05:22 PM UTColi4Severity3 - Normal=>2 - Minor

    Back to the top


    Powered by Savane 3.1-cleanup1