houmain / keymapper

A cross-platform context-aware key remapper.
GNU General Public License v3.0
257 stars 21 forks source link

No Joy #132

Closed QueenCityNerd closed 2 months ago

QueenCityNerd commented 2 months ago

I'm following the instructions for install on my Mint 20.3 system and even get a pop up telling me there is an older version available in the software center yet after installation nothing runs. I don't see any additions to my applications in the GUI and I'm not sure where in the system it's being installed to look in the terminal. Are there compatibility issues with Una? What's doing? I'd really like to use the software to make a cording keyboard here and feel like I'm hitting a wall.

ristomatti commented 2 months ago

and even get a pop up telling me there is an older version available in the software center

I'm running Linux Mint 20 (both use packages from Ubuntu Focal) and had the same issue. Keymapper's package name conflicts with this one on the main repository: https://packages.ubuntu.com/focal/keymapper. The packaga manager mixes them up. I don't remember how I fixed the issue out of the bat, but I'll try to dig it up.

I don't see any additions to my applications in the GUI and I'm not sure where in the system it's being installed to look in the terminal.

Keymapper's daemon (keymapperd) runs as a systemd service and needs to be manually enabled. Follow instructions on the readme https://github.com/houmain/keymapper?tab=readme-ov-file#linux. keymapper which reads the config file and communicates with keymapperd should start when logging in.

Since version 4.1 it has a tray icon, so you can easily tell if it's running or not.

ristomatti commented 2 months ago

Did you install keymapper from the APT repository or from the .deb package on the GitHub releases page? If you installed it with apt install keymapper, then you have installed the wrong app. You can try installing the release package (https://github.com/houmain/keymapper/releases/download/4.1.1/keymapper-4.1.1-Linux.deb) by downloading it and installing it from the terminal:

sudo apt install ./keymapper-4.1.1-Linux.deb

However, if I remember correctly APT refused to install it due to a mismatch or a missing library. I have been building from source and creating a compatible .deb package from it.

In case you run into this issue and dare to install a binary package from a "random guy", I can share a link to it. Or alternatively, if you want to build it yourself I can give some hints on how to do that.

ristomatti commented 2 months ago

I figured out how I fixed the nagging about an older version available. Open Update Manager and select Edit > Preferences.

image

From the preferences, add package keymapper on the blacklist:

image

This will prevent APT from nagging or trying to replace this keymapper.

QueenCityNerd commented 2 months ago

Did you install keymapper from the APT repository or from the .deb package on the GitHub releases page? If you installed it with apt install keymapper, then you have installed the wrong app. You can try installing the release package (https://github.com/houmain/keymapper/releases/download/4.1.1/keymapper-4.1.1-Linux.deb) by downloading it and installing it from the terminal:

sudo apt install ./keymapper-4.1.1-Linux.deb

However, if I remember correctly APT refused to install it due to a mismatch or a missing library. I have been building from source and creating a compatible .deb package from it.

In case you run into this issue and dare to install a binary package from a "random guy", I can share a link to it. Or alternatively, if you want to build it yourself I can give some hints on how to do that.

I got it from here: https://github.com/houmain/keymapper/releases/tag/4.1.1

Trying you're suggestion for terminal install I was greeted with : malachi@malachi-HP-Compaq-Elite-8300-USDT:~$ sudo apt install ./keymapper-4.1.1-Linux.deb [sudo] password for malachi:
Reading package lists... Done E: Unsupported file ./keymapper-4.1.1-Linux.deb given on commandline

It's funny, my brother-in-law maintained that he' start using Linux when making the smallest changes wasn't a research project! I can't say I've ever poured so much in to trying to do so little with Linux in the many years I've been running it thus far! ;-P

ristomatti commented 2 months ago

I found out how you can do it from the command line as well.

First, check if you've already got some packages backlisted:

gsettings get com.linuxmint.updates blacklisted-package

If nothing was listed, you can blacklist the conflicting package with:

gsettings set com.linuxmint.updates blacklisted-package "['keymapper']"

In the case there's existing packages like I had, add 'keymapper' to the list.

Example:

$ gsettings get com.linuxmint.updates blacklisted-packages                                          
['thunderbird', 'hexchat']

$ gsettings set com.linuxmint.updates blacklisted-packages "['thunderbird', 'hexchat', 'keymapper']"
ristomatti commented 2 months ago

I can't say I've ever poured so much in to trying to do so little with Linux in the many years I've been running it thus far! ;-P

If you ask me, it's worth hurdle in this case. :wink:

Here's a build I did yesterday if you wish to try: keymapper-4.1.1-Linux.deb.zip

I had to zip it as GitHub won't allow deb files as attachments.

Edit: It's built without Wayland support, so if you're running Wayland it won't work. I was not able to build it otherwise.

QueenCityNerd commented 2 months ago

malachi@malachi-HP-Compaq-Elite-8300-USDT:~$ keymapper ERROR: Opening configuration file failed This is PROGRESS! Yeah, I've always found the Linux term paper to figure it out to be rewarding. It's sort of like working with invisible LEGO but I suppose all playing with computers is that when you're in software! OK, now to get that config, I have a ARTSEY config made up I just need to place it where keymapper is looking I think.

ristomatti commented 2 months ago

It looks it up by default from ~/.config/keymapper.conf.

ristomatti commented 2 months ago

When a valid config file exists and keymapperd is enabled and running (sudo systemctl enable keymapper --now), keymapper should start automatically by logging out and back in. The automatic startup uses the --update flag, so any change to keymapper.conf will be reloaded when you save the file.

QueenCityNerd commented 2 months ago

keymapperd seems to be missing. Failed to start keymapperd.service: Unit keymapperd.service not found But I'm seeing progress.

ristomatti commented 2 months ago

How did you install it? Try running sudo systemctl daemon-reload and see if it's found then.

QueenCityNerd commented 2 months ago

Ah, yes that -reload was just the kick in the pants it needed. However I did get an extra fun return when then proceeding to run keymapper: malachi@malachi-HP-Compaq-Elite-8300-USDT:~$ sudo systemctl daemon-reload malachi@malachi-HP-Compaq-Elite-8300-USDT:~$ sudo systemctl start keymapperd malachi@malachi-HP-Compaq-Elite-8300-USDT:~$ keymapper

(keymapper:51044): Gdk-CRITICAL **: 15:47:50.058: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed

Don't know why the strike out in the text above. there must be a formatting character in the text.

ristomatti commented 2 months ago

I get it also, I reported it as a bug #113, but apparently it does not come from keymapper and is likely a harmless warning.

ristomatti commented 2 months ago

You'll need to paste the terminal output in a code block to make them look proper:

image

QueenCityNerd commented 2 months ago
I'm doing it, this is with the sayo 2x4!
QueenCityNerd commented 2 months ago

So thank you for your patience and so much help with it. I mean to use this with my ham radio when I do code and for CAD drafting though not on this machine. It's slow but nice to use both hands!

ristomatti commented 2 months ago

No problem! @houmain has implemented so many of my feature requests that I try my best to help this way. My C++ skills are on the "I can write some Arduino programs" level. It'd take years (or forever) for me to understand the source code on this repository.

I recommend starting with a very simple config at first to get the hang of it. Every time something doesn't work as expected, read the functional principle again. I managed to understand it incorrectly "more than once".

If you run into a roadblock with the config, I recommend posting the question on the Q/A section behind the "Discussions" tab rather than posting a bug report.

This is not a bug, so I think you can close this. 🙂

QueenCityNerd commented 2 months ago

Thanks, again and yes. I'll tinker. I've got a copy of a working ARTSEY layout and that's fun. It can't do numbers.... yet.... but I'll see what I can do!

ristomatti commented 2 months ago

I suggest also checking out Espanso. It's a similar app but works very differently. I use it to complement Keymapper. What it does is automatically replace strings. For instance if I type :ds it's replaced with 2024-04-20, or :email it replaces it with my email.

ristomatti commented 2 months ago

I need to keep ARTSEY in mind if I end up getting RSI again!

houmain commented 2 months ago

No problem! @houmain has implemented so many of my feature requests that I try my best to help this way.

Thank you very much for your continuing support!

houmain commented 2 months ago

I did not know there was a packet with the same name in the Debian repository. I should have been more creative.

However, if I remember correctly APT refused to install it due to a mismatch or a missing library. I have been building from source and creating a compatible .deb package from it.

I thought about building it with gcc 8 or 9, which should support the required C++ standard. Then it hopefully does no longer complain about missing GLIBC version. Unfortunately the older Ubuntu... versions likely do not have libxkbcommon 1.x, which is also linked in, so it likely would still not work with these.

ristomatti commented 2 months ago

I've been building it succesfully with these all this time:

$ dpkg -l | grep libxkbcommon
ii  libxkbcommon-dev:amd64                        0.10.0-1                                    amd64        library interface to the XKB compiler - development files
ii  libxkbcommon-x11-0:amd64                      0.10.0-1                                    amd64        library to create keymaps with the XKB X11 protocol
ii  libxkbcommon-x11-dev:amd64                    0.10.0-1                                    amd64        library to create keymaps with the XKB X11 protocol - development files
ii  libxkbcommon0:amd64                           0.10.0-1                                    amd64        library interface to the XKB compiler - shared library