-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use this with xmonad as window manager? #657
Comments
I'm just another Kinto user, mainly, but I've run into this kind of problem on different distros. Sometimes it can be fixed by re-running the Kinto installer script. Don't ask me why, because I have no idea. Sometimes that only works until you reboot or restart the Kinto service. Be aware that re-running the installer will overwrite your You don't say what Linux distribution you're using, or if you were already using Kinto in another DE/WM on that same distro before attempting to use it in xmonad. The DE/WM is usually not a big deal, other than possibly needing tweaks to some of the shortcuts, but usually what needs tweaking is the shortcut on the DE/WM side to match Kinto's existing shortcuts for things like Cmd+Tab. You'll see in the config file there are options for GNOME, KDE, XFCE that will get enabled by the installer. For something else like xmonad you're kind of on your own, but I'm sure it can be made to work. On a couple of distros I've had to move Kinto from running as root from a Edit: Didn't look closely enough at the screenshot, of course it says Fedora. I do think that re-running the Kinto installer should fix it. That has worked for me recently on Fedora. But you should at least restart afterward, after cofirming that Kinto is working, to make sure it stays working after the reboot. What I usually do to test that Kinto is really working the way I expect is to open a terminal app that supports tabs (with Ctrl+Shift+T without Kinto), and do Cmd+T a few times and then Cmd+Shift+Left_Brace/Right_Brace to make sure that I can open new tabs, move between them, and then close the new tabs with Cmd+W. |
Hey @RedBearAK that was more than enough to at least start the troubleshooting process. What's interesting is that I can run this on gnome for fedora 35 no problem, but as soon as I try running it in xmonad is when the service starts misbehaving. Maybe it's time to rerun the script and try all over again but this time doing it from within xmonad itself. Will post any progress here and thanks for the suggestions! |
FYI, make sure you do a full system update on F35 before attempting to upgrade F35 to F36. There was an annoying situation with SELinux containers or something that hit a lot of people who attempted the upgrade early (including me) and has caused the devs to delay the official release of F36 temporarily. Should be OK as long as you do a full update on F35 and then reboot before attempting to do the F36 upgrade (when it's officially released). |
I’ve yet to play around w/ any tiling manager, xfce w/ zentile is as close I’ve gotten to it. I’ll have to try xmonad & i3 sometime - possibly a weekend to debug it. You may want to checkout what ID your display environment var echos back in your terminal/user session. Make sure it matches the one that’s hard coded in the xkeysnail.service file.
|
Hi @rbreaves @RedBearAK, sorry for the delay in my response, but I have been sick. @RedBearAK seems like what you mentioned previously
is exactly what happens in my case. Once I run it the first time, it works until I reboot/log out. after logging out/rebooting, it stops working and even if I call the service again (seems like it fails to start again). Only after completely uninstalling and reinstalling it works again. Do you have any suggestions to make sure the service keeps working after restart? |
Hope you're feeling much better.
I haven't been able to track down exactly why this happens, but I think it has something to do with SELinux or AppArmor. Fedora of course uses SELinux. The simplest way to bypass the issue is to just set SELinux to "permissive" mode. It is up to you whether you find the extra security of SELinux important enough to not do this. Due to the complexity of how SELinux permissions (context) works, all my efforts to troubleshoot the problem have come to very little. The other option is to convert Kinto to running as your user, rather than needing to run as root with a sudo command. This is a bit more complicated, but not too bad if you know how to make a couple of simple shell scripts and a couple of "desktop entry" or "dot desktop" files and stick them all in the right places to allow the easy (re)starting and stopping of the Running Kinto as user completely bypasses the SELinux issues, and allows the addition of much simpler I've been meaning to put together a script that will automate this process of converting Kinto from root to user, but in the meantime I can just post the contents of my own run-as-user files that make this work, if you're interested. |
hey @RedBearAK, thank you for the suggestions. Just to test the easiest route first, I actually set SELinux to "permissive"in my /etc/selinux/config and rebooted, then tried to fresh install but for some reason, seems like the issue still happens after fresh installing Kinto again. Am I missing anything there? This is the output of sestatus after changing the /etc/selinux/config:
|
I really don't understand the root cause of anything that has been going wrong with Kinto on Fedora. Setting to permissive was something that had worked in the past. If it still doesn't work I'm afraid your only real option is to move to run-as-user. It's really not too difficult, if you are already capable of messing with your SELinux config. You'll need to disable the First step, follow the instructions here to put your user in a Immediately after rebooting you should be able to open a terminal and run the command (without After that step you'll need simple start/stop scripts to run the My start script, at
My stop script, at
Probably don't need to remind you about this but make sure the Bash scripts are marked executable with My desktop file to start Kinto as user, at
Use GNOME Tweaks or some other method to pick the The start script is written such that it can also be used to safely (re)start Kinto whenever you change something in the config file. It kills the If you make a mistake with editing the config file and I guess I didn't go to the trouble of creating a "Stop_Kinto" desktop file on this system (Ubuntu 22.04) but you can either use a terminal to run
Save that as Actually if you don't tell the Kinto tray icon to go away you can still stop Kinto from the tray icon menu, but you can't start or restart Kinto from the tray because it will be attempting to run the Place the new "Kinto (xkeysnail non-sudo)" app you've just created on a dock or some other launcher and you'll always have a way to launch or restart Kinto. If you do this conversion just maintain awareness that if you ever re-run the Kinto installer again it will try to run the I think that's the whole procedure I follow every time I do this. You can see why I want to automate it all with a script. It's a bit tedious to do from scratch. But if you don't go around distro hopping every couple of weeks you'll only need to do this once. Good luck and let me know if you have questions. |
hey @RedBearAK your method works FLAWLESSLY! Thank you for all the time you took to explain how to achieve it. Now I'm running kinto with xmonad with no problems at all and it doesnt die every time I reboot! It would be awesome to include a scrip to do this into the Kinto installer (maybe as an optional flag?) so that all of this gets taken care of when/if you need it. I'm gonna close this issue as this is exactly what i wanted to achieve, so no need to keep it open. Thanks again for all the help! |
FYI, in case you aren't subscribed to the Kinto GitHub repo to receive info about new releases, Ben found the problem and was able to fix the installer and make a new release that seems to have no further issues running on Fedora 34/35/36. If you remove whichever run-as-user startup option you're using to autostart Kinto as user, and then re-run the main Kinto installer from the web link at https://kinto.sh , everything should start working the way it was originally intended. The tray icon will be back to showing the actual status of Kinto, and the GUI app should show the log again. Other than disabling the autostart option, leaving the other run-as-user files where they are shouldn't cause any problems. No need to track them down and remove them. |
hey @RedBearAK, I tried just now, but seems like it dies after reboot again (at least using xmonad as WM it dies). It might be related to needing a spawn to enable the service in the xmonad config, so for my case, I will keep the old approach. do you know whats the standard path/command to enable the service, cause might just need to add that same command in my xmonad config and that way, it will just be adding one line of code (which i can pre-add to my dotfiles) vs doing the process you explained |
Hmm, figures. Well, as far as I understand, the Obviously if the run-as-user setup was working you could stick with that. But if you want to keep hacking away at this maybe we can find a simple solution for xmonad and other WMs in the future. If you cat
So it uses
Notice that being run as root means the user's name/home path has to be hard-coded into this command. You'll have to change everywhere you see To break this down a bit, the The Kinto installer also sets up a new
I would try running that first I would also try just running the whole command from the service file in a terminal, and see what happens:
After you run the
This is just what the run-as-user script does, but with If course if you don't use one of the The output either way should be illuminating as to why the service may not be loading when you log into xmonad. Or maybe it will work when run in the terminal but the I'll be interested to see exactly what is going on. If you know of a simple way to get a working xmonad desktop setup without running through the whole manual building of a configuration file, I could do some troubleshooting of my own more easily. |
I think the root of the trouble is as I expected,
This command reveals that there are only a few "targets" active when starting a basic Seems to be possible to just manually restart Kinto from the Kinto GUI app menu, or presumably from the Kinto tray icon if you have an indicator tray, after starting the On Ubuntu when you use the commands from the Otherwise it will be necessary to find some way for |
Looks like the GUI app, the tray icon, and even the
So maybe if you spawn just that part of the command the
Again, replacing Once the |
hey @RedBearAK your last suggestion worked! seems like its just making sure you run that line on the xmonad.hs and call it a day. would be awesome to have something along the lines of detecting if your current WM is xmonad and adding it automagically, but adding just one line of code to a file i already have a backup of (essentially making sure if i configure any other distro, to use the same username so that I don't need to do any changes is a very good compromise :+1) Thank you for all your help! |
Glad it worked. I had to do a similar fix to use Kinto with IceWM on a very old laptop. It just wouldn't work unless I ran the |
hey @rbreaves first of all, wanted to give you a huge thank you for this project. I got myself already too used to the macOS like shortcuts and running this on linux has been a lifesaver.
I have been starting to experiment a bit with xmonad, and got myself very comfortable using it, and now would love to be able to use xmonad as my window manager but keep all my mappings with the standard kinto.sh script. I thought to myself, well, it should work since both kinto and xmonad use x11, so what could go wrong.
Essentially, when I try to run Kinto on xmonad, the window shows, but then, nothing happens. then if i restart the service, i get an issue with xhost not able to open display :1
Do you know if there's a way to make this work?
Thank you for your help and again, love the project and will soon support it as well!
The text was updated successfully, but these errors were encountered: