如何使我的synclient设置坚持下去?
synaptics触摸板的默认设置包括映射到触摸板右上角的粘贴function。 我可以通过运行命令禁用此行为
synclient RTCornerButton=0
但每次重新启动我的设置都会被还原。 我该如何防止这种情况发生?
您需要将设置放在xorg.conf文件中,如下所示:
sudo gedit /usr/share/X11/xorg.conf.d/60-synaptics-options.conf
在新文件中,键入
Section "InputClass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Option "RTCornerButton" "0" EndSection
Gnome设置守护程序可能会覆盖现有设置(例如,在xorg.conf.d中设置的设置),因此忽略/usr/share/X11/xorg.conf.d/50-synaptics.conf
中的现有设置。 这是我修复它的方式。
运行
dconf-editor
编辑
/org/gnome/settings-daemon/plugins/mouse/
(或/org/cinnamon/settings-daemon/plugins/mouse/
for cinnamon)取消选中
active
设置
它现在将尊重您系统现有的synaptics配置。
然后按照monkbroc的解决方案进行操作。
(也许)最快的解决方法是在“启动应用程序”中创建一个条目。 它可以在统一发射器中找到。
示例条目看起来像这样:
名称: Enable Palm Detection
命令: synclient PalmDetect=1
注释: Enable synclient palm detection
这基本上相当于Augustin Riedinger的答案,但我们不是手动创建桌面条目,而是让Ubuntu为我们做这件事。
对我有用的最好的方法是将您的更改添加到Xsession.d中,因此当您登录X时它将自动加载给所有用户:
(该文件不存在,因此您可以根据需要为其命名。左侧的数字表示与其他文件相比将执行的顺序。)
/etc/X11/Xsession.d/80synaptics
(由root拥有,具有权限644)
例如,您可以将其用作基础:
#https://wiki.archlinux.org/index.php/Touchpad_Synaptics #Palm dimension #synclient PalmDetect=1 #synclient PalmMinWidth=4 #synclient PalmMinZ=100 #Touchpad sensibility (move) #synclient FingerLow=10 #synclient FingerHigh=20 #Click detection #synclient MaxTapTime=180 #synclient MaxTapMove = 242 #synclient MaxDoubleTapTime = 180 #2 finger = right click #synclient TapButton2=0 #3 finger = middle click #synclient TapButton3=2 #click corners #synclient RBCornerButton=0 MaxTapTime #synclient RTCornerButton=0 #synclient LTCornerButton=0 #synclient LBCornerButton=0 #Oval instead of rectangular #synclient CircularPad=1 #TapAndDragGesture #synclient TapAndDragGesture=1 #scroll in sides #synclient VertEdgeScroll=0 #synclient HorizEdgeScroll=0 #synclient CornerCoasting=0 #2 finger scroll #synclient VertTwoFingerScroll=1 #synclient HorizTwoFingerScroll=0 #Disable Touchpad on start #synclient TouchpadOff=1
在Ubuntu 14.04和16.04中测试过
使synclient
选项在X会话之间synclient
使用startx
( xinit )
在运行窗口管理器或桌面环境的行之前,将任何synclient
lines添加到.xinitrc
,如下所示:
## ~/.xinitrc ## X11 startup script; sourced by xinit(1) and its frontend startx(1) ## Set Synaptics touchpad options synclient RTCornerButton=0 & ## Start desktop environment or window manager of your choice exec startxfce4 # exec startlxde # exec startkde # exec i3 # exec dwm
上面的示例在运行Xfce桌面环境之前设置了synclient
选项。 以#
开头的行是注释 (它们不会被执行)。
使用显示管理器
该方法与xinit
相同,只是将synclient
行放在显示管理器的相关启动脚本中,例如/etc/GDM/Init/Default
。
如果您有任何疑问,请允许我向您推荐优秀的ArchWiki 。 尽管Archlinux特定,但由于Arch的DIY性质,大多数解决方案都适用于每个Linux发行版。 祝你有个好的一天!
我正在使用Xubuntu 14.04,这可能不适合你。 打开会话和启动或任何名称适合您。 无论您的名称是什么,都可以转到“应用程序自动启动”选项卡。 单击“添加”按钮。 保留您想要的任何名称和描述,并在命令类型中:
synclient RTCornerButton=0
如果你想添加多行,用a分隔它们;
确保选中刚刚创建的命令。
将synclient [Var=Value]
添加到〜/ .bashrc的末尾
示例: synclient RTCornerButton=0
这将使您每次登录时系统都设置此synclient设置。
尝试touchegg,这个解决方案适用于我的XPS13 Ubuntu16.04 https://samtinkers.wordpress.com/2016/06/13/3-finger-gestures-in-ubuntu-16-04/
这里建议的所有解决方案都不适用于我:
- 我希望配置在
/home
文件夹中,因为它是本地配置(所以我可以保留参数,即使我更改我的发布器例如) -
.bashrc
或.xinitrc
似乎没有正确执行
所以我最终创建了一个自动启动的.desktop
文件:
cat ~/.config/autostart/touchpadconfig.desktop [Desktop Entry] Name=Touchpad Config GenericName=Touchpad Config Comment=Sets better default parameters to touchpad Exec="synclient VertScrollDelta=40 && synclient AccelFactor=0.1 && synclient RightButtonAreaTop && synclient RightButtonAreaLeft=0" Terminal=false Type=Application Icon=input-mouse Categories=Settings; StartupNotify=false
也许不是最好的解决方案,但它对我有用。
在使用Unity桌面的Ubuntu 14.04 LTS中,没有一个解决方案适合我。 为了使设置永久化,我不得不将synclient命令粘贴到shell脚本,并将shell脚本添加到Unity中的启动应用程序。
注意:shell脚本必须在synclient命令之前启动#!/bin/bash
之类的操作,并且必须将权限更改为可执行文件。
使用Wayland(仍在17.04实验,但很快将成为默认设置),您可以获得所需的所有设置:
sudoedit /usr/share/X11/xorg.conf.d/50-synaptics.conf
在“InputClass”部分添加这些行
Option "RTCornerButton" "0"
如果您使用的是GNOME或Cinnamon桌面管理器,GNOME / Cinnamon的设置很可能会覆盖您的自定义设置。 要防止GNOME / Cinnamon的设置覆盖您的设置,请打开dconf编辑器 [ dconf-editor
]并编辑以下条目:
/org/gnome/settings-daemon/plugins/mouse/ or /org/cinnamon/settings-daemon/plugins/mouse/
取消选中有效 。