-1

I am relatively new to Linux/Ubuntu (so please take it easy on me) and I am trying to install Autokey to use the text expansion functionality. I have tried installing it from the instructions on the Github page here - https://github.com/autokey/autokey#installation

However, no matter whether I follow the installation process under the Ubuntu/Mint/Debian section or the instructions to install via pip I cannot seem to get the program working.

The installation seems to be successful (running a 'which' command gives the path installed) but clicking on the icon does not launch the program.

I have also tried to install directly from Ubuntu/GNOME software manager but that also will not launch the program once installed.

I have tried installing both the GTK and QT frontends and neither will launch. I don't get an error message or anything. I have opened up the System Monitor to see if a process even appears (however briefly) and there's nothing.

Typing autokey-gtk into Terminal gives:

    /usr/local/lib/python2.7/dist-packages/autokey/gtkapp.py:24: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, Gdk, GObject, GLib
Traceback (most recent call last):
  File "/usr/local/bin/autokey-gtk", line 20, in <module>
    from autokey.gtkapp import Application
  File "/usr/local/lib/python2.7/dist-packages/autokey/gtkapp.py", line 28, in <module>
    import service, monitor
  File "/usr/local/lib/python2.7/dist-packages/autokey/service.py", line 21, in <module>
    from iomediator import Key, IoMediator
  File "/usr/local/lib/python2.7/dist-packages/autokey/iomediator.py", line 107, in <module>
    from interface import *
  File "/usr/local/lib/python2.7/dist-packages/autokey/interface.py", line 29, in <module>
    from Xlib import X, XK, display, error
ImportError: No module named Xlib

Can anyone please help? Thank you.

Ian J
  • 1
  • I'm voting to close this question as off-topic because it would be more appropriate for [Ask Ubuntu](https://askubuntu.com). – Ken Y-N Dec 12 '18 at 23:27
  • My guess is that this may be an issue with dependencies? but I seem to have all of the ones needed installed as far as Python. Pip gives a different error when I try to install that way and if anyone is interested in that I can paste here too. Thank you. – Ian J Dec 12 '18 at 23:27
  • @KenY-N My bad. Can I easily cross-post it to that location? – Ian J Dec 12 '18 at 23:28
  • Just copy the whole post and repost it over there. I've found that site helpful for detailed issues like this. – Ken Y-N Dec 12 '18 at 23:33
  • I found this question over there which is pretty much the same as mine and it is getting no love. Worse, I can't even comment to *bump* it or anything since I don't have the reputation needed. I guess I'm just hosed perhaps.. https://askubuntu.com/questions/989945/cant-get-autokey-to-work – Ian J Dec 13 '18 at 00:03
  • Have you done `pip install python-xlib`? – Ken Y-N Dec 13 '18 at 02:22
  • 1
    @KenY-N - Somehow the problem resolved itself and the app launched after a restart. Still not sure the issue. Thanks for the help though. – Ian J Dec 15 '18 at 06:04

2 Answers2

1

I am a newbie too and installed Autokey 0.90.4, which did not work for me either. Someone suggested I try 0.95.1 because the other version is 7 years old. I installed the new version with some acrobatics from the Autokey Github page, using the PIP method. At 1st it did not work, but after doing import setuptools it did. That might be a coincidence since it was after installation of the Ak package itself.

I know this sounds convoluted, but I am not familiar (yet?) with Linux. Anyway 0.95 works for me.

Klaas Vaak
  • 21
  • 3
0

install module python-xlib and it will work, like this: On Deb:

apt install python3-xlib

You might later need python autokey module as well:

pip install autokey