Closed nikolayg closed 1 year ago
@nikolayg
That looks like an odd Python problem, with the launcher stub file for xkeysnail
being unable to import the cli_main
module from... itself. It's not a problem with the xkeysnail
package not being installed, it's more like some kind of Python path issue.
All the file at that location contains is this:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
if __name__ == '__main__':
from xkeysnail import cli_main
cli_main()
That looks for the module to be installed somewhere in the "paths" that Python knows about. What do you get from these commands:
python3 -c "import sys; print(sys.path)"
echo $PYTHONPATH
This last one will probably have no output.
I think the problem is that Ubuntu 23.04 uses a newer python 3.10, which limits how dependencies are installed. Here is the log I get when I run the installation script locally (from git):
@rbreaves @nikolayg
This seems to be triggered by the attempt to use pip
to install additional Python packages. Xubuntu is managing the Python environment with its own packaging system and is discouraging the use of pip
to install Python packages that aren't available in native DEB packages.
Suggested solutions are using pipx
(sudo apt install pipx
) or some other method to create a virtual environment.
This is kind of outside my knowledge area, but it looks like the installation procedure will need to be reworked a bit.
I installed pipx
and then used it to install the patched version of xkeysnail
from the folder that the Kinto installer cloned, then I was able to get through the terminal install.
pipx install ~/Downloads/kinto-master/xkeysnail
If you don't use the patched version of xkeysnail
you'll find that shortcuts like Cmd+Tab, Tab, Tab won't work correctly.
Additional package that needs to be installed to get the GUI app to appear, so that the keyboard type can be set:
gir1.2-vte-2.91
Also, Xubuntu has a background application that takes over the Meta key (Super/Win key). That needs to be disabled so that you can successfully get through the install GUI.
Open the "Session and Startup" control panel app, go to the "Application Autostart" tab, and uncheck the "Bind Super Key" item. That will stop the xcape
command from running at startup.
Then kill the existing process that is binding the Super/Win/Meta key:
killall xcape
Strangely, that didn't let me get through the GUI installer by tapping the Meta key, so I just hit "Alt" and then changed the keyboard type with the menu from "Apple" to "Windows" once the main Kinto window appeared.
That's the best I can do for now with an explanation and solution to this.
Additional packages needed to get the tray icon working:
gir1.2-notify-0.7
and
gir1.2-appindicator3-0.1
or
gir1.2-ayatanaappindicator3-0.1
Edit: Also kept working after a reboot, so it seems there isn't a larger problem at work. Just the Python environment glitches.
This also happened to me on the latest Ubuntu (Lunar Lobster) and exacerbated this closed issue: https://github.com/rbreaves/kinto/issues/616#issuecomment-1529755673
I can confirm that the following works for me now on Ubuntu 23.4, based on this answer:
sudo apt install pipx
git clone https://github.com/rbreaves/kinto.git
cd kinto
pipx install xkeysnail
python3 ./setup.py
I'm closing this issue, although this probably needs to be documented or fixed in the main installation script.
Thanks @RedBearAK !
@nikolayg
I don't think you or others will end up with the correct version (patched for "held" keys) of xkeysnail
if you do it this way:
pipx install xkeysnail
That will probably try to grab the version of xkeysnail
available to pip
, which is v0.4.0, without the patch.
What you probably want to do instead is install from the local folder, like in my post above.
pipx install ~/Downloads/kinto-master/xkeysnail
And that needs to be done by running the Kinto installer once and letting it fail, so that it grabs its preferred version of xkeysnail
. Before the Kinto installer runs, that local folder won't exist.
In other words, the installer really needs to be fixed.
I may be wrong, but I suspect if you try to do Cmd+Tab, Tab, Tab
or Cmd+Grave, Grave, Grave
you'll find that it won't behave like you expect.
Thanks @RedBearAK - it seems to be working at the moment, so I won't touch it 😅
If I encounter any issues, I'll reinstall as suggested!
Describe the bug After upgrading to Xubuntu 23.04 Kinto no longer works. I uninstalled and then installed again. I can see an error regarding
xkeysnail
in the logs. I installed xkeysnail, but that didn't help:Logs and status if relevant