Tag Archives: mouse

Run a powershell script

First open a powershell window and enable script execution

  • Restricted ? Stops any script from running.
  • RemoteSigned ? Allows scripts created on the device, but scripts created on another computer won’t run unless they include a trusted publisher’s signature.
  • AllSigned ? All the scripts will run, but only if a trusted publisher has signed them.
  • Unrestricted ? Runs any script without any restrictions enter this and answer A for All:

Set-ExecutionPolicy RemoteSigned

Now you can execute the scrip by entering it with the “invoke operator” (&) in front

& SloppyFocusFollowsMouse.ps1

3DConnexion mouse problem, how to solve it

https://sourceforge.net/projects/spacenav/

https://janoc.rd-h.com/archives/74

libinput list-devices
man 5 xorg.conf

https://wiki.freecadweb.org/3Dconnexion_input_devices
https://forum.freecadweb.org/viewtopic.php?style=4&t=29766
https://forum.freecadweb.org/viewtopic.php?style=4&f=3&t=29766&sid=2cc3dab8db151f002569147d7befb160&start=10

cat /usr/lib/systemd/system/spacenavd.service

As root:
xhost +
systemctl restart spacenavd

https://buildmedia.readthedocs.org/media/pdf/spnav/latest/spnav.pdf

# example file copy this to /etc/spnavrc
/usr/share/doc/spacenavd/examples/example-spnavrc

loginctl show-session 2 -p Type

# if changing some config files…
systemctl daemon-reload
/usr/share/X11/xorg.conf.d/40-libinput.conf

# if using HAL
# create file /etc/hal/fdi/policy/spacenav.fdi

*** none of the above seams to work ***

Disables it Globally: disable it as pointer using libinput config file
# /usr/share/X11/xorg.conf.d/40-libinput.conf
Section “InputClass”
Identifier “3Dconnexion SpacePilot PRO “
MatchIsPointer “on”
MatchDevicePath “/dev/input/event26”
Driver “libinput”
Option “Ignore” “on”
EndSection

SOLUTION: disable it as a mouse
xinput set-prop “3Dconnexion SpacePilot PRO ” “Device Enabled” 0
or this, not shure if this disable everything and not just as a pointer?
xinput disable [touchscreen id/name]

Add a script that runs everytime a input device is plugged inn
gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command ‘$HOME/bin/script.sh’

spacenavd does not use it as mouse.
x11 or gnome is using it as mouse pointer

It’s reported as:
idVendor=046d, idProduct=c629, bcdDevice= 4.11

installing the 3DxWare
download from https://3dconnexion.com/us/drivers-application/3dxware-10/
unpack
cp 3dxware-linux-v1-8-0.x86_64.tar.gz 3dxware-linux-v1-8-0.x86_64
cd 3dxware-linux-v1-8-0.x86_64

Fix the user bug with this C code
#include
#include
#include
#include

int main(int argc, char ** argv) {
if (argc != 2) {
fprintf(stderr, “Need a name to put in the structure\n”);
exit(1);
}
struct utmpx u;
memset(&u, 0, sizeof(u));
u.ut_type = USER_PROCESS;
u.ut_pid = getpid();
strcpy(u.ut_id, “:0”);
strcpy(u.ut_line, “:0”);
strcpy(u.ut_user, argv[1]);
setutxent();
pututxline(&u);
endutxent();
}

compile and start it with your username as the argument.
then run install-3dxunix.sh
And it should be installed.
install the required font
apt install xfonts-75dpi
apt isntall xfonts-100dpi
fc-cache -f -v
(xhost +)
test it by running /etc/3DxWare/daemon/3dxsrv -d usb

Then start it:
open terminal, sudo root
xhost +
fixbuguser root # the C source code above
/etc/3DxWare/daemon/3dxsrv -d usb -debug

*** Works now under FreeCad and Blender ***
Download and compile the newest spacenavd from
https://sourceforge.net/projects/spacenav/
then start freecad and push a button on 3dconnexion for the button config under tools->preferences to be un-grayed