rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.24k stars 212 forks source link

Unable to get kinto.sh to work #819

Closed nitingarg1000 closed 11 months ago

nitingarg1000 commented 11 months ago

I keep getting "inactive" message at the bottom of my kinto tray: photo_2023-07-21 15 16 25

RedBearAK commented 11 months ago

@nitingarg1000

Stop Kinto from the “File” menu, and disable auto start.

Then, if you know how to find the “xkeysnail.service” file, try to manually run the command in the “ExecStart” line. See what sort of error there might be.

It’s helpful to know what distro you are using, which desktop environment, whether you logged into an Xorg or Wayland session. Kinto has no Wayland support yet.

If you can’t get it working there is a closely related alternative that I made that might work better for now:

https://github.com/RedBearAK/toshy

nitingarg1000 commented 11 months ago

Hi @RedBearAK, Thanks for the response. I stopped Kinto from the File menu and disabled auto-start.

I found the "xkeysnail.service" file in the repo that I cloned and got the following error upon executing that file. photo_2023-07-25 13 22 53

I also checked the ~/.config/kinto folder and it contained the following: image_2023-07-25_13-22-27

Here are the details of my distro: photo_2023-07-25 13 24 27

I'm not sure what Xorg or Wayland is but I'm directly using my linux system and not through any remote session.

RedBearAK commented 11 months ago

@nitingarg1000

You can't execute a systemd service file directly like that, they are configuration files rather than "scripts". But a service file will contain a line starting with ExecStart= that shows the actual command the service will try to run. You want to take everything after the = and try to run it in the terminal manually. Try to open the service file with a text editor, or less or nano in the shell, and copy the command.

X11/Xorg and Wayland are what display the graphical desktop. Linux is in a transition between X11/Xorg and Wayland, and Wayland is often the default session type on newer Linux distributions. Since Kinto won't work in Wayland, you would have to make sure you are choosing the "X11" or "Xorg" type of login at the login screen.

I have an alternative project that should have no trouble running on Ubuntu 20.04 that you can try, if you can't get Kinto working. But we should look at the error you're getting first. Kinto should work on Ubuntu 20.04. You probably just need a couple of packages, and there should be some kind of meaningful error message when running the command from the service file manually.

It occurs to me looking at your user name that it is pretty unusual to have a dot/period in your user name. There is a remote possibility that it could be part of your problem with Kinto, but I'll have to see the error message first.

RedBearAK commented 11 months ago

Forget running the command from the service file.

If you run these commands, you should be able to see what might be going wrong.

xhost +SI:localuser:root
sudo xkeysnail --watch ~/.config/kinto/kinto.py

The first command allows the root user access to your display server (X11). The second command runs the keymapper (xkeysnail) as root, with the config file from your home folder. I left out the --quiet option, so there will be more debugging output in the terminal.

To quit it just do the usual Ctrl+C, or if the keyboard isn't working, just close the terminal tab or window.

nitingarg1000 commented 11 months ago

@RedBearAK ,

Can you check if this is the right way to execute the command?

photo_2023-07-25 14 21 13

Also, I don't have sudo access for my user but can obtain it for some time. Could that be the problem?

This is what I get when running the two commands that you just mentioned: photo_2023-07-25 14 24 29

RedBearAK commented 11 months ago

@nitingarg1000

Still not sure it's actually a problem, but I'm really wondering if it is a good idea to have a username with a dot in it.

I do think you need to do a web search for how to fix the "unable to resolve host" issue. Seems to have something to do with making sure your system's host name is in the /etc/hosts file. I've never actually run into that problem myself.

The xkeysnail keymapper does need to run as root normally in order to work, which is why the xhost command is necessary. Once you fix your sudo problem Kinto should theoretically just work. It shouldn't be having any trouble working on Ubuntu 20.04. There were some users who had issues with missing packages after installing Kinto, but they were on much newer releases of Ubuntu like 23.04.

My project that is an alternative to Kinto doesn't need to run the keymapper as root. Instead it uses a udev rules file to give your user access to the /dev/uinput device. But that means my project requires a reboot after installing, due to the permissions change.

Just fix sudo and you should be fine.

nitingarg1000 commented 11 months ago

Hi, I installed toshy and it works seamlessly. Except one thing, I can't seem to use Cmd+W to close tabs inside the terminal even after I have specifically mapped the close tab shortcut to Cmd+W which then lists the shortcut as Alt+F4. Also, when I try to set the close window shortcut as Cmd+Q, it lists the shortcut as Alt+F4 once again. Won't this cause conflict?

RedBearAK commented 11 months ago

Open an issue about this on the Toshy repo and we can work on it.

https://github.com/RedBearAK/toshy/issues