Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problems on Ubuntu #2

Closed
sojusnik opened this issue Sep 3, 2015 · 37 comments
Closed

Installation problems on Ubuntu #2

sojusnik opened this issue Sep 3, 2015 · 37 comments

Comments

@sojusnik
Copy link

sojusnik commented Sep 3, 2015

Hey,

after

cd ~/<path to extracted zimsearch-master.zip>
chmod +x autogen.sh
sh ./autogen.sh

I'm stuck, because I don't know the proper path to python on my system. Any ideas about the right path on Ubuntu Gnome 15.04?

$ whereis python
python: /usr/bin/python /usr/bin/python3.4 /usr/bin/python2.7 /usr/bin/python3.4m /usr/lib/python3.4 /usr/lib/python2.7 /etc/python /etc/python3.4 /etc/python2.7 /usr/local/lib/python3.4 /usr/local/lib/python2.7 /usr/include/python2.7 /usr/include/python3.4m /usr/share/python /usr/share/man/man1/python.1.gz
er

Do you thought about improving the install process for not so experienced Linux users? I can imagine, that the current approach discourages a lot of people from installing this plugin.

PS: To run autogen.sh properly, the version 1.15 of automake is requiered, but Ubuntu's repositories only provide 1.14. Gladly, it's possible to install the 1.15 version from a .deb file packaged for Ubuntu 15.10.

@dsboger-zz
Copy link
Contributor

Hi,

I'm not sure, but I think Ubuntu still defaults to python2, so you could either use /usr/bin/python2.7 or /usr/bin/python (the former is very likely to work, the latter depends on Ubuntu default).

Probably the right way to support Ubuntu would be to create a .deb (and launch a PPA for it), but I do not know how to do that, unfortunately. That is certainly something I need to learn, but I do not have enough time for now. Also I don't use Ubuntu (or Ubuntu-based) Linux, to make matters worse. Help certainly appreciated!

Thanks for reporting!

@sojusnik
Copy link
Author

sojusnik commented Sep 4, 2015

I made some progress, but encountered another obstalce :)

sojusnik@mir:~$ cd /home/sojusnik/Downloads/zimsearch-master/
sojusnik@mir:~/Downloads/zimsearch-master$ chmod +x autogen.sh
sojusnik@mir:~/Downloads/zimsearch-master$ sh ./autogen.sh
configure.ac:5: installing 'config/install-sh'
configure.ac:7: installing 'config/missing'
Makefile.am:3: installing 'config/py-compile'
sojusnik@mir:~/Downloads/zimsearch-master$ PYTHON=/usr/bin/python2.7 ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether /usr/bin/python2.7 version is >= 2.7... yes
checking for /usr/bin/python2.7 version... 2.7
checking for /usr/bin/python2.7 platform... linux2
checking for /usr/bin/python2.7 script directory... ${prefix}/lib/python2.7/dist-packages
checking for /usr/bin/python2.7 extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
sojusnik@mir:~/Downloads/zimsearch-master$ make
make: Nothing to be done for 'all'.
sojusnik@mir:~/Downloads/zimsearch-master$ make install
make[1]: Entering directory '/home/sojusnik/Downloads/zimsearch-master'
make[1]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/share/dbus-1/services/'
/bin/mkdir: das Verzeichnis »/usr/local/share/dbus-1“ kann nicht angelegt werden: Keine Berechtigung
Makefile:350: recipe for target 'install-dbusserviceDATA' failed
make[1]: *** [install-dbusserviceDATA] Error 1
make[1]: Leaving directory '/home/sojusnik/Downloads/zimsearch-master'
Makefile:574: recipe for target 'install-am' failed
make: *** [install-am] Error 2

@sojusnik
Copy link
Author

sojusnik commented Sep 4, 2015

Probably the right way to support Ubuntu would be to create a .deb (and launch a PPA for it), but I do not know how to do that, unfortunately. That is certainly something I need to learn, but I do not have enough time for now. Also I don't use Ubuntu (or Ubuntu-based) Linux, to make matters worse. Help certainly appreciated!

I'm afraid, I cannot be of help here, because my coding knowledge is next to nothing.

@dsboger-zz
Copy link
Contributor

You need to make install with root privileges, as it will copy files to system folders. Running sudo make install should work.

@sojusnik
Copy link
Author

sojusnik commented Sep 6, 2015

Thanks, sudo did the trick :)

But I had to copy gnomeshellsearch.py to the plugin folder of Zim (/home/sojusnik/.local/share/zim/plugins/) to be available in the plugins list of Zim. We have the same situation like in #1.

sojusnik@mir:~/Downloads/zimsearch-master$ sudo make
[sudo] password for sojusnik: 
make: Nothing to be done for 'all'.
sojusnik@mir:~/Downloads/zimsearch-master$ sudo make install
make[1]: Entering directory '/home/sojusnik/Downloads/zimsearch-master'
make[1]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/share/dbus-1/services/'
 /usr/bin/install -c -m 644 data/zim.plugins.gnomeshellsearch.provider.service '/usr/local/share/dbus-1/services/'
 /bin/mkdir -p '/usr/local/share/gnome-shell/search-providers/'
 /usr/bin/install -c -m 644 data/zim.plugins.gnomeshellsearch.provider.ini '/usr/local/share/gnome-shell/search-providers/'
 /bin/mkdir -p '/usr/local/lib/python2.7/dist-packages/zim/plugins/'
 /usr/bin/install -c -m 644 src/gnomeshellsearch.py '/usr/local/lib/python2.7/dist-packages/zim/plugins/'
Byte-compiling python modules...
gnomeshellsearch.py
Byte-compiling python modules (optimized versions) ...
gnomeshellsearch.py
make[1]: Leaving directory '/home/sojusnik/Downloads/zimsearch-master'

@dsboger-zz
Copy link
Contributor

It's strange. Could you please send me the output of command python -m site?

@sojusnik
Copy link
Author

sojusnik commented Sep 6, 2015

Here it is:

sojusnik@mir:~$ python -m site
sys.path = [
    '/home/sojusnik',
    '/usr/lib/python2.7',
    '/usr/lib/python2.7/plat-x86_64-linux-gnu',
    '/usr/lib/python2.7/lib-tk',
    '/usr/lib/python2.7/lib-old',
    '/usr/lib/python2.7/lib-dynload',
    '/usr/local/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages/gtk-2.0',
    '/usr/lib/pymodules/python2.7',
    '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
]
USER_BASE: '/home/sojusnik/.local' (exists)
USER_SITE: '/home/sojusnik/.local/lib/python2.7/site-packages' (doesn't exist)
ENABLE_USER_SITE: True

@dsboger-zz
Copy link
Contributor

Even more strange! The installation path used by make install (i.e. /usr/local/lib/python2.7/dist-packages/zim/plugins/) is actually in the python lookup path, according to line /usr/local/lib/python2.7/dist-packages of your output. Maybe it is a Zim bug? I'll have to assemble an Ubuntu VM and make some tests... Also, it's possible that building a .deb and installing in the dist-wide prefix (/usr/lib/python2.7/dist-packages) will work. I'll not be able to do that in a while, though.

@sojusnik
Copy link
Author

sojusnik commented Nov 6, 2015

Same situation with your latest version of Zimsearch on Ubuntu Gnome 15.10 and Zim 0.65. Only after manually copying gnomeshellsearch.py to /home/sojusnik/.local/share/zim/plugins/ your plugin appears in the plugins list of Zim and therefore can be enabled.

BTW, if "search all notebooks, instead of only the default" is disabled in the plugin's settings, then the notebook name in the Gnome Shell overview (marked with an "#") should be hidden. This would make the results easier to read. Apart from that your plugin feels snappy. Keep up your great work!

@sojusnik
Copy link
Author

sojusnik commented Aug 4, 2016

Having again problems installing your plugin on Ubuntu 16.04:

Launching Zim with "zim -D" in the terminal shows:

…
ERROR: Could not load plugin gnomeshellsearch
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zim/gui/preferencesdialog.py", line 328, in __init__
    klass = self.plugins.get_plugin_class(key)
  File "/usr/lib/python2.7/dist-packages/zim/plugins/__init__.py", line 211, in get_plugin_class
    mod = get_module(modname)
  File "/usr/lib/python2.7/dist-packages/zim/utils.py", line 33, in get_module
    mod = __import__(name)
  File "/home/sojusnik/.local/share/zim/plugins/gnomeshellsearch.py", line 53, in <module>
    import dbus.service
ImportError: No module named dbus.service

Installation process:

sojusnik@mir:~$ cd /home/sojusnik/Downloads/zimsearch-master/
sojusnik@mir:~/Downloads/zimsearch-master$ chmod +x autogen.sh
sojusnik@mir:~/Downloads/zimsearch-master$ sh ./autogen.sh
configure.ac:5: installing 'config/install-sh'
configure.ac:7: installing 'config/missing'
Makefile.am:3: installing 'config/py-compile'
sojusnik@mir:~/Downloads/zimsearch-master$ PYTHON=/usr/bin/python ./configurechecking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether /usr/bin/python version is >= 2.7... yes
checking for /usr/bin/python version... 2.7
checking for /usr/bin/python platform... linux2
checking for /usr/bin/python script directory... ${prefix}/lib/python2.7/dist-packages
checking for /usr/bin/python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
sojusnik@mir:~/Downloads/zimsearch-master$ make
make: Für das Ziel „all“ ist nichts zu tun.
sojusnik@mir:~/Downloads/zimsearch-master$ sudo make install
[sudo] Passwort für sojusnik: 
make[1]: Verzeichnis „/home/sojusnik/Downloads/zimsearch-master“ wird betreten
make[1]: Für das Ziel „install-exec-am“ ist nichts zu tun.
 /bin/mkdir -p '/usr/local/share/dbus-1/services/'
 /usr/bin/install -c -m 644 data/zim.plugins.gnomeshellsearch.provider.service '/usr/local/share/dbus-1/services/'
 /bin/mkdir -p '/usr/local/share/gnome-shell/search-providers/'
 /usr/bin/install -c -m 644 data/zim.plugins.gnomeshellsearch.provider.ini '/usr/local/share/gnome-shell/search-providers/'
 /bin/mkdir -p '/usr/local/lib/python2.7/dist-packages/zim/plugins/'
 /usr/bin/install -c -m 644 src/gnomeshellsearch.py '/usr/local/lib/python2.7/dist-packages/zim/plugins/'
Byte-compiling python modules...
gnomeshellsearch.py
Byte-compiling python modules (optimized versions) ...
gnomeshellsearch.py
make[1]: Verzeichnis „/home/sojusnik/Downloads/zimsearch-master“ wird verlassen
sojusnik@mir:~/Downloads/zimsearch-master$ PYTHON=/usr/bin/python2.7 ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether /usr/bin/python2.7 version is >= 2.7... yes
checking for /usr/bin/python2.7 version... 2.7
checking for /usr/bin/python2.7 platform... linux2
checking for /usr/bin/python2.7 script directory... ${prefix}/lib/python2.7/dist-packages
checking for /usr/bin/python2.7 extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
sojusnik@mir:~/Downloads/zimsearch-master$ sudo make installmake[1]: Verzeichnis „/home/sojusnik/Downloads/zimsearch-master“ wird betreten
make[1]: Für das Ziel „install-exec-am“ ist nichts zu tun.
 /bin/mkdir -p '/usr/local/share/dbus-1/services/'
 /usr/bin/install -c -m 644 data/zim.plugins.gnomeshellsearch.provider.service '/usr/local/share/dbus-1/services/'
 /bin/mkdir -p '/usr/local/share/gnome-shell/search-providers/'
 /usr/bin/install -c -m 644 data/zim.plugins.gnomeshellsearch.provider.ini '/usr/local/share/gnome-shell/search-providers/'
 /bin/mkdir -p '/usr/local/lib/python2.7/dist-packages/zim/plugins/'
 /usr/bin/install -c -m 644 src/gnomeshellsearch.py '/usr/local/lib/python2.7/dist-packages/zim/plugins/'
Byte-compiling python modules...
gnomeshellsearch.py
Byte-compiling python modules (optimized versions) ...
gnomeshellsearch.py
make[1]: Verzeichnis „/home/sojusnik/Downloads/zimsearch-master“ wird verlassen
sojusnik@mir:~/Downloads/zimsearch-master$ 

I've manually copied /zimsearch-master/src/gnomeshellsearch.py to /home/sojusnik/.local/share/zim/plugins/gnomeshellsearch.py.

Any ideas how to fix this?

@dsboger-zz
Copy link
Contributor

I'm not sure, but it seems that the extension is not finding dbus-python. Could you please make sure you have the package python-dbus installed? Thanks for reporting!

@sojusnik
Copy link
Author

sojusnik commented Aug 7, 2016

Installing python-dbus helped, thanks!

Although I've deleted the manually copiedgnomeshellsearch.py from ~/.local/share/zim/plugins/, it has also gone from the plugin's list in Zim, your plugin still works fine. Would be great though to have it back in the plugin's list, to adjust the settings.

@sojusnik
Copy link
Author

sojusnik commented Aug 7, 2016

False alarm!

After restarting the system, I've realized, that gnomeshellsearch.py has to be in ~/.local/share/zim/plugins/ in order to work properly.

@sojusnik sojusnik changed the title Installation problems on Ubuntu 15.04 Installation problems on Ubuntu Aug 7, 2016
@achadwick
Copy link
Owner

Great plugin here. Seems to work really well for me, after some coaxing. Thanks, @dsboger!

The trick is to not install as a Python module if the prefix is something other than where your Zim got installed to. Seems that your plugin module will get shadowed by the plugin package shipping with Zim, at least on my Debian testing/unstable system 😄

The two commits in #6 should address the installation issues. Sadly we can't do the entire install into a user's home - the .service file still needs to be where DBus can see it.

I took the liberty of changing to distutils, because that actually handles data files quite well. Though that absolute path stuff still needs careful handling.

@dsboger-zz
Copy link
Contributor

@achadwick Thanks for looking into this! Although I know python reasonably well I'm not familiar with system-wide installations, especially involving plugin handling like Zim does. Also I'm not having a lot of free time to spend learning it. I went with autotools because I'm more familiar with it, but it seems like it's not the best tool for the job. I'll have a look at your PRs as soon as possible.

@achadwick
Copy link
Owner

No problem. Whenever you're ready.

I've a few other tweaks in the pipeline, aiming at more nvpy-style serendipity. I'll try to construct sensible PRs for them so you can review them more easily.

@sojusnik
Copy link
Author

sojusnik commented Jan 4, 2017

@dsboger I'm back again :)

Now, on Ubuntu Gnome 16.10, the installation process went without errors, but your plugin isn't appearing in Zim's plugin list anymore. I've also tried to copy /usr/local/share/zim/plugins/gnomeshellsearch.py manually to ~/.local/share/zim/plugins/, but it didn't help either.

I've tried both commands:

sudo python2 ./setup.py install
sudo python ./setup.py install --prefix=/usr

with the following output:

sojusnik@mir:~/Downloads/zimsearch-master$ sudo python ./setup.py install --prefix=/usr
[sudo] Passwort für sojusnik: 
running install
running build
running build_scripts
running install_scripts
changing mode of /usr/bin/zim-gnomeshellsearch to 755
running install_data
expanding data/zim.plugins.gnomeshellsearch.provider.service.in -> /usr/share/dbus-1/services/zim.plugins.gnomeshellsearch.provider.service
expanding data/zim.plugins.gnomeshellsearch.provider.ini.in -> /usr/share/gnome-shell/search-providers/zim.plugins.gnomeshellsearch.provider.ini
running install_egg_info
Removing /usr/lib/python2.7/site-packages/zimsearch-0.0.0-py2.7.egg-info
Writing /usr/lib/python2.7/site-packages/zimsearch-0.0.0-py2.7.egg-info
sojusnik@mir:~/Downloads/zimsearch-master$ sudo python2 ./setup.py installrunning install
running build
running build_scripts
running install_scripts
changing mode of /usr/local/bin/zim-gnomeshellsearch to 755
running install_data
creating /usr/local/share/zim
creating /usr/local/share/zim/plugins
copying src/gnomeshellsearch.py -> /usr/local/share/zim/plugins
expanding data/zim.plugins.gnomeshellsearch.provider.service.in -> /usr/local/share/dbus-1/services/zim.plugins.gnomeshellsearch.provider.service
expanding data/zim.plugins.gnomeshellsearch.provider.ini.in -> /usr/local/share/gnome-shell/search-providers/zim.plugins.gnomeshellsearch.provider.ini
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/zimsearch-0.0.0.egg-info
Writing /usr/local/lib/python2.7/dist-packages/zimsearch-0.0.0.egg-info

As a result I have two "Zim Desktop Wiki" search plugins in Gnome Searchs' menu now.
How do I reverse those two installations, so that I can start from scratch?

Additionally, I've run a zim -D in the shell, when I've manually copied gnomeshellsearch.py to ~/.local/share/zim/plugins/ and got this:

sojusnik@mir:~$ zim -D
INFO: This is zim 0.65
DEBUG: Python version is sys.version_info(major=2, minor=7, micro=12, releaselevel='final', serial=0)
DEBUG: Platform is posix
DEBUG: No bzr version-info found
DEBUG: Not running from a source dir
DEBUG: Set XDG_DATA_HOME to /home/sojusnik/.local/share
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share/gnome>, <Dir: /usr/local/share>, <Dir: /usr/share>, <Dir: /var/lib/snapd/desktop>]
DEBUG: Set XDG_CONFIG_HOME to /home/sojusnik/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg/xdg-gnome>, <Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /home/sojusnik/.cache
DEBUG: Loading config from: <zim.notebook.VirtualFile object at 0x7f015a110250>
DEBUG: Loading config from: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/notebook.zim
DEBUG: Wrote /home/sojusnik/.config/zim/notebooks.list
INFO: Using default notebook: file:///home/sojusnik/Sonstiges/Zim%20Notebooks/Allgemeines
DEBUG: Wrote /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim/tmp
INFO: Remove file: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim/tmp
DEBUG: Loading config from: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/notebook.zim
DEBUG: Cache dir: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim
DEBUG: Index database file: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim/index.db
DEBUG: Remote call from 9671: <RemoteMethodCall: 9671: zim.ipc.Server(None).ping((), {})>
DEBUG: Starting server by spawning new process
INFO: Spawning: ['/usr/bin/zim', '--ipc-server-main', '/tmp/zim-sojusnik/zim-server-socket', '10'] (cwd: None)
DEBUG: Process started with PID: 9673
DEBUG: Remote call from 9671: <RemoteMethodCall: 9671: zim.ipc.Server(None).ping((), {})>
INFO: Server starting 9673 at /tmp/zim-sojusnik/zim-server-socket
DEBUG: Remote call from 9671: <RemoteMethodCall: 9671: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call returned to 9671: ('ACK', 9673)
DEBUG: Remote call from 9671: <RemoteMethodCall: 9671: zim.ipc.Server(None).has_object((<RemoteObject: zim.gui.GtkInterface(file:///home/sojusnik/Sonstiges/Zim%20Notebooks/Allgemeines)>,), {})>
DEBUG: Remote call returned to 9671: False
DEBUG: Remote call from 9671: <RemoteMethodCall: 9671: zim.ipc.Server(None).init_object((<RemoteObject: zim.gui.GtkInterface(file:///home/sojusnik/Sonstiges/Zim%20Notebooks/Allgemeines)>,), {})>
DEBUG: Registered object line
DEBUG: Wrote <UnixFile: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim/tmp>
INFO: Remove file: <UnixFile: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim/tmp>
DEBUG: Loading config from: <UnixFile: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/notebook.zim>
DEBUG: Cache dir: <Dir: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim>
DEBUG: Index database file: <UnixFile: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim/index.db>
DEBUG: Opening notebook: <zim.notebook.Notebook object at 0x7f78fe119490>
DEBUG: Loading config from: <ConfigFile: /home/sojusnik/.config/zim/preferences.conf>
DEBUG: Loading plugin: attachmentbrowser
DEBUG: Loading plugin: autocompletion
DEBUG: Loading plugin: bookmarksbar
DEBUG: Loading plugin: distractionfree
DEBUG: Loading plugin: insertsymbol
DEBUG: Loading plugin: linesorter
DEBUG: Loading plugin: linkmap
DEBUG: Loading plugin: printtobrowser
DEBUG: Loading plugin: spell
DEBUG: Loading plugin: tableeditor
DEBUG: Registered object table
DEBUG: Loading plugin: tableofcontents
DEBUG: Loading plugin: tags
DEBUG: Loading plugin: versioncontrol
DEBUG: Loading plugin: zim-mendeley-plugin-master
INFO: VCS detected: git - <Dir: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines>
DEBUG: Gtk version is (2, 24, 30)
DEBUG: Pygtk version is (2, 24, 0)
WARNING: Could not find all icon sizes for the application icon
DEBUG: Loading config from: <ConfigFile: /home/sojusnik/.config/zim/style.conf>
DEBUG: Loading config from: <UnixFile: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines/.zim/state.conf>
DEBUG: Child process started 9675 for <RemoteObject: zim.gui.GtkInterface(file:///home/sojusnik/Sonstiges/Zim%20Notebooks/Allgemeines)>
INFO: Starting async index update
DEBUG: Remote call returned to 9671: True
DEBUG: Remote call from 9671: <RemoteMethodCall: 9671: zim.gui.GtkInterface(file:///home/sojusnik/Sonstiges/Zim%20Notebooks/Allgemeines).present((), {'geometry': None, 'fullscreen': None, 'page': None})>
INFO: Running: ['git', 'status'] (cwd: /home/sojusnik/Sonstiges/Zim Notebooks/Allgemeines)
WARNING: fatal: bad object HEAD

DEBUG: No autosave version needed - no changes
DEBUG: Wrote <UnixFile: /home/sojusnik/.config/zim/preferences.conf>
DEBUG: Wrote <UnixFile: /home/sojusnik/.config/zim/preferences.conf>
DEBUG: Accelmap: /home/sojusnik/.config/zim/accelmap
INFO: Open page: <FileStorePage: Computer:Tweaks:Neuinstallation> (<HistoryPath: Computer:Tweaks:Neuinstallation>)
DEBUG: Remote call returned to 9671: None
DEBUG: NOTE FOR BUG REPORTS:
	At this point zim has send the command to open a notebook to a
	background process and the current process will now quit.
	If this is the end of your debug output it is probably not useful
	for bug reports. Please close all zim windows, quit the
	zim trayicon (if any), and try again.

sojusnik@mir:~$ INFO: Index update done
DEBUG: Action: show_preferences
ERROR: Could not load plugin gnomeshellsearch
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zim/gui/preferencesdialog.py", line 328, in __init__
    klass = self.plugins.get_plugin_class(key)
  File "/usr/lib/python2.7/dist-packages/zim/plugins/__init__.py", line 211, in get_plugin_class
    mod = get_module(modname)
  File "/usr/lib/python2.7/dist-packages/zim/utils.py", line 33, in get_module
    mod = __import__(name)
  File "/home/sojusnik/.local/share/zim/plugins/gnomeshellsearch.py", line 53, in <module>
    import dbus.service
ImportError: No module named dbus.service
DEBUG: Loading description for plugin: distractionfree
DEBUG: Opening dialog "Einstellungen - Zim"
DEBUG: Dialog response CANCEL
DEBUG: Wrote <UnixFile: /home/sojusnik/.config/zim/preferences.conf>
DEBUG: Closed dialog "Einstellungen"

Any ideas how to debug this?

Your help is very appreciated!

@dsboger-zz
Copy link
Contributor

@sojusnik I'm not developing zimsearch anymore, since I'm not using Zim and it dropped in my priority list. Maybe @achadwick might have some idea of what is happening, since he is the one who ported to python tools for installation. I'm happy to accept any pull requests.

@dsboger-zz dsboger-zz reopened this Jan 4, 2017
@sojusnik
Copy link
Author

sojusnik commented Jan 5, 2017

@dsboger That's a pity! Still all the best to your feature projects.

Let's hope that @achadwick will find some time to resolve this issue fingers crossed.

@achadwick
Copy link
Owner

@sojusnik Looks like you're missing python-dbus. Try installing that package and try again.

@sojusnik
Copy link
Author

sojusnik commented Jan 5, 2017

Indeed, that's the solution! Thank you @achadwick !

Because I've used both commands to install this extension

sudo python2 ./setup.py install
sudo python ./setup.py install --prefix=/usr

as a result I have two "Zim Desktop Wiki" search plugins in Gnome Searchs' menu now.

What's the proper way to remove one of them, i.e. uninstall one?

@sojusnik
Copy link
Author

@achadwick The installation process went well with the new Zim version on Ubuntu 17.04, but I'm getting no results in the Gnome Shell search anymore.

Could you have a quick look on that?

That's my installation routine:

sojusnik@mir:~$ cd /home/sojusnik/Downloads/zimsearch-master/
sojusnik@mir:~/Downloads/zimsearch-master$ sudo python2 ./setup.py install
[sudo] Passwort für sojusnik: 
running install
running build
running build_scripts
creating build
creating build/scripts-2.7
copying and adjusting zim-gnomeshellsearch -> build/scripts-2.7
changing mode of build/scripts-2.7/zim-gnomeshellsearch from 644 to 755
running install_scripts
copying build/scripts-2.7/zim-gnomeshellsearch -> /usr/local/bin
changing mode of /usr/local/bin/zim-gnomeshellsearch to 755
running install_data
creating /usr/local/share/zim
creating /usr/local/share/zim/plugins
copying src/gnomeshellsearch.py -> /usr/local/share/zim/plugins
creating /usr/local/share/dbus-1
creating /usr/local/share/dbus-1/services
expanding data/zim.plugins.gnomeshellsearch.provider.service.in -> /usr/local/share/dbus-1/services/zim.plugins.gnomeshellsearch.provider.service
creating /usr/local/share/gnome-shell
creating /usr/local/share/gnome-shell/search-providers
expanding data/zim.plugins.gnomeshellsearch.provider.ini.in -> /usr/local/share/gnome-shell/search-providers/zim.plugins.gnomeshellsearch.provider.ini
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/zimsearch-0.0.0.egg-info

Installed python-dbus manually before.
I again had to move gnomeshellsearch.py from /usr/local/share/zim/plugins to ~/.local/share/zim/plugins/gnomeshellsearch.py to see it in Zim's plugin list.

@sojusnik
Copy link
Author

@achadwick Are you still using Zim? Your help is very appreciated on this matter.

@achadwick
Copy link
Owner

@sojusnik
Yes, zim is awesome!

You will have to clean up the files manually. There's no way of uninstalling with plain setuptools/distutils.

The Proper Way To Do It™ these days is by using pip install ., but you'll find that doesn't work well because this project uses distutils (and you have old files which you need to clean up on your own). This is awkward, because pip+setuptools doesn't like data_files for utterly ridiculous reasons. I made a workaround for a nautilus terminal extension a while back (flozz/nautilus-terminal#1), but that approach may need some more cunning to be added to setup.py.

I've been adding some cunning stuff to zimsearch, like the ability to create new pages from the GNOME search so you go Meta Title of my new note page Return. Maybe it's time for me to adopt this project properly. Please keep bugging me about it ☺

@dsboger-zz
Copy link
Contributor

@achadwick I'd be willing to transfer this repo to you whenever you are ready. I've never transferred a repo before, but it seems like a simple process. The only catch seems to be that you cannot have a fork of it. You could send pull requests with your changes, then after I merge them you can remove your fork so I can initiate the transfer.

@sojusnik
Copy link
Author

@achadwick Thanks for reacting fast!

Since the new 0.66 release of Zim, this great plugin stopped working for me:

The installation process went well with the new Zim version on Ubuntu 17.04, but I'm getting no results in the Gnome Shell search anymore.

Could you have a quick look on that?

Do you observe the same? And maybe already found a solution?

@sojusnik
Copy link
Author

sojusnik commented Jun 6, 2017

@achadwick

Please keep bugging me about it ☺

bug 🐛 bug 😄

@achadwick
Copy link
Owner

@dsboger
Okay, I've bundled my new features into #9. Can you have a look at it and consider merging please? Once it's merged, I'll blow away my fork ready for you to do the transfer.

(It's working fine with Zim 0.65)

@dsboger-zz
Copy link
Contributor

@achadwick #9 is merged. Ping me again after you fork is deleted.

@achadwick
Copy link
Owner

@dsboger Done! You should be able to transfer ownership now. Let me know if you need anything from me.

@achadwick
Copy link
Owner

Okay, I had to click a link in email. It's appearing in my namespace now. Thanks!

@dsboger-zz
Copy link
Contributor

@achadwick Thank you too!

achadwick added a commit that referenced this issue Jun 9, 2017
Kind of a test commit, but I also want to make the README a bit prettier.

Per #2 (comment),
I'm adopting this project. Thanks for your good maintainership and
original work, @dsboger! I'll try and take good care of Zimsearch.
@achadwick
Copy link
Owner

Okay, let's get this old issue closed out.

@sojusnik Please update, and try again. Try the instructions in the updated Installation Guide. If that doesn't work, please paste the output of

find "$HOME" -iname '*zim*search*' -ls
find /usr -iname '*zim*search*' -ls

You may need to manually remove those files and try again. A working install now looks like:

 25837576      4 drwxr-sr-x   2 andrewc  staff        4096 Jun 14 00:09 /usr/local/lib/python2.7/dist-packages/zimsearch-0.0.1.egg-info
 25952649      4 -rw-r--r--   1 andrewc  staff         180 Jun 14 00:09 /usr/local/share/gnome-shell/search-providers/zim.plugins.gnomeshellsearch.provider.ini
 25952376      4 -rw-r--r--   1 andrewc  staff         114 Jun 14 00:09 /usr/local/share/dbus-1/services/zim.plugins.gnomeshellsearch.provider.service
 25428050      4 -rwxr-xr-x   1 andrewc  staff         444 Jun 14 00:09 /usr/local/bin/zim-gnomeshellsearch

Also, you need to log out and back in again to get Zimsearch working, unless you're very careful about killing off old zim IPC server processes and cleaning up the server socket directory.

@achadwick
Copy link
Owner

Should be fixed now with the latest revision on master, even if you were having permissions issues.

You will need to to an upgrade as described in https://github.com/achadwick/zimsearch/blob/master/INSTALL.md#updating-zimsearch

Note that --system isn't supported everywhere - it's notably lacking in Ubuntu 17.04. I'll tweak the docs shortly to reflect that - we'll have to start recommending sudo now, sigh.

@sojusnik
Copy link
Author

The installation process is much easier now, thank you!

Are you sure, that your updated version is compatible with the 0.67-rc2 version of Zim, that was released recently?

I've followed your instructions, the installation process went well, but don't get any results in the Gnome-Shell. Of course I've enabled both the Gnome-Shell search plugin and the Zim one. Restarted, but without any effect. Happens with Ubuntu Gnome 17.04.

All files seem to be on their place:

$ find /usr -iname '*zim*search*' -ls
  5773136      4 -rwxr-xr-x   1 root     root          444 Jun 15 19:38 /usr/local/bin/zim-gnomeshellsearch
  5799999      4 drwxr-sr-x   2 root     staff        4096 Jun 15 19:38 /usr/local/lib/python2.7/dist-packages/zimsearch-0.0.1.egg-info
  5773131      4 -rw-r--r--   1 root     root          180 Jun 15 19:38 /usr/local/share/gnome-shell/search-providers/zim.plugins.gnomeshellsearch.provider.ini
  5773130      4 -rw-r--r--   1 root     root          114 Jun 15 19:38 /usr/local/share/dbus-1/services/zim.plugins.gnomeshellsearch.provider.service
  5799972      4 drwxr-xr-x   5 root     root         4096 Jun 15 19:38 /usr/local/src/zimsearch
  5773124      4 -rw-r--r--   1 root     root          121 Jun 15 19:38 /usr/local/src/zimsearch/data/zim.plugins.gnomeshellsearch.provider.service.in
  5773123      4 -rw-r--r--   1 root     root          180 Jun 15 19:38 /usr/local/src/zimsearch/data/zim.plugins.gnomeshellsearch.provider.ini.in
  5773128      4 -rwxr-xr-x   1 root     root          449 Jun 15 19:38 /usr/local/src/zimsearch/zim-gnomeshellsearch

@achadwick
Copy link
Owner

@sojusnik
This is a different error. Please report it separately.

@sojusnik
Copy link
Author

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants