Despite the dogma of many operating system evangelists, pragmatic IT professionals understand that being flexible and knowledgeable about the tools available is the best way to implement solutions. For instance, many users don’t hesitate to dual boot between the Linux and Windows operating systems on their desktops to take advantage of the power of Linux while still retaining access to the industry-standard software and greater hardware support provided by Windows.
To use applications on both platforms, it becomes increasingly desirable to share application data and resources between the operating systems and, as a result, switch back and forth between them. This is what some have called the “two desktop problem.” In this Daily Drill Down, I’ll offer some tips for dealing with one aspect of the two desktop problem: how to share two Web-browsing components, bookmarks, and plug-ins between Linux and Windows.
Sharing bookmarks (Favorites) between operating systems
The Web browser has become one of the most important applications on the desktop. A vast amount of useful information can be marked for easy retrieval by using the bookmarks or Favorites feature (as Microsoft calls it). After a while, users can accumulate hundreds or thousands of bookmarks. A problem arises when a user collects bookmarks on different operating systems. On a Windows-Linux dual-boot system, the user collects bookmarks on both operating systems and on different browsers. The basic problem becomes converting and synchronizing bookmarks across both operating systems so that the user can maintain easy access to the same Web sites regardless of which OS is booted.
In Linux, Netscape Navigator and the browsers derived from its open source code, such as Mozilla, seem to be most popular, unlike in the Windows environment, where Microsoft’s Internet Explorer (IE) dominates. For the example in this Daily Drill Down, I’ll concentrate on converting and synchronizing bookmarks between Mozilla in Linux and IE in Windows. (Since Mozilla saves bookmarks in the same format as Netscape, I’ll use a utility that can synchronize or convert between IE and Netscape.) The process will be the same regardless of the browsers you use, with the exception of the utility or utilities used to convert the bookmarks.
The process can be summarized as follows: First, select a utility that can synchronize and/or convert bookmarks between the users’ Windows and Linux browsers. It might be easier to choose a Windows program instead of a Linux one since you’ll have more of them to choose from. Then, make the bookmarks of the users’ browsers available to the chosen utility. This usually involves placing the Linux browser’s bookmarks on a Windows partition that’s accessible by Linux and creating a symbolic link to them. Finally, set up the program so that it can find appropriate bookmark files and directories. If you can’t find a utility to synchronize directly into the format of one of the users’ browsers, which might be the case if the users are using a less popular Linux browser, you might have the additional step of importing the bookmarks into the browser from a more popular format. I’ll detail these steps below.
Finding the proper utility or utilities is the hardest step. While a multitude of free and commercial utilities that provide conversion and synchronization features between browsers are available, most of them fail in three key areas. Many utilities are sorely out of date and don’t work with the latest browsers or operating systems. There also seems to be a plethora of atrociously bug-laden conversion utilities that either fail to run or crash when executed. Finally, many of the utilities that I found to work lack the ability to automatically synchronize bookmarks at Windows startup. While that isn’t an absolute necessity, ideally, you’ll want the bookmarks to automatically synchronize between operating systems without user intervention.
|Bookmark Converter is perfect for syncing bookmarks between Windows and Linux.|
I chose a small, inexpensive shareware utility named Bookmark Converter, shown in Figure A. Bookmark Converter has all the features necessary for the job. It allows you to synchronize bookmarks between IE and Netscape Navigator, and the registered version allows automatic synchronization at Windows startup. It’s also easy to set up and seems to be kept up to date.
If your users have Windows 2000 and they’re unable to start Bookmark Converter as regular users after it’s installed with the administrator account, try reinstalling the program as a regular user. You’ll see a warning indicating that the program may not run properly if installed in this manner, but you can safely ignore this.
An excellent alternative to Bookmark Converter is Urlbase. Unlike Bookmark Converter, Urlbase is actually a powerful bookmark manager with synchronization features built in. However, to date it doesn’t allow you to automatically synchronize on Windows startup, so users will have to do synchronizations manually. Its interface is not as easy to use as Bookmark Converter’s, but on the plus side, it’s kept up to date, supports several browsers, including Opera, provides many other powerful features, and is free.
If you choose a Windows-based utility to do the synchronization, you must then make the users’ Linux browsers’ bookmarks accessible to it. That is, you must place the Linux browsers’ bookmarks on a hard drive partition that can be accessed by both Windows and Linux. Although a FAT partition is preferable, it’s possible to use an NTFS partition (kernel 2.2 or later). The important thing to remember is that you must be able to mount and write to the partition with your regular nonroot user account. If it’s not mountable and writable by your regular user account, you may have to modify the /etc/fstab file. For information on how to modify the /etc/fstab file, see the mount and fstab man pages.
If you don’t have a partition available for this purpose, another method is to access the users’ Linux browsers’ bookmarks using a utility that can read and write to a Linux ext2 filesystem from within Windows. Several utilities can do this, including LTOOLS.
For this example, I created a directory called linbooks on my Windows D:\ partition. Then I booted Linux and logged in with my regular user account. Most browsers will maintain a user’s configuration files and bookmarks within a hidden directory (the name starts with a dot) in the user’s home directory. From a terminal or the command line, you can issue an ls -a command to help find the hidden directory. The actual bookmarks might be buried a few directories down, and the exact location will vary depending on the browser you’re using. On my system, for example, the Mozilla bookmarks (bookmarks.html) are in a .mozilla/default/stm2ug7c.slt directory.
Once I knew which directory the bookmarks were in, I issued the following commands:
mv bookmarks.html bookmarks.back
cp bookmarks.back /mnt/win_d/linbooks/bookmark.htm
The first line changes the directory to the browser’s bookmark directory. The second line renames the file bookmarks.html to bookmarks.back to keep it as a backup. It’s always a good idea to keep backups of the users’ bookmarks. The third line copies bookmarks.back to the directory linbooks in my Windows D:\ partition and renames the copy bookmark.htm. Obviously, the Windows partition may not be named win_d, so check the /etc/fstab file if you don’t know what the user’s Windows directory is labeled. The copy’s name was changed to bookmark.htm in case the Windows utility used for synchronization cannot accept long filenames.
The next step is to create a symbolic link (a pointer) to the bookmark file. Make sure that the name of the link that is created matches the name of the original bookmark file.
ln –s /mnt/win_d/linbooks/bookmark.htm
When you’ve made the Linux bookmarks accessible to Windows, you’re ready to set up the synchronization utility. Bookmark Converter is extremely easy to set up. After booting into Windows and starting the program, click on the Utilities menu and select Bookmark Synchronizer. In the Bookmark Synchronizer window (Figure B), click on the Browse button to select the Linux Netscape bookmark file. In my example, this is the bookmark.htm Mozilla file that I placed in the D:\linbooks directory. The IE Favorites directory can then be chosen if it’s not already selected. Check the Synchronize On System Boot check box and you’re all set. The next time Windows is booted, the program should automatically synchronize the Linux Netscape-type bookmarks and the Windows IE bookmarks.
|If you prefer to synchronize manually, you can use the Synchronize Now button instead.|
If you use a Linux browser such as Konqueror or Galeon, you may have to perform an additional step because these two browsers store their bookmarks in a format that is very different from the Netscape Navigator file format. You might have trouble finding a Windows utility that converts bookmarks directly into that format. You can get around this by first synchronizing to a more popular format, such as Netscape Navigator’s, and then using the import feature of this browser to manually synchronize the bookmarks. To import bookmarks within Konqueror, click on the Bookmarks menu and select Edit Bookmarks. In the Bookmark Editor window, you can import Netscape or Mozilla bookmarks from within the File menu. In Galeon, click on the Bookmarks menu and select Edit. When the Bookmarks Editor window appears, select the Import/Export menu.
Using Windows plug-ins in Linux
Another powerful feature of many Web browsers is their ability to accept plug-in software. This allows them to handle various file types and become an extensible Internet interface, which is especially important when dealing with multimedia file formats that add vital content to a Web site.
|A Flash-based quiz, Adobe Acrobat Reader, QuickTime, and Shockwave running in Linux|
Many of the most popular Windows plug-ins, such as Flash, RealPlayer, and Acrobat Reader, have been ported to Linux (Figure C). However, most plug-ins, including some very notable ones such as Apple’s QuickTime, haven’t been adapted to the Linux desktop. This can pose a serious limitation to Web browsing on the Linux platform if you require access to the file types handled by those plug-ins.
To address this problem, CodeWeavers, a company dedicated to providing Windows technologies on the Linux platform, has created CrossOver Plugin, a WINE-based program that makes it possible to use certain Windows plug-ins within Linux. Its first version seems to be aimed primarily at providing QuickTime support in Linux as a standalone version and as a plug-in for Netscape Navigator. It does work with other plug-ins and browsers as well. Your success with other browsers, plug-ins, and file types will vary, but overall I found CrossOver to work quite well when testing it with Mozilla 0.9.1 and Galeon 0.11.0. For more details on what does and doesn’t work with CrossOver Plugin, check out CodeWeavers’ real-world description, ”The Real Dirt," and O’Reilly Network’s testing of CrossOver (including the current limitations of using CrossOver with QuickTime Pro).
Installing CrossOver is easy, thanks to an excellent installer script. If you’re installing the single-user version, you’ll need to install CrossOver as a regular nonroot user. To start the CrossOver Setup, move into the directory where the script is located and issue the following command from a terminal window:
The Plugin Setup will start and allow you to select the install path. If you accept the default settings, the program will be installed in a directory named crossover within your home directory. After the program is installed, click on the Configure Now button, and a window will appear that allows you to configure individual plug-ins. Select QuickTime and click on the Add button to start the QuickTime Setup.
After QuickTime is installed, the Plugin Setup window will list its status as Installed, as shown in Figure D. If you want to use QuickTime as a browser, you must associate the plug-in files with the particular browser you’re using. You’ll have to do this after installing each plug-in. Simply select the tab with the name of the browser whose plug-ins you’ll be using and click the Activate button for each file that is to be associated. In version 1.00 of CrossOver, you’re able to activate Netscape, Konqueror, and Mozilla plug-in types. Opera, which only recently began using Netscape plug-ins, doesn’t yet work with CrossOver. According to CodeWeavers’ Web site, it may be available in version 1.01.
If you receive a permission error when trying to activate plug-in files with Mozilla, you’ll have to give your user account write permission to the directory that is indicated in the Mozilla plug-ins directory box under Plugin Setup’s General tab. This permission will have to be changed using your root account and remain active at least until the plug-in files are activated.
Installing other plug-ins involves the same method detailed above, except that you’ll have to select Other in the Plugin Setup’s Add/Remove pane to indicate where the plug-in’s executable file is located. CrossOver is capable of supporting several other plug-ins besides QuickTime. According to CodeWeavers, CrossOver can even run Windows Media Player 6.4 to access some sites. Windows Media Player 7.1 doesn’t work, though. CrossOver also allows you to use the installed plug-ins to view mail attachments with your e-mail client. By installing file viewers for Word and Excel, you can view those file types as attachments.
Overall, CrossOver Plugin is an impressive program that handles QuickTime movies beautifully. I found its handling of QuickTime VR files quite stunning as well. Although CrossOver Plugin still has many kinks that need to be resolved, it fills the gap of missing Linux plug-ins quite nicely and is well worth its modest price. With subsequent versions, this program will continue to strengthen Linux desktop performance and make Windows-Linux coexistence easier.
Employing both Windows and Linux on your users’ desktop systems allows them to benefit from the assets of both systems. Several available utilities and options allow users to share resources and greatly simplify the interactions between operating systems in a dual-boot environment. As explained in this Daily Drill Down, the ability to share bookmarks and plug-ins will go a long way toward making it easier for users who need to use both operating systems. By using these options, users gain an extremely powerful desktop capable of using Web-based resources on both types of operating systems.