input-remapper icon indicating copy to clipboard operation
input-remapper copied to clipboard

allow autoload command to execute if `config_dir` is provided

Open tmclane opened this issue 3 years ago • 3 comments

I have a Linux machine that does not show any logged in users with the who command even when I am using the machine. It is perhaps a specialized use-case but I don't see why you need a logged in user in order to activate the mapping IF a config directory has been provided which contains the relevant configuration for key-mapper.

The machine in question is a JingPad A1.

tmclane@JingOS:/media/tmclane/data/key-mapper$ who
tmclane@JingOS:/media/tmclane/data/key-mapper$ whoami
tmclane

tmclane avatar Nov 30 '21 04:11 tmclane

You are absolutely right!

But that won't fix autoloading at login (data/key-mapper-autoload.desktop) or device plugging (data/99-key-mapper.rules) on your system. An alternative to who would be a check if the system booted up completely, until that happened it should ignore calls from udev. Any ideas?

sezanzeb avatar Nov 30 '21 05:11 sezanzeb

I have pushed a change to main that uses systemd-analyze, does that work for you?

sezanzeb avatar Dec 07 '21 07:12 sezanzeb

Let me give your changes a try.

FYI: I found another solution which was to put a script in: /usr/lib/pm-utils/sleep.d that calls the key-mapper-control command on sleep / wake to disable and reenable it.

Specifically this one: https://github.com/tmclane/jingpad/blob/main/99_jingpad_wakeup

tmclane avatar Dec 07 '21 14:12 tmclane

I think this can be closed, the change with systemd-analyze probably fixed this

sezanzeb avatar Oct 23 '22 17:10 sezanzeb