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
/usr/local/lib/python2.7/dist-packages/autokey/gtkui/notifier.py:19: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gdk, Notify
/usr/local/lib/python2.7/dist-packages/autokey/gtkui/notifier.py:28: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
from gi.repository import AppIndicator3
/usr/local/lib/python2.7/dist-packages/autokey/gtkui/configwindow.py:20: PyGIWarning: GtkSource was imported without specifying a version first. Use gi.require_version('GtkSource', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Pango, GtkSource, Gdk, Gio
Any help would be greatly appreciated!
Note: The PPA is no longer current. See the edit below for current instructions.
The install from the PPA for 18.04 should "just work" TM. ;)
That's where I installed mine from recently (before I switched to a newer version that isn't in the PPA yet.) I'm running kubuntu 18.04 which is essentially the same as your environment - except with KDE.
However, that's not where you got yours (even though you were probably trying to.)
The current version is based on Python3 and those messages show Python2.7. That means you have a much older version.
Since, you are installing for the first time, you don't have to worry about saving your phrases and scripts because you don't have any yet.
For others who find this later, be sure to copy everything - including hidden files under
to another location before following these steps.That's where all your phrases and scripts are stored by default and purging AutoKey will erase them. You don't want that to happen!
After a successful (re)install, you can copy them back where they were before under
$HOME/.config/autokey/data
being sure to copy the hidden files too.Scripts and phrases stored outside of the autokey directory sub-tree will not be affected by a purge, but you may have to convince AutoKey to look at them again by adding empty folders with the correct paths/names to AutoKey and then putting the scripts and phrases back in those folders. Hopefully this will be corrected soon.
The first thing to do is open a terminal and uninstall AutoKey completely.
I'm including both front ends because you mention you tried them both. Usually you just install the one that best matches your environment and that pulls in the common package automatically.
Next, you install our 18.04 PPA and update your package lists. After you install a new software source like a PPA, your system has to update its package indexes or it still won't see the newer version(s) which the PPA or other source provides.
(I just tried this on my system and it doesn't seem to hurt anything if you run it when the PPA is already installed.)
Next, install AutoKey.
If you want to, you can also install
autokey-qt
in the same command, but it's really not necessary and will pull in a ton of QT libraries which you don't need unless you need other QT applications anyway.Swap the two front ends in the above command and paragraph if you prefer the QT version.
The two versions are almost identical, but since they're different code bases, they occasionally show small differences and different bugs. Installing either of them will cause
autokey-common
to be installed as a dependency. That's the code that does all the actual work and both front ends use the same version.Once this is done, you should have an entry for AutoKey in your program launcher. In KDE, it's in the Utilities section. It should be somewhere similar under Gnome or in whatever desktop environment you are running. If you don't immediately find it, then try searching for it if your Launcher supports that function.
Because you've had difficulties in the recent past, we're going to launch AutoKey from a terminal the first time to see if there are any error messages which would be invisible in the GUI.
In the terminal type
If all goes well, there may be a few messages or nothing followed by something like
That's AutoKey's process ID (pid). It will be a different number every time. It shows up because we ended the command with an ampersand which causes AutoKey to be launched in the background. This way it won't tie up your terminal. You'll be able to type other commands if you want to.
If all went well, you should see an
A
icon in your panel. That tells you AutoKey is running and lets you access several of its functions.Now, left click on the
A
icon in your panel. This should launch the AutoKey Main window.In AutoKey's main window, left click on
Help
on the top menu bar and then selectAutoKey
. This will launch a pop-up window which displays the AutoKey version and says whether you're running the GTK or QT front end.The version you should now see should be
0.95.1
or greater.Close the pop-up and open another application like a text editor (
gedit
is probably installed on your system). We'll use this as a safe place to expand some sample phrases to make sure everything is working correctly. Try to size and position both windows so you can see them both at the same time.On the left side of the main AutoKey window, you should see a panel titled
Name
. AutoKey comes with sample scripts and phrases preinstalled. They're listed in this panel in a file tree.I deleted my samples long ago, so I'm going from memory for this part.
You should see a folder named
Sample Phrases
click on it to see the sample phrases. Pick one (no clicking for this) and scroll the pane to the left.The next two columns should become visible. These list the trigger phrase and hotkey which is associated with that phrase (not all will have both). Note what the hotkey is for the phrase you picked, Pick a different phrase if the one you picked doesn't have a hotkey assigned.
Click somewhere in the edit space of the text editor (the place where you would type the code or text of a document) then press the hotkey combination that was listed with your phrase. The text of the phrase should now appear as text in the edit window.
Do the same thing again, but this time type the trigger phrase for your phrase or another one and then type a white space character such as space, tab, or Enter. The text of the associated phrase should now appear as text in the edit window.
If you get this far, everything works and you can start exploring all AutoKey's other features and capabilities. (We're done.)
If it doesn't work, then we have to take it step by step, doing things in a terminal so we can see if anything complains along the way.
We could do that here, but it's not really Q&A material, so it would probably be better if you come on over to our email support list and I or someone else can take you through it.
AutoKey is kind of like the TV remote control. When it was new (I've been around awhile ;) ), people didn't think they'd ever need it for anything. Now people get divorced over who gets to use it!
Once you get used to it, it will be hard to do without it.
Edit ----------------
The above PPA is very old now and we do not have access to update it, so please follow our installation instructions.
If you have any issues or questions, we're happy to help on our support list.