Populate uinput/uhid/evdev in the nxnode X server AutoAddDevices from /dev/input

Forum / NoMachine for Linux / Populate uinput/uhid/evdev in the nxnode X server AutoAddDevices from /dev/input

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #53242
    jsp
    Participant

    I need touch and keyboard mouse input for the moon light client created at case Western University. I am mostly interested in the emerging touch support for PC games but also need mouse and keyboard to test and activate it. Only game pad devices work because they don’t depend on the X server. Mouse input ultimately have to reach the X11 server otherwise the cursor will not respond

    the easiest way for you to test this is
    python-uinput. You can create devices and listen to them and test them in your X server with a few lines of python code that works immediately. If you can think of or find any way to enable this on old versions I would be grateful to hear it I haven’t found a way. There might be some way to send a request to the X server to automatically add new devices from /dev/input when they appear disappear. I don’t think your fork listens to /etc/X11/xorg.conf but there might be some other way to enable this behaviour the upstream X server automatically do this I suppose because everyone seem to assume mouse input devices are active in the X server I am the only one that use your fork apparently . If you can open source nxnode that would be easiest for me. If I can’t speak directly with the other engineers and exchange drafts my communication always fails in my experience.

    I am also looking for a way to use the regular X server with NoMachine from gcloud Ubuntu cloud but I haven’t found a working configuration. The NX server indicates it can broadcast from an existing X server also. But without any configuration X will complain that there are no screens to broadcast from and “X -configure” is not smart enough to create a screen on a remote server . I have a draft of an attempted headless xorg.conf but not something that has worked with the NoMachine or moon light client. Moon light depend on sun shine can find a suitable screen to broadcast from and miraculously the nxscreen is suitable.

    Previously sun shine had native mouse support from X11/extensions/XTest.h but it was removed in favour of only supporting the input tino Library that create virtual input devices for the uinput.ko kernel module

    If I can find the Debian Sid build repo I can add a working cloud configuration .
    It contains input settings but nothing for headless servers

    ~~~
    apt-file find xorg.conf.d

    /usr/share/X11/xorg.conf.d
    10-evdev.conf

    Section “ServerFlags”
    Option “AutoAddDevices” “True”
    EndSection

    SubSection “Display”
    Depth 24
    Modes “500×1000”
    EndSubSection
    ~~~

    ~~~
    gcloud compute instances create –image-project ubuntu-os-cloud –image-family ubuntu-minimal-2410-amd64 …

    /etc/apt/apt.conf
    APT::Install-Recommends “0”;
    sudo apt install sunshine nomachine fluxbox xserver-xorg-input-evdev

    grep uinput /lib/modules/$(uname -r)/modules.builtin
    sudo adduser $USER input
    sudo chgrp input /dev/uinput
    sudo chmod g+rw /dev/uinput

    chromium https://gamepad-tester.com/

    pip install python-uinput evdev inputtino

    import evdev
    devices = [evdev.InputDevice(path) for path in evdev.list_devices()]
    for d in devices:
    print(d.path, d.name, d.phys)
    /dev/input/event7 python-uinput
    /dev/input/event6 Wolf (virtual) keyboard
    /dev/input/event5 Wolf mouse virtual device (absolute)
    /dev/input/event4 Wolf mouse virtual device
    /dev/input/event3 ImExPS/2 Generic Explorer Mouse isa0060/serio1/input0
    /dev/input/event2 AT Translated Set 2 keyboard isa0060/serio0/input0
    /dev/input/event1 Sleep Button LNXSLPBN/button/input0
    /dev/input/event0 Power Button LNXPWRBN/button/input0

    from inputtino import Mouse
    mouse = Mouse()
    from time import sleep
    while True:
    sleep(1)
    mouse.move(10, 20)
    ~~~

    #53294
    bucu
    Participant

    Hi,

    Thank you for your inquiry. To enable uinput for mouse and keyboard events on your NoMachine server, you can add the following key in the node.cfg file, located at /usr/NX/etc/node.cfg:

    DisplayAgentExtraOptions "-alteventapi 1"

    This setting enables use of uinput for handling events from the client side. After updating the file, restart the NoMachine server to apply the changes:

    sudo /usr/NX/bin/nxserver --restart

    Please note that we use absolute coordinates for mouse events, not relative coordinates, which may not fully meet your requirements for precise cursor control. You may need to test this configuration to ensure it aligns with your needs.

    As for the headless problem: have you tried following the instructions in this article?

    If you encounter any issues or have further questions about this setup, please let us know.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Please login .