Friday, 26 October 2007

How to run apps that dont run on XGL desktop

You might encounter some apps that do not like XGL enabled desktop(for the less informed, aka Beryl, Compiz, Compiz-Fusion enabled desktops). Most often these are DirectX based Windows apps that you want to run through Wine or probably some Java App like Lazarus.

I found two different solutions with different approaches.

First approach:
Shift your present XGL enabled session into a separate Window and launch a nonXGL window manager on the main Xsession. I found this approach funny, but works.

Create this script and copy it to ~/bin for single user only or /usr/bin for global access. Give it a name like noxgl(u can change this to your liking)

if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ $# -eq 0 ] ; then
echo "Usage : noxgl
echo " noxgl -b
echo " (-b option means 'border' so it adds a window border)"

if [ "$1" = "-b" ]; then
if [ -x /usr/bin/kwin ]; then
killall $WM
DISPLAY=:0.0 "$@"

Now u can launch ur app as noxgl -b appname [options]

The second approach is to launch a nested Xserver using Xnest and launch ur app into the Xnest. You need to install Xnest for this.

Use the following commands:
Xnest -ac -terminate -geometry 1280x1024+0+0 :3 &

This will launch Xnest which is an Xserver as well as a Client.

Now launch ur app into this:
DISPLAY=:3 appname [options] &

A word of caution: By default Xnest will not allow Window borders, so it will be a hell to manage multiple windows(if your app uses them). So before launching ur app launch metacity using the above command and then launch ur app.

Thursday, 25 October 2007

Migrating Your Windows Mozilla Thunderbird Profile to Linux

One of the most common tasks when migrating from Windows to Linux is making sure that your emails from ur Mozilla Thunderbird install are migrated properly. Here is a small HOWTO which I figured out myself, when faced with this task.

What you need to know?
Locations of the Profiles in Windows and Linux
On Windows its located in: "C:\Documents and Settings\UserName\Application Data\Thunderbird\Profiles\randomprofileid.default"

On Linux: ~/.mozilla-thunderbird

There is absolutely no need to copy your mails from windows to Linux partition. You can keep them where they are incase you do not plan to uninstall ur Windows OS or you frequently toggle between both OS like I do due to work requirements.

So here is what you do either copy your randomprofileid.default folder to the Linux partition or link it inside the ~/.mozilla-thunderbird folder.

Here is how you link it:
ln -s /media/WinPartition/Documents\ and\ Settings/Albuquerque/Application\ Data/Thunderbird/Profiles/okapp5e4.default/ ~/.mozilla-thunderbird/okapp5e4.default

Now you need to edit the profiles.ini file located at ~/.mozilla-thunderbird/profiles.ini
Here is the snippet from my Modified Profile




I added the new Profile 1 section in place and added the path to point to the one which is the one i linked above. Also changed StartWithLastProfile=1 to StartWithLastProfile=0 so that I would get a choice at startup.

Now start you firefox and you are done. Enjoy ur mails on both OS without any problems.