Closed hoegrammer closed 2 years ago
Hello, I am afraid, without any additional information about your system and configuration etc., there is not much to go from. Assuming the program was installed successfully (you did not get any errors when executing systemctl --user restart touchcursor.service
), could you try to give us the outputs of the following commands?
systemctl --user status touchcursor.service
and
systemctl --user restart touchcursor.service; sleep 5; journalctl -e
What do you get? In case of the second command, look for a line containing Started Touch Cursor Service
and then see below this line for additional logs for touchcursor service. For example, when I set a wrong keyboard name in the config file, I get something like the following. Do you see anything fairly similar?
Oct 22 19:41:05 ArcoLinuxPC systemd[2203]: Started Touch Cursor Service.
Oct 22 19:41:05 ArcoLinuxPC touchcursor[11641]: error: could not find device: Name="AT Translated Set 2 keyboard"
Oct 22 19:41:05 ArcoLinuxPC touchcursor[11641]: error: please specify the keyboard device name in the configuration file
Oct 22 19:41:05 ArcoLinuxPC touchcursor[11641]: info: looking for the configuration file at: /home/adda/.config/touchcursor/touchcursor.conf
Oct 22 19:41:05 ArcoLinuxPC touchcursor[11641]: info: found the configuration file
Oct 22 19:41:05 ArcoLinuxPC touchcursor[11641]: info: deviceName: Name="AT Translated Set 2 keyboard"
Oct 22 19:41:05 ArcoLinuxPC touchcursor[11641]: info: deviceNumber: 1
Oct 22 19:41:05 ArcoLinuxPC systemd[2203]: touchcursor.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 19:41:05 ArcoLinuxPC systemd[2203]: touchcursor.service: Failed with result 'exit-code'.
Closing this until @hoegrammer reports back.
Hi, thanks for your reply! Here is the output:
root@steamer:~# systemctl --user status touchcursor.service
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=
When I run systemctl --user restart touchcursor.service; sleep 5; journalctl -e
I just see the same error as above, and then a bunch of unrelated stuff. So it looks like that error is the problem. How can I fix it? Ta!
That doesn't seem like an issue specifically with touchcursor-linux. Maybe your distribution isn't using systemd? You could always run the application directly (in terminal /usr/bin/touchcursor
).
Thanks for your help. I'm using standard debian 11 though so pretty sure it's systemd...
Output of /usr/bin/touchcursor:
info: looking for the configuration file at: /home/naomi/.config/touchcursor/touchcursor.conf info: found the configuration file info: deviceName: Name="AT Translated Set 2 keyboard" info: deviceNumber: 1 info: found the keyboard event info: attempting to attach to: '/dev/input/event0' info: attached to: AT Translated Set 2 keyboard error: EVIOCGRAB: Device or resource busy. info: successfully created virtual output device info: running
I then open a text editor and the space bar works as normal, I see no touchcursor behaviour (space bar should not type a space until it's released, and should work as a control key whilst pressed, have I got that right?)
I then open a text editor and the space bar works as normal, I see no touchcursor behaviour (space bar should not type a space until it's released, and should work as a control key whilst pressed, have I got that right?)
You have got it right. That should be the default behaviour.
I entered the correct keyboard name in the config file and I restarted the service.
How did you restart the service, when systemctl --user
fails, btw.?
systemctl --user
errorI believe Debian 11 uses systemd by default, unless you have specifically switched from systemd, which you would have known. For example, to be sure, one can use something as the following to see if all processes originates from systemd process.
pstree -p | grep systemd
I get something as the following:
systemd(1)-+-NetworkManager(514)-+-{NetworkManager}(545)
|-systemd(1610)-+-(sd-pam)(1614)
|-systemd-journal(268)
|-systemd-logind(517)
|-systemd-machine(518)
|-systemd-udevd(269)
First off, the following are some pretty serious changes to your environment, so proceed with caution. I am merely trying to explain, what might be the problem. I do not know if the following settings are the right one for you and your system and that it will not break your system or some parts of it in the process (as they will not be able to start). So, your XDG_RUNTIME_DIR
seems to not be set correctly. That can sometimes happen, if some process overrides this variable incorrectly. One can view the current settings with:
env | grep XDG_RUNTIME_DIR
AFAIK, it should be set as follows:
XDG_RUNTIME_DIR=/run/user/`id -u`
Where the id -u
evaluates to a number corresponding to your user ID. Mine is 1000
, therefore XDG_RUNTIME_DIR=/run/user/1000
, super user would be 0
etc. The XDG_RUNTIME_DIR
variable is being set by pam_systemd
after user log in, but it can be set manually with (stored in your shell .*rc
file for permanent change):
export XDG_RUNTIME_DIR=/run/user/`id -u`
Second, the DBUS_SESSION_BUS_ADDRESS
then would have the same problem, as it should be something like $DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
. See for yourself with
env | grep DBUS_SESSION_BUS_ADDRESS
Again, in my case, it is DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
. One can again set this variable manually and make it permanent with export
.
error: EVIOCGRAB: Device or resource busy.
)As far as I know, there can be multiple reasons for this, but out of the blue, may it be your case that the touchcursor.service
is already attached to the keyboard? I get the same error when I run the touchcursor.service
with systemd and try to run /usr/bin/touchcursor
. I am not sure here seeing as you have problems with running touchcursor.service
, but just in case (though I am quite sure it will not be the case here), I would try to run (or disabling the service any other way)
systemctl --user stop touchcursor.service
And then run /usr/bin/touchcursor
again. Other than that, there needs to be another process that is keeping the device busy. Do you happen to have some other applications/processes working with your keyboard? Like some other key-mapper applications or similar? Maybe lsof
? Or more like sudo cat /proc/ioports
? @donniebreve may have better insight on where to look for these. I had this issue on my notebook when I first run TouchCursor there, but I do not remember what was the solution.
For both issues, I would maybe set up clean Debian 11 environment in virtual machine (VirtualBox, virt etc.) and tried to download and run TouchCursor there. You could then run all of the above commands without worrying about breaking your system. I hope some of this will be of help.
@Adda0 the effort and detail here is amazing. Bravo!
@hoegrammer I initially wrote a list of commands to run and output to send to us, but after looking around a bit... are you trying to run touchcursor-linux on a server that you are connected to through ssh?
@donniebreve at first I thought you could be right because I often have ssh terminals open and could have typed it in the wrong one but no, it was on my local machine, I've just tried again and got the same output
@Adda0 Thank you! I don't know when I will get around to investigating all of that but when I do I'll let you know how it goes. I appreciate the effort
Hi, I followed the instructions to install this, I entered the correct keyboard name in the config file and I restarted the service. But the space bar is still behaving as normal. Is there another step I need to follow to start the application? Thanks