Archive

Posts Tagged ‘Debian’

Wireless Network Manager Woes

September 16th, 2009 No comments

Debian Lenny ships with the Network Manager package, version 0.6.6-4, which for all intents and purposes is a well written and very useful network management application. But of course, I wanted something more. At home, I have my music library (hosted on a Windows Vista machine) shared to the local network, and wanted to mount that drive using Samba so that I could share my music library between my two machines while on my home network.

On a Windows machine, one can just point an application to files on a networked drive, while Windows handles all of the dirty details related to allowing that application use those files as if they were on the local machine. On Linux, the application in question seems to have to be aware of how to handle a Windows share (usually via the Samba package), and handle that drive sharing on it’s own, unless the network drive has been mounted first. Further, when mounting a network share in Linux, one can choose any folder on their hard drive to put its contents into, ensuring that it always appears in the same location, and is easy to find.

Unfortunately, as far as I can divine, a networked drive can only be mounted by the root user, which seriously reduces the number of applications that can perform that mounting action. In my quest to get my home music share working, I looked into plenty of different methods for automatically mounting network drives, including startup scripts, modifying the fstab file, and manually connecting from a root terminal. None worked very well.

Eventually, I stumbled across a web post advertising the pros of the WICD network manager, which as I understand, will be used as an alternative to the network manager package by Debian Squeeze, and can currently be pulled into Lenny by adding the Debian-Lenny Backports repository to your sources list. I installed it, replacing the default network-manager-gnome package.

My first impression of WICD was extremely positive. Not only did it connect to my home network immediately, it also allowed me to define default networks to connect to (something that is conspiciously absent from the NetworkManager interface), and to set scripts that are run when my client connects to or disconnects from any of the networks in the list. This allowed me to write a simple one line script that mounted my network share on connection to my home wireless network. It worked every time, and mysteriously did so without asking me for my Sudo password, even though it used the sudo command internally to get rights to perform the mount.

Odd security peculiarities aside, I was happy with what I had accomplished – now I could tell my laptop to automatically connect to my home wireless network, and to mount my music share as soon as it did so! Then I went to school. Shit.

The wireless network at my University uses EAP-TTLS with PAP inner-authentication as a security protocol, something that WICD apparently had no idea how to handle. This protocol is extremely secure, as the host identifies itself to the client with a certificate that the client uses to tunnel into the host, allowing connection to take place without any user information being passed in the clear. At least that’s how it’s supposed to work, except that our school doesn’t have a certificate or certificate authority, so… Whatever.

In any case, WICD does not include a template for this type of network (which is fair I suppose, since Windows requires an add-on to access it as well), but for the life of me, I couldn’t figure out what to do to fix the problem. I trolled the internet from a wired machine and tried editing the WICD encryption templates, while Tyler (on Fedora) and Phil (on OpenSuse) connected on first try.

Eventually, after an hour or so of fruitless trial and error, I gave up, came home, and reinstalled the NetworkManager application, because that’s what Tyler and Phil were using on their systems, and it seemed to work fine. Sure enough, the next day I connected after just a minor tweaking of the network properties in the NetworkManager dialog.

Unfortunately, while I can now connect to my home and school networks, I once again have lost the ability to automatically connect to networks, and to execute scripts on connection, meaning that I’m back to square one with the mounted networked music share – for now, I just do the mounting manually from a root terminal. Balls.

Eclipse Fails It

September 14th, 2009 No comments

Man, Eclipse works great on Debian! It gives me this cool message on startup:

JVM terminated. Exit code=127
/usr/lib/jvm/java-gcj/bin/java
-Djava.library.path=/usr/lib/jni
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.2/classmap.db
-Dgnu.gcj.runtime.VMClassLoader.library_control=never
-Dosgi.locking=none
-jar /usr/lib/eclipse/startup.jar
-os linux
-ws gtk
-arch x86
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
-showsplash 600
-exitdata 3a0015
-install /usr/lib/eclipse
-vm /usr/lib/jvm/java-gcj/bin/java
-vmargs
-Djava.library.path=/usr/lib/jni
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.2/classmap.db
-Dgnu.gcj.runtime.VMClassLoader.library_control=never
-Dosgi.locking=none
-jar /usr/lib/eclipse/startup.jar

After uninstalling, reinstalling, changing which JVM I was using, uninstalling, reinstalling, googling, yahooing, and binging, I finally found this post over at Debian Help that instructed me to first install XULRunner. With the addition of this simple step, everything suddenly worked great.

The strange part about the whole thing is that Eclipse doesn’t install XULRunner as a dependency, and the Wikipedia article about XULRunner doesn’t mention Eclipse anywhere. I don’t really understand their relationship, aside from the fact that Eclipse supports plugins that may or may not be written on top of XULRunner.

Regardless of their strange and undocumented relationship, the Eclipse/XULRunner combo seem to work perfectly, allowing me to create Java, C/C++, and Plugin projects out of the box. Next steps include adding plugins for Subversion, Python, and PHP.

How to not install XBMC on Debian Lenny

September 13th, 2009 4 comments

So tonight I got a terrible idea. I figured that I’d try to install XBMC, the awesome media centre app for modded Xbox consoles. Turns out that they do, in fact, have a Linux version… but that none of it’s dependencies can be resolved automatically, and that every developer remotely related to the project was on crack while packing the tarball.

Because the devs only package a release for Ubuntu (that doesn’t work worth a shit on Debian), I was forced to download a tarball from this site, which I extracted to my home/username/bin directory. Unfortunately, when attempting to./configure in this directory, I discovered that the package had roughly 337 thousand dependencies, namely:

subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libfribidi-dev liblzo-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl4-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev

Yeah. That many. Further, the library liblzo-dev is no longer a part of Debian Lenny, although it is available from the Etch repositories. You can grab that tarball and manually install it from this page. Oh, and you’ll also need to add the debian-multimedia non-free repositories to your sources.list file in order to obtain libdvdcss… You can find instructions to do that here.

Assuming you’re still with me, and have managed to install all of the above dependencies (all 300+ MB of them), you’ll probably still fail, because the tarballs for the vast majority of them fail to set execute permissions on their configure files on extraction. As such, you’ll have to manually walk through each of the folders under xbmc and add those permissions…

After adding these permissions as deep as I could in the directory structure with the command chmod -R +x */configure (where you can add up to 6 instances of */), and running the XBMC config file a solid 50+ times, I’m stuck on the libdvdnav library, which doesn’t seem to contain a valid config file… Seeing as I have to work tomorrow, I offically give up for now. Christ this must be a small taste of what Gentoo is like all the time.

The Next Morning:

With a clear head and a fresh cup of coffee, I took another shot at installing XBMC.After spending 20 minutes manually installing the libdvdnav, libdvdread, and libdvdcss libraries, I finally managed to run the XBMC configure script with no errors.

After just over a half hour compiling, I finally got XBMC installed and gave it a test run.

Initially, I had troubles connecting to any network shares where my media is stored. After going into the network settings, changing my workgroup name, and telling the app to automatically mount SMB shares, everything seemed peachy.

More to come as I figure this out

Upgrading to Flash 10 in Debian

September 5th, 2009 No comments

Even though the Debian community is very strict about only allowing free software in their repositories, my Iceweasel install came preloaded with Macromedia Flash 9. Regardless of whether this is how things are supposed to be, Flash has since moved on to version 10. Some sites like youtube are already warning users who have lower versions installed that they should upgrade for performance reasons, and Firefox is going to begin to prompt users to upgrade for security reasons.

Regardless of your motivations, having the latest Flash plugin is essential to today’s internet experience, regardless of well placed free software ideals. Luckily, I’ve found a handy tutorial (incredibly, it’s on the Debian Wiki and isn’t horribly out of date) that gives instructions on how to get the latest Flash installed on a Debian system.

It should be noted that the tutorial requires the user to add a non-free repository to their sources list, located in /etc/apt/sources.list file, and that making this change will techinically make your system non stable, in the sense that it will no longer be officially supported by the Debian community. While regrettable, my sources list already contained non-free sources list, as some of my hardware lacks free drivers/firmware, so I’m not terribly concerned.

A Pretty New Desktop Theme

September 5th, 2009 No comments

This morning I spent some more time messing around with Compiz. I followed this tutorial to add an alternative repository to my sources list that keeps a more up to date version of Compiz around. When I ran the install initially, it errored out and broke a couple of my packages, but after fully removing Compiz through Synaptic, I was able to get the install process to work with no issues. It added a number of plugins to Compiz, along with the Emerald Theme Manager.

After messing about with Emerald, grabbing some great new wallpaper from Open Source Wallpaper, and screwing about with the Gnome theme for a few minutes, I ended up with this desktop:

Pretty Desktop

I think that this is a great improvement over the default desktop:

Debian_GNOME Default Desktop

Finally Up and Running

September 3rd, 2009 1 comment

As you may recall, last night, I ruined my system by manually editing the xorg.conf config file according to a sketchy tutorial on the Debian Wiki. This evening, I fixed the problem and got Compiz effects running in all of 20 minutes. The moral of the story: Before fucking about online, use the resources that are right in front of you.

Firstly: Fixing X

When I edited the xorg.conf file last night, I made a mistake, and every time X tried to load on startup, it failed out. At the time, I was bleary-eyed and half in the bag, and didn’t realize that when this happened, Debian presented me with the ability to log into the terminal and fix my silly mistakes.

Refreshed and ready to go, I logged into the terminal as root this evening, loaded the config file in question, took out my changes, saved, and restarted. Lo and behold, everything worked perfectly, and I got my desktop back.

Part B: Getting Compiz

After enabling OpenGL support and 3D hardware acceleration last night, I immediately attempted to get the Compiz suite of relatively useless eye candy nonsense up and running, a process that lead directly to me bricking my system.

The first tutorial that I tried to follow last night instructed me to edit my sources list and download the required packages from a third-party mirror… Until I scrolled down (after already doing all of the suggested actions), and realized that the entire tutorial was outdated because Compiz had since been migrated into the Debian repositories. I more or less succeeded in disabling all of those changes, in the sense that undoing them didn’t break anything apparent.

The next step was a quick dash over to the Debian Wiki for information on how to install Compiz properly, which I assumed could be had from this tutorial. Turns out I was wrong, because while the package installs that it reccomends mostly succeeded, when I tried to enable Compiz, it errored out and locked up my desktop.

Pissed off, I tried making the suggested changes to the xorg.conf file that are suggested in the tutorial, which to my dismay, resulted in X locking up because of errors in my freshly edited config file. This brings us roughly to where I was at with last night’s post.

Once I had restored my desktop and come to my senses, getting Compiz was actually a snap. I launched the Aptitude package manager from a root terminal, searched for the Compiz package, and let it take care of handling any dependencies and conflicts for me. In the process, it handily uninstalled a few garbage packages that I had added last night while fucking things up.

With Compiz properly installed, I used the Synaptic package manager (the graphical front-end to Aptitude) to add the Fusion Icon package (a Compiz control icon) to my taskbar for easy access, and sat back to have a celebratory beer and enjoy me some Wobbly Windows. Another moral for the story: The Debian Wiki sucks, and has lead me astray one too many times. From here on in, I will take everything that it claims with a truckfull of salt.

(Supposed) Icing on the Cake: Screenlets

Lastly, I added the Screenlets package, which allows me to have Vista-like widgets on my desktop that do silly things like monitoring my internals and wasting my system resources. So far, I’ve found the default screenlets to be pretty lame and useless, and I don’t quite understand the process of installing a new screenlet yet. I’ll get back to this in a later post.

Graphical Woes and a Bricked System

September 2nd, 2009 1 comment

Today’s big task was to get rid of the Windows 3.1 look of the default GNOME theme by installing the Compiz Fusion window manager. First, however, I needed to add 3D hardware acceleration and OpenGL support to my existing graphics system. Unfortunately, after an evening of searching for how to accomplish these seemingly simple tasks in Google’s proverbial haystack of information, I found myself no wiser, and in the mood to chew through my power cable and just end it all.

Bleary-eyed and pissed off, I turned to the community in the #debian IRC channel for help, and found a room full of knowledgeable folks who were very willing to help me out. Sometime during the ensuing discussion, I followed this guy’s advice and installed a package called mesa-utils that added OpenGL support to my system, and was good to go. The only problem is that I don’t know if I could do it again, because I can’t recall the steps that got me to where I am. Damn.

In any case, with hardware acceleration now supported, I moved on to enabling the Compiz Fusion window manager with this tutorial on the Debian Wiki. Unfortunately, upon activating my newly installed eye candy, my entire system froze up. I restarted X, but the service refused to come back online, and was disabled by the system.

Now, whenever I attempt to boot my laptop, I get a big error message claiming that X failed to start, and can’t get into my desktop. It seems that the changes that I made to the /etc/X11/xorg.conf file while setting up Compiz have caused an error that occurs while parsing the file on startup.

So, I guess my install is bricked until I can remove my changes to that config file… Anybody got a live CD?

The Need for a Password Manager

September 2nd, 2009 1 comment

On my Windows machine, I use a free program called KeePass to manage all of my passwords. It creates an encrypted file that contains all of my passwords, and automatically pastes them into the correct dialog boxes when I hit ctrl-alt-a.

Since I’m attempting to emulate my normal work flow, one of my first goals with Debian was to get a password manager up and running, and to disable the password management tool that is present in Iceweasel (For those that don’t know, Iceweasel is Firefox, but it’s been re-branded and given a new set of icons so that it is a truly “free” program).

Luckily, with just a few minutes of looking around, I found the KeePassX project, a mature cross-platform clone of the KeePass project that even imports KeePass 1.x database files. Installation was simple, and once I exported a 1.x version of my KeePass database from my Windows machine, KeePassX opened it immediately.

It should be noted that GNOME ships with an application called Seahorse that provides a graphical front end to the underlying keyring management system. This application seems to have been designed primarily for remembering PGP keys and remote server passwords. It handles my wireless network passwords, but I can’t seem to figure out how to add website passwords to it, so KeePassX is my replacement solution.

Aside: To add another item to my to-do list, I’ve just noticed that GNOME has registered the Epiphany web browser as my default browser, so all system links launch in it instead of in Iceweasel. From what I’ve seen so far, it’s not that Ephiphany is a bad browser, but more that I’m used to how Iceweasel works. Further, Epiphany appears to just be another re-branding. According to it’s webpage, it runs all the same plugins that Firefox can… So I guess my first question is, why bother?

Getting Up and Running with Debian

September 1st, 2009 3 comments

Considering that it was my first experience with Linux, the installation of Debian actually went rather smoothly. I popped in the Debian live disc, rebooted my machine, and said goodbye to Windows XP.

The Basics:

I chose the graphical installer, because I’m a big wimp, and because it makes screenshots. You might ask how the installer saves screenshots to a hard drive that is as of yet unpartitioned, and will be wiped/encrypted during the coming hours… I don’t know either, but I guess that’s a part of the Linux magic. (You don’t get any of these pictures, because I lost them when I reinstalled, and forgot to take more the second time around).

The first few settings were fairly straightforward. Debian asked me to choose my default language, geographical location, and keyboard layout. Debian appears to support some 44 different keyboard layouts on install, including Dvorak, and Canadian Multilingual, which is perhaps the most awful layout ever conceived by man. Is it as bad for the Quebecois as it is for us Ontarians?

Next, the installer attempted to detect my hardware settings, and scanned the live disc for required drivers. At this point, the installer notified me that my system would require non-free firmware files to get my wireless card working. In Linux-speak, non-free simply means that the firmware is distributed as a compiled binary, and that the source code is not available. It is, however, free in the sense that I don’t have to pay a dime to use it, although I have to agree to a license to do so. Given the option to load the firmware files from a disc, or to wait and deal with the problem once the desktop was up and running, I chose the latter.

The next step was for the Debian installer to attempt to auto-configure my DHCP settings, and to use my ethernet card to connect to the internet. Since the laptop wasn’t plugged in to an ethernet cable, it didn’t really surprise me that this step failed. I chose to configure the network later, and moved on to giving my machine a name and choosing my timezone instead.

Partitions and Full-Disc Encryption:

When it came time to partition my disks, I chose to take a shot at full-disc encryption. The most basic Linux drive has two partitions – one called /boot that is generally formatted with ext2 and takes the place of Window’s boot sector, and another called / that contains the rest of your data, including the OS. Once the BIOS has finished all of it’s startup checks and initializations, it hands off to GRUB, which is stored on the /boot partition. GRUB does some other stuff, and then boots the operating system, which is stored on the secondary partition, usually formatted with one of the many available file systems that Tyler covered in detail in a previous post. There is a great explanation of the entire boot process available here.

To allow for multiple partitions, Linux utilizes some fancy software called the LVM (logical volume manager), which virtualizes any partitions that you create within the big main one. When enabling full-disc encryption, everything inside of the LVM (all of the partitions except for /boot, because the machine needs to be able to start) is encrypted as it is written to disc, and decrypted as it is read from disc. This method of protecting your data is extremely secure, as the encryption is transparent to the user and operating system, while every file on the system remains encrypted until the correct password is provided by the user.

Debian allows me to put each of the important parts of my root directory on separate drive partitions. For example, I can separate the /home partition from the /usr, /var, and /tmp partitions within the LVM. This would be extremely handy if my machine were running multiple physical discs, and I wanted to put my install on a separate disk from my data so that backups and reinstalls are less painful. Because I’m new at this and have only one disc, I chose to put all of my files in a single partition.

Before proceeding with installation, Debian tried to zero all existing data on my drive. Since that data wasn’t at all sensitive, my hard drive is small, and I don’t care to wait years for the wiping process to finish, I hit the cancel button in the bottom-right hand corner of the screen, which allowed me to skip to the next step. I actually found this out by accident, fully expecting the cancel button to boot me right out of the install process. Silly UI design, that.

The last step in partitioning my drives was to provide a password for the full-disc encryption, and to choose the file system for each of my newly created partitions. As previously noted, my /boot partition is formatted with ext2, and the LVM is using a filesystem called crypto, which I assume is just the name of the encrypted partition container. Linux also creates a root partition for me (located at /), which I’ve chosen to format with the ext3 filesystem, since ext4 does not appear to be supported by my installer. Finally, a partition called /swap is created (the equivalent of the Window’s swap file), that is formatted with the (what else?) swap file system.

It should be noted that the partition manager screen also had a strange UI bug in it – the continue button that had been my friend and companion thus far throughout the install process ceased to have any meaningful functionality. I had to choose to ‘finish partitioning and write changes to disc’ from the partition manager menu before I could continue with the installation.

Just About There:

With all of the setup options behind me, the Debian installer helpfully finished the install all on it’s own, pausing only to demand that I enter a root password, a default user account name and user account password. It should be noted that if you intend to become a l337 system administrator, your root password should be hard to guess but easy to type, as you’ll be forced to enter it whenever you do an action that is outside of the user account security privileges (or in other words, essentially anything of consequence).

Lastly, the installer asked if I wanted to enable the Debian package popularity contest (popcon), and which default software I wanted to install. I chose to add a web server, file server, and SQL database to the default install. That done, the installer went on it’s merry way and actually got down to the business of installing my distribution.

Adding the Tubes (Or Not):

Remember how the Debian installer failed to auto-detect my DHCP settings because my laptop wasn’t plugged into an ethernet cable? Well it also “forgot” to install my ethernet card driver at the same time. Since the machine doesn’t have a network connection, I have no access to the Debian repositories from which I can get the required drivers, but I can’t seem to get them without access to those repositories. I found the driver in question here, but have no idea what to do with the driver once I get it, because it is distributed as a *.rpm package, which is the Fedora package format, and unsupported by Debian. I’ve found various discussions on the Debian website that reveal that tg3, the driver for my network card, was removed from the Debian package, because it is not “free” in the sense that it is distributed as a compiled binary, and not as source.

After spending a half hour scouring the GOOG for instructions on how to install this driver, only to come up empty handed, I’ve decided to simply reinstall, but to plug the ethernet cable in this time, and hope that it works better than it did last time. If anybody knows what the hell happened, I’d love to hear an explanation, and perhaps a method by which I can fix the problem.

Back from the Reinstall:

So after waiting for Debian to reinstall, I got back up and running, and just needed my wireless card active so that I could put my ethernet cable back in my other computer. Luckily, the steps to get it working are very straightforward:

  1. Open the synaptic package manager
  2. Under the settings menu, select repositories, and select the DFSG and Non-DFSG checkboxes. This will allow synaptic to install packages that are non-free.
  3. Search for a package called firmware-ipw2x00, and install it
  4. Agree to the firmware license
  5. Open a root terminal
  6. Type “modprobe ipw2200″ to load the firmware kernel module
  7. Navigate to the etc/ directory, and open the file “modules” in the nano editor
  8. add the line “ipw2200″ to the end of the file
  9. Hit ctrl-x to close the file, and Y to save the changes.
  10. Restart your machine

Once your machine restarts, the wireless firmware will be loaded, and you should be able to click on the network icon in the taskbar and select an available wireless network to connect to.

So Everything is Cool, Right?

Well, not quite. My system is up and running, supports full-disc encryption, wired and wireless networking; but the GNOME desktop bugs the hell out of me, and so far as I can tell, I don’t have a working sound card yet… More on that one tomorrow. The moral of this story is as follows: NEVER install Debian without a network connection present. It’s just not worth your time.

The Distributions of Debian

August 21st, 2009 No comments

Like many of the other varieties of Linux, Debian gives the end user a number of different installation choices. In addition to the choice of installer that Tyler B has already mentioned, the Debian community maintains three different distributions, which means that even though I’ve picked a distribution, I still haven’t picked a distribution! In the case of Debian, these distributions are as follows:

  1. Stable: Last updated on July 27th, 2009, this was the last major Debian release, codenamed “Lenny.” This is the currently supported version of Debian, and receives security patches from the community as they are developed, but no new features. The upside of this feature freeze is that the code is stable and almost bug free, with the downside that the software it contains is somewhat dated.
  2. Testing: Codenamed “Squeeze,” this distribution contains code that is destined for the next major release of Debian. Code is kept in the Testing distribution as long as it doesn’t contain any major bugs that might prevent a proper release (This system is explained here). The upside of running this distribution is that your system always has all of the newest (and mostly) bug free code available to users. The downside is that if a major bug is found, the fix for that bug may be obliged to spend a good deal of time in the Unstable distribution before it is considered stable enough to move over to Testing. As a result, your computer could be left with broken code for weeks on end. Further, this distribution doesn’t get security patches as fast as Stable, which poses a potential danger to the inexperienced user.
  3. Unstable: Nicknamed Sid after the psychotic next door neighbour in Toy Story who destroys toys as a hobby, this is where all of Debian’s newest and potentially buggy code lives. According to what I’ve read, Sid is like a developer’s build – new users who don’t know their way around the system don’t generally use this distribution because the build could break at any time, and there is absolutely no security support.

I’m currently leaning towards running the Testing distribution, mostly because I like new shiny toys, and (I think) want the challenge of becoming a part of the Debian community. Since we’ve been getting a lot of support from the various development communities lately, perhaps some of our readers could set me straight on any information that I might have missed, and perhaps set me straight on which distribution I should run.