Re: Integrate VMware and Gnome




On 13 Oct 1999, Regis Duchesne wrote:
(I've been sitting here saying I know I know your name and trying to
remember where from, are you the regis from linux-ntfs list by any
chance?)

I haven't seen any responces to your questions, so I am gonna do my best.
I am cc:ing the list so they correct all my mistakes. :)

> 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?
yes the mime-magic database does this, no gmc does not.  the problem
usually cited when people ask why not, is that it is really painfull to do
it that way over something like nfs,etc.  There have been talks in the
past about having it do magic number checking on just local systems, but
I believe they have not been implemented.  I am fairly sure that gmc still
uses extensions to guess the type.

> 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?
I don't think it is at this point.  You could associated something with 
the extension and add the regex to the magic file, however I don't think
you can make them play together, at least not in gmc.

> 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?
Are you using 'open' or 'fm-open'  I believe you must use fm-open, since I
think gmc tries that first, and by default fm-open for all executables is
to execute them.

> 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
hmm, no idea.  Sounds like a bug though.  I'd test it but I don't have gmc
on my box at work at the moment.

>    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?
hmm, should it matter?  Aren't all file commands going to work on the file
pointed to anyways?  If you did this you would have to reqursively search,
which is a pain.  (I wrote a script once that did this, the company had a
huge weird environment where having a chain of like 6-10 links was not
uncommon.  of course there is probably something that does this anyways)

> 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
hmm, no idea how to make it only do it on the first open, short of ugly
flags in the filesystem or some-such.

> Q: Is there a way to detect that a user is currently running gnome?
I think if you know more than me about X there are ways to get it from the
current desktop or whatever.  Or you could check if gmc and gnome are
running, since they are basically "gnome" i guess.

> 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.
perhaps a dailog asking them to rescan their directory?  Or perhaps gmc
could have a commandline option to do this. ("gmc --rescan" or something)

> 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?
I believe the menueditor is gui only.  The menustuff however is both easy
and hard.  it is basically just .desktop files placed in a hiearchy:
$gnomedir/share/gnome/apps/Category/Subfolder/program.desktop
for instance
/usr/share/gnome/apps/Internet/gnomba.desktop is the menu entry for
gnomba.  The trick however, is discovering where $gnomedir is.  This I
have no idea how to do.  I build my tarballs assuming it is in
/usr/local, and my rpm's assuming it is in /usr.  I know there has been
some discussion of making it easier, I don't know what ever came of it.

> 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?
short of writing a quick gui to prompt them, I'm not sure.

> 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.
Right now I think it has to downscale them.  This should probably be
submitted as a bug if it hasn't already, the downscaled images do often
look worse.  But I'm not sure.

> 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 :(
I believe there is currently no way to figure this out, but I am not sure.
Everyhing is in fixed places under $PREFIX, but that can change, though
/usr/local, /usr, and /opt/gnome seem to be the most popular.

Personally I just use /usr, since that is what rpm's use, and then do
--prefix=/usr for all the things i compile.

> For those who have read up to here, thanks for your attention.
> Best regards,
no problem.  hopefully I was helpfull and not too horribly wrong.

-chris

_______________________________________________________
Christopher Rogers      http://www.darkcorner.net
gandalf@darkcorner.net  gandalf@pobox.com       

An optimist believes we live in the best of all possible worlds.  
A pessimist is sure of it!




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