Wednesday 11 February 2009

After cloning a Linux box problems running vnc server, xterm can not run

After cloning a Linux box, running vnc server, a terminal connection could not start xterm. (I clonned a virtual server into a virtual server, on vmware ESX 3.5)
The log file (located at /home/username/.vnc/hostname:1.log) was as follows:

Wed Feb 11 11:27:53 2009
Client: Server default pixel format depth 16 (16bpp) little-endian rgb565
Client: Client pixel format depth 6 (8bpp) rgb222
xterm: Error 32, errno 2: No such file or directory
Reason: get_pty: not enough ptys


I think the two steps that solved it were:

1) create a new .Xauthority file
Loged in as username:
Delete the .Xauthority file, located at /home/username
Create a new .Xauthority file, issuing the command: $mkxauth -c

2) use makedev to create the pty and pts devices:
Loged in as root:

cd /dev
./MAKEDEV pty
./MAKEDEV ptm


Steps found at:

a) http://www.gelato.unsw.edu.au/IA64wiki/XinChroot

host:/# xterm
xterm: Error 32, errno 2: No such file or directory
Reason: get_pty: not enough ptys
try running MAKEDEV pty in /dev to make the devices you need.



b) http://mail-index.netbsd.org/pkgsrc-users/2008/07/09/msg007591.html


cannot start xterm on NetBSD-4.0

--------------------------------------------------------------------------------

To: pkgsrc-users%netbsd.org@localhost
Subject: Re: cannot start xterm on NetBSD-4.0
From: Aleksey Cheusov
Date: Thu, 10 Jul 2008 00:46:55 +0300

--------------------------------------------------------------------------------

>> - After manual running the following commands
>> cd /dev
>> ./MAKEDEV ptm
>> mkdir pts
>> mount pts

> You can add this to MAKEDEV under "init)":
> makedev ptm
> mkdir -m 0755 /dev/pts

I've added this code to /etc/rc.local (because /dev is on MFS)
and everything works fine now while booting.
But this is strange ;-( Before HDD failure everything worked fine
without this code.

>> xterm seems to work but says
>> utmp_update: Cannot update utmp entry: Resource temporarily unavailable
>> utmp_update: Cannot update utmp entry: Undefined error: 0

> Have you searched for "Cannot update utmp entry"? Same problem, same solution?
Thank you. I've found it :-) I really forgot -U option of build.sh

--
Best regards, Aleksey Cheusov.



I also made as root:

set DISPLAY=:0.0
export DISPLAY

No comments:

Post a Comment