Integrate VMware and Gnome



Hi guys,

Cool title eh? I'm in charge of making sure that VMware installs on
Linux as beautifully as it does on Windows, and I have a few questions 
and remarks about this. I know this mail is long. My goal is triple:

 . I don't want to annoy you

 . I want to solve a real-world case: a third party company wants to
   install its product on top of your software, and I want to make sure that
   it is possible without you needing an access to that third company
   sources. I would like to share my needs with you, so that other
   companies won't have to do so.

 . I would like this email and its answers to be the foundation of a
   future 'Third party software installation on top of Gnome HOWTO'
   because more and more companies will need to do so, and will need
   that kind of documentation

File name to mime-type bindings
-------------------------------
I have created a vmware.mime file in the system-wide mime-info
directory. It is based on regex for the VMware binaries, and on
extension for the VMware config files (the .cfg files).

Q: It is my understanding that Gnome also support content analysis to
   determine the file type (something like the 'file' command) through
   the mime-magic database. Does the gmc file manager make use of content
   analysis?

Q: I would like to define a mime type like this: "A file is a VMware
   configuration file if: its extension is .cfg _and_ its first line
   matches the regex: '#!.*/vmware.* ' Is it possible?

Otherwise, the default drag-and-drop behavior (dropping a config file
on top of the VMware icon) works great. Good job.

Mime-type to metadata bindings
------------------------------
I have created a vmware.keys file in the system-wide mime-info
directory. It defines icons for some VMware binaries, and the 'open'
action for VMware configuration files (typically it calls vmware with
the file as an argument).

Q: I cannot manage to change the 'open' action of the VMware main
   binary? Is it because it is an ELF executable and executables are
   special cased and always executed when they are double-clicked?

Q: I have problems with the current directory. Let's say I have on my
   desktop 2 symlinks:

    A) A symlink to vmware
    B) A symlink to a directory containing a .cfg file

   . I double-click on B). A gmc window pops up, showing the .cfg
     file. I keep the window open
   . I double-click on A). It executes vmware. I exit the program. Perfect.
   . I double-click on the .cfg file. Problem: the current directory
     is ~/.gnome-desktop and it should be the directory pointed by the
     B) symlink
   . I double-click again on A). This time the current directory is
     correctly set

   I think this is a bug. I'm using Gnome gmc 4.5.40

   In a general way, is it possible to retrieve the real location of
   the file (%F would be a good candidate) instead of the file itself
   (%f) when the file is a symlink?

New document
------------
I have created a vmware.desktop file in the mc/template directory to
handle the creation of new Virtual Machine configuration file. I works 
great both when right-clicking on the desktop and in gmc's menu.

Desktop
-------
Ideally, during the phase of configuration of VMware, I would like
to prompt the sysadmin to put VMware icons on the desktop of users.

I know about the mc/desktop-scripts directory, but it is my
understanding that things that I put in (URL, program to generate
desktop icons) are only executed:

  . When a new desktop is created
  . When the user does a right click->"Recreate Default cons"

I would like to give each user the opportunity to automatically place
icons on their desktop, without annoying them of course.

Q: Is there a way to run a program each time a user opens its first
   gmc session? This program could prompt the user 'do you want VMware 
   icons on your desktop?' And if the user says yes, it would create
   the icons. Of course, the program should be given the user's
   desktop directory as an argument

The previous way to do it is cool, but if the user installs Vmware
while he is running gnome, he will not see the new icons until he
exits and re-opens the gmc session.

Q: Is there a way to detect that a user is currently running gnome?

Q: Is there a way to automatically do a right click->"Rescan Desktop
   Directory"? So that a program could generate icons and have them
   appear automatically on the user's desktop? I'm talking about a
   simple way here (from a shell or a perl script). I don't want to
   use the Gnome API to do this.

Menus
-----
I would like to create menu entries for VMware (something similar to a
'VMware' entry in the start menu of Windows)

Q: I guess it is possible to do it, but I don't know how to do it
   simply with a shell or perl script. Basically, I haven't found any
   documentation explaining how menu (or the menu editor) work, and
   what files I need to modify. Can somebody help me?

Q: Of course, as for the desktop icons, any user should be given the
   possibility (read: will be prompted) to create those menu
   entries. How can I do that?

Misc
----
Q: I currently use 48x48 icons for desktop icons, and they seem to be
   down sampled for menu entries. Is there a way to specify different
   icons (with different sizes) for the same file? Will Gnome choose
   the best format? It is not a big deal, it is just that our 16x16
   icons (that our graphic artist designed) look better than the down
   sampled ones.

Q: In this email, I have referred to a lot a gnome directories. Is
   there a central database (whose location does not change) where
   these directories ($PREFIX, $LIBDIR) are stored? We need to install 
   our stuff on tons of distributions, and all of them have chosen
   different places for those directories :(

Well, I think that's all for the moment. Oh no, I forgot to tell you
(and to make it a little more spicy. Competition always benefit the
customer:) that I will post a similar mail on the KDE mailing list in
a few days.

For those who have read up to here, thanks for your attention.
Best regards,
-- 
Regis "HPReg" Duchesne - Member of Technical Staff - VMWare, Inc.
        www              http://www.VMware.com/
       (O o)             I use Linux (1135 KB/s over 10Mb/s ethernet)
--.oOO--(_)--OOo.----------------------------------------------------
If cryptography is outlawed, only outlaws will have cryptography



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]