• Increase font size
  • Default font size
  • Decrease font size

Make sense of your Firefox/Swiftfox plugins (Linux version)

Print PDF

If you like me jump often from one installation to the other, or use more than one computer on a regular basis you'll soon find yourself looking for ways to setup the things we use most in the shortest amount of time. One of those things is certainly the web browser, Mozilla Firefox in my case.

One of the most powerful yet in my opinion not adequately marketed by Mozilla is the possibilities of setting up multiple profiles, which can be easily stored, backed up and transferred to a different computer, even a different operating system.

I will not talk about profiles here, instead will focus on perhaps the most troublesome aspects of web browsers, that is plugins. These plugins are mostly platform dependent, and it has to be that way since they deal with things such as delivering audio from web pages, online radios and audio streams as well as video from popular websites such as YouTube. While Firefox will store information on which addon you have added to your profile (addons include language packs, bookmarking tools, etc) it cannot do so with plugins, that is those "addons" that need to deal with your computer hardware.

Every operating system needs to provide Firefox with its own plugins, which can be added in different ways. It is usually a direct download for Windows (for example from Adobe website for Flash player) while more than one option is usually available in GNU/Linux distributions. In most case you'll be able to install your plugins directly from the package manager (apt-get or synaptic in Ubuntu for example) and this will take care of properly linking those plugins to your default Firefox installation. But what if you installed a different version of Firefox yourself? In this case the plugins might not be found automatically and you need to tell Firefox where to look for plugins.

In my case I have installed Swiftfox an optimized version of Firefox (which I believe share the same plugin structure with Firefox) in /opt/swiftfox/ thus plugins are expected to appear in /opt/swiftfox/plugins but that was not the case even after installing everything through OpenSUSE package manager. Default Firefox (the one that comes with your Linux distribution) will be installed in most cases under /usr so I looked into that for clues on where the plugins might be. On OpenSUSE 11.0 this was easy, /usr/browser-plugins with Firefox installed in /usr/lib/firefox. In this case all I needed to do was creating symlinks in /opt/swiftfox/plugins pointing to /usr/lib/browser-plugins (you do so by using command line sudo ln -s /usr/lib/browser-plugins/plugin-library-name.so while in /opt/swiftfox/plugins directory or opening a nautilus session as root and just drag and drop those files with middle button pressed).

After that Firefox/Swiftox could find all the plugins I had previously installed, furthermore they can be enabled and/or disabled from within Firefox/Swiftfox (Tools>Add-ons menu) and/or by deleting the corresponding symlink to the library.

Last Updated on Wednesday, 17 March 2010 10:55

Mount NTFS truecrypt volume read/write with ntfs-3g

Print PDF

There are two popular ways to mount NTFS volumes on Linux systems. One is ntfsprogs, the other is ntfs-3g. They both offer similar functionality with read/write access to NTFS volumes.

If you use ntfs-3g I have noticed that mounting a TrueCrypt volume which is formatted as NTFS will not be done read/write by default. Only read access will be provided when mounting through the graphical interface. How I solve the problem is by using command line option --filesystem to explicitly call ntfs-3g mounting option.

For example mount TrueCrypt volume /dev/sdb1 to /media/truecrypt1 will be done as follows:

truecrypt --mount /dev/sdb1 /media/truecrypt1 --filesystem=ntfs-3g

(Note that the mounting point /media/truecrypt1 must exist)

To unmount a TrueCrypt volume from command line use the --dismount or -d option:

truecrypt -d /dev/sdb1


truecrypt -d

to unmount all TrueCrypt volumes at once.

Last Updated on Friday, 12 March 2010 20:49

Install NI-VISA and NI-KAL on Mandriva 2009.1 (Spring)

Print PDF

Linux Mandriva 2009 is one of the distributions officially supported by NI-VISA 4.5, a collection of instrument drivers and tools provided by National Instruments in order to interface devices and instrumentation to LabVIEW and other NI software.

What they do not tell you (or maybe they do but I missed that) is that only Mandriva 2009.0 (which is the first release of 2009) is 100% compatible while 2009.1 (the one I unawarely installed) has a subtle difference that prevents NIKAL from installing. NIKAL is the base package for most drivers so it is crucial to the behavior of the whole NI-VISA suite. To be precise the difference is in the Linux kernels that ship with 2009.1 which miss one feature NIKAL relies on. I found the solution in this post.

The catch is in one small line of code which is missing from a kernel source file. I am sure there is a reason for this line being missing, but for the purpose of compiling and installing NIKAL that line is absolutely necessary. What you need to fix things:

  • as you will be recompiling the kernel you will need gcc and make installed, you can check that in Software Management or simply try to type those commands in a terminal
  • kernel sources will take up some space on your hard drive and even more is required for compiling them (up to 3 GB were used in my case in /usr/src), you can free up the space at the end of the process but you need it right now
  • you need to login into the terminal (Konsole Terminal on KDE) as root user, that is by typing su and providing your administrator password

This is how you proceed:

  • download kernel-source package for your currently running kernel (you'll know your kernel by typing uname -r in a terminal, look for that exact string in Mandriva Software Management, the name of the package will include kernel-source and the string you found plus an rpm extension)
  • your full kernel source will be located in /usr/src/linux (this is a link to the right directory, for example /usr/src/linux-

  • edit the file /usr/src/linux/arch/x86/kernel/init_task.c (you need to do so with write-permission, i.e. as root user, so it's best if you use a terminal based editor such as vim /usr/src/linux/arch/x86/kernel/init_task.c , if you haven't used vim before you might want to check out how it works, which is not immediately obvious)
  • once you've opened the file in an editor you can add the following line somewhere in the file (e.g. at the end):
  • save the file and exit the editor, now you are ready to compile the kernel
  • in terminal as root, move to /usr/linux (i.e. home directory of your kernel source code) and type the following commands:
    • make oldconfig
      this will recreate a .config file according to your system current configuration
    • make
      this compiles all source code (C files in source tree) (this will take an hour or more)
    • make modules_install
      will install your compiled modules (this will also take some time)
    • make install
      will copy the new kernel image to /boot directory, it will be available there along with those that were previously there, the one just created is simply called vmlinuz- in my case since I did not provide a name for it
  • you are now ready to reboot the computer into the "new" kernel, make install should have created a new entry in GRUB boot menu so make sure that you remember the name of the kernel you've just compiled and you choose that when prompted after restarting (it will not be the default choice)
  • after reboot you should be able to install NIKAL by using the provided INSTALL script in NI-VISA directory, in my case I already had a broken installation of NI-VISA so I only reinstalled NIKAL by downloading the latest version I could find (1.10), to do that you also use INSTALL script in NIKALxxx directory
  • since we have changed a few things, in case you had previously configured NI-VISA you should run updateNIDrivers as root in order to synchronize everything, if all goes well you should not see any error message and after a required reboot NI-VISA should be properly configured
  • make distclean
    typed in the directory where you previously built your kernel, will optionally delete all compiled kernel objects (those that took so long to be created!), leaving the original source in place. This will let you recover some disk space (around 3GB in my case) but if you want to compile the same kernel on the same system again you will need to go through the above steps. Note that the kernel image you created has been copied to your /boot directory and will not be touched by the above command.

A few notes:

  • for reasons I don't fully understand the system will at times not boot into the custom kernel (actually it will not load graphical X server), I suspect that is due to updates applied later which are not fully compatible with the custom kernel I compiled before. Oddly enough this is usually fixed by booting once into the default kernel and then booting again into the custom
  • the main reason I wanted to get NI-VISA working on a Linux system was to interface with USB RAW devices and this is what I am trying to do now, it looks like there are still a few hurdles ahead **

** UPDATE: access to a USB RAW device (EZ-USB chip from Cypress) works "out of the box" on OpenSUSE 11.0 without the need to create a driver through NI Driver Wizard, which is required on Windows. I only realized this after being stuck trying to get driverwizard to work, which as it turns out is not necessary. Will try on Mandriva as well. Works fine on Mandriva 2009.1 with LV 8.6 and VISA 4.5.1.

Last Updated on Tuesday, 04 May 2010 13:57

Page 5 of 5