AlessioDP / kpmenu

Dmenu/rofi interface for KeePass
MIT License
28 stars 5 forks source link

kpmenu has troubles daemonizing #2

Closed thornycrackers closed 5 years ago

thornycrackers commented 5 years ago

First off, this is an awesome little application! Works awesome! There are a couple I noticed that could be updated to make kpmenu work smoothly with daemonizing:

[Service] ExecStart=/usr/bin/kpmenu Restart=always Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/thorny/.Xauthority StandardOutput=syslog StandardError=syslog

[Install] WantedBy=default.target


it will run for about a minute and then I think the process dies, not sure if I'm missing something for the tool in the service file or it's my system.
AlessioDP commented 5 years ago

Hi, thank you for the idea.

Right now, the daemon starts only after password prompt, this to daemonize only an 'unlocked' instance of kpmenu, anyway I like the idea that you can start before the daemon so I will implement these :)

AlessioDP commented 5 years ago

I have implemented a daemon option, you can start it with kpmenu --daemon. It won't be stopped by normal user input, like a wrong password. It can be stopped if you kill it or something goes wrong with client-server communication.

What do you think about that?

thornycrackers commented 5 years ago

Wow! Thank you for the quick turnaround. I just compiled the latest version and updated the service file and this works perfectly now :+1: Thanks so much!

AlessioDP commented 5 years ago

Perfect :) Is working good as systemd service too?

thornycrackers commented 5 years ago

Yup. I've been using it all morning so far and haven't had any issues. All I changed from the above example was adding --daemon to the command.

AlessioDP commented 5 years ago

Good, I will release it soon :)