Re: Exposing yourself over d-bus



Alex Launi wrote:
> Bruce, I'm trying out your script but it doesn't seem to be working for me,
> the GetSelectedPaths is always coming back empty, despite having files
> selected in nautilus. I restarted nautilus, but had the same problem. When I
> run this inside of nautilus as a script, I get this error:
> 
> /usr/users/alauni/.gnome2/nautilus-scripts/nautilusdbus.py: line 46: syntax
> error near unexpected token `('
> /usr/users/alauni/.gnome2/nautilus-scripts/nautilusdbus.py: line 46: `
> class NautilusDBus(nautilus.MenuProvider):'

It's probably trying to parse it as a Bash shell script as it doesn't
have a shebang and you placed it in nautilus-scripts.

Also, the way I wrote it would cause some issues when the DBus daemon
wasn't started before Nautilus was. I fixed these issues (adding some
exception handling) and committed the script to the NautilusSvn repo,
you can find it here:

http://code.google.com/p/nautilussvn/source/browse/other/NautilusDBus.py

You should place this in ~/.nautilus/python-extensions. It will now
automatically start the DBus service if it isn't running.

Best regards,

Bruce

Attachment: signature.asc
Description: OpenPGP digital signature



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