저는 Linux Manjaro Gnome X11을 사용합니다. 나는 마우스 버튼에 대한 특별한 설정을 갖고 싶고 이 작업은 를 통해 수행됩니다 xinput
.
이 설정이 세션 전반에 걸쳐 지속되도록 하기 위해 에 작성했는데 xinput
, ~/.xprofile
이는 실제로 모든 세션이 시작될 때 적용됩니다.
그러나 특정 세션 내에서 일정 시간이 지나면 작동이 중지됩니다(로그아웃하지 않음).
~/.config/autostart/*.desktop
대신 Gnome 시작 항목()을 사용할 수 있습니다 ~/.xprofile
.
alba@mac2011-manjaro% journalctl -b _UID=1000 -t /usr/lib/gdm-x-session|grep Logitech
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: device removed
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) config/udev: removing device Logitech M350
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) config/udev: removing device Logitech M350
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) config/udev: Adding input device Logitech M350 (/dev/input/mouse0)
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "system-keyboard"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) config/udev: Adding input device Logitech M350 (/dev/input/event5)
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "evdev pointer catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "evdev keyboard catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "libinput pointer catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "libinput keyboard catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "system-keyboard"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) Using input driver 'libinput' for 'Logitech M350'
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: always reports core events
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: is tagged by udev as: Keyboard Mouse
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: device is a pointer
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: device is a keyboard
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: device removed
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) libinput: Logitech M350: needs a virtual subdevice
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) XINPUT: Adding extended input device "Logitech M350" (type: MOUSE, id 14)
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: (accel) selected scheme none/0
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: (accel) acceleration factor: 2.000
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: (accel) acceleration threshold: 4
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: is tagged by udev as: Keyboard Mouse
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: device is a pointer
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) event5 - Logitech M350: device is a keyboard
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "evdev pointer catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "evdev keyboard catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "libinput pointer catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "libinput keyboard catchall"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: Applying InputClass "system-keyboard"
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) Using input driver 'libinput' for 'Logitech M350'
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (**) Logitech M350: always reports core events
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) libinput: Logitech M350: is a virtual subdevice
Mar 12 23:04:55 mac2011-manjaro /usr/lib/gdm-x-session[15562]: (II) XINPUT: Adding extended input device "Logitech M350" (type: KEYBOARD, id 15)
내 설정이 어떻게 망가졌나요? 세션 전반에 걸쳐 완전히 지속되도록 하려면 어떻게 해야 합니까?
답변1
낮은 수준의 솔루션: 무한 반복되는 백그라운드 작업을 설정했습니다.
alba@mac2011-manjaro% cat ~/.xprofile
# This file is read at X11 start.
# In Fedora use ~/.config/autostart/*.desktop instead.
# # avoid spurious paste while scrolling
# # find the device number
# # repeat forever
while sleep 1
do xinput list|grep pointer|tail -1|grep -o 'id=[0-9]*'|grep -o '[0-9]*'|xargs -I{} xinput set-button-map {} 1 3 2
done&
crontab
cron 작업이 X 서버에 연결할 수 없기 때문에 이 작업을 수행할 수 없습니다 (그리고 1분이 너무 짧습니다).