tensixtyone

Rants of Andrew Williams / Nik_Doof

Archive for the ‘debian’ tag

Unneeded Dependencies

without comments

$ sudo apt-get install bzr
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bzrtools defoma file fontconfig fontconfig-config graphviz libcairo2 libdatrie0
  libdirectfb-1.0-0 libfontconfig1 libfontenc1 libgraphviz4 libice6 libpango1.0-0
  libpango1.0-common libpixman-1-0 libsm6 libsysfs2 libthai-data libthai0
  libts-0.0-0 libxaw7 libxcb-render-util0 libxcb-render0 libxext6 libxfont1
  libxft2 libxmu6 libxpm4 libxrender1 libxt6 python-paramiko ttf-dejavu
  ttf-dejavu-core ttf-dejavu-extra ttf-liberation x-ttcidfont-conf x11-common
  xfonts-encodings xfonts-utils
Suggested packages:
  bzr-gtk bzr-svn python-pycurl xdg-utils pybaz librsvg2-bin defoma-doc dfontmgr
  psfontmgr gsfonts graphviz-doc ttf-kochi-gothic ttf-kochi-mincho ttf-thryomanes
  ttf-baekmuk ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp
  ttf-arphic-bkai00mp
Recommended packages:
  libft-perl
The following NEW packages will be installed
  bzr bzrtools defoma file fontconfig fontconfig-config graphviz libcairo2
  libdatrie0 libdirectfb-1.0-0 libfontconfig1 libfontenc1 libgraphviz4 libice6
  libpango1.0-0 libpango1.0-common libpixman-1-0 libsm6 libsysfs2 libthai-data
  libthai0 libts-0.0-0 libxaw7 libxcb-render-util0 libxcb-render0 libxext6 libxfont1
  libxft2 libxmu6 libxpm4 libxrender1 libxt6 python-paramiko ttf-dejavu
  ttf-dejavu-core ttf-dejavu-extra ttf-liberation x-ttcidfont-conf x11-common
  xfonts-encodings xfonts-utils
0 upgraded, 41 newly installed, 0 to remove and 7 not upgraded.
Need to get 16.1MB of archives.
After this operation, 38.9MB of additional disk space will be used.
Do you want to continue [Y/n]?

That is why it pays to have the following settings in your apt preferences if you want to keep things to a minimum:

APT::Install-Recommends "false";
APT::Install-Suggests "false";

Written by Andrew Williams

November 18th, 2009 at 10:43 am

Posted in General, Soapbox

Tagged with , , , , , ,

Upgrade Pains

with 2 comments

Yesterday I learned a lesson the hard way. I upgraded a “production” system (My home MythTV box) to the latest testing version of Debian and suffered numerous small failures. The knock on effects ment the MythTV system was unavailable for recording for about five hours, much to the fustration of the other half.

The idea came to me at first when I spotted that MythTV 0.22 has been released and maybe it was time to upgrade to get up to speed, of course I didn’t read through the new features list or check out what was happening in the world of MythTV. As it turns out, nothing changed that affected me or improved the situation . I did a senseless upgrade when I didn’t need to.

So, from now on i’ll follow a simple checklist:

  1. Do you need to upgrade? Will it fix a bug or a ongoing issue?
  2. Do you REALLY need to upgrade? Will the upgrade fix a world shattering issue?
  3. No, DO YOU REALLY NEED TO UPGRADE?

Production systems usually run old software for a reason, I learned that today.

Written by Andrew Williams

November 17th, 2009 at 4:01 pm

Posted in General, Soapbox

Tagged with , , ,

Howto: Send SMS using a Huawei E160G and Debian

with 11 comments

People who use their Huawei E160G on Three will know that in the Windows client you can send and receive SMS, this will come at some minor cost of £0.10 per SMS, and you can add bundles onto your mobile broadband account to make this cheaper.

Similar functionality can be achieved in Linux, and it’s very useful if your like me and want to drop someone a message when you don’t have your phone around.

For this we’ll be using Gammu, which is a toolset for managing phones via the AT GSM command set. It was originally forked from Gnokii, which was a similar toolset for Nokia handsets. As the E160G opens a serial port with access to the AT command set this is a relatively easy tool to setup.

First of all, we need to grab the packages. As these are standard Debian packages you should have no issues.

# sudo apt-get install gammu

Next, we need to configure Gammu to pickup the correct device. Check your dmesg for the serial port:

$ dmesg|grep tty
[12321.308078] usb 5-3: GSM modem (1-port) converter now attached to ttyUSB0
[12321.308275] usb 5-3: GSM modem (1-port) converter now attached to ttyUSB1

Edit ~/.gammurc, or run gammu-config to change the device settings. Your ~/.gammurc file should look similar to:

[gammu]
port = /dev/ttyUSB0
model =
connection = at19200
synchronizetime = yes
logfile =
logformat = nothing
use_locking =
gammuloc =

Give it a test by getting all the SMS from the device:

# gammu getallsms

This should bring back all the SMS currently stored on the stick, which should include your login details for the Three website (unless you’ve deleted them). To send a SMS use the “sendsms” command:

$ gammu sendsms text 07874454543
Enter message text and press ^D:
Test Message!!!!!1!
Sending SMS 1/1....waiting for network answer..OK, message reference=2

Gammu has a lot more tools and options to explore, now you have the basic config you can setup a SMSD, which can expose the ability to send SMS to a network. Also, Gammu has a python interface so you can possibly build your own frontend client for sending SMS. For more details explore the Gammu Wiki.

Written by Andrew Williams

October 17th, 2008 at 11:53 am

Experimentation Failure

without comments

My grand idea of experimenting with various distributions for the EeePC went wrong, by quite a bit as well. As mentioned in the last post I decided to have a play around with some of the distributions specifically built for the Asus EeePC 701, I was wondering if something out there can beat Debian on this little work horse.

Oh boy was I wrong.

First I attempted to install Zeee (Zenwalk for the EeePC), the installation “media” came as a compressed disk image, nothing that unusual as most of the distros come in their own little installation media package. It turns out that this image is a raw dump of a file system, so I had to create the installation media on a USB stick with the various handy tools, mke2fs, grub, you get the idea. After about 45 minutes of fiddling I called it a day, for some reason the GRUB installation wasn’t detecting the ext2 partition on the USB stick, and couldn’t find the menu.lst file. While this is probably a simple issue it’s a bit more than I could be arsed with, the Zeee guys are doing well but the installation method need a little work, maybe a prepackaged ext2 dump.

After the kerfuffle with Zeee I moved onto the latest Foresight Linux Mobile Edition, I’ve heard Dan & Fab mention Foresight on the Linux Outlaws podcast and I have downloaded a live CD previously, so I decided to get the image and have a go. This installation went a lot easier, the image was a precompiled usb installation so no hassle there, the installation took time but I put t hat down to the quality of the USB stick I was using. After about 30 minutes I had a working Foresight Linux install, and everything seemed to work out of the box, including the WIFI (which is the usual sticking point for most distros).

Foresight Mobile uses the clutter based launcher you can also find in the Ubuntu Netbook Remix, the mainstream applications are pre-installed and are usable. Within a few minutes I hit my all time pet hate, touchpad clicking, ever since i’ve owned a laptop I’ve never been able to use touchpad click to any degree of success and I don’t see any reason why it should be enabled by default. In previous distribution I know the way to fix this issue is to simply changing the settings in gsynaptics or modify the Xorg config, as I was trying to operate from a user perspective I went the simple route of using gsynaptics. It wasn’t installed. I went digging around in the package manager (conary) and didn’t find a related package. After about ten minutes searching I found the “synaptics” package, which proved useless as I had no idea of what it does.

Three hours in and my experiment with Foresight was over, people may complain that it’s a simple issue but having the option enabled by default and then hiding the configuration in a non standard package doesn’t help matters. I have to give Foresight kudos for being one of the first distributions to have a full “netbook” version, but it still needs a little refinement.

So, now I’m back on Debian, tried and tested. This time I installed using the updated Lenny installation media for the EeePC and it was a breeze, and since I’ve done this “fresh install” a lot more of the features work consistently. In the process of configuring my machine again I’ve noticed that the older guide for the E160G using Network Manager is a little wrong, so I’ll have to update that sometime. For now I’ll be sticking on ol’ faithful. Maybe when the “next big distro” gets released I’ll give it a try.

Written by Andrew Williams

October 15th, 2008 at 11:06 pm

Posted in General

Tagged with , , , , ,

Dropbox on Debian

with 6 comments

Dropbox is out of closed beta and is open for the public, but what is more interesting is that they now have a client for Linux. I’ve had a beta email sat in my inbox for about 3-4 months, but I’ve never got round to signing up as I couldn’t get a client for Linux.

Dropbox is one of the new wave of online storage, sort of a cross between WebDAV and SVN, in fact, I’d say its almost exactly like SVN, just with a nice GUI. I guess all it would need to take the “value-added” part of this product is for someone to develop a nice front end for Amazon S3, and by looking at their future prices it could be cheaper.

Anyway, picking out the bits of the service is not what I’m here to do. At the moment I run a Debian Testing/Unstable desktop machine, I was quite disappointed to not see a specific Debian package for their software on the website. I realised after a few dumb minutes that I could use the Ubuntu packages.

In sources.list, I referenced their Gusty archive

deb http://www.getdropbox.com/static/ubuntu gutsy main

Then in /etc/apt/preferences I set some basic package pinning to make sure that any packages didn’t collide with the existing Debian repository, not likely but you never know.

Package: *
Pin: release a=gutsy
Pin-Priority: 400

Do a “apt-get update” and you should have the “nautilus-dropbox” package available to install. Simple!

Remember, you’ll need to restart nautilus by either killing it (killall -9 nautilus) or restarting your Gnome session.

[edit: Fixed the first URL]

Written by Andrew Williams

September 13th, 2008 at 8:45 am

Xen Stupidity

without comments

Last night I spent a few hours getting Liverpool LUG’s website on its own Xen VM, so hopefully we can provide some services to members, like webhosting and email aliases. This was my first venture into creating a Xen VM for myself, previously Chris has spent the time to set it up for me.

I’ll name this little adventure: Trip on the Fail Boat

Ok, so I was a little stupid. I didn’t read any existing documentation and bungled through it based on a few commands in the bash_history file. I know, stupid. For a while I hissed and cursed about incomplete setup which I thought debbootstrap would do, reading the documentation this morning has highlited how much of a monumental idiot I actually was. So now i’ll go through my idiotic bitching and explain why I was wrong…

1. 4Gb Fixup error messages
When I started up the VM I was assaulted by thousands of messages regarding a “4Gb memory fixup” or something to that nature. Of course, I was too busy trying to edit files in vi to actually look at the issue but was more than happy to shout and scream at my console formatting getting mixed up.

The fix? Install libc6-xen, or move /lib/tls to /lib/tls.disabled

2. Missing network config
The VM couldn’t see eth0, or lo for that matter. After hammering my head against the table checking the Xen config files I finally realised that updating /etc/network/inferfaces could help.

3. “Why is the hostname dom0?”
Stupidity ensues, thankfully I noticed before I issued the shutdown on dom0.

4. Services randomly failing to start up
Missing loopback network device, no actual 127.0.0.1. You would be suprised how much this can effect your system.

So for now, The VM is working. I’ll get round to posting some more details about LivLUG services soon, but for now i’m going to get some coffee…

Written by Andrew Williams

August 18th, 2008 at 2:38 pm

Posted in Projects

Tagged with , , ,

Howto: Debian Lenny & Huawei E160G

with 18 comments

So, in my last post I described how it was using the E160G with Debian. All in all it’s very good and i’ve not experienced any major issues, bar a few minor apt-get and NetworkManager issues. So, heres a quick rundown of how to get it on your machine.

So first, you need to get the hardware to work correctly under Debian. Plug in your E160G and check dmesg to see if the device recognises correctly. If you see ttyUSB0/ttyUSB1 appear you can skip this step.

First, you need to download USB_Modeswitch:

# wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-0.9.4.tar.bz2
# tar jxvf usb_modeswitch-0.9.4.tar.bz2
# cd usb_modeswitch-0.9.4/
# ./compile.sh

Now you have the usb_modeswitch program, as this will be executed by udev it needs to be in a sensible location, personally i’d copy it to /usr/local/sbin/

# cp usb_modeswitch /usr/local/sbin/

Also, you need to grab the latest config file from the usb_modeswitch website and put it into /etc

# wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.conf
# sudo mv usb_modeswitch.conf /etc/

Now, by default the config file comes with the section commented out, so edit the file and uncomment the section for the E220 (which is essentially the same device).

# sudo $EDITOR /etc/usb_modeswitch.conf

One last step, you need to add a small configuration file to udev to detect the E160G and run usb_modeswitch, put this file in you /etc/udev/rules.d/ folder:

SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1",
  RUN+="/usr/local/sbin/usb_modeswitch"

Restart udev, and plug in your E160G…

sudo /etc/init.d/udev restart

and you should see something similar to:

[   16.085904] usb 5-3: GSM modem (1-port) converter now attached to ttyUSB0
[   16.086033] usb 5-3: GSM modem (1-port) converter now attached to ttyUSB1

So, the device is detected and you have your USB ports, first a quick overview. The E160G shows two serial ports, one is a data port, the other is for control signals. NetworkManager only makes use of one of these ports but the Vodafone Connection Manager uses both. Now you have a choice, install Network Manager 0.7 to gain native GPRS/UMTS data support or use another package. I went for Network Manager, while it’s still in beta and i’ve had a few run-ins in the past with it I decided to give it a go.

So, it was a simple case of adding the 0.7 repositories to /etc/apt/sources.list, updating, then installing the needed packages.

# echo "deb http://debs.michaelbiebl.de/ unstable main" >> /etc/apt/sources.list
# apt-get update
# apt-get -t unstable install network-manager

You might need to remove any old Network Manager packages before you do this, as network-manager-openvpn collides with the new package.

Hopefully thats give you the overview you needed, and you should be up and running!

Written by Andrew Williams

August 7th, 2008 at 11:08 pm

Using DVD Decrypter on Ubuntu/Wine

with 2 comments

I’ve recently tried to get DVD Decrypter working on Wine, it may seem simple at first, i assure you, its not. Here’s a few quick steps to get you going in the right direction.

  • Install DVD Decrypter (wine SetupDVDDecrypter_3.5.4.0.exe)
  • Run winecfg, and add the installed DVD Decrypter as an application and set the version to NT4
  • Go to the Drives tab and hit Autodetect
  • Remove any unwanted drives but leave your CD drive (should be /media/cdrom0)
  • Select the CD drive letter from the Drive Mappings box and click Show Advanced
  • Change Type to CD-ROM and click OK
  • Open a shell and go to your local wine config dosdevices (.wine/dosdevices)
  • You should have a existing link for your CD-ROM, now make a softlink for that letter to your physical device, but put a extra colon after the drive letter. (ln -s /dev/hdc g::)
  • Fire up DVD Decrypter, in the Settings and I/O tab, switch it to SPTI and tick on Show All Devices.

Bar a few minor errors you should detect the drive and be able to use it. This will also work for CrossOffice, but the config directory will be slightly different (.cxoffice/bottlename/)

Written by Andrew Williams

February 16th, 2007 at 11:17 am

Posted in General

Tagged with , , , , ,