logkeys icon indicating copy to clipboard operation
logkeys copied to clipboard

Logging routinely stops

Open ReDressCodes opened this issue 5 years ago • 2 comments

I am witnessing a strange bug where logkeys routinely stops logging.

This time round, I managed to spot logkeys not logging while it was supposed to be logging. In fact, from the log file, it looks like logkeys was logging just a few minutes ago but strangely stopped.

I have a systemd unit file which I use for starting and stopping logkeys. The file looks as below.

[Unit]
Description=Keylogger daemon

[Service]
Type=forking
GuessMainPID=yes
ExecStart=/usr/local/bin/logkeys --start 
ExecStop=/usr/local/bin/logkeys --kill
     
[Install]
WantedBy=multi-user.target

and logkeys does start logging but will routinely stop logging while the process is still running.

Any ideas where debugging this should start?

ReDressCodes avatar Jun 10 '19 22:06 ReDressCodes

A little late, but for the future:

What I managed to solve was to use cron. Just by adding my full command as:

$ crontab -e
...
#* * * * * cmd
@reboot /usr/local/bin/logkeys --start

It just started logging to /var/log/logkeys.log once the reboot happened.

MarAvFe avatar Nov 14 '19 03:11 MarAvFe

Nice hack, @MarAvFe . For non us keymaps, you'll need to precise --keymap, for it might not be properly detected during you cronjob

@reboot logkeys --start --output=/home/zar3bski/Téléchargements/keys.log --device=/dev/input/event4 --keymap /path/to/keymaps/fr.map

zar3bski avatar Apr 03 '22 06:04 zar3bski