GNOME Bugzilla – Bug 574919
%d parameter returns blank field
Last modified: 2009-05-25 16:35:19 UTC
I use Ubuntu 9.04 Alpha 5 with Gnome 2.25.92 and nautilus-actions 1.4.1 The %d parameter when used should return the /path/to/selected/file-folder but it simply doesn't work Steps to reproduce : Case 1: - create an action and put in "Path" field : /usr/bin/gnome-terminal "Parameters" filed : --working-directory=%d - make the action appear in folders and restart nautilus. - Go to /etc/samba and run the action we created. gnome-terminal opens with working-dir /home/<username>/ Case 2: - create a bash script (test.sh) and put inside #!/bin/bash echo $1 > /tmp/test echo "----" >> /tmp/test - this should echo the %d parameter in /tmp/test - create an action and put in "Path" field : /path/to/test.sh "Parameters" filed: %d - make the action appear in files and folders and restart nautilus. - go to whatever file or folder you want and run the action we created. then check /tmp/test. Is is empty !
I confirm this bug
In fact it is not only %d parameter who don't work anymore, but all types of arguments gived by nautilus to a script : %m, %f, %M I don't know if nautilus developpers have changed something, or simply deleted this feature, but it is a big regression. My mailpictures application (http://sourceforge.net/mailpictures), who bypass nautilus-actions but use the same way to work, simply doesn't work anymore as all actions from nautilus-actions utility Please developpers, can you explain now what we can have the same feature and the way we can use it
XMP Manager is broken too http://grigio.org/xmp_manager
hi ! this bug is a great problem ! mailpictures is the best way to send pictures by mail without problems I don't understand why this script is not included directly in ubuntu....
Created attachment 132551 [details] [review] Adds call to gnome_vfs_init The problem is that GnomeVFS needs to be initialized before gnome_vfs methods can be used. Nautilus used to call gnome_vfs_init itself (pre 2.26) and since extensions run inprocess of Nautilus this call would also apply to them. Nowadays Nautilus is GIO/GVFS and so this call has been removed, because nautilus-actions is unmaintained it hasn't moved with Nautilus to GIO/GVFS. The relevant function which uses the gnome_vfs functions is nautilus_actions_utils_parse_parameter which parses all the %u, %d, %f, %m, %M and so on. See: http://svn.gnome.org/viewvc/nautilus-actions/trunk/plugin/nautilus-actions-utils.c?view=markup#l32 Since GnomeVFS has been deprecated all the functions to gnome_vfs_* should be converted to their GIO/GVFS equivalents but in the meantime calling gnome_vfs_init will do as a quickfix. This patch adds the init call to nautilus_actions_instance_init. Also, there was a problem with po/LINGUAS which contained a linebreak and was causing corrupt Makefiles to be generated due to the ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS"`" call in configure.in. This patch also fixes that by removing the linebreak so nautilus-actions can be build once again from trunk. Since I don't have any commit rights somebody else will have to commit. Can somebody else also make sure that this gets in the Jaunty (9.04) release for Ubuntu? Opening a bug on Launchpad pointing to this one might be a good idea.
https://bugs.launchpad.net/ubuntu/+source/nautilus-actions/+bug/341035 is the bug on Launchpad.
*** Bug 578008 has been marked as a duplicate of this bug. ***
Hi, The part of the patch proposed by Bruce relative to GnomeVFS initialization has been applied to the master branch. The part relative to the line break in po/LINGUAS has not been applied as already fixed by Christian. Thanks to all Regards Pierre
*** Bug 577447 has been marked as a duplicate of this bug. ***
*** Bug 583628 has been marked as a duplicate of this bug. ***