ok, I've got a patch, and I also have an easier way to debug this app for you.
so first, debugging:
if you leave all the other files from the package the same, you can rm /usr/lib/nautilus/extensions-2.0/python/nautilus-terminal.py
instead create ~/.nautilus/python-extensions, and you can symlink nautilus-terminal.py into that (or develop it from there).
I added python logging then instrumented NautilusTerminal.get_widget and printed uri so I could see what that looks like for the desktop and for the path alike.
Turns out that the uri for the desktop looks like this:
x-nautilus-desktop:///
vs the uri for directories looks like this:
file:///home/devon
so basically added if
uri.startswith('x-nautilus-desktop'):
return
to the beginning of get_widget and it solved the problem. You can probably remove the code later in that function that detects the desktop dir, because i think this will catch any reference to the actual desktop.
ok, I've got a patch, and I also have an easier way to debug this app for you.
so first, debugging: nautilus/ extensions- 2.0/python/ nautilus- terminal. py python- extensions, and you can symlink nautilus- terminal. py into that (or develop it from there).
if you leave all the other files from the package the same, you can rm /usr/lib/
instead create ~/.nautilus/
I added python logging then instrumented NautilusTermina l.get_widget and printed uri so I could see what that looks like for the desktop and for the path alike.
Turns out that the uri for the desktop looks like this: desktop: ///
x-nautilus-
vs the uri for directories looks like this:
file:///home/devon
so basically added if 'x-nautilus- desktop' ):
uri.startswith(
return
to the beginning of get_widget and it solved the problem. You can probably remove the code later in that function that detects the desktop dir, because i think this will catch any reference to the actual desktop.