Posts Tagged ‘Ubuntu’

Acer Aspire One (ZG5) and Ubuntu Intrepid Ibex 8.10 UMPC

7.12.2008

Ok, got fed up with the Xubuntu installation and thought there’s time for something new. Atleast clean re-installation was needed.

After short tinkering, I remembered that I had stumbled upon Ubuntu UMPC image at some point, which of course had to be checked. The image had Intrepid Ibex, so I thought that it should be given a chance.

Downloaded the latest image from http://cdimage.ubuntu.com/ubuntu-umpc/intrepid/current/ and had a quick look at the instruction page, as the image is in .img format. From the page you can download Ubuntu Imagewriter for easy GUI based install media creation.

Easiest way is to create the installation media by downloading the image, installing the Ubuntu Imagewriter and then using 1GB USB-stick as media. This image is intended to be “burned” to USB-stick.

Image creation is pretty easy. After you’ve installed the Imagewriter, insert a USB-stick to USB port and launch Imagewriter from terminal: $ sudo imagewriter

Browse the downloaded image, select the correct USB-stick and click “Write to device”. Then wait. After the writing is done, you can close the program and remove the stick.

Now you can test the USB-stick on a computer which can boot from USB device. Do note that this will not work on every computer having USB boot possibility and all wireless cards are not supported out of the box, like the Atheros card in Acer Aspire one. Don’t worry though, it works after installation and working out the driver files for it.

This image is quite stripped due to the limitations of the image size. You’ll get midbrowser, mozilla based internet browser (which I don’t like..), Openoffice.org, Media player etc. Few things probably will be on you installation list as additions I’d assume and apt-get works fine. Overall feeling is happy. I’ve been on the impression that this is slightly faster than my Xubuntu 8.04 installation, but that’s just me :) Quite impressive, I’d say.

Installation works like normal Ubuntu LiveCD installation, so no differences there. After the installation is done, you might want to get rid of the automatic window maximize feature. Open terminal and: $ pkill devilspie

Now opening a program won’t maximize it straight away. To enable the feature, open terminal and:  $ devilspie -a /etc/devilspie.cfg

This will enable the window maximization to all open programs/windows.

To get the Wireless work on Acer Aspire one, have a look at my earlier post here. I’d recommend installing nano and mc while you’re on the roll, just to have a fast terminal based text editor which does not require inhuman capabilities and neat terminal based file explorer etc. Firefox might be good to install also, or some other internet browser of you liking.

That’s basically it. Installation is very easy, tweaks for the UMPC world seem fit and thought over.

Xubuntu Hardy 8.04.1, Fuj:tech DVB-T USB-stick and how to install drivers

4.09.2008

Ha!

Some gizmos acquired as birthday presents and one of them happens to be a Fuj:tech DTV PRO DVB-T USB stick.

Obviously, as with oh so many devices, the driver side was worrying me. Surprisingly I happened to be clever and checked before purchase that it would hopefully work with Linux. One witty Finnish guy has apparently been working on a driver with his friends for this particular DVB-T USB stick, which is using af9015 chip.

Getting the driver and compiling it was not too hard, even though you have to install mercurial. Mercurial in fact is a source control management system. Don’t bother your head too much with that, just keep reading to get the driver package to your pc..

Now, for the actual driver acquiring and compiling part.

Make sure you have build-essential, linux-headers and mercurial installed:
$ sudo aptitude install build-essential linux-headers-$(uname -r) mercurial

Then, get the driver (Note that the following command will create af9015 folder to the current folder where you are!):
$ hg clone http://linuxtv.org/hg/~anttip/af9015

Change directory to the af9015 folder:
$ cd af9015

And start compiling the driver, typing:
$ make

If all goes seemingly well, in other words no errors:
$ sudo make install

Then, you need to get firmware and place it to the /lib/firmware/$(uname -r) folder for the stick so that it can be detected and initialized correctly. First cd to the correct folder:
$ cd /lib/firmware/$(uname -r)

Then get the actual firmware:
$ sudo wget http://www.otit.fi/~crope/v4l-dvb/af9015/af9015_firmware

Note that you need to issue that wget command with sudo, as your normal account (hopefully) doesn’t have privileges to write files to the folder in question.

Now, put the stick to free USB socket and wait a bit. Then check that the driver is loaded:
$ lsmod | grep 9015

Output should show dvb_usb_af9015 at few different lines.

And just to be sure, check that there’s some content in /dev/dvb folder:
$ ls /dev/dvb

If the output of ls command is adapter0, your stick is correctly detected. If not, then you might have the usbhid module interfering the detection. Remove DVB stick from USB socket and unload usbhid module:
$ sudo rmmod usbhid

Now place the DVB stick again to one free USB socket and check again that do you have the dvb_usb_af9015 module loaded and some content in /dev/dvb/ folder.

Unfortunately, I didn’t get the IR remote to work “out of the box” and didn’t have enough time or motivation to fiddle around with it. At the end, I’m using the stick with Acer Aspire One (ZG5) or with some other laptop and I think I can switch channel and volume by hand..

After this, you need to work out channel configuration file or just start using the stick. depends on what program you are going to use.

I’ll work out the details of how to actually watch and record (read: use the stick) programs on a separate post. Just to annoy/simplify people/things.

I came across one page telling that when you compile the driver/module for af901x based dvb-t tuners you also break your uvcvideo device, for example usb webcam or Acer Aspire One (ZG5) builtin webcam. At first, this didn’t happen to my setup, but after having to compile the dvb-t stick driver/module again, it happened. When I figure this out, I’ll post a separate post of it with instructions how to get it fixed.

UUID of storage media and using it in Ubuntu

2.08.2008

Uh,

This post is more or less to just keep me reminded of this, as it seems I tend to forget this every time I happen to need it. Frustrating to try to find it again when in need.

As there happens to be slight problems with storage media connected to USB ports and mounting them to correct places, it’s whole lot easier to refer to the storage media in /etc/fstab by it’s UUID. This way the device will be mapped even if it’s order in USB hub/chain/whatnot changes and therefore it’s /dev/sdx path would change at the same time.

So, long story short. if you have an external storage media connected to USB, say port 1, and you see it as /dev/sdb1, you then go and create an entry for it into /etc/fstab and continue working normally, thinking “now it works, yay.”, you’re wrong. Next time you have the device on USB port 2 and whoop-de-doo, the device is seen as /dev/sdc1 “oops” you whisper when you realize that the /etc/fstab entry you created, fails this time.

Instead of /dev/sdx1 use UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

To get UUID for the storage media, use one of the following methods:

1) ls -l /dev/disk/by-uuid
2) vol_id /dev/sdx1
note that with this you need to know the path to the partition/disk you wish to get the UUID

JVC Everio GZ-MG132E and Ubuntu Hardy 8.04

24.07.2008

Right,

This little HDD Camcorder is starting to be really handy. Start with it was a bit of a pain, but with great patience from Jartza, as he managed to get the correct settings for mencoder just right. Need to buy him few beers when he gets back from his tour.

So, the problem with the camcorder is that it creates almost standard MPEG2 movie clips, but those are saved in .MOD type and the “real” video scale is 1.33:1 and that creates a small trouble if you don’t want to use the software that came with the camera. Also, the movie clips are huge, one hour clip is 4G, and to my opinion it needs to be smaller for reasonable storing.

So! Now we need mencoder. $ sudo apt-get install mencoder should do the trick to get it installed.

After a short talk with Jartza, we decided that H264 MPEG4 would be good. 4Gb clip shrinks into about 700Mb and that starts to look much prettier in terms of storing.

Now the actual conversion of the .MOD file into .mp4 is done with two commands, which are long. So I won’t even try to remember them. We need a bit of scripting. Below are the commands, notice that there’s two passes for the same files, so if you have for example MOV011.MOD as original and you give mov011.mp4 as output filename, you need to give those exact names for the second command too.

$ mencoder original.MOD -sws 9 -vf pp=ci,dsize=1.78,harddup -oac faac -faacopts br=128:mpeg=4:object=2:raw -ovc x264 -x264encopts pass=1:turbo=1:bitrate=1500:vbv_maxrate=2500:vbv_bufsize=2500:nocabac:level_idc=13:global_header:threads=2 -of lavf -lavfopts format=mp4 -o output.mp4

$ mencoder original.MOD -sws 9 -vf pp=ci,dsize=1.78,harddup -oac faac -faacopts br=128:mpeg=4:object=2:raw -ovc x264 -x264encopts pass=2:bitrate=1500:vbv_maxrate=2500:vbv_bufsize=2500:nocabac:level_idc=13:global_header:threads=2 -of lavf -lavfopts format=mp4 -o output.mp4

For someone to remember those is seriously damaging to the brain, so we probably like to somehow shorten the procedure. Here’s how it’s done in the easiest way.

Open editor which you prefer, and copy the following code to it and save with some name which is easy for you to remember.

#!/bin/sh

# Script to convert JVC Everio .MOD files into x264 mpeg4 movies#

mencoder $1 -sws 9 -vf pp=ci,dsize=1.78,harddup -oac faac -faacopts br=128:mpeg=4:object=2:raw -ovc x264 -x264encopts pass=1:turbo=1:bitrate=1500:vbv_maxrate=2500:vbv_bufsize=2500:nocabac:level_idc=13:global_header:threads=2 -of lavf -lavfopts format=mp4 -o $2

mencoder $1 -sws 9 -vf pp=ci,dsize=1.78,harddup -oac faac -faacopts br=128:mpeg=4:object=2:raw -ovc x264 -x264encopts pass=2:bitrate=1500:vbv_maxrate=2500:vbv_bufsize=2500:nocabac:level_idc=13:global_header:threads=2 -of lavf -lavfopts format=mp4 -o $2

After saving the text, you can use it as follows: open terminal and cd to the same directory as the script you just saved. will ease up if you have the .MOD file also in that same folder. Then use the script like

$ ./scriptname inputfile.MOD outputfile.mp4

After awhile, you should have outputfile.mp4 in the same directory. Be patient, conversion takes long. I like to open a screen and start the conversion in it, as it can be detached and then attached from other locations too to see if it’s ready.

However, that little script will not check wheter the inputfile exists nor if there’s already an outputfile in the same folder. I use that just to get a shitload of files in a conversion “pipe” by opening screen and then using the script as

./scriptname inputfile1 outputfile1; ./scriptname inputfile2 outputfile2; ./scriptname inputfile3 outputfile3

and then ctrl-a d to detach it and let it do it’s magic.

I’ll post more about how to get some error-checking into the script tomorrow or soon, it’s getting late and I need a hug and sleep to be fresh tomorrow morning. Last day before my one week holiday.

Taa-Taa.

Threw Gnome-Panel away..

22.07.2008

Mh,

Got tired of gnome-panel and decided to give avant-window-navigator a go. Some problems occurred after installation, as desktop just froze right after the desktop background was loaded.

Seems that it was pulseaudio having issues, needed to go to tty and issue kill -s KILL pulseaudiopid before the desktop woke up again. Did quite much work trying to get it work, but seems that following tweaks solved the problem.

Settings – Preferences – Sound : change all definitions from autodetect to ALSA, make sure that on “sounds” tab the Enable software sound mixing (ESD) is selected.
Open Users and Groups from Settings – Administration and check that your username is in the pulse, pulse-access and pulse-rt groups.
Also, have a look at asoundconf tool and it’s commands.

I’ll post some quick installation quide to avant-window-navigator and it’s extras in awhile.

Edit: Still having small issues with login/startup, need to see how my setup works to determine if I’ve corrected the problem. Hold on..

HP G7061EO laptop, Atheros wireless card and the webcam on Ubuntu Hardy 8.04 i386

15.07.2008

If you have HP G7061EO laptop that has Atheros AR5007 (AR242x) wireless network adapter follow this procedure to make it work in Ubuntu Hardy 8.04

This is for i386 users. I’m repeating that because you might end up messing your system badly if you have 64bit installation.

- First go to System–>Administration–>Hardware Drivers and disable both selections having Atheros in their description

- Atheros Hardware Access Layer (Hal)
- Atheros driver..

- Then Reboot your system.

Preparing your system

$ sudo apt-get install build-essential

- Then open the terminal from Applications–>Accessories–>Terminal and issue/copy the following commands

$ wget http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz

$ tar xfz madwifi-ng-r2756+ar5007.tar.gz

$ cd madwifi-ng-r2756+ar5007

$ make

$ sudo make install

$ sudo modprobe ath_pci

$ sudo reboot

That’s it! Now your wireless connection should work.
Webcam works out of the box. To test it, give the following command:

$ sudo apt-get install cheese

Cheese program should appear after installation in “start” -> “graphics”.