I'm hoping someone can help me in trying to run AutoKey on Fedora 10.
As suggested in another post in this group, I did the following:
As root...
1. Download and expand "autokey-gtk_0.61.1.tar.gz"
2. python setup.py install (didn't show any errors)
3. cp debian/autokey-gtk.init /etc/init.d/autokey
4. chmod a+x /etc/init.d/autokey
5. chkconfig --add autokey
6. service autokey start
The "service autokey start" command resulted in these messages:
Traceback (most recent call last):
File "/etc/init.d/autokey", line 16, in <module>
from autokey.interface import DOMAIN_SOCKET_PATH, PACKET_SIZE
File "/usr/lib/python2.5/site-packages/autokey/interface.py", line
38, in <module>
import gtk
File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py",
line 79, in <module>
_init()
File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py",
line 67, in _init
_gtk.init_check()
RuntimeError: could not open display
From a little searching on that message, I got the impression that it
might be related to the DISPLAY variable, which on my system is ":
0.0".
Can anyone give me a hint as to what the problem is, or what debugging
steps I should try next? By the way, my system does normally run an
older version of AutoKey (0.50.0), which is apparently of an older
architecture in that it doesn't use any "/etc/rc.d/init.d" mechanism
like the new one does. (And I did shut the old one down before trying
to start the new version.)
Thanks,
Jim
2009/12/19 JDA <jim.a...@gmail.com>:
Thanks.
On Dec 18, 11:52 pm, Chris Dekter <cdek...@gmail.com> wrote:
> Are you running the service command from a remote ssh terminal or a
> console with no X server attached? That would cause this symptom.
>
> 2009/12/19 JDA <jim.adam...@gmail.com>:
Start AutoKey at the command line with this:
autokey -l
That's a lowercase L. That will show you the debug logging messages
while it runs.
Derek
So the fix for this was to modify the "/etc/rc.d/init.d/autokey"
startup script. Near the beginning of that script are these
statements:
import sys, os, socket, glob, shutil, time
from autokey import evdev, daemon
from autokey.interface import DOMAIN_SOCKET_PATH, PACKET_SIZE
I inserted an additional statement, so these statements now look like
this:
import sys, os, socket, glob, shutil, time
from autokey import evdev, daemon
os.environ["DISPLAY"]=":0.0"
from autokey.interface import DOMAIN_SOCKET_PATH, PACKET_SIZE
The new "os.environ" statement must precede the last statement.
There is probably a more elegant solution to this problem, but at
least this workaround gets AutoKey working.
Thanks for your help!
Jim