Arch Linux with Canon iP1600 printer (virtualisation)


Finally, I solved the problem doing printing with my Arch Linux with Canon iP1600 printer. It is an old printer. With several tries of those drivers mentioned in forums and other discussions, I never success to use this printer with Arch Linux. That is why, whenever I want to print, I need to reboot into Windows 7, print, then reboot into Arch Linux again. This is really troublesome.

However, recently, I found a possible solution. That is using hardware virtualisation. Actually, it is using the guest OS to detect the printer, then print from the guest OS. So, my guest OS is still Windows. Meaning that, Linux is still not working with Canon iP1600. But, this solution avoid rebooting for different OSes.

Hardware virtualisation can use either VirtualBox or QEMU. VirtualBox is easier to be used. QEMU can be used with Qemu Launcher.  VirtualBox provides easier way for USB virtualisation. Just go to the setting and add the USB device that you want to virtualise. But make sure the user is in “vboxusers” group. Besides that, we need to know the vendor ID and product ID of the USB device (that’s printer). When booting into the guest OS, such as Windows XP, then we can detect the USB printer. Now, I can print as I like.

For the QEMU, it is a little problematic. This is because the virtualisation of the device requires that the driver of the device is unloaded from the kernel. The next problem is that several options need to be added to the command-line for the hardware virtualisation. I tried this on the USB pendrive only, not with the USB printer.

The command is something like this:

qemu -boot d -m 512 -hda 'xp.img' -usb -usbdevice host:0951:1625

0951 is vendor ID and 1625 is product ID, we can get this with “lsusb”

Now, go back to the problem of unloading the driver from the kernel. This is something which cannot be done through command-line (based on what I know). Therefore, I solved this by writing a small command-line using libusbx (a fork of libusb) API.  Yes, only through the API, I can manage to unload the driver (or module) from the kernel. (I uploaded the pre-compiled command, it is available here. The command also allows to re-attach the module to the kernel.)

With this, my USB pendrive can be detected in the guest OS in QEMU. I think it will also work with the USB printer. However, I choose VirtualBox rather than QEMU, because of the ease of use.

VirtualBox is very good. For me, the greatest limitation of the hardware virtualisation is the graphic card. I am still cannot using VirtualBox to play the 3D games yet. If this can be solved, then I can never boot into Windows anymore.

Advertisements

Trying Arch Install Scripts


Latest Arch Linux announcement mentioned that AIF (Arch Installation Framework) is no longer included. And this installation method is replaced with Arch Install Scripts. Users who are willing to install Arch Linux need to follow the guide. So, I just tried the installation of this latest Arch Linux with the VirtualBox.

If you follow the guide accordingly, everything should be fine. But without the basic Linux knowledge, it is really a hell (I think so).

The next thing is the requirement of internet connection. The Arch Linux installation CD provides only the network installation. For any laptop that does not have a Linux compatible wireless device hardware, I cannot imagine how to install the driver, without network cable and wireless connection. Because even the core and core-devel packages are installed from network connection. How do we build the package even we have the source?

One of the steps that I am not familiar is bootloader installation. This is because I was using older version of grub (grub-legacy). But current Arch Linux provides two solution, grub2 or syslinux. To have a dual boot with Windows, some configurations are needed.

Another part that I am not familiar is the systemd. This is because previously, mkinitcpio was using udev. However, udev is replaced with systemd. Now, systemd uses the configuration files such as /etc/locale.conf, /etc/hostname, /etc/timezone. These configuration previously were all set in /etc/rc.conf.

Actually, the Arch Way is really good. The Arch Install Scripts: pacstrap and genfstab are working well. The only thing I consider is the problem of network installation as I mentioned above. Maybe, I might choose Archbang over Arch Linux for the installation.

Firefox or Chromium (Google Chrome)


Yes, again web browser. I am using Firefox. Only sometimes Chromium (Google Chrome). Mainly Firefox. If someone ask me, which one I choose, I definitely answer Firefox. But, if someone ask me, which one I prefer, then it will be difficult to answer.

Firstly, I would like to go through why I choose Firefox as my primary web browser.

Because of DownThemAll. There is no alternative extension in Google Chrome like DownThemAll. Why I like DownThemAll so much? I use DownThemAll with GreaseMonkey to download my favourite mangas (comics). This is something Google Chrome still cannot do it, based on my current knowledge. GreaseMonkey generates the links, right-click, then I DownThemAll.

Another two addons, DownloadHelper and FlashGot. Both of them allows me to download any online video or audio streaming. Google Chrome doesn’t have this type of extension.

Actually, all of these limitations of Google Chrome are because of extension API restriction. That is why, there is no similar replacement for DownThemAll, DownloadHelper and FlashGot. However, I wonder why there is no one uses NPAPI to build the similar extension in Google Chrome.

Next advantage of Firefox is the bookmarks. The best feature I like is the tagging feature. This help me to search my unorganised bookmarks easier. I know, Google Chrome uses a different approach to solve this problem. Google Chrome is more to cloud computing and searching algorithm, it solves the problem by using Google Bookmark search. This is something I don’t like, without internet connection, Google Chrome can done less thing than Firefox. (You might said, without internet connection, your web-browser can do nothing, yet I can said, I can still do the web development without proper internet connection, or manage my bookmarks when I don’t have internet connection.)

Then, if I definitely choose Firefox over Google Chrome, why do I need to post this blog? Sure, there is some beauty about Google Chrome which always makes me to consider to switch to it. Firstly, its interface is really clean and simple. The interface make me feel more to the webpage instead of web-browser. Firefox makes me feel that I am using Firefox; Google Chrome makes me feel that I am visiting the websites.

Secondly, for the developers, creating extension using Google Chrome is super easy comparing creating a Firefox addon. Firefox addon needs to follow a lot of convention and using XUL, which is not easy to learn (for me). It needs to create “chrome.manifest”, “install.rdf”, and so on. The documentation is also not very good (I personally feel).

Thirdly, Google Chrome has Chrome Web Store, this is something which Firefox lacks of. But even if there exists Mozilla Web Store, I will not prefer it, unless the Mozilla Web Store is a superset of Chrome Web Store, then I may like it.

Then, there are several other reasons, such as Google Chrome open and close is faster than Firefox. Though Firefox startup is far more better than its older version, it is still slower than Google Chrome. And if closing the Firefox, then you want to start the Firefox again, you need to wait a while. Besides that, enable or disable the addons needs to restart Firefox also. May be this is the price paid for the good addons like DownThemAll, FlashGot and DownloadHelper.

A review on several Linux major distribution with LiveCD


Use Arch Linux quite a while, I like the “pacman” command-line, simple and easy installing packages. Then I think about the other package managers such as deb with aptitude, rpm with yum or zypper or urpmi, how will they look like? Because of this, I tried several LiveCDs/LiveDVDs with VirtualBox: LinuxMint 13, Ubuntu 12.04, Fedora 17, OpenSUSE 12.1, Debian 6.0, CentOS 6.2, PCLinuxOS 2012.02, and Mageia 2.

I didn’t go through all the distribution thoroughly, just tried the installation, a web-browser, and the package manager.

PCLinuxOS and Mageia are using KDE. Both requires quite higher resources especially for the video memory in VirtualBox. For me, both are similar. Only difference is the package manager, PCLinuxOS uses aptitude but with rpm packages. Mageia uses urpmi.

Then Fedora and OpenSUSE, both are using GNOME3. It is also require more video memory, however, if memory not sufficient, it allows using GNOME Fallback. That is why I like Gtk+, but not GNOME3. With 256M memory and 32M video memory, OpenSUSE will fallback, but Fedora will not. For me, both Fedora and OpenSUSE are also similar. The only difference is the package manager, Fedora uses yum and OpenSUSE uses zypper.

Actually, Ubuntu is also similar to Fedora and OpenSUSE, the differences are using Unity instead of GNOME3 and the package manager is aptitude. I said similar to Fedora and OpenSUSE is because of the similarity of Unity and GNOME3. The package manager is totally different because it is debian-based.

I also tried CentOS. I feel comfortable with the desktop environment, because it is using GNOME2. However, I cannot get the GNOME3 with the repositories. So, I cannot use the latest packages.

Next, Debian. For me, it is the worst among what I tried. The reason is because of Iceweasel. If Iceweasel is as latest as Firefox, I might consider it. Yet, the version of Iceweasel is 3.5.16 in Debian 6.

Then, the best is LinuxMint. Because it uses Mate as the desktop environment. In the usability perspective, Mate is more preferable, because I need to open a lot of applications when I do my work.

As a conclusion, for me, LinuxMint > Ubuntu > Fedora OR OpenSUSE > CentOS > Mageia OR PCLinuxOS > Debian. However, the best of the best is Arch Linux that I am using.