tag:blogger.com,1999:blog-64409023538521798492024-03-07T20:10:16.267-07:00Linux BlogThis blog is a departure from my personal blog so that I can stop boring the readers there with my technical Linux mumbo-jumbo. Recently I made the switch from Ubuntu 8.04 to Debian Lenny. Here is the chronical.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-6440902353852179849.post-90526355547591480882009-05-06T20:37:00.011-06:002009-05-10T11:11:02.212-06:00Ubuntu 9.04 on the Toshiba Satellite L305<p>Previously I had written about installing Ubuntu 8.10 on the Toshiba Satellite L305. It was not without its problems, the hardware on Toshiba systems can be pretty picky. The omnibook module got the fan and brightness keys working, but on some systems, this also caused the laptop to turn itself on three to fifteen minutes after being shut down. The good news for those who had this problem is that in 9.04, the fan problem is easily fixable without the module, and with a few workarounds, the brightness keys work too. Furthermore, wireless now works out of the box with the ath5k module, so madwifi or ndiswrapper are no longer necessary.<br /><br />If you are already running the omnibook module without this problem, I recommend using that instead, as it is a simpler fix.<br /><br /><span style="font-size:130%;"><b>Step 1: Install and get the fan going</b></span></p> <p style="margin-bottom: 0.2in;">Download and install Ubuntu 9.04. In my experience, the DVD drive in the L305 can be a little picky, so I recommend either installing from a usb stick or burning the Ubuntu CD at a slower speed. The installation should go smoothly. When it boots to your new Ubuntu desktop, you first need to get the fan going.<br /><br />This is a pretty easy fix, all you need to do is modify your grub file. Open up a terminal and type:</p> <pre style="margin-left: 0.39in; margin-right: 0.39in; margin-bottom: 0.2in;">sudo gedit /boot/grub/menu.lst<br /></pre><p>*note: You can use nano, vi, kate, or whatever your preferred text editor is.<br /><br />Add 'acpi_osi="Linux"' to your kernel's boot parameters. This is an example of my menu.lst file, with the part you need to add in <b>bold</b> (the rest may differ slightly in your file):</p><p><br />title Ubuntu 9.04, kernel 2.6.28-11-generic<br />uuid a91f7379-e93b-490c-b541-0681173bccc2<br />kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=a91f.. ro quiet splash <b>acpi_osi="Linux"</b><br />initrd /boot/initrd.img-2.6.28-11-generic<br />quiet</p><p><br />Reboot and your fan should work fine. In my experience, it turns on at about 50 degrees and turns back off at about 35. Your brightness keys might be usable now, too. In my experience, though, these keys stop working after a few reboots. (If your keys continue to work, you can skip the brightness keys workaround section).<br /><br /><span style="font-size:130%;"><b>Optional: monitor your temperatures with lm-sensors</b></span><br />I wanted to make sure that the fan was working appropriately, so I wanted to monitor the computer's temperature. This is easy to do by installing the lm-sensors package. After you set up the sensors, you can either run the sensors package to display temperatures, or install the sensors-applet package to monitor them from the desktop:</p> <pre style="margin-left: 0.39in; margin-right: 0.39in;">sudo apt-get install lm-sensors sensors-applet<br />sudo sensors-detect<br /></pre> <p>sensors-detect will set up the sensors. It will ask a lot of questions, the defaults should all be fine, though when asked if I want to add the modules to /etc/modules, I say yes. either reboot or manually add the modules it specifies manually. Add the sensors applet to the panel and you should be able to monitor your temperatures.<br /><br /><span style="font-size:130%;"><b>Step 2: Get the brightness keys working</b></span><br />For some reason, after a couple of reboots, the function keys no longer work for me. It seems the function key (fn) doesn't get input. I've developed a workaround to make the super (Windows) key to work with F6 and F7 to change brightness levels.<br /><br />First you need to modify the keyboard with xmodmap to allow the use of the super key, because by default it is set to a different use. Though it is supposedly changeable through Gnome, I have had no luck. It is actually quite easy to do manually though.<br /></p> <p>First open a console and run xev. Hit the windows key and look for the keycode output. On my computer, it is 147, though may be different (there are a few different models of L305s). Close out of xev and make (or modify) ~/.Xmodmap (note the dot and the capital X). Add the following lines to .Xmodmap:</p> <pre style="margin-left: 0.39in; margin-right: 0.39in;">keycode 147 = Super_L<br />add mod4 = Super_L<br /></pre><p>Save and close the file, then run xmodmap. The super key should now be mapped to "Super_L" (you can test this again in xev, if you like)<br /><br />Next you need to bind super+F6 and super+F7 to the brightness keys. This is doable with xbindkeys, which is installable in the console, and you may also need the keytouch daemon: (sudo apt-get install xbindkeys keytouch). Xbindkeys will be mapped to run acpi keys with "acpi_fakekey", which should already be installed on your system. The keytouch daemon will install apci-related things that make acpi_fakekey work (I'm not exactly sure how, but in my experience, without the keytouch daemon, acpi_fakekey doesn't work)</p> <p><br /></p><p>You are also going to need to install the lineakd package to find out what the event keys are for your brightness keys. Lineakd comes with a program called evtest. Run it (as root) on the different events in /dev/input/ until you find the one with brightness event codes. Mine is in /dev/input/event5, though it may be different for you:<br /></p><blockquote><pre>sudo apt-get install lineakd<br />sudo evtest /dev/input/event5</pre></blockquote><br />It lists for me that brightness down is 224 and brightness up is 225.<br /><br />Next you need to modify the xbindkeys config file. This is easiest by installing the xbindkeys-config package, and run that. Here you can add various commands for different combinations of keypresses. Click “add.” Name the command whatever you like. Click on “get key” and press your key combination. For the action type in “acpi_fakekey [keycode]”, where [keycode] is the event code you found with evtest. For example, for my brightness down key I put <b>acpi_fakekey 224. </b>You can also use this for other commands, too.<br /><br />Save the file and close xbindkeys-config. Here, I like to move the config file from its default location (~/.xbindkeysrc) to its own folder in /etc, because the commands should be system wide, and also for security (the commands it will be running will be running <b>as root</b><span style="font-weight: normal;">). I copied it to /etc/xbindkeys/xbindkeysrc</span><p></p> <p><br />Now it's time to test it. run xbindkeys as root with "sudo xbindkeys -f [location of xbindkeysrc file]" . Press super+F6 and super+F7 to make sure they adjust the brightness as they should. If everything is set up right, your brightness should be changing now!<br /><br /><span style="font-size:130%;"><b>Step 3: Get xbindkeys to run at boot:</b></span><br />As long as the keys are working, the only thing left to do is to make xbindkeys run on boot. The following is the only way I've been able to find to get that to work (init scripts make it run too early and it segfaults). Many thanks to Ubuntu Forums user BslBryan for this tip!<br /><br />First, modify the sudoers file with the command "sudo visudo" Add the following to the end of the file:<br /></p><blockquote><pre>[your username(s)] ALL= NOPASSWD: /usr/bin/xbindkeys</pre></blockquote><br />This makes xbindkeys able to be run as root without a password. It's important for the next step. Next go to System -> Preferences -> Startup Applications. Click on add. Name it xbindkeys. For the command, type "sudo /usr/bin/xbindkeys" (without the quotes). Sudo won't ask for a password now because we edited the sudoers file earlier with visudo. Type a description if you like and click add, then close out of startup applications.<br /><br />Now reboot. If all went well, when you reboot super+F6 and super+F7 should adjust the brightness. Along with the easy fix for the fan, this makes Ubuntu 9.04 much more usable on newer Toshiba laptops.<p></p>Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com26tag:blogger.com,1999:blog-6440902353852179849.post-50308244918079739972009-03-23T00:04:00.005-06:002009-03-23T03:13:01.842-06:00How to use LIRC with Amarok 2, Exaile, and other media players in UbuntuIt has been a while since I updated. School and life in general have kept me busy, and I haven't had many adventures in Linux, but today I had to grapple with a new problem.<br /><br />Amarok 2 was released last December and after I first tried the beta, I really didn't like it. Amarok 1.4 was my music player of choice, you see, but the times, they are a changin'. In the upcoming release of Ubuntu (Jaunty Jackelope, 9.04) Amarok is due to be replaced by version 2. I decided to try out Amarok 2 again, figuring I will either have to get used to it, or find myself a new player.<br /><br />Truth is, I still hate Amarok 2. And while I could go into details on that, it is not the reason I am here. When I was first trying to learn to love Amarok 2, I spent a while trying to fix one of my main annoyances with it: <strike>lack of support with LIRC (Linux Infrared Remote Control.) In 1.4, the DCOP server made things extremely easy, but it no longer exists in Amarok 2, and so you have to get creative.</strike> <span style="color:red;">Edit: *</span>As pointed out in the comments for this post, DCOP was actually replaced with DBus, which I managed to miss somehow. I admittedly don't know much about DBus myself, but if you are interested in getting LIRC working with Amarok 2, you will save yourself some effort looking into DBus. However, this guide still applies to Exaile and any other media players that don't specifically offer remote control support. Thanks to nhnFreespirit for pointing this out!<span style="color:red;">*</span><br /><br />As I found out, this guide will also work for other music players. In addition to an already set up LIRC daemon and remote control, you will need an audio player with either global hotkey support (<strike>like Amarok 2</strike>) or a media player that can take advantage of the keyboard shortcuts (the default way to use media buttons on a keyboard) in Gnome. You might also need a keyboard with media buttons, but I haven't tried it without them, so it may work (if it does, you should let me know!) These instructions are taken from three or four other resources that, in my exhaustive search, I lost and so can't give proper credit, but thanks to those who paved the way.<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Step 1: Global Hotkeys</span></span><br />The first thing you need to do is set your global hotkeys to your media buttons. <strike>If you are using Amarok 2, this needs to be done within Amarok (go to the configure shortcuts dialogue, and set your <u>global</u> hotkeys for play/pause, stop, next track, and previous track to the corresponding media buttons on your keyboard.</strike> If you are using a Gnome/GTK+ music player, you should be able to set these under Preferences -> Keyboard Shortcuts. In either case, you should now be able to control the music with these media buttons.<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Step 2: Set LIRC to use acpi scripts<br /></span></span>There are scripts in /etc/acpi/ that will actually control these multimedia button functions, and if you tell LIRC to use them, you can get your remote to tell the computer that you actually hit that button on the keyboard. The associated scripts are are called playbtn.sh, stopbtn.sh, nextbtn.sh, and prevbtn.sh. You can use irexec to run these scripts by setting them up in the ~/.lircrc file. For example, I have included the play button and stop button from my .lircrc file:<br /><blockquote><pre>begin<br />prog = irexec<br />remote = AtiRW<br />button = play<br />config = /etc/acpi/playbtn.sh<br />end<br /><br />begin<br />prog = irexec<br />remote = AtiRW<br />button = stop<br />config = /etc/acpi/stopbtn.sh<br />end</pre></blockquote>*Note, your "remote =" and "button=" will vary depending on how you set up your LIRC daemon. In my example, I named my remote "AtiRW", my play button "play" and my stop button "stop". These values come from your lircd.conf file when you set it up.<br /><br />Set all of the buttons you want. You can even set up the vol+/vol-/mute buttons on your keyboard if you have them to change the master volume, though I prefer to use aumix or amixer to do that because there is no OSD.<br /><br />When you are done setting up your keys in ~/.lircrc, save the file and close it. Then run irexec as root in the terminal with "sudo irexec" (It should have been installed with LIRC, but if it hasn't, you can install it with apt-get first.) If you have set up everything correctly, at this point you can press the buttons on your remote and it should cause the music player to function accordingly. If it doesn't work, make sure A) You set up LIRC correctly (I didn't cover that here), B) LIRC is currently running, C)You ran irexec AS ROOT (you will get an error otherwise), and D) Your media buttons on your keyboard work.<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Step 3: Get irexec to run at boot</span></span><br />For me, irexec (the program that tells other programs/scripts to run based on LIRC input) was automatically told to run at start up with LIRC. However, even if that is the case for you too, to run these scripts irexec has to be running <u>as root</u> so you will have to do this next step either way. For whatever reason, and the sources I found on the internet seem to confirm it, the usual methods for starting irexec always seem to result in them being run as a normal user. We are going to have to get around that.<br /><br />It would be a good time to note that, for good reason, running programs as root should be done with the utmost caution, and the only reason we are running irexec as root is because running the acpi scripts <i>have to</i> be run as root. (I even tried copying them to my home directory and changing the permissions/ownership with no luck.) Anybody with an alternative method that does not require irexec to be run as root should leave a comment on how to do it and I will update accordingly.<br /><br />The only way I managed to get irexec to run as root was found <a href="http://ubuntuforums.org/showthread.php?t=390986">here</a> thanks to Ubuntu forums user Kipee. They suggest adding it to crontab. Edit crontab with:<br /><blockquote><pre>sudo crontab -e</pre></blockquote>You may be asked which editor to use, if so just select whichever one you are most comfortable with. Add a new line and insert the following, replacing USER with your username:<br /><blockquote><pre>@reboot sleep 30 && export DISPLAY=:0 &&/usr/bin/irexec -d /home/USER/.lircrc</pre></blockquote><br />"@reboot" tells it to run when the machine is booted. "sleep 30" causes irexec to wait 30 seconds before starting, and is only to make sure that the LIRC daemon is running before trying to run irexec. (Note: in Kipee's post, they use 120, but two whole minutes seems longer than necessary in my experience). Close out of crontab (ctrl+x if you are editing with nano) and make sure to save it. Now reboot. When the machine reboots, irexec should now start running (remember, after 30 seconds), and when you open up your favorite media player, it should respond to remote control input.<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Other Considerations</span></span><br />These directions assume you have multimedia buttons on your keyboard, and I am not entirely sure how one could achieve the same effect without those multimedia buttons. (If you try running the acpi scripts without assigning them to a key, they don't work!) If you are using a player with configurable shortcut keys (like Amarok 2), I would imagine it would be possible, though I haven't tried it, to use irxevent to fake keypresses in that program <strike>(for example, set ctrl+p to play in Amarok, set the play button on your remote to sent "ctrl+p" to Amarok.)</strike> <span style="color:red;">Edit: *</span>as mentioned previously, for Amarok 2 use DBus instead.<span style="color:red;">*</span> This would also bypass the need to run irexec as root (or in fact, at all.) You Alternatively, the scripts that run the multimedia keys are tied to key numbers given in /usr/share/acpi-support/key-constraints, and it *might* be possible to use those even without multimedia keys, though how you would do that is beyond me, and if you attempt it you do so at your own risk. Any other solutions to this problem? Feel free to leave some comments.<br /><br />And in case you were wondering, I switched to Exaile, and now that I've bypassed the hurdle of being able to use my remote, I am loving it.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com6tag:blogger.com,1999:blog-6440902353852179849.post-63485020384451707492009-02-01T21:07:00.003-07:002009-02-04T11:00:17.741-07:00Steps to a successful 64-bit UbuntuCompletely on a whim I decided to try <a href="http://www.archlinux.org/">Arch Linux</a> on my laptop, which had some hardware issues, and then later on my desktop. While I liked it, it was way too much work for me, given the fact that I use Linux almost exclusively and need something functional. When it came time to reinstall with an easier distro, I decided to go back to Ubuntu if only because I spent a decent amount of time trying to tweak Debian that is unneeded in Ubuntu. However, I decided to go with the 64-bit version, which comes with its own set of problems that can be overcome with a little knowhow.<br /><br />Previously, I wrote on how to set up a chroot environment to run 32-bit programs in their own 32-bit environment, all within the 64-bit operating system. (I wrote it for Debian Lenny, but the same process can be used for Ubuntu if tweaked slightly.) It works, but it is not without limitations. The biggest of which was running a 32-bit web browser caused problems with other web browsers arguing for the title of "default browser," and being unable to run downloaded files from within the browser. I decided this time I was going to try to do it all without using a chroot.<br /><br /><span style="font-weight: bold;font-size:130%;" >Web Browsing:</span><br />Adobe Flash has always been tricky to get working on a 64-bit browser. This will soon change, as Adobe currently has an alpha version of flash, but I have tried it and it is (as one would expect for alpha software) quite buggy and unstable. The other common alternative is to run the nspluginwrapper package to use a 32-bit flash in a 64-bit browser, but this can also be quite buggy for some. My solution is simply to run a 32-bit browser. I don't know how well all 32-bit browsers run, but I would recommend Swiftfox, which is basically an optimized Firefox, and I recommend it because it comes in a very easy-to-install .deb file. The one thing you have to do is figure out what sort of processor your computer uses, because different packages are optimized for different processors. After you find your processor, you can download the appropriate version of swiftfox <a href="http://getswiftfox.com/deb.htm">here</a>. (My computer uses the Prescott version, so I am going to use it in the examples) Then install it in the terminal:<br /><blockquote><pre>sudo dpkg -i swiftfox_3.0.4pre-1_prescott.deb</pre></blockquote>Even though it is a 32-bit browser, it *should* install just fine. Open it up and make sure it works. One thing to watch out for is that on Debian, it did not find the printer I had installed, though I have never had problems with it in Ubuntu. If everything works in Swiftfox, you are ready to install Flash. Download the latest version from <a href="http://get.adobe.com/flashplayer/">Adobe</a>. Download the .tar.gz file (NOT the .deb file), navigate to the downloaded file and extract the contents. Copy libflashplayer.so to the plugins directory in your home directory:<br /><blockquote><pre>tar -zxvf install_flash_player_10_linux.tar.gz<br />cd install_flash_player_10_linux<br />cp libflashplayer.so ~/.mozilla/plugins/</pre></blockquote>When you start up Swiftfox again, you should have working Flash support.<br /><br /><span style="font-weight: bold;font-size:130%;" >Adobe AIR:</span><br />I like the Adobe AIR runtime to use TweetDeck, but it is still not supported in 64 bit. The latest version will run on 64-bit versions with a few tweaks, and Adobe is kind enough to supply the information on their website. Rather than rehash what they have, I would recommend just checking out <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=kb408084">their website</a>. If you follow their guide exactly, Adoebe AIR should run beautifully.<br /><br /><span style="font-weight: bold;font-size:130%;" >The getlibs Package:</span><br />For many other programs that have no 64-bit version, installing the 32-bit libraries will often be enough to get them up and running. The easiest way I have found to do this is with a package called getlibs, which can be found at <a href="http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb">http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb</a>. This program will assess 32-bit packages/binaries and figure out which 32-bit libraries it needs to run successfully. For this example, I am going to use the <a href="http://www.amazon.com/gp/dmusic/help/amd.html">Amazon.com mp3 downloader</a>. After downloading it, if you try to install it with dpkg, it will fail, claiming that you are attempting to install something for the wrong architecture. This is an easy enough fix using the --force-architecture option when installing:<br /><blockquote><pre>sudo dpkg -i --force-architecture amazonmp3.deb</pre></blockquote>The package will install but will still give you errors if you try to run it. To fix this, install getlibs if you have not already, and then run it on the binary file (not the .deb file) and it will, after a few moments, download and install the required libraries:<br /><blockquote><pre>sudo dpkg -i getlibs-all.deb<br />sudo getlibs /usr/bin/amazonmp3</pre></blockquote>My one complaint with getlibs is that it does not provide any detailed output, so it may seem like it is not doing anything, but be patient. Once it completes, try running your program again and it should run. If the installer for a program is in .bin format, try running getlibs on the .bin file first because that might work as well (like in the directions for installing Adobe AIR), but so far it doesn't seem to do anything for .deb files for me. If a program complains of a missing library file, getlibs can also be used to download that specific library with the -l (or -64l for 64 bit libraries) option. And if downloading the libraries doesn't seem to work, try updating your library links with "sudo ldconfig".Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com0tag:blogger.com,1999:blog-6440902353852179849.post-54122731422298780992008-12-08T15:06:00.004-07:002008-12-09T22:10:29.442-07:00Using 32-bit applications in 64-bit Debian with chrootSome time ago I switched to 64-bit Debian on my desktop. I used to be scared off by the fact that certain, important applications were not yet available in 32 bit, such as Adobe's flash player. With some workarounds some of these programs are workable in 64 bit, for example <a href="http://gwenole.beauchesne.info//en/projects/nspluginwrapper">nspluginwrapper</a> uses the 32 bit version of flash and forces it to play nice with your 64 bit browser, with moderate to good success. (Adobe also just released their alpha version of 64 bit flash for Linux, but it kept causing my browser to crash.) For other programs, though, there is no way to run them effectively (or at all) in 64 bit. Until recently there were very few programs I wanted in this category (really, only TweetDeck, a twitter application on the Adobe AIR interface), but suddenly there have been a few more programs that I wanted/needed that are only available in 32 bit versions. The solution? Run them in 32 bit using a chroot! A chroot is sort of like a disk within a disk. It is often used for testing so that developers can test a program without it destroying the filesystem on their machine. Here, we are using it to install a 32 bit Debian inside a 64 bit Debian. This process is also possible to do on Ubuntu, with slightly modified commands. *Note, most of this comes from <a href="http://www.debian-administration.org/articles/356">this page</a>, but I have cleaned it up, fixed some typos and, in my opinion, made it easier to understand.<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Step 1: Set up the base file system</span></span><br />First you need to set up the base file system. This is going to install a very minimal version of 32-bit Debian Sid inside your 64-bit Debian install. So first, make a directory for this second install and then use debootstrap to install (as root or with sudo):<br /><blockquote><pre>mkdir /var/sid-386-chroot<br />debootstrap --arch i386 sid /var/sid-386-chroot http://ftp.debian.org/debian/</pre></blockquote><br />This will download a number of packages for the chroot and install them. Depending on your internet connection this may take a little while. When it is all done you should see that you have a whole file system inside /var/sid-386-chroot, similar to your main file system.<br /><br />I am not entirely sure what the next steps do, but the howto I followed states that you have to add the library path of your chroot to your ld.so.conf, and you need a link to your 32 bit linker in the /lib path. In any case, what you need to do is add the following lines to /etc/ld.so.conf:<br /><blockquote><pre># chroot i386 system libs<br />/var/sid-386-chroot/lib<br />/var/sid-386-chroot/usr/lib<br />/var/sid-386-chroot/usr/X11R6/lib<br />/var/sid-386-chroot/usr/local/lib</pre></blockquote><br />Then you need to run these commands in the terminal:<br /><blockquote><pre>cd /lib<br />ln -s /var/sid-386-chroot/lib/ld-linux.so.2 ld-linux.so.2<br />ldconfig</pre></blockquote><br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Step 2: Set up the chroot to run alongside your 64 bit install</span></span><br />For your 32-bit applications to work just like they were on your 64 bit install, certain parts of your 64 bit install have to be accessible to your chroot (normally, a chroot can't access anything outside of the chroot. It's called a chroot jail and it is why developers use chroots to test programs.) For this, we use what is called a bind mount, which is used to mount a directory, such as /home, to the home folder inside the chroot. There are a few folders which should be mounted in the chroot, and this can be done by modifying the /etc/fstab file and adding the following lines at the bottom:<br /><blockquote><pre>/home /var/sid-386-chroot/home none bind 0 0<br />/tmp /var/sid-386-chroot/tmp none bind 0 0<br />/proc /var/sid-386-chroot/proc proc defaults 0 0<br />/dev /var/sid-386-chroot/dev none bind 0 0<br />/usr/share/fonts /var-sid-386-chroot/usr/share/fonts none bind 0 0</pre></blockquote><br />It is <b>VERY IMPORTANT</b> to note that now that these folders are bound to their locations on your main file system, if you ever decide to delete your chroot, make sure that you unmount these bind mounts or else <b>you can end up erasing these folders on your main file system</b>. Also make sure that there are directories for each of these mounts. The only one you should end up having to make is /media/cdrom0. Then mount them:<br /><blockquote><pre>sudo mkdir /var/sid-386-chroot/media/cdrom0<br />sudo mount -a</pre></blockquote><br />If all went well you should get no error messages and these locations will be bound to their counterparts in the chroot.<br /><br />Lastly, you need to make sure that all of the users on your machine also exist in the chroot. This can be done by copying certain files to the chroot:<br /><blockquote><pre># sudo cp /etc/passwd /var/sid-386-chroot/etc/<br />sudo cp /etc/shadow /var/sid-386-chroot/etc/<br />sudo cp /etc/group /var/sid-386-chroot/etc/<br />sudo cp /etc/sudoers /var/sid-386-chroot/etc/<br />sudo cp /etc/hosts /var/sid-386-chroot/etc/</pre></blockquote><br /><br />Now you should be able to enter the chroot and run programs from within. To get into the chroot (which you must be root to do) you can type:<br /><blockquote><pre>sudo chroot /var/sid-386-chroot</pre></blockquote><br />Now you can run commands. Try out a command or two. Keep in mind that the chroot is a brand new Debian install, so most of the programs you use will not be installed yet. For example, if you try running gedit, it won't run because gedit is not yet installed in the chroot. You can install it and other programs with apt-get or aptitude just like in your 64 bit install. Should you ever want to exit the chroot, simply type "exit"<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Step 3: Installing your 32-bit applications</span></span><br />Anything in the Debian repositories is as easy as entering the chroot and installing it via the apt-get or aptitude command line. Keep in mind that since it is a different install you will have to add contrib and non-free to your sources.list file if you want to use those repositories. Downloaded .deb files are a bit tougher. Download them to your home directory and install them with dpkg -i (from within the chroot), for example, if you wanted to install skype (a 32-bit only app), download it, navigate to the directory where you downloaded it in the terminal, and type:<br /><blockquote><pre>dpkg -i skype-debian_2.0.0.72-1_i386.deb</pre></blockquote>. This method is a bit more tedious because, since the chroot is a brand-new, minimal install, there are most likely a host of dependencies that are not installed yet. This means that it will come up with all sorts of errors about dependencies. For each dependency that it is lacking, use apt-get or aptitude to install them.<br /><br />You may also get a lot of errors about locale settings. To fix this, I had to install locales and reconfigure it:<br /><blockquote><pre>sudo apt-get install locales<br />sudo dpkg-reconfigure locales</pre></blockquote><br /><br />You should now be able to run your 32 bit application from within the chroot. (Note: TweetDeck did not function properly until after the next step, but other applications ran okay.) In this example, while in the chroot simply type "skype" into the terminal and skype will launch.<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Step 4: Make it work seamlessly from your 64-bit install.</span></span><br />So you got your application up and running, but as you are probably already thinking, entering the chroot and running the application is rather tedious. So the next step is to work up a script that will load it in one fell swoop. First, make sure you exit the chroot and install dchroot, which will allow you to run programs installed in the chroot from your 64-bit Debian.<br /><blockquote><pre>sudo apt-get install dchroot</pre></blockquote><br />Now you need to edit (or create) /etc/dchroot.conf and add:<br /><blockquote><pre># sid386 chroot<br />sid386 /var/sid-386-chroot</pre></blockquote><br />This essentially names the chroot and defines where it is located, so that dchroot knows where to look when it is run. Now you should be able to launch skype using dchroot without having to enter the chroot itself by running the command:<br /><blockquote><pre>dchroot -c sid386 -d skype</pre></blockquote><br />To make life even easier, we can write a simple script to call that command whenever we want to launch Skype. While you could certainly write a script to specifically launch Skype, it would mean that you would have to make a new script for every 32-bit application you install. Instead, we are going to create one universal wrapper script. Make the following script called /usr/local/bin/do_chroot:<br /><blockquote><pre>#!/bin/sh<br />ARGS=""<br />for i in "$@" ; do<br />ARGS="$ARGS '$i'"<br />done<br /><br />exec dchroot -c sid386 -d -q "`basename $0`" "$ARGS"</pre></blockquote><br />I am no scripting expert, but basically what this script does is it uses the name of the script to determine what program to run from the chroot, and will also take any arguments given and append them to the end of the dchroot command. Make sure it is executable ("sudo chmod 755 /usr/local/bin/do_chroot"). Now, make a link to the script called "skype" in /usr/bin:<br /><blockquote><pre>sudo ln -s /usr/local/bin/do_chroot /usr/bin/skype</pre></blockquote><br />This script is slick in the fact that it will use the name of the link in the script to run the whatever program the link is named after. This means that when you make your link, make sure it is typed exactly as it needs to be to launch it in the chroot (So, in this example, make sure it is "skype" and not "Skype" or "launch_skype" or anything else. Just "skype".) If all has worked correctly, all you have to do now is type "skype" into the terminal to launch the 32-bit only Skype!<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Conclusion</span></span><br />It is a little bit of effort to set up, but after the chroot is set up, new 32-bit applications can be installed by entering the chroot, installing the application, exiting the chroot, and linking to the do_chroot script. Using this method, I have installed and use the following 32-bit only applications:<br /><ul><li>Skype</li><li>TweetDeck (which uses the Adobe AIR environment, currently only for 32-bit)</li><li>SwiftFox (The 64-bit Flash Player alpha kept crashing IceWeasel so I switched to SwiftFox and a 32-bit Flash Player)</li><li>Amazon.com MP3 downloader<br /></li></ul>Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com4tag:blogger.com,1999:blog-6440902353852179849.post-8836502644453601902008-11-17T20:09:00.008-07:002009-05-06T22:15:40.109-06:00Ubuntu on the Toshiba Satellite L305: Howto<span style="color: rgb(204, 0, 0);">EDIT:</span> If you are having the problem with the omnibook module starting up your computer after shutdown, install the latest version of Ubuntu (9.04) and follow the directions in my newer post <a href="http://swinky-linuxblog.blogspot.com/2009/05/ubuntu-904-on-toshiba-satellite-l305.html">here</a>.<br /><br />I decided to upgrade from Ubuntu 8.10 32-bit to the 64-bit version on my Toshiba Satellite L305. While going with the 64-bit version came with its own set of difficulties, the need to reinstall made me realize one important thing about installing 8.10 (rather than the beta I did before) on this laptop: it no longer comes with the kernel modules needed to run the fan or the brightness buttons.<br /><br />This is <i><b>extremely</b></i> important because if the fan doesn't work, the processor will overheat.<br /><br />The problem stems from the fact that without the module, the fan will not change speeds as the computer heats up. When the computer first boots, the fan does not turn on immediately, causing the fan to never turn on. If you run the computer for a while and reboot, you will notice the fan running at full speed nonstop.<br /><br />The following is a guide to installing what is needed to get your Ubuntu install running as it should on the Satellite L305.<br /><span style="font-size:130%;">Step 1: Download and install.</span><br /><br />Download and install your desired flavor of Ubuntu (Ubuntu/Kubuntu/Xubuntu) in the 32 bit or 64 bit version (the 64 bit version takes a bit of work to get set up, so only use the 64 bit version if you are prepared for a little work,) <span style="color:red;">EDIT: After beating my head against it for quite a while I would suggest against installing the 64 bit version. I ended up going back to the 32 bit version.</span> If you have installed Ubuntu before you know the drill, if not, follow the prompts the installation gives you. And though it is less pretty, I recommend the alternate (non-graphical) install, because I have had less luck with the live cd install.<br /><br /><span style="font-size:130%;">Step 2: Install omnibook module.</span><br /><br />Older Toshiba laptops use their own proprietary bios that required the toshiba_acpi module to be compiled with the kernel. Toshiba now uses the Phoenix bios, which means that this has to be done another way, which is a bit deceptive. You have to download the omnibook module (Omnibook is actually an HP model laptop) which will allow these functions. You can download the module source package here: <strike>http://packages.kirya.net/debian/pool/main/o/omnibook/omnibook-source_2.20070211+svn20071217-1_all.deb</strike> <span style="color: rgb(255, 0, 0);">Edit: The omnibook-source package has been updated, which broke the link. Updated versions of the omnibook-source can be found at <a href="http://packages.kirya.net/debian/pool/main/o/omnibook/">http://packages.kirya.net/debian/pool/main/o/omnibook/</a></span><br />Install the source, extract it, install dependencies, and install the module in the terminal:<br /><br /><blockquote><pre>sudo dpkg -i omnibook-source_2.20070211+svn20071217-1_all.deb<br />cd /usr/src<br />tar -xvf omnibook-source_2.20070211+svn20071217-1_all.tar.bz2<br />cd modules/omnibook<br />sudo apt-get install build-essential linux-headers-`uname -r`<br />sudo make install<br /></pre></blockquote><br /><br />The install may say it lacks a few other dependencies which can be installed with apt-get. Once the source is installed, the module should be able to be loaded, however it needs a special argument when it is loaded or else it won't work.<br /><br /><blockquote><pre>sudo depmod -a<br />sudo modprobe omnibook ectype=11</pre></blockquote><br /><br />If everything was set up correctly, you will most likely hear your fan kick on and the screen brightness change. You can now change the brightness with the function keys, and the fan will start up when you turn on the laptop. Make sure the module loads when you boot by adding "omnibook ectype=11" to the bottom of your /etc/modules file.<br /><br /><span style="font-size:130%;">Step 3: Wireless</span><br />If you have the Atheros wireless card (I am not sure what other options the L305 can have) you can go about wireless two ways, madwifi drivers or ndiswrapper. Ndiswrapper is the required method if you go with 64 bit, so that is the method I went with, though I would recommend either madwifi for the 32 bit install. Install ndiswrapper:<br /><blockquote><pre>sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9 ndisgtk</pre></blockquote><br /><br />Ndiswrapper is a wrapper application for windows networking drivers so that they can be used on Linux. This means that for it to work, you need to also get the windows drivers. The 64 bit drivers can be found at <a href="http://blakecmartin.googlepages.com/ar5007eg-64-0.2.tar.gz">http://blakecmartin.googlepages.com/ar5007eg-64-0.2.tar.gz</a>, or the 32 bit version can be found at <a href="http://blakecmartin.googlepages.com/ar5007eg-32-0.2.tar.gz">http://blakecmartin.googlepages.com/ar5007eg-32-0.2.tar.gz</a>. Unzip the files from the file and start ndisgtk from the terminal (open the terminal and type "sudo ndisgtk"). Click on "install new driver" and navigate to the folder where you unzipped the drivers. Select the file ending in .inf and then install it. Make sure ndiswrapper is loaded:<br /><br /><blockquote><pre>sudo modprobe ndiswrapper</pre></blockquote><br /><br />You should also blacklist the module that tries to load for the wireless drivers by adding the following to /etc/modprobe.d/blacklst<br /><br /><blockquote><pre>blacklist ath_pci</pre></blockquote><br /><br />You should now have wireless internet access. One caveat is that for reasons that are unknown to me, the module has trouble connecting sometimes on boot. If it keeps saying it is getting disconnected, or if it keeps asking for the passphrase when you know it is right, you need to remove and reload the module:<br /><br /><blockquote><pre>sudo rmmod ndiswrapper<br />sudo modprobe ndiswrapper</pre></blockquote><br /><br />This should cause the wireless device to play nice and allow you to connect. For now, it is the best solution I have as I have yet to find a permanent fix.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com20tag:blogger.com,1999:blog-6440902353852179849.post-47623500182801579512008-10-26T23:14:00.004-06:002009-02-04T11:01:49.589-07:00Ubuntu on Toshiba Satellite L305I've noticed a sudden increase in traffic to my little blog, most of which is coming from Google searches pertaining to the topic of installing Ubuntu on the Toshiba L305 (somehow it seems that my post about installing DEBIAN on the laptop found its way to the top of Google's search.) But, Google searchers, you happen to be in luck, for after my failure to install (an adequate version of) Debian on my L305, I decided to go back to Ubuntu on my laptop.<br /><br />If you are installing Ubuntu 8.04 (Hardy Heron) the system will hang in a few spots but eventually show a bright red screen saying that it can't detect any network devices. This as it turns out is the exact problem I had trying to install Debian. The reason this happens is that the network devices in the L305 were unsupported at the time of Hardy's release. This will cause the installer to pretty much refuse doing the rest of the install in my experience.<br /><br />The good news is that these drivers will be fully supported in the upcoming release 8.10, Intrepid Ibex. The even better news is that as of this writing, Intrepid is a mere four days away from launch. (Intrepid will be released on October 30th.) If you <i>absolutely cannot</i> live with Windows Vista for four more days, and are willing to try Intrepid before it is fully finished, you can download the latest release candidate off of the Ubuntu website. I have been using the release candidate for the past week and a half and have had no <i>major</i> problems, but do be prepared for a less-than-perfect install (I have had my fair share of minor problems). If you are still a little new to the Linux world, I'd suggest waiting out the four days and downloading the finished product. If you are wanting to download Hardy for the fact that it is the Long-Term Support (LTS) release, then I don't really know what to tell you.<br /><br />The other good news is that having used Ubuntu 8.10 for the last week and a half, I can tell you that it is yet another good release by the Ubuntu team.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com3tag:blogger.com,1999:blog-6440902353852179849.post-77010862776430927142008-10-20T10:59:00.005-06:002008-10-20T11:38:41.524-06:00xvinfo: No Adaptors Present and a curious fix for fglrxA few days after installing Debian, VLC media player stopped playing video. This launched a whole crusade to get the damned thing to work. And it wasn't easy. The following is using the fglrx ATI proprietary drivers and <b>ONLY</b> applies to these drivers. I am using the Radeon X1950.<br /><br />To cut a long story short, after a lot of web searching and trial and error, I found the problem: my Xvideo stopped working. This was tested by typing "xvinfo" into the terminal. A healthy output would look something like this:<br /><br /><blockquote><pre>X-Video Extension version 2.2<br />screen #0<br /> Adaptor #0: "ATI Radeon AVIVO Video"<br /> number of ports: 4<br /> port base: 131<br /> operations supported: PutImage<br /> supported visuals:<br /> depth 24, visualID 0x23<br /> depth 24, visualID 0x24<br /> depth 24, visualID 0x25<br /> ......</pre></blockquote><br />And go on for quite a while (This only the first ten lines of the output when I run xvinfo.)<br />An unhealthy xvinfo output (and the problem I was experiencing) looks like this:<br /><blockquote><pre>X-Video Extension version 2.2<br />screen #0<br />no adaptors present</pre></blockquote><br /><br />The problem with this is that I have yet to find a decent solution to "no adaptors present." I have looked and looked and looked and found very little. For one thing, if you are having problems with xvideo with fglrx, <b>first</b> try running (either as root or with sudo)<br /><blockquote><pre>aticonfig --overlay-type=Xv</pre></blockquote><br />I have heard that for some cases this is the fix. Which is good because it is easy. But, for me, it didn't work.<br /><br />After reconfiguring every option I could think of in my xorg.conf and breaking X half a dozen times, reinstalling the fglrx drivers from both the Debian repos and the binary from ati.com and breaking X half a dozen more times, the problem quite suddenly fixed itself. These are the steps that I did immediately before. <b><i>I am making no claim that this will fix anything, and cannot actually describe what happened during these steps that made my xvideo work again</b></i>. I say this because really, for all I know, the great Debian gods intervened and fixed it with magic. I really don't know why or even if this fixed my problem, but if you are desperate like I was, you never know. Just remember, you are trying it at your own risk.<br /><br />First I downloaded the latest version of the proprietary ATI drivers. These can be found on <a href="http://ati.amd.com/support/driver.html">ATI's website</a>.<br /><br />Second, I downloaded <a href="http://kanotix.com/files/install-fglrx-debian.sh">this script</a> that I found on the Debian forums.<br /><br />Third, I quit gdm and drop down to a console. This is required, the script will not run if you have any running X sessions. Then I navigated to the folder I saved these files in and (as root) ran the install script (install-fglrx-debian.sh). This will do quite a bit (and if you know your way around scripting maybe you could open the script and see. I really don't know what it did.) All I know is that it downloads a few files from the repos and installs them, downloads the ATI binary (the I already downloaded, but I'll need that one in a few minutes), and generates a package to install, then installs it. The problem with this script is that it breaks X. Why? I think it has something to do with the fact that it generated a package for me that was for Ubuntu. Whatever the case, when the script finished I tried to load up gdm and it failed. <br /><br />Fourth, going back to the console, I ran (as root) ATI's file (ati-driver-installer[version number]-x86.x86_64.run) and it reinstalled the ATI driver. When gdm successfully started again, out of curiosity I ran xvinfo, but this time with success! I don't know what it did behind the screen, but suddenly I have xvideo again. I don't think it was anything in my xorg.conf (which was regenerated during this process, so back up first!) because I have nearly identical files before and after. Your best guess is as good as mine, but I've decided not to look a gifthorse in the mouth. If you are running compiz fusion, you may have to disable it to watch videos without flickering. For easy switching on/off I recommend installing the package fusion-icon and making sure it starts at boot. It makes an icon on the panel that right-clicking will allow you to switch on/off compositors and window decorators.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com3tag:blogger.com,1999:blog-6440902353852179849.post-3799274665115936322008-10-16T12:03:00.005-06:002009-02-04T11:02:18.330-07:00Debian Lenny on Toshbia Satellite L305, or A comedy of errorsI got a new laptop a few days ago, the Toshiba Satellite L305. It's pretty cool. My first goal with it was to split the default Vista partition in half and dual boot Vista/Debian. Dual booting if only so I can run Photoshop and the like on the Vista side. Plus, I suppose it wouldn't hurt to actually dive in and see what all the anti-Vista stuff is about.<br /><br /><span style="font-size:130%;">Step one: Repartitioning</span><br /><span style="font-size:100%;">Vista claims it is easy to shrink a partition. No, it is not. The shrink partition dialog kept insisting that only 7GBs could be pulled out of the partition. There were a bunch of steps I found online that required disabling system restore, page file, etc. etc. but even after all that I could only get 7GBs out of it. The solution was to use the Gparted Live CD. I ended up having to download a new version because the old (and it wasn't even THAT old) version couldn't load the hard drive. I shrunk the partition in half, and formatted a few ext3 partitions and a swap for my impending Debian install. After shrinking the partition I ran the Vista recovery CD to regenerate the Master Boot Record. <span style="font-weight: bold;">This is *required* to boot back into Vista</span> (at least before installing grub.) I did this anyways in case I couldn't successfully install Debian, and also just to make sure the grub installation found Vista.<br /><br /><span style="font-size:130%;">Step Two: Getting the right Debian installer<br /></span>I happened to have a CD of Debian Lenny beta 2 from my desktop's install, so I threw it in and went to install. The problem was that the installer couldn't detect some of the hardware. After a lot of research, I discovered that the hardware in specific was my network adapters. I tried downloading a weekly build CD overnight and that could not detect the hardware either. Turns out the solution was to boot the net installer from a USB drive. The instructions came from a wiki entry on how to <a href="http://wiki.debian.org/DebianAcerOne">install Debian to an Acer Aspire One</a>, as it has the same two network interfaces as the L305.<br /><br />First download the <a href="http://people.debian.org/%7Ejoeyh/d-i/images/daily/hd-media/">boot.img.gz</a> and the daily build of the <a href="http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/">netinst.iso</a>.<br /><br />Insert the USB drive (with at least 256MB) and find it in /dev. <span style="font-weight: bold;">Make sure this is the right device, or you might lose information on your other drives.</span> Mine, for example, was /dev/sdc. Make sure any files are backed up, as this will erase anything on the drive. As root, run the command<br /><blockquote><pre>zcat /path/to/boot.img.gz > /dev/sdc<br /></pre></blockquote>Then mount the flash drive and load the netinst.iso onto the drive.<br /><br /><span style="font-size:130%;">Step Three: Install Debian<br /></span></span>With the bootable USB drive, I was finally able to install Debian. Put the USB drive in, turn the computer on and press F12, which will then display different devices to boot from. Pick USB Memory, and the Debian installer should boot. Though the network devices will be found, they may not be usable unless you install with acpi turned off. I forget the exact way to do it, but the help, boot options menu gives an example that happens to exactly what we need (I think it is "acpi-off", though the Aspire One page says different.) The Debian install will now commence flawlessly. You should have a wired connection during this isntall, because the WiFi won't work right away, and since it is the net installer, a functioning network is extremely important.<br /><br /><span style="font-size:130%;">Conclusion</span><br />The downside to my (eventual) Debian install is that perhaps through problems with install (perhaps turning off acpi during install?) or perhaps with problems with me, I can't access any of the power fucntions a laptop really need (batery power, CPU scaling, etc.) So while I was successful eventually, all was perhaps for naught. If you successfully install these thigns on the Toshiba Satellite L305 let me know, but for now I'm going to try out Ubuntu (8.10 beta) to see if it configures anything better for me.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com5tag:blogger.com,1999:blog-6440902353852179849.post-9212740571075283512008-10-13T20:28:00.002-06:002008-10-13T20:49:41.273-06:00apt-get problem: The package index files are corruptedMy computer crashed today, due to the fact that I was testing my media server and foolishly tried to play a video through VNC. Silly me. Nothing worked short of a hard reboot.<br /><br />When I started up my system again, the box popped up saying that there were updates ready to install. Since I like doing things via the command line, I did an apt-get upgrade and it didn't find any updates. The box down in the corner clearly stated that there were 4 updates to install, but they didn't show up anywhere. Later I tried to install easytag (a fantastic GTK+ based audio file renamer/tagger) and got an error:<br /><blockquote><pre>...The package index files are corrupted...</pre></blockquote>What that meant I wasn't sure, and a lot of google searching yielded a lot of people with the problem with very few results. Certain things would install fine but others would give the same, scary sounding error. I found <span style="font-style: italic;">one</span> source that even attempted to provide a solution other than "try 'apt-get clean'!" <a href="http://ubuntuforums.org/showthread.php?t=365177">on the Ubuntu forums</a>.<br /><br />The solution provided sounded a little drastic, but they worked:<br /><blockquote><pre>sudo rm /var/lib/apt/lists/*<br />sudo aptitude update</pre></blockquote>Rather than actually <span style="font-style: italic;">delete</span> anything I opted to move all of the files in /var/lib/apt/lists/ to a temporary folder. This only caused the problem that there is a folder in there called "partial" that will be moved with the mv command that you have to move back to the original directory, or else you will get an error saying that the folder doesn't exist. After that, apt-get update rebuilds the previously corrupted index and installing programs works again. After doing this, my four previously invisible updates showed up and were upgraded no problem.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com2tag:blogger.com,1999:blog-6440902353852179849.post-30663696601533192802008-10-09T02:38:00.006-06:002008-10-09T03:15:30.431-06:00LIRC - Linux Infrared Remote Control, Debian, and the remote wonderI have installed my Ati Remote Wonder four different times now (twice on my media server, once on Ubuntu, and once just now on Debian), and each time it proves most problematic <span style="font-style: italic;">every single time</span>. I think the problem arises from the driver setup for the remote itself. I found a few resources that managed to walk me through the process in setting up my remote again.<br /><br />First I installed lirc via apt-get:<br /><blockquote><pre>sudo apt-get install lirc lirc-modules-source</pre></blockquote>*note: I actually installed lirc-modules-source later, based on the steps at <a href="http://www.mythtv.org/wiki/index.php/LIRC_on_Debian_Etch">http://www.mythtv.org/wiki/index.php/LIRC_on_Debian_Etch</a><br /><br />This installs lirc, which will then try to run automatically. It will fail. Next I extracted the source I just downloaded<br /><blockquote><pre>cd /usr/src<br />tar -xvzf lirc-modules.tar.gz</pre></blockquote>Then I followed the commands from the aforementioned link: (*note, you need the package module-assistant to continue)<br /><blockquote><pre>apt-get install kernel-package<br />m-a update,prepare<br />dpkg-reconfigure lirc-modules-source<br />m-a a-i lirc<br />dpkg -i /usr/src/lirc-modules-*.deb<br />modprobe lirc_i2c<br /></pre></blockquote>If you look at the instructions from the link, it explains in more detail what these commands do, but basically this is making the module that lirc needs to set up the device in /dev. If you are following along on the instructions, it then asks you to start lirc, but it is not going to pick up the remote wonder just yet.<br /><br />The second set of instructions are from <a href="http://www.mythtv.org/wiki/index.php/ATI_Remote_Wonder.">http://www.mythtv.org/wiki/index.php/ATI_Remote_Wonder. </a>There is no Debian-specific instructions, so I had to wing it. I first had to blacklist the ati_remote module that is installed with lirc. Simply add "blacklist ati_remote" (without the quotes) to the bottom of /etc/modprobe.d/blacklist. After blacklisting ati_remote, you should be able to see the correct module lirc_atiusb by typing:<br /><blockquote><pre>lsmod | grep ati</pre></blockquote>It was then possible for me to run irrecord to record the buttons on my remote. Alternatively, the second link provides an lircd.conf file for the remote wonder. Though if you download their file, they say to put it in /etc/lircd.conf, but it won't run unless you put it into /etc/lirc/lircd.conf. Finally, lirc is ready to run.<br /><blockquote><pre>sudo /etc/init.d/lirc start</pre></blockquote>(If it still doesn't start, you may have to edit the /etc/lirc/hardware.conf file, change DEVICE="" to DEVICE="/dev/lirc0" and that should fix it.)<br /><br />Running the command irw will let you test the remote. Type "irw" and then hit buttons on the remote, and you <span style="font-style: italic;">should</span> see them register in the terminal. If the remote is set up correctly, you are then free to edit your ~/.lircrc file to make it function in whichever program you want. Personally, I use it with my favorite music player, Amarok, to play/pause or skip songs, and amixer to change my system volume.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com3tag:blogger.com,1999:blog-6440902353852179849.post-23048128610871319072008-10-08T12:30:00.000-06:002008-10-08T13:43:50.388-06:00BackgroundA new blog. I made this blog to have a place to write about my adventures with installing and using Linux, away from my personal blog so that readers there can stop being bombarded by increasingly geeky and increasingly technical posts about an operating system they probably don't care about. In some ways, writing about setting up Linux is for my own purposes to catalog what worked, what didn't, and what killed my system. But if you are a user of Linux I would hope that you might glean a tidbit or two of knowledge from reading this. Keep in mind that I am still somewhat of a Linux newbie though.<br /><br /><span style="font-size:130%;">Background</span><br /><span style="font-size:100%;"><br />I started dabbling in Linux with the Ubuntu 6.10 live CD, and eventually decided to dual boot Ubuntu/Win XP on my desktop. After the release of Ubuntu 7.04 finally made the WiFi card on my laptop usable I took a leap of faith and wiped Windows entirely from my laptop. As time progressed I found myself using Linux way more often than Windows, and have reached the point that if I did not need Windows for some of my graphic design work (I am currently a computer graphics student) or for some of my games (I'm also a gamer) I would be happy never using Windows again.<br /><br /></span><span style="font-size:100%;">Less than a week ago I decided to make another bold switch: I took out my hard drive with Ubuntu (now upgraded to 8.04) on it and put in a new drive and installed Debian Lenny on it. This has been an adventure all its own, and I now know first hand why many people lable Ubuntu a "noob distro," alternatively, "N00buntu." (I would like to say that I still consider Ubuntu a fine Linux distrobution, and if you are looking into entering the world of Linux I highly reccommend Ubuntu.) While Debian was definitely much harder to set up (it took me a few <span style="font-style: italic;">days</span> to isolate some of the random problems that arose) I am in love with it so much more than Ubuntu.<br /><br /><span style="font-size:130%;">Pros of switching to Debian (for me):<br /></span></span></span><ul><li>The fglrx (Proprietary ATI Radeon) drivers from the non-free repository work <span style="font-style: italic;">flawlessly</span>. On my Ubuntu setup, after going through all the problems involved in setting up my fglrx drivers to play nice with Compiz-Fusion, video files would flicker when played (at first no matter what, later only when not in fullscreen.) In Debian this works beautifly.</li><li>Flash no longer crashes Firefox. Ever since Ubuntu 8.04 was released, every now and then a website would try to load some flash video and Firefox would just disappear. Flash took me a while to figure out, but the solution was simple: Download Flash player 10 beta (which incidentally also crashed in Ubuntu). 10b works with PulseAudio so I no longer have audio conflicts, and the pesky incorrect layering problem I have <span style="font-style: italic;">always</span> experienced in Linux is gone. Flash has never worked better for me in Linux than it does right now.</li><li>It is just plain faster. One of my complaints with Ubuntu's 8.04 release is that it bogged down terribly. Debian boots faster, loads the desktop faster (even with Compiz-Fusion enabled), and loads programs faster. It is just faster all around, most likely because, as most user-friendly operating systems are wont to do, Ubuntu is accumulating quite a bit of bloat, and Debian is still nice and lean.</li><li>I am learning MUCH more about the workings of a Linux system because I have to know why things keep failing (mostly because I failed at it in the first place, but not always) or how to set it up myself. Though toward the end of my Ubuntu days I was using the command line more often than not, I never realized how much Ubuntu was still doing things for me behind the scenes (still not to the extent of Windows)</li></ul><span style="font-size:130%;">Cons of switching to Debian:</span><br /><span style="font-size:100%;">With all that said, the switch to Debian hasn't been all puppies and sunshine. There have been (and I expect, will be) problems.<br /></span></span><ul><li>There is an increase in the need to know how to install things from source. While Debian has an awe-inspiring amount of packages in its repositories, even in Lenny (testing) many of the packages are more out of date than I need. For example, GNOME Do is, as of this writing, still at a rather unusable 0.4.x, meaning that I had to install version 0.5.99 myself from source. And due to some of the odd dependencies, it wasn't exactly easy. When I last installed GNOME Do on Ubuntu, the (third party) repository was using version 0.6.0.</li><li>Things break. One of the inevitabilities of using the testing version of Debian is that things are going to break from time to time. I was having an odd problem with memory leaks causing skipping and eventually crashing in Pulse Audio (which I am using for Amarok). Scrolling down a page on Firefox could eventually cause Pulse Audio to crash entirely, meaning that my music stopped and I had to go into the terminal and manually restart the Pulse Audio daemon. It turned out that reverting back to the 2.6.14 kernel seems to stop this from happening, but I spent a few hours trying to figure this one out.</li></ul>In any case, I have gotten it to the point that it is running stably and I feel comfortable using it as my main OS again. I still have a few things to fix but overall it is running well.Swinkyhttp://www.blogger.com/profile/03926678140327322943noreply@blogger.com0