Windows Compatibility for the Linux Desktop
Pages: 1, 2, 3
Non-JDS Gnome and KDE Desktops
Non-JDS Gnome desktops use exactly the same system of Category=
values to place applications in menus.
To appear in the Applications menu, the categories must include Application.
Under that menu, the commands appear in sub-menus if they contain
Application and one of following additional category names.
| Applications Sub-Menu Name | Category Names |
|---|---|
| Accessories | Utility but not System |
| Programming | Development |
| Games | Game |
| Graphics | Graphics |
| Internet | Network |
| Multimedia | AudioVideo |
| Office | Spreadsheet || Office || WordProcessor || ProjectManagement || Calendar |
| Preferences | Preferences |
| System | Settings but not System |
| Other | not Settings |
These category names shown here come from the .vfolder-info files in /usr/share/gnome/vfolders or /etc/gnome/gnome-vfs-2.0/vfolders.
KDE uses an entirely different system. Instead of placing Category= lines in the desktop files, the files themselves appear in a directory hierarchy that corresponds to the menus. For example, if
netscape.desktop were in /usr/share/applications/internet, it would appear in the
Applications -> Internet menu.
Integrating Visio and Project
The same techniques works to add your Windows programs to the Gnome menus. We'll start with Visio.
Install the program as usual under Windows. Before you remove the CD, locate the icon you wish to use with the program. Running find on the CD identified a Windows VisioCD.ICO file in the /media/cdrom/Support directory. Copy the icon to a Linux file system and convert it to a Unix icon with:
$ winicontoppm VisioCD.ICO | pnmtopng > /tmp/visio.png
Copy visio.png to /usr/X11R6/share/icons/png/hicolor/48x48/apps, the default location for Gnome icons.
Next, find the executable. Running find on ~/win found ./Program Files/Visio/Visio32.exe and dir identified the path as \PROGRA~1\VISIO\VISIO32. At this point, we can copy the project script to create a visio script.
Then, create a desktop file in /usr/share/applications/visio.desktop, containing:
[Desktop Entry]
Name=Visio
Comment=Visio
Exec=/bin/visio
Icon=visio.png
MimeType=
Path=
Type=Application
Terminal=0
Categories=Application;Graphics;X-Sun-Supported
A new entry, Visio, will now appear in the JDS menus under Graphics. It's runnable.
Project requires a similar project.desktop file:
[Desktop Entry]
Name=Microsoft Project
Comment=
SwallowTitle=
SwallowExec=
BinaryPattern=
MimeType=application/vnd.ms-project
Exec=/bin/project
# Icon=
TerminalOptions=
Path=
Type=Application
Terminal=0
Categories=Application;Office;X-Sun-Supported
Visio and Project File Types
In the visio and project.desktop files above, a line identifies the MIME type of the program. This is an unambiguous name for the file type used by the program. Both Gnome and Netscape use the MIME type to find out what program to run if you double-click a file of this type.
Gnome stores its registry files covering all MIME types that it will recognize in /usr/share/mime-info. We'll create win4lin.keys and win4lin.mime files as follows.
win4Lin.keys contains:
application/vnd.ms-project
description=Microsoft Project File
short_list_application_ids=msproject
short_list_application_ids_for_novice_user_level=msproject
short_list_application_ids_for_intermediate_user_level=msproject
short_list_application_ids_for_advanced_user_level=msproject
default_action_type=application
category=Documents
application/vnd.visio
description=Microsoft Visio file
short_list_application_ids=visio
short_list_application_ids_for_novice_user_level=visio
short_list_application_ids_for_intermediate_user_level=visio
short_list_application_ids_for_advanced_user_level=visio
default_action_type=application
category=Documents
win4Lin.mime contains:
application/vnd.ms-project
ext: mpp mpc mpt mpx mpw
application/vnd.visio
ext: vsd vss
A similar applications registry for files lives in /usr/share/application-registry. We'll create a Win4Lin.applications file there, containing:
msproject
command=/bin/project
name=MS Project
can_open_multiple_files=true
expects_uris=false
requires_terminal=false
mime_types=application/vnd.ms-project
visio
command=/bin/visio
name=Visio
can_open_multiple_files=true
expects_uris=false
requires_terminal=false
mime_types=application/vnd.visio
Netscape
To integrate MS Project with Netscape, you need to provide the same information in a different set of files. Add the following lines to /etc/mailcap:
type=application/vnd.ms-project desc="Microsoft Project File"
exts="mpp,mpc,mpt"
type="application/vnd.visio desc="Microsoft Visio File"
exts="vsd,vss"
and the following lines to /etc/mailcap:
application/vnd.ms-project: /bin/project %s
application/vnd.visio: /bin/visio %s
The /etc/mailcap file corresponds to the /usr/share/application-registry/Win4Lin.applications file, while the mime.types file corresponds to the /usr/share/mime-info/win4lin.keys and win4lin.mime files.
After adding these to the system mime.type and
mailcap files, Netscape will recognize a Project file when you
double-click it either in email or on the Web. It will launch
/bin/project to edit the file.
Remote Access to Win4Lin and Windows
If you have another non-x86 machine, you can run Windows programs on Linux and display the window on your other machine, to the considerable startlement of your colleagues. See Figure 6.

Figure 6. Running Visio from a SPARC
With a Linux machine named Calvin and a Solaris machine named Hobbes, the command on Hobbes is:
xhost +calvin: ssh calvin "DISPLAY=hobbes:0.0 /bin/project $@"
At this point we're done. Whenever we need to run those last remaining Windows programs, we can do so without leaving Unix and without the interminable waits of dual booting.
If we need to provide this same kind of capability to a whole department, we can look at the Win4Lin terminal server, which Sun and Siceroo recently used in a large deployment of Sun Rays for the Netherlands school system.
References
David Collier-Brown is a consulting systems integrator, currently working for the performance and engineering group at Sun Opcom in Toronto.
Return to the LinuxDevCenter.com.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 12 of 12.
-
Qemu.
2004-06-24 12:01:27 garick [Reply | View]
I recently setup win98 inside Qemu to run Windows apps under Linux. It took a little effort, but I
can run windows apps under Fedora Core 2 from within Win98.
It works, its free and if an individual has a fast enough machine, and an old windows licence its another option. Likewise an organization that has either a site license for windows or old licenses they are not using could use this technique at low or no cost.
I do web development, on my linux workstation .. os having an easy way to render pages in ie is handy.
Garick
-
Please do not teach users bad habits
2004-06-18 14:22:38 thomasvs [Reply | View]
Hi,
I am worried because given the topic and style of your article I expect it is also targeted at new Linux users.
Therefore it apalls me to see that you tell them to install an rpm with --force --nodeps !
First of all, this should never be necessary - don't tell users to install crap packages.
Second, what should these users do later on when they want to install new stuff and their rpm database is inconsistent ?
*Please* remove the statement or add a big warning and tell them how to fix it. If there really is something wrong with the package, complain and fix it.
-
Mis typed?
2004-06-17 11:13:23 coolian [Reply | View]
Suse 9.1, possibly? Maybe it's an old article?
"At the time of writing, SuSE version 8.1 has just come out."
-
VMWare ESX Server
2004-06-17 10:54:36 DkReaver [Reply | View]
In the article it is stated:
'... EMC VmWare ESX server, both of which replace the Windows Citrix product.'
EMC VMWare ESX server is a server virtualization product, not a GUI terminal server product. It will not provide a complete substitute for the functions of Windows Citrix or Win4Lin TS on it's own.
You could load a GUI TS product on top of VMWare ESX as a virtual server.
You could also load multiple virtual systems with Project or Visio, each having a single remote connection available via the VMWare ESX remote console. This is missing much functionality, is not scalable and is a waste of an expensive ESX license.
-
RE: Why?
2004-06-17 09:44:49 BeastOfBurden [Reply | View]
Why run windows inside of Linux?
1) Because you can. ;)
2) Because with Linux you have no worries about
windows viruses and trojans. You can use
Linux programs for internet stuff, but still
use Windows programs when you need to.
Even if the Windows program you are using is
internet enabled and you get a virus, the most
damage it could do would be to hose your
$HOME/~win and/or $HOME/~mydata directories
(or in the case of this article
$HOME/Documents), but it could never crash
your computer. If you ever got a virus, as
long as you backed up the above directories
regularly, returning to the last known good
state is a simple as deleting the above
directories and untar'ing the backups. You
wouldn't have to even reboot.
I love Win4Lin, because it was the way I was
able to convince my wife to have Linux be the
default boot option on our primary computer.
She can use MS Office, she can play Win9x games
with my kids. E-mail, scanning, and photo editing
are handled natively in Linux using Mozilla,
X-Sane, and the GIMP, respectively. In Linux
she can setup the desktop background to cycle
though our photo collection with a new photo
every few minutes. We only reboot when I upgrade
the kernel. I love it!
All I wish is that Win4Lin would add NT/2000/XP support so I can at least be running modern WinXP
when I have to use windows. I'm currently running
Win4Lin using Win95 on a Gentoo Linux box, and it works great except for newer Windows programs (MS Money, TurboTax) that don't necessarily work on Win95 anymore.
-
VMWare
2004-06-17 09:04:23 John_Bresnahan [Reply | View]
One small correction to your article...
Although you can't run VMWare on a Windows 9x system, you can run Windows 9x just fine within a VMWare session.
While VMWare is the most expensive of the solutions, it also offers a "better" virtual environment. In my case, I have to support and enhance an ancient Point-of-Sale system which requires a Windows 9x computer to build (some of the build tools simply won't work on an NT/2K/XP system), and about 6 MS-DOS computers to test. VMWare allows me to have all of these "virtual" computers on my laptop, ready to run at a moment's notice.
-
Why?
2004-06-17 08:35:33 karaboon [Reply | View]
WHY DON"T YOU JUST USE WINDOWS INSTEAD OF RUNNING WINDOWS ON TOP OF LINUX?
It seems to be nonsense to me for what you did. -
Why? @karaboon
2004-06-17 11:15:20 coolian [Reply | View]
Obviously, you have no reason to do so, so why comment? We use it here at work, because some of our tools don't work under Linux. That's it.
Did you honestly think there was no reason IN THE ENTIRE WORLD, to run Windows on Linux? Come on, think, shut off the caps lock, and read a little.
-
RE:Windows compatibility for the Linux desktop article
2004-06-17 05:37:56 smachine182 [Reply | View]
as far as i know JDS uses an older version of SuSe.
-
A lot of work
2004-06-17 03:55:11 dasarinc [Reply | View]
This is a lot of work for the average user. I would suggest taking another look at CodeWeaver's v3.0.1 product (http://www.codeweavers.com/), which is great and they do offer support. For $40 or so, you can install Project without having to have a Windows license or special kernel at all, plus it will run other programs such as Adobe Photoshop, Office (Outlook et al), Visio, Dreamweaver/Flash and so forth. This is much better than any emulation program, and CodeWeaver's has done a great job making the installation easy.
-
Windows compatibility for the Linux desktop article
2004-06-11 14:41:19 tomdelmonte [Reply | View]
It seems this article is a little dated saying that the CodeWeavers Crossover software does not support MS Project (it does) and listing Suse 8.1 (kernel 2.4) as just released when the latest is 9.1 (kernel 2.6).
Other than that it was a helpful article.






I'd worry very much about NeTraverse's ability to provide future releases before investing any of my money in this product. Where is Windows 2000/XP support? It's been promised for a long time, but they have not released it. Why? They have no staff left to do it and no way to pay them! One of thier principal investors of several years has filed a lawsuit against them. They do not pay their ex-employees, nor does the CEO treat people with any honesty or respect.
Run, don't walk to buy VMWare or use crossover or bochs if you can't afford that.