On Sat, Apr 25, 2009 at 8:27 PM, Gravis <nauti...@adaptivetime.com> wrote: > On Sun, 2009-04-26 at 00:51 +0200, Bruce van der Kooij wrote: >> Gravis wrote: >> > Other apps like GIMP can open this file just fine, so do I need to >> > somehow register the application somehow with Nautilus? What's the >> > deal? >> > >> >> Have you looked into whether or not it is your program that is at fault? >> You can start Nautilus from the command line and any output your send >> to stdout will be printed (nautilus -q && nautilus --no-desktop >> sftp://example.com). >> >> For example, are you sure it handles spaces appropriately as Nautilus >> will pass a path starting with "/home/$USER/.gvfs/sftp on example.com/" >> for SFTP mounts nowadays. >> >> Best regards, >> >> Bruce > > Ok, after doing further investigation, I found that no arguments are > being passed to my program. i found this out by just making a dialog > and displaying the value of argc, which was 1 (only the name of the > binary executed is stored in argv). This explains why my app wasnt > showing, because it just outputs the usage details then quits when there > are no arguments passed in. > > I had associated my program with the type of file (jpeg) which worked > fine locally but it didnt show up in the list of programs that could be > used to open the file. Only programs like GIMP that use GIO/GVFS are > listed which further leads me to believe that the application must be > registered with nautilus somehow. > > So, is this ringing any bells?
You are not installing a .desktop file for your application to tell Nautilus /how/ to run your application, or when to show your application in menus, etc. Nautilus (actually, GIO's AppLaunch code) could probably guess and just do "app-name filename", but it's often not going to work, e.g. if your app needs flags to tell it that you're opening a file ("app-name -f filename"). That's why we have the Desktop Entry Spec, and that's why applications install app-name.desktop files in $(datadir)/applications. -A. Walton > > -- > Gravis <nauti...@adaptivetime.com> > > -- > nautilus-list mailing list > nautilus-list@gnome.org > http://mail.gnome.org/mailman/listinfo/nautilus-list > -- nautilus-list mailing list nautilus-list@gnome.org http://mail.gnome.org/mailman/listinfo/nautilus-list