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

 
 

bug #36906: jk_init xterm broken on Debian Squeeze

Submitter:  None
Submitted:  Sat 21 Jul 2012 11:50:43 AM UTC
   
 
Category:  None Severity:  2 - Minor
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-04 oli4 Open/ClosedOpen Closed
    2012-08-02 oli4 Severity3 - Normal 2 - Minor

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code