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

Autokey 0.94.1 "Automatically start AutoKey at login" not working. #149

Closed
BiNh0X opened this issue May 22, 2018 · 11 comments
Closed

Autokey 0.94.1 "Automatically start AutoKey at login" not working. #149

BiNh0X opened this issue May 22, 2018 · 11 comments

Comments

@BiNh0X
Copy link

BiNh0X commented May 22, 2018

System
Ubuntu MATE 18.04 LTS

Autokey 0.94.1 "Automatically start AutoKey at login" not working.

"Automatically start AutoKey at login" checkbox not save state on clicking in "OK" button.
captura de tela em 2018-05-22 13-54-27

@sporkwitch
Copy link
Contributor

sporkwitch commented May 22, 2018

CNR
Kubuntu 18.04 LTS
Autokey 0.94.1-0ubuntu3

Try uninstalling and reinstalling. Also verify ~/.config/autokey and its contents are writeable

@BiNh0X
Copy link
Author

BiNh0X commented May 22, 2018

It does not work and ~/.config/autokey is writable. All configuration options save, except for automatic login initialization.

@sporkwitch
Copy link
Contributor

PPA or built it yourself?

@BiNh0X
Copy link
Author

BiNh0X commented May 22, 2018

PPA.

@sporkwitch
Copy link
Contributor

I'll try to spin up a VM later and see if i can reproduce.

@BiNh0X
Copy link
Author

BiNh0X commented May 23, 2018

Dear,

After I installed XDM and this one goes to automatic startup, AutoKey has now accepted to save the state "Automatically start AutoKey at login" checkbox. What is it?
EDIT.: This is a new system installation.

1
2

@AdamPS
Copy link

AdamPS commented Aug 8, 2018

I have the same problem on Ubuntu 18.04 (vanilla - not mate or kubuntu).

autokey-gtk 0.95.1

Is there any more information that we can provide to help? Thanks

@luziferius
Copy link
Collaborator

luziferius commented Aug 9, 2018

Try to create the ~/.config/autostart folder. I suspect that it is missing on your system.
This directory is used by the desktop environment. During startup, it reads all .desktop files in there and executes them.

The current implementation does not check if the directory exists and then even completely silences the error messages to make sure you don’t know why it fails… 🥇 👎

Here, it checks if the file exists, and if not, creates it. This fails, if the parent directory is missing.

if self.autoStartCheckbox.get_active():
if not os.path.exists(AUTOSTART_FILE):
try:
inFile = open(DESKTOP_FILE, 'r')
outFile = open(AUTOSTART_FILE, 'w')
contents = inFile.read()
contents = contents.replace(" -c\n", "\n")
outFile.write(contents)
inFile.close()
outFile.close()
except:
pass

Fixing this should be pretty easy and will (probably) go into 0.95.3.

@AdamPS
Copy link

AdamPS commented Aug 9, 2018

Great, thanks @luziferius, creating that directory fixed it.

This also explains @BiNh0X situation where installing XDM fixed it - presumably that app created the autostart directory.

@luziferius
Copy link
Collaborator

I’ve rewritten the autostart handling. Fixed it in 0420250 and added a user data migration task in 4334f8d

@AdamPS
Copy link

AdamPS commented Aug 10, 2018 via email

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

No branches or pull requests

4 participants