Category: Linux

Debian Squeeze installer for NSLU2

By , 2010-10-16 22:48

Just quickly threw together a flashable debian-installer image for NSLU2, following the guide from http://cyrius.com/debian/nslu2/repack.html.

Have NOT tested this yet, but technically it should work.

Tested, and works great! installing now. Hopefully it will be done by tomorrow morning.

During the install process, be sure to check off the “SSH Server” option! Otherwise you’ll have no way of accessing the slug.

new-nslu2.bin

Enable Desktop Effects in Kubuntu 10.10 using radeon driver

By , 2010-09-28 21:33

Just installed Kubuntu 10.10 on my old ThinkPad T43p. It has an ATI FireGL V3200, which is similar to the Radeon X600. The latest fglrx driver doesn’t support this card anymore, however the open-source ‘radeon’ driver does. The driver is enabled by default in a fresh install of Kubuntu maverick, however KDE desktop effects are not enabled. After some research, I found that “KWin has detected that your OpenGL library is unsafe to use, falling back to XRender.”

The solution then is to force Kwin to enable desktop effects and stop complaining.

Edit ~/.kde/share/config/kwinrc

add

DisableChecks=true
OpenGLIsUnsafe=false

to the

[Compositing]

section

http://kubuntuforums.net/forums/index.php?topic=3113529.msg240826#msg240826

Thanks to Rog131 of kubuntu forums.

By , 2010-09-13 10:34

Message from syslogd@proxmox at Sep 13 10:32:46 …
kernel:You probably have a hardware problem with your RAM chips

Message from syslogd@proxmox at Sep 13 10:32:46 …
kernel:Uhhuh. NMI received for unknown reason a0.

Message from syslogd@proxmox at Sep 13 10:32:46 …
kernel:Dazed and confused, but trying to continue

DVD playback in XBMC on Ubuntu

By , 2010-07-17 17:15

To get DVD playback to work properly in XBMC on Ubuntu, disable nautilus’ automount feature

-> gconf-editor
apps->nautilus->preferences
Uncheck “media-automount”

http://www.pubbs.net/201002/opensuse/27474-opensuse-disable-automount-for-dvd-drive.html

Making a SOCKS proxy transparent

By , 2010-07-07 15:43

Finally, after about an hour of googling, I found a program that allows a SOCKS proxy to be made transparent. Installed on a router/gateway, this can force all LAN users’ traffic through the proxy.

http://darkk.net.ru/redsocks/

via http://wiki.przemoc.net/tips/linux#making_socks_proxy_transparent

HOWTO: Easily modify dependencies of a .deb file – Ubuntu Forums

By , 2010-06-28 10:35
#!/bin/bash
 
if [[ -z "$1" ]]; then
  echo "Syntax: $0 debfile"
  exit 1
fi
 
DEBFILE="$1"
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb
 
if [[ -e "$OUTPUT" ]]; then
  echo "$OUTPUT exists."
  rm -r "$TMPDIR"
  exit 1
fi
 
dpkg-deb -x "$DEBFILE" "$TMPDIR"
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN
 
if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then
  echo DEBIAN/control not found.
 
  rm -r "$TMPDIR"
  exit 1
fi
 
CONTROL="$TMPDIR"/DEBIAN/control
 
MOD=`stat -c "%y" "$CONTROL"`
vi "$CONTROL"
 
if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then
  echo Not modfied.
else
  echo Building new deb...
  dpkg -b "$TMPDIR" "$OUTPUT"
fi
 
rm -r "$TMPDIR"

via HOWTO: Easily modify dependencies of a .deb file – Ubuntu Forums.

Ralink 3090 driver : Markus Heberling

By , 2010-06-25 22:33

ppa:markus-tisoft/rt3090

via Ralink 3090 driver : Markus Heberling.

Driver for the cheap Ralink wireless in the Acer Aspire Revo.

Headless uTorrent Linux server in OpenVZ

By , 2010-06-13 21:10

Yes, I know, another Linux post. What can I say, this is what I do these days.

I’ve been running a Windows server in a kvm VM just to be able to run uTorrent. This was overkill, had a crazy amount of overhead, and was unstable (downloading to a share on my Samba server). Today I decided to attempt a more efficient solution: uTorrent in Wine. (Yes, there are other BitTorrent clients, and even… NATIVE Linux clients, but I’ve found none of them match the speed of uTorrent for my connection except for kTorrent. However, I don’t have an Android and/or iPhone app to remote control kTorrent.) Wine is a supported platform, according to the uTorrent website, however I wanted to run it on a headless OpenVZ container, and not on a standard desktop Linux distro. Should still be pretty simple, but knowing me, I might forget something next time I try and set this up, so I’ll document it here.

  1. Create a fresh VZ container. I used the Proxmox Debian 6.0 (squeeze) – standard i386 template.
  2. Edit /etc/apt/sources.list to point to a fast mirror in Canada (iweb!)
    deb http://debian.mirror.iweb.ca/debian squeeze main contrib non-free
    deb http://debian.mirror.iweb.ca/debian-security squeeze/updates main contrib non-free
  3. run an apt-get update && apt-get upgrade
  4. apt-get install wine sudo xterm openbox tightvncserver
  5. adduser matt
  6. add google repo: http://www.google.com/linuxrepositories/apt.html
  7. install Google Chrome
  8. wget http://download.utorrent.com/2.0.2/utorrent.exe
  9. From another PC: ssh -Y matt@openvz-container
  10. wine winecfg
  11. run vncserver and set a password.
  12. run wine utorrent.exe
  13. Enable Web UI

Next steps:

  1. Set up Dropbox for easy adding of torrents: http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall
  2. Make uTorrent and VNC server run on container startup*
  3. Create a VZ mount script so that torrents download outside of /vz area.

* For this I used a cool script obtained from http://www.abdevelopment.ca/blog/start-vnc-server-ubuntu-boot :

  1. Modify your ~/.vnc/xstartup to start the programs you want (gnome-session, lxde-session, utorrent, etc.)
  2. Save the following script as /etc/init.d/vncserver. Change
    export USER="mythtv"

    to the user you want to run the VNC session for.

#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          vncserver
# Required-Start:    networking
# Default-Start:     3 4 5
# Default-Stop:      0 6
### END INIT INFO
 
PATH="$PATH:/usr/X11R6/bin/"
 
# The Username:Group that will run VNC
export USER="mythtv"
#${RUNAS}
 
# The display that VNC will use
DISPLAY="1"
 
# Color depth (between 8 and 32)
DEPTH="16"
 
# The Desktop geometry to use.
#GEOMETRY="x"
#GEOMETRY="800x600"
GEOMETRY="1024x768"
#GEOMETRY="1280x1024"
 
# The name that the VNC Desktop will have.
NAME="my-vnc-server"
 
OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"
 
. /lib/lsb/init-functions
 
case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;
 
stop)
log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;
 
restart)
$0 stop
$0 start
;;
esac
 
exit 0

For more info, see the source link.

Rooting the PBX

By , 2009-12-14 21:44

My home PBX was installed and working well. However, today I discovered that my VoIP provider started blocking outgoing calls from the Asterisk user agent. The fix is to edit /etc/asterisk/sip.conf and change the useragent line. However, the distro I chose was very much a PBX appliance. No SSH, no shell, only Web UI access. But, I knew it was a Linux box, probably CentOS or RHEL based. So i decided I’d try my hand at retaking control of the system.

First step was to boot into single-user mode. This was quite easy. Just interrupt GRUB and add “single” to the kernel options.

Once at the shell prompt, you might want to add a regular user.

adduser matt

Then, try changing the root password.

passwd root

Unfortunately this does not work. It fails with “Authentication Token Manipulation Error”. To fix this, use pwconv. (Thanks to mohammedz)

Then try passwd root again, it should work this time.

Next, enable ssh. Run chkconfig sshd on.

Now, edit /etc/asterisk/sip.conf and change the useragent. 🙂

Custom theme by me. Based on Panorama by Themocracy