Sunday, May 25, 2008

Fedora 9(Sulphur) + Wireless + SCIM

My Fedora 6 (Zod) crashed a few days ago and instead of fixing it I decided to go for the latest version - Fedora 9(Sulphur).

Everything went pretty well. There was a small problem with network cards. I had to select the checkbox 'Controlled by NetworkManager' under 'Device Configuration' window that pops up when you double click on the device in 'Network Configuration' & Devices tab. 'Network Configuration' pops up by selecting System->Administration->Network

I restarted the network service and now it did detect my wireless card and I didn't have to do anything special and could start using it immediately.

There was one more wierd problem though. I use SCIM to type in Marathi. I was not able to enter the hotkeys using 'SCIM setup'. It just refused to accept the keys. No matter what I did, It was refusing to accept any Key Code.

I basically wanted to enter the hotkeys for 'Trigger' under 'Global Setup'.

If you have same problem, this is how you can solve it.

The configuration data for the scim is stored in ~/.scim/config file.
Edit the file and add words "= Control+space" on line /Hotkeys/FrontEnd/Trigger.

After that just restart scim or 'Reload Configuration' by right clicking on the scim icon.

Now it should work for you. I can switch between English and Marathi using Control+space.

Friday, March 7, 2008

Linux Tips - 5

YUM - "Yello dog Updater, Modified" is the package management tool for Red Hat based linux systems like Fedora, CentOS and others. It uses rpms to install/uninstall packages.

New users can use yum pretty easily. But sometimes you wonder where the package got installed.

Lets say we have just installed the CD/DVD writing software k3b using yum but don't know where exactly it has been installed.

Here is how you can find out the directory where the package gets installed.

[amit@localhost ~]$ rpm -qa | grep k3b

Use above command to find out the exact package name. Note that the same package name, but in upper and lower cases are considered to be different packages by grep. It will give output something like this

[amit@localhost ~]$ rpm -qa | grep k3b
k3b-extras-0.12.17-1.fc6
k3b-0.12.17-1
k3b-extras-nonfree-0.12.17-3.lvn6

Now use following command to find out the directories where k3b related files are installed. Substitute the argument with your package name.

[amit@localhost ~]$ rpm -ql k3b-0.12.17-1

Depending on the software it may show hundreds of directories. The executable file would be mostly the one that is under /usr/bin or /usr/share/apps/

It will also show you other details like where the documentation is stored, where the icons are stored, where the header files are etc.

Wednesday, April 18, 2007

Linux Tips - 4

This is not a big secret. But just thought of putting it here.

If you work on a server by remotely logging into it and wonder how you can open softwares like matlab, openoffice on the remote server with the GUI window appearing on your screen, this is what you need to do.

Login with ssh with the -X flag

# ssh -X abc@bcd

where abc is your login name and bcd is your server name

The flag -X enables the X11 forwarding. Now any graphical program that you run on the server will appear on your screen. Note that you have to have high speed network connection for this to work smoothly.

Now run the program

# ooffice &

ampersand (&) runs it in the background.

A window will appear on your screen that actually belongs to the program running on the remote server.

The use of flag -X invloves some security issues. You can use -Y flag to enable trusted X11 forwarding.

Sunday, March 18, 2007

Linux Tips - 3

If you have recently started using Linux and ofcourse love your language, often you get frustrated when you can't read your favourite sites in your language. This happens because many of the sites in local languages use ttf fonts instead of new unicode encoding.

I happened to buy a book from www.rasik.com and faced this problem. I couldn't read the Marathi web pages on Rasik site.

Here is what you need to do to enable ttf fonts with your X server.

I am writing this with respect to marathimati.com but this will work for any site that uses ttf fonts (e.g. rasik.com). Note for rasik.com don't use the default procedure given for linux, instead use the procedure given for windows to download the ttf fonts.

1. Download the kiran ttf fonts from here and save them on Desktop.

2. Create a new directory, lets say 'marathifonts' under /usr/share/fonts

# mkdir /usr/share/fonts/marathifonts

3. Copy the ttf fonts to this directory.

# cp kiran.TTF KF-kiran.TTF /usr/share/fonts/marathifonts


5. Run the following command to build the font cache.

# fc-cache -f -v


6. Restart the web browser (Firefox)

7. No need to restart the X font server.

Also note that for the sites that use ttf fonts, you need to change/disable the Character Encoding if it is already set to 'Unicode'. Set it to default 'Western'. Go to View -> Character Encoding -> Western.

Tuesday, January 30, 2007

Linux Tips - 2

2. Installing newer FUSE module.

You may get some warning while mounting ntfs partition. One sample warning is as follows. This indicates that the FUSE module is old.

WARNING: Old FUSE kernel module detected. This means, some driver features are not available (swap file on NTFS, boot from NTFS by LILO), and unmount is not safe unless you make sure the ntfs-3g process naturally terminates after calling 'umount'. The safe FUSE kernel driver is included in the official Linux kernels since version 2.6.20-rc1, or in the FUSE 2.6 software package. Please see the next page for more help: http://www.ntfs-3g.org/support.html#fuse26

If so, you can manually install the newer fuse module.

Download new fuse tarball from here.

Untar the downloaded file.

# tar -xzvf fuse-2.6.x.tar.gz

Remove the old module.

# rmmod fuse

Change to the fuse-2.6.x directory and run following commands.

# ./configure --enable-kernel-module

# make

# make install

Make sure that you get no errors after configure command. If you don't have kernel source code available, the it will give some errors.

Once these commands are executed successfully, you can mount ntfs partitions without any warnings.

Linux Tips - 1

I am referring to Fedora Core 6.

1. How to mount windows NTFS partitions in read/write mode?

This tip tells you how to make your linux system capable of mounting NTFS partitions in read/write mode. After this you are no longer constrained to the linux partitions. You can use windows partitions to read and even to write the data.

Change to root.

Make sure that Livna repository is set up.

# rpm -ivh http://rpm.livna.org/livna-release-6.rpm

# rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY

Now install fuse and ntfs modules.

# yum install fuse fuse-libs ntfs-3g ntfsprogs ntfsprogs-gnomevfs

Once these modules get installed successfully, you can mount the windows ntfs partitions as

# mount -t ntfs-3g /dev/hda1 /mnt/windows

Note: This assumes that a directory named 'windows' is present under /mnt. You can alternatively mount it under any directory but it is always a good idea to mount it under /mnt.