Monday, 6 July 2009

Truecrypt 6.2 install guide for Fedora 11

For Truecrypt 6.2, nothing much has changed from the Truecrypt 6.1 install process except for the line numbers that need to be modified to make the source compile correctly.

1. Download the TrueCrypt 6.2 source tarball from www.truecrypt.org
2. Untar the source
tar xvf TrueCrypt\ 6.2a\ Source.tar.gz
3. Install required libraries
sudo yum install nss-pkcs11-devel fuse-devel wxGTK wxGTK-devel
You might also need the following packages if you haven't installed them already.
sudo yum install gnome-keyring-devel gcc-c++
4. Export the Cryptoki include folder
export PKCS11_INC=/usr/include/gp11
5. Run make
make
You may get the following error messages:
../Common/SecurityToken.cpp:660: error: ‘CKR_NEW_PIN_MODE’ was not declared in this scope
../Common/SecurityToken.cpp:661: error: ‘CKR_NEXT_OTP’ was not declared in this scope

5.1 Open Common/SecurityToken.cpp in your favourite editor.
5.2 Scroll to line 660
5.3 Comment out line 660 and 661. It should look like this:
//TC_TOKEN_ERR (CKR_NEW_PIN_MODE)
//TC_TOKEN_ERR (CKR_NEXT_OTP)

5.4 Save and exit
5.5 Run make again
[Some people may not like to fiddle with code like this. But these two lines are only used to generate error messages. At the very worst, you will end up getting a generic error message instead of a more focussed one. ]
6. TrueCrypt is now compiled. You can find the executable inside the folder titled 'Main'. You might want to make it available from your bin directory for easy access.
sudo cp Main/truecrypt /usr/share/bin

All done!

Sunday, 14 June 2009

Changing the Plymouth Theme in Fedora 11 Leonidas

Plymouth is the new graphical boot system introduced with the release of Fedora 10 Cambridge. It replaced the rhgb (RedHat Graphical Boot) with a snazzier boot screen that supported cool animations. The first version of Plymouth that shipped with Cambridge used a plugin system where each graphical boot animation had to be coded from scratch - something that did not encourage many people to create new boot screens. With the release of Fedora 11, Plymouth has also gone through a major change. It now supports "themes" instead of "plugins" - making it much easier for theme developers to focus on the graphical elements rather than raw coding.

Currently there are 4 Plymouth themes in the Fedora repositories.
  • Charge (Default theme in Leonidas)
  • Spinfinity (A throbber that moves in a path shaped like the infinity sign)
  • Solar (Default theme in Cambridge - the planet with exploding pulsars)
  • Fade-In (Fedora logo fading in and out in a star field)
To check out these themes, you need to download them first.

sudo yum install plymouth-utils "plymouth-theme-*"

After the themes are downloaded, install them as follows:
sudo plymouth-set-default-theme spinfinity
sudo /usr/libexec/plymouth/plymouth-update-initrd


Replace "spinfinity" above with the name of either one of the themes you would like to try out.

EDIT: You can list the installed themes by running the following command
plymouth-set-default-theme --list

Hopefully the new theme system will encourage people to come up with new and exciting themes for Fedora boot-up.

Sunday, 3 May 2009

Installing the FCEUX NES Emulator on Fedora 10

FCEUX is a Famicom/NES emulator that merges the different branches of the FCE Ultra project in to a single project. It is a great tool to have if you are a fan of classic NES games such as "Super Mario Brothers" and want to play them on your Linux machine. FCEUX has a host of features such as recording, Lua scritping etc. But as a casual gamer, you are probably only interested in getting the emulator up. For serious ROM hackers and advanced users, www.fceux.com is the place to start looking for additional info.

Installing FCEUX

FCEUX comes in two flavours. The Win32 edition and the SDL edition. We are only interested in the SDL version here. For Debian/Ubuntu users, a pre-packaged deb file already exists, but for the rest of us, it needs to be compiled from the source.

Step 1 : Install dependencies
sudo yum instal scons SDL SDL-devel zlib zlib-devel lua lua-devel zenity

Step 2 : Download and extract FCEUX
Download the source tar ball from http://fceux.com/web/htdocs/download.php and extract it.
wget http://downloads.sourceforge.net/fceultra/fceux-2.1.0a.src.tar.bz2
tar xvf fceux-2.1.0a.src.tar.bz2

This will create 2 folders names fceu and gfceux

Step 3 : Compile and install FCEUX command line tool
cd fceu
scons
sudo scons install


Step 4 : Install GFCEUX GUI
cd ../gfceux
sudo python setup.py


Step 5 : Run the emulator
gfceux

You will need to download NES ROMS to start playing. This part is left as an exercise to the reader ;)


Sunday, 26 April 2009

Useful Bash Tips

TuxRadar has a very useful list of Bash keyboard shortcuts at http://www.tuxradar.com/content/bash-tips-power-users. Scroll to the bottom to see the list.

Sunday, 1 March 2009

Convert videos for Sony Walkman

I own a Sony Walkman NWZ-S639F. It's a great mp3 player possibly much better than the ipod itself. Best of all it integrates well with Linux without needing any extra libraries or software. Rhythmbox can be used for syncing music files from my computer to the Walkman and Nautilus can be used to simply drag and drop pictures or videos.

When copying videos however, the Walkman is only capable of playing mp4 files of size 320x240. It also needs a jpg file of the same size and name as the mp4 file to display a nice thumbnail in the player interface. ffmpeg can be used to achieve all this very simply.

To convert a flv video downloaded from the internet to Walkman compatible video:
ffmpeg -i video.flv -s 320x240 -ac 2 video.mp4
To generate the thumbnail:
ffmpeg -i video.flv -s 320x240 -an -ss 00:01:00 -r 1 -vframes 1 video.jpg

All that is left now is to copy the generated mp4 file and the jpg file to the video folder in your Walkman.

Monday, 9 February 2009

Office 2007 On Linux

I recently managed to get Office 2007 working on Fedora 10 with Wine 1.1.14. I was helped along the way by this article at the excellent wine-reviews blog.

1. Download the latest Wine source tarball from http://www.winehq.org
2. Extract the source. tar xvf wine-1.1.14.tar.bz2
3. Run the installer. This may take a long time. On my Dual Core 1.8GHz laptop with 2GB of RAM, the compilation took about an hour. cd wine-1.1.14
./tools/wineinstall

4. Download winetricks. wget http://www.kegel.com/wine/winetricks
5. Install the MSXML parser, .NET Framework 2, GDI+, RichEdit controls and Visual C++ 2005 Runtime. sh winetricks msxml3 dotnet20 gdiplus riched20 riched30 vcrun2005sp1
6. Run the Office 2007 installer. wine setup.exe

Office 2007 should now be installed in your machine.




Sunday, 25 January 2009

Enable Guest USB Access on VirtualBox

Although I have been using Linux exclusively for a long time now, there are still occasions where some pesky applications demand a Windows environment. For those rare moments, I have Windows XP installed as a guest OS on VirtualBox. VirtualBox is an absolutely wonderful virtualization tool that provides almost every function I need from a Windows box.

Recently however, I had to plug in a USB device to the Guest OS and I found out that the USB device menu is grayed out, preventing me from switching the device over from the host to the guest. I tried messing with the settings but none seemed to have an effect. A quick search of the internet revealed this article which worked like a charm!

First create a new group and add yourself to it
sudo groupadd usb
sudo usermod -G usb `whoami`

Find out the gid of the new group by running the following command
MYGID=`cat /etc/group | grep usb | awk -F ":" '{print $3}'`
Create a new entry in fstab
sudo echo "none /sys/bus/usb/drivers usbfs devgid=$MYGID,devmode=664 0 0" >> /etc/fstab
Restart the computer
sudo reboot

Now when you start VirtualBox, the USB devices can be freely assigned to the guest OS.