X session error

Xsession :warning:unable to write to /tmp; X session may exit with an error

登陆进入不了界面,可以进入命令行ctrl+alt+f1

磁盘

1
2
3
4
5
6
7
8
df -lh

#1777权限
ls -ld /tmp

sudo du --max-depth=1 -h

du -k |sort -n |tail -10

磁盘目录满了清目录

https://www.experts-exchange.com/questions/26782995/Xsession-warning-unable-to-write-to-tmp.html

user@

点击okay提示 启动user@xxxxx.service失败

1
2
#tab补充uid
systemctl status user@

systemctl status user@xxxxx.service

/usr/bin/xxx文件权限被修改导致,具体那个文件待确认

sudo chmod u+s /usr/bin/* 导致

1
2
3
4
5
6
❯ su root
密码:
su: 鉴定故障
❯ ls -ld /usr/bin/su
-rwxr-xr-x 1 root root 71912 1月 21 2022 /usr/bin/su

❯ ls -ld /usr/bin/sudo
-rwsr-xr-x 1 root root 182600 1月 14 21:29 /usr/bin/sudo

#4755

chmod u+s /usr/bin/su rwsr-xr-x

屏幕亮度

背光

临时修改

1
2
3
4
5
6
7
8
9
10
11
12
❯ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1920x1080 60.02*+
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
❯ xrandr --output DP-0 --brightness 0.6
❯ xrandr --output DP-0 --brightness 0.96

xrandr –output DISPLAY –brightness MONITOR

“DISPLAY”和”MONITOR”替换为您的实际值

永久

默认是100

1
2
3
4
#acpi_video0或acpi_video1或 nvidia_0
ls /sys/class/backlight/

echo 88 | tee /sys/class/backlight/nvidia_0/brightness

sudo update-rc.d custom-init defaults 90 #添加开机自启

sudo update-rc.d -f custom-init remove #移除

/etc/init.d
custom-init
❯ cat /etc/rc1.d/K01custom-init
#!/bin/sh
### BEGIN INIT INFO
# Provides:          custom-init   
# Required-Start:    $local_fs $network $remote_fs $syslog
# Required-Stop:     $local_fs $network $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the custom-init daemon
# Description:   custom script    
### END INIT INFO

#屏幕亮度 ##sudo update-rc.d custom-init defaults 90 ## sudo update-rc.d -f custom-init remove [ -f "/sys/class/backlight/nvidia_0/brightness" ] && { echo 72 | sudo tee /sys/class/backlight/nvidia_0/brightness ; }

调节伽马值

1
2
3
#默认值为1.0,越高则越亮,越低则越暗。
xgamma -gamma 0.9
xgamma -bgamma 0.9

-gamma f.f Gamma Value

-rgamma f.f Red Gamma Value

-ggamma f.f Green Gamma Value

-bgamma f.f Blue Gamma Value

点击打赏
文章目录
  1. 1. Xsession :warning:unable to write to /tmp; X session may exit with an error
    1. 1.1. 磁盘
    2. 1.2. user@
  2. 2. 屏幕亮度
    1. 2.1. 背光
      1. 2.1.1. 临时修改
      2. 2.1.2. 永久
    2. 2.2. 调节伽马值
载入天数...载入时分秒... ,