在xubuntu,我们的登陆界面是很正常的,有图标,有默认的用户名,但是发现xfce版本的debian13居然什么都没有。而且发现笔记本的触摸板也是各种问题。
由于xfce是基于lightdm的,所以很多修改都是改的lightdm, 这个跟现在kde和gnome有很大区别的。
修改登陆头像
首先看看对应的配置:
1 2 3 4 5
| cat /etc/lightdm/lightdm-gtk-greeter.conf
[greeter] hide-user-image = false default-user-image = /var/lib/AccountsService/icons/timo
|
很好理解的,不隐藏用户头像,头像的位置。
然后就看下对应头像位置是否有对应文件,如果没有就复制一个过来就行,png或者jpg这些都支持
1 2
| ll /var/lib/AccountsService/icons/timo -rw-r--r-- 1 root root 82K 9月 5日 14:05 /var/lib/AccountsService/icons/timo
|
然后看下AccountsService配置是否正确, 这里还能设置登陆时候的桌面背景。
1 2 3 4 5 6 7 8 9 10
| sudo cat /var/lib/AccountsService/users/timo
[org.freedesktop.DisplayManager.AccountsService] BackgroundFile=''
[User] Session= XSession=xfce Icon=/var/lib/AccountsService/icons/timo SystemAccount=false
|
设置默认登陆账户
首先查看对应配置, 这里主要就是把 greeter-hide-users设置为false
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| sudo apt install slick-greeter -y
cat /etc/lightdm/lightdm.conf | grep -v ^
[Seat:*] [LightDM]
[Seat:*] greeter-session=lightdm-greeter greeter-hide-users=false user-session=xfce
[XDMCPServer]
[VNCServer]
|
三指切换
Debian13 默认已使用 libinput。如果你当前还在用 synaptics就先删除了。很多老的教程里还在用synaptics
1
| sudo apt remove xserver-xorg-input-synaptics
|
安装libinput-gestures 及依赖
1 2 3 4 5 6 7 8 9 10 11
| sudo apt install xserver-xorg-input-libinput libinput-tools sudo apt install xdotool wmctrl git sudo gpasswd -a $USER input
git clone https://github.com/bulletmark/libinput-gestures.git cd libinput-gestures sudo ./libinput-gestures-setup install
cp /etc/libinput-gestures.conf ~/.config/
|
配置ibinput-gestures.conf文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| cat ~/.config/libinput-gestures.conf
gesture swipe left 3 xdotool key alt+Shift+Tab
gesture swipe right 3 xdotool key alt+Tab
gesture swipe up 4 xdotool key super
gesture swipe down 4 xdotool key super+d
gesture swipe left 4 xdotool key ctrl+alt+Left gesture swipe right 4 xdotool key ctrl+alt+Right
gesture pinch in 2 xdotool key ctrl+minus
gesture pinch out 2 xdotool key ctrl+plus
|
启动并设置开机自动启动
1 2
| libinput-gestures-setup start libinput-gestures-setup autostart
|
打字时候禁用触摸板
libinput-gestures.conf` 只管手势(滑动/捏合),而触摸板右键和打字时禁用触摸板是 libinput Xorg 驱动的配置,需要写在 /etc/X11/xorg.conf.d/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| cat /etc/X11/xorg.conf.d/90-touchpad.conf
Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "libinput"
Option "Tapping" "on"
Option "TappingButtonMap" "lrm"
Option "ClickMethod" "clickfinger"
Option "DisableWhileTyping" "true"
Option "ScrollMethod" "twofinger"
Option "NaturalScrolling" "false"
Option "HorizontalScrolling" "true"
Option "AccelSpeed" "1" Option "AccelProfile" "flat"
Option "TappingDrag" "on"
Option "TappingDragLock" "off"
Option "MiddleEmulation" "false"
Option "LeftHanded" "false" EndSection
|
XFCE 的 xfsettingsd 在登录时会从 ./xfce4/xfconf/xfce-perchannel-xml/pointers.xml 读取鼠标/触摸板设置,覆盖 xorg.conf.d 里的配置
不过这块完全可以从图形界面里操作。
