Common Mozilla Product Profiles Across Operating Systems

Being able to have common profiles for my Mozilla products across operating systems on my main computer has been a dream for a few years now.

I tried this a few years ago between Slackware and my then secondary OS, Debian (stable). The way I had it set up then worked well until the day that Debian dropped FF and TB from their repos and started using their own IceCritters. Another problem I had back then was that Debian’s Mozilla apps were usually quite a bit older versions than the ones in Slackware. If the versions get too disparate, as they eventually did between Slack and Debian, the common profiles no longer function properly.

Later on, when I adopted Arch Linux as my secondary OS, I tried to run common profiles again. I had forgotten my lesson about needing similar versions of the Mozilla apps for the common profiles to work. Arch is much faster at getting newest versions into their repos than Slackware, so once again I had this version disparity issue. Since Mozilla’s recent change to the update-as-often-as-you-change-underwear schedule, I’ve learned to blacklist Mozila apps in Arch so they don’t get updated. Once Slackware puts out an update (I manualy download and install from current) for the Mozilla applications (Firefox, Thunderbird, Seamonkey), I allow the Arch update to go through.

Now that I have my Slack and Arch Moz versions the same or very similar, the common profiles should work. Below is a look at how I did it on my system. It will, of course, be different on yours, but the principles are about the same.

First, I used a common partition on a separate internal hard drive for my common profiles directory.

/home/vtel57/vtel57_common/common_mozilla

This partition automounts within my /home/<user> directory at boot up. You could theoretically use a thumb drive for this, if you wanted to. You’d just have to make sure that it automounts with the proper permissions at boot time.

Next, I copied the firefox and seamonkey directories from my Slackware (main OS) /home/vtel57/.mozilla directory into my newly created /home/vtel57/vtel57_common/common_mozilla directory. I also copied the contents of the .thunderbird directory into a directory called thunderbird also in /home/vtel5/vtel57_common/common_mozilla. You can perform these operations from the command line or in your GUI file manager app, as you prefer.

Photobucket

Now, in the /home/vtel57/.mozilla directory, I renamed the old firefox and seamonkey profiles to inoperative. The old profiles had some random <number/letter>.default as their name. I just added “inop” to the end of that to deactivate them. I did the same with the /home/vtel57/.thunderbird profile. This will prevent the apps from trying to use these old versions.

vtel57_Slackware~/.mozilla/firefox:$ mv 3mvew7qq.default 3mvew7qq.default_inop

Back in the new common directory shown above, I renamed the <number/letter>.default profiles to names that made more sense to me: ff_profile.default, tb_profile.default, and sm_profile.default.

Once I did all of the above, I needed to edit the profile.ini in each original application directory (/home/vtel57/.mozilla/firebird and seamonkey, /home/vtel57/.thunderbird) to point  to the newly created common profiles. You can open your favorite gui or command line editor and make these changes to each profile.ini file. Here is my profile.ini for Firefox, for example:

[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1  0
Path=<number/letter>.default  /home/vtel57/vtel57_common/common_mozilla/firefox/ff_profile.default
Default=1

*change the items in red to the ones in green

So now, whenever I fire up firefox, seamonkey, or thunderbird in either Slackware or Arch, they will be running off the same profiles; meaning all data, preferences, etc. are synch’d. Ain’t it great!?

I’m sure there are easier ways to do this, but this is how I managed it. You can experiment to find what works best for you on your systems.

Have fun!

Later…

~Eric


Pimp My Bash Prompt

In the next couple lessons here at Nocturnal Slacker v1.0 we’ll be discussing the Bourne Again Shell (BASH) in a bit more detail.

With that in mind, though, how ’bout we play around with a neat trick that will customize your BASH prompt whenever you go to the command line? Sound like fun? OK, here we go…

There’s a file in your /home/<your_username> directory called .bashrc. You’ll need to use the -a (all) option when listing (ls) that directory because the preceding . means it’s a hidden file. So, let’s see how joe would do this…

joe@mysystem:~$ ls -a .bashrc

.bashrc

There we go. So Joe now knows that he does have a .bashrc file in his /home directory. Now, let’s say that Joe wants a cool BASH prompt like mine:

vtel57_Slackware~:$

… that shows his username, his operating system, and his working directory. To do this, Joe is going to have to add a little data to his .bashrc file. He’ll edit the file using the VIM command line editor. Remember that from a previous lesson? Here goes Joe…

joe@mysystem:~$ vim .bashrc

And poof! Up comes VIM with the .bashrc file ready to be edited. It’s almost like magic, huh?

# /home/joe/.bashrc

# custom prompt
PS1=”\u | archlinux\w:$ “

Joe is going to edit the .bashrc file to add the little bit in purple that you see above. What that will do is tell BASH to start up the command line with a prompt the shows Joe’s usersname (u), his distribution (ArchLinux) separated by the | (pipe) character; and his working directory (\w). After saving the file, this is what Joe’s command line prompt will look like once he starts his next BASH session:

joe | archlinux~:$

Pretty neato, huh? Remember the ~ denotes the home directory. If Joe was to change directories (cd) to say /boot/grub, then his prompt would now change too to show the new working directory.

joe | archlinux~:$ cd /boot/grub

joe | archlinux/boot/grub:$

Again, pretty neato, huh? This way, Joe will always know what directory he’s in at any given time. That will help prevent Joe from making any command line boo-boos.

That’s it, guys and gals. Pretty simple stuff. See? You’re not near as scared of that mean ol’ command line as you used to be, huh? Use your imagination when customizing your prompt. I’ve seen some pretty cool ones out there. Here’s the one my friend securitybreach and fellow Admin from Scot’s Newsletter Forums – Bruno’s All Things Linux uses:

╔═ comhack@Cerberus 02:27 PM
╚═══ ~/->

How’s that for spiffy? For further reading see HERE and HERE.

Have a great weekend wherever you may be!

~Eric


Follow

Get every new post delivered to your Inbox.

Join 43 other followers