Skip to content
Francis Marasigan edited this page Dec 24, 2025 · 2 revisions

Tips and Tricks

This guide provides platform-specific tips and configuration guides for optimizing your ncSender setup.

See Also: Headless Mode for running ncSender as a network server on Linux/Raspberry Pi

Setting Linux or Raspberry Pi

Rotate touch screen

If you are using Wayland and Touch screen is not rotating with monitor orientation, follow this guide.

libinput list-devices | awk '
/Device:/ {dev=$0}
/Kernel:/ {kern=$0}
/Capabilities:/ && /touch/ {print dev "\n" kern "\n"}'
// Sample Response:

Device:           TSTP MTouch
Kernel:           /dev/input/event0

Now create a file 61-touchscreen-local.hwdb

sudo nano /etc/udev/hwdb.d/61-touchscreen-local.hwdb

Add the following and save.

evdev:name:TSTP MTouch:*
# LIBINPUT_CALIBRATION_MATRIX=0 -1 1 1 0 0
# LIBINPUT_CALIBRATION_MATRIX=-1 0 1 0 -1 1
  LIBINPUT_CALIBRATION_MATRIX=0 1 0 -1 0 1

Execute the following:

sudo systemd-hwdb update 
sudo udevadm trigger /dev/input/event4 

Then Restart.

sudo reboot

AutoStart ncSender

mkdir -p ~/.config/autostart
echo -e "[Desktop Entry]\nType=Application\nName=gSender\nExec=/opt/ncSender/ncsender"> ~/.config/autostart/ncSender.desktop

Installing Joystick/Gamepad

Install joystick/gamepad support for manual control of your CNC machine:

sudo apt update
sudo apt install joystick jstest-gtk

See Also: Jogging Controls for configuring gamepad controls in ncSender

Enable Auto-Update without Requiring Password

Since Linux installations for CNC controllers are typically dedicated machines, you can simplify the user experience by disabling certain security features:

Enable Auto-Login (works with Raspberry Pi OS and some other Linux distributions):

# Replace {{username_goes_here}} with your actual username
sudo sed -i 's/^#\?\(autologin-user=\).*/\1{{username_goes_here}}/; s/^#\?\(autologin-user-timeout=\).*/\10/; s/^#\?\(user-session=\).*/\1PIXEL/' /etc/lightdm/lightdm.conf

Allow ncSender Updates Without Password:

Create a sudoers file to allow the current user to run ncSender update commands without password:

# Create sudoers file for ncSender
echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/apt update, /usr/bin/apt install ncsender*" | sudo tee /etc/sudoers.d/ncsender-updates
sudo chmod 0440 /etc/sudoers.d/ncsender-updates

Warning: Only use these configurations on dedicated CNC controller machines, not on shared or internet-facing systems.

Allow Flashing SLB/SLB-EXT from Linux (Raspberry Pi)

If you get the following error during flashing

[11:12:29 AM] [ERROR] Flash error: initialize error: Error: LIBUSB_ERROR_ACCESS 

LIBUSB_ERROR_ACCESS on a Raspberry Pi (including Pi 5) almost always means permissions or device ownership when the STM32 switches into DFU (USB) mode.

Create rules

sudo nano /etc/udev/rules.d/99-stm32-dfu.rules

Add the following

SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", MODE="0666", GROUP="plugdev"

and then reoload:

sudo udevadm control --reload-rules
sudo udevadm trigger

Clone this wiki locally