Re: Custom file associations priority bug?
- From: Christian Neumair <chris gnome-de org>
- To: Fabio Gomes <bugtraq gs2 com br>
- Cc: nautilus-list gnome org
- Subject: Re: Custom file associations priority bug?
- Date: Fri, 09 Apr 2004 11:58:16 +0200
On Fri, 2004-04-09 at 11:57 +0200, Christian Neumair wrote:
> On Thu, 2004-04-08 at 21:47 -0300, Fabio Gomes wrote:
> > Hello friends,
> > In our company, we have some *.ssh files. We invented this file type to
> > create SSH connection descriptors so that we could access our dozens of
> > servers by double-clicking icons on Nautilus. This idea of using the
> > file manager as a GUI for non-gui programs is well-known and used in the
> > Microsoft world.
> > Our .ssh files are simple Bash script snippets that define variables,
> > much like those /etc/sysconfig/* files from Red Hat. We have a "gs2ssh"
> > script that interprets these .ssh files and opens a terminal with ssh
> > according to the parameters.
> > And here is the problem:
> > In nautilus 2.4, we simply associated files with the .ssh extension with
> > our gs2ssh script and everything worked fine.
> > Now, using Nautilus 2.6, the files are always detected as text/plain.
> > I created another empty test user account to check if there was some
> > problem with my old GNOME 2.4 settings.
> > Then I opened the File Types and Programs capplet and created my SSH
> > file type application/x-gs2ssh, but Nautilus still ignores it and
> > detects the *.ssh files as plain text.
> > Trying to prevent the file from being detected as plain/text, I created
> > a new empty (0-byte) file with the .ssh extension. Nautilus detects it
> > as application/octet-stream.
> > Are the user-defined file types being completely ignored in favor of
> > fd.o shared-mime-data?
> > Is there something I can do to solve this other than downgrading to
> > GNOME 2.4?
> Sorry, I can't really help you when it comes to fixing nautilus.
> Instead, I can offer you to apply the attached patch to
> shared-mime-info, remake it and try it again. For me, it worked:
> touch test.ssh && ./test-mime test.ssh
> File "test.ssh" has a mime-type of application/x-gs2ssh
Do'h. Forgot to attach it.
RCS file: /cvs/mime/shared-mime-info/freedesktop.org.xml.in,v
retrieving revision 1.14
diff -u -r1.14 freedesktop.org.xml.in
--- a/freedesktop.org.xml.in 23 Mar 2004 14:39:54 -0000 1.14
+++ b/freedesktop.org.xml.in 9 Apr 2004 09:55:07 -0000
@@ -706,6 +709,10 @@
<_comment>Graphite scientific graph</_comment>
+ <mime-type type="application/x-gs2ssh">
+ <_comment>SSH Connection</_comment>
+ <glob pattern="*.ssh"/>
] [Thread Prev