Jonathan Arbib

Tag: linux

PTY allocation request failed on channel 0

by on Aug.13, 2010, under Tech Junk

When installing a new virtual machine (Lenny) you may get this error:

PTY allocation request failed on channel 0

stdin: is not a tty

To fix this do the following:

Add the following line to /etc/fstab (in the domU):

none /dev/pts devpts defaults 0 0

Then run:

mkdir /dev/pts
mount /dev/pts


Leave a Comment :, , more...

Alix 3d3 scripts

by on May.18, 2010, under Gadgets, Tutorials

Simple stats script:

while [ 1 ]
 df -h | grep Filesystem
 df -h | grep rootfs
 df -h | grep usb
 echo ""
 Temp1=$(cat /sys/bus/i2c/drivers/lm90/0-004c/temp1_input)
 Temp2=$(cat /sys/bus/i2c/drivers/lm90/0-004c/temp2_input)
 echo "MB T  = "$Temp1
 echo "CPU T = "$Temp2
 sleep 1

Insert it in a file. I called it

chmod a+x

and run with ./

It updates every second and returns:

  • uptime with load
  • Disk space and usb disk space
  • MB temp
  • CPU temp

You can add all you want in there or remove what you don’t need 🙂

2 Comments :, , , more...

Fix GNU screen backspace

by on May.14, 2010, under Tutorials

create a new .screenrc in your home directory and put these lines inside:

bindkey -d ^? stuff ^H
bindkey -d ^@ stuff ^H
5 Comments :, , , , , , , more...

X Session from Linux to Windows

by on Jan.19, 2010, under Tutorials

On the Linux Machine
Install X on your system (example for Debian)

apt-get install xserver-xorg-core xorg
apt-get install gdm (or xdm/kdm)
apt-get install fluxbox (or gnome/kde)
apt-get install firefox (or iceweasel if you get an error)

Just in case run

dpkg-reconfigure xserver-xorg

On the Windows Machine
Download Xming and install it.
Download Putty and save it to disk.

Configure Xming
Launch XLaunch (Start, Programs, XMing) and at the Display settings dialog box, select Multiple windows and set the Display number as 0. Click on Next until Finish.

Configure PuTTY
Start PuTTY.
In the PuTTY Configuration section, on the left panel, select Connection → SSH → X11
On the right panel, click on the Enable X11 forwarding checkbox
Set the X display location as :0.0
Click on Session option on the left panel.
Enter the hostname or IP address in the Host Name textbox
Save the session.

xf86PciVideoInfo is not set
Could not get primary PCI info

waiting for X server to begin accepting connections
giving up.
xinit: Connection reset by peer (errno 104): unable to connect to X server
xinit: No such process (errno 3): Server error.

a workaround to start only INDIVIDUAL APPS

Leave a Comment :, , , , more...

Screen error: no more PTYs

by on Jan.19, 2010, under Tutorials

Quick solution:

mkdir /dev/pts
mount -t devpts /dev/ptmx /dev/pts

add the above code to run on bootup and make the file executable

Alternate solution 1:
Add the following at the end of your config file

extra = 'console=hvc0 xencons=tty'

Alternate Solution 2:

chmod 666 /dev/ptmx
chmod 666 /dev/null
1 Comment :, , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!