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

Enjoy!

Leave a Comment :, , more...

Alix 3d3 scripts

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

Simple stats script:

#!/bin/bash
clear
while [ 1 ]
do
 uptime
 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
 clear
done

Insert it in a file. I called it stats.sh

chmod a+x stats.sh

and run with ./stats.sh

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)
reboot

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.

Troubleshooting
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.

Solution:
a workaround to start only INDIVIDUAL APPS
http://www.breitenlee.net/index.php?option=com_content&view=article&id=33:xlib-putty-x11-proxy-wrong-authentication-protocol-attempted&catid=16:linux-howto&Itemid=54

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!