起因:
我的Arch上只有一个用户,叫做“ypixcm”,但是我嫌这个名字太长了,想要改成“jz”
我的操作:
注销xfce,转到tty ,输入如下命令
sudo usermod -l jz ypixcm
成功 用户名确实被修改成了“jz” 但是我还不满意,因为jz的用户目录还是“/home/ypixcm
重启(其实是不必要的)后 我发现在我的xfce终端下不能直接修改用户目录
于是转到tty
输入 (此处我忘注销xfce了):
pkill -u jz
xfce瞬间退出到显示管理器(LightDM)
然后我再转到tty输入:
(这个地方我忘了我是用户还是用root了😶)
sudo usermod -d /home/jz -m jz
重启,(我遗忘了还有UID ,用户组名 没有修改)
重启后从显示管理器登录xfce 如图所示 xfce没有正常启动
https://imgse.com/i/pkfLfjs
我转到tty2 收集日志:
fars.ee/JL3h
最近编辑记录 Ypixcm (2024-07-11 18:56:30)
离线
没看到图。
我建议保留一个软链接 /home/ypixcm 指向 /home/jz ,因为可能有些软件记住了原来的绝对路径
离线
没看到图。
我建议保留一个软链接 /home/ypixcm 指向 /home/jz ,因为可能有些软件记住了原来的绝对路径
谢谢回复 我已经更新了截图和日志当时没有输入完
离线
看起来就是 thunar 和 xfce4-panel 啥的没有启动成功。看看 ~/.xsession-errors?
离线
http://fars.ee/zWF_
我已经将/home/jz/.* 包含“ypixcm”字眼的配置文件都改成了“jz” xfce正常启动 我不知道“/”下有没有漏网之鱼(
总之linux改一个用户名比我想象的困难😅
最近编辑记录 Ypixcm (2024-07-10 18:04:40)
离线
看来 xfce4-session 还惦记着你的老家。
改名是个挺复杂的事情。Windows 上也一样(而且 Windows 会截取账号的前五个字符当用户名,使得你不得不事后再改……)。
离线
谢了😄
离线
我碰到了一个新的问题( Thunar变成英文了,其他的xfce组件、程序 都是中文
离线
把你的 LANG 环境变量导入到 systemd 和 dbus?
dbus-update-activation-environment --systemd LANG
离线
[jz@thinkpad ~]$ sudo dbus-update-activation-environment --systemd LANG
[sudo] jz 的密码:
dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
[jz@thinkpad ~]$ sudo dbus-update-activation-environment --systemd LANG=zh_CN.UTF-8
dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
我的D-Bus好像一直有问题
2024/7/11 09:59 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Thunar.FileManager1.service' is not named after the D-Bus name 'org.freedesktop.FileManager1'.
2024/7/11 09:59 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Tumbler.Cache1.service' is not named after the D-Bus name 'org.freedesktop.thumbnails.Cache1'.
2024/7/11 09:59 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Tumbler.Manager1.service' is not named after the D-Bus name 'org.freedesktop.thumbnails.Manager1'.
2024/7/11 09:59 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Tumbler.Thumbnailer1.service' is not named after the D-Bus name 'org.freedesktop.thumbnails.Thumbnailer1'.
2024/7/11 09:59 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
2024/7/11 09:59 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
2024/7/11 09:59 systemd Started D-Bus User Message Bus.
2024/7/11 10:00 lightdm pam_systemd_home(lightdm:auth): New sd-bus connection (system-bus-pam-systemd-home-609) opened.
2024/7/11 10:00 lightdm pam_systemd(lightdm-greeter:session): New sd-bus connection (system-bus-pam-systemd-560) opened.
2024/7/11 10:00 lightdm pam_systemd(lightdm:session): New sd-bus connection (system-bus-pam-systemd-609) opened.
2024/7/11 10:00 systemd Starting D-Bus User Message Bus Socket...
2024/7/11 10:00 systemd Listening on D-Bus User Message Bus Socket.
2024/7/11 10:00 systemd Starting D-Bus User Message Bus...
2024/7/11 10:00 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Thunar.FileManager1.service' is not named after the D-Bus name 'org.freedesktop.FileManager1'.
2024/7/11 10:00 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Tumbler.Cache1.service' is not named after the D-Bus name 'org.freedesktop.thumbnails.Cache1'.
2024/7/11 10:00 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Tumbler.Manager1.service' is not named after the D-Bus name 'org.freedesktop.thumbnails.Manager1'.
2024/7/11 10:00 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.Tumbler.Thumbnailer1.service' is not named after the D-Bus name 'org.freedesktop.thumbnails.Thumbnailer1'.
2024/7/11 10:00 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
2024/7/11 10:00 dbus-broker-launch Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
2024/7/11 10:00 systemd Started D-Bus User Message Bus.
2024/7/11 10:00 systemd Stopping D-Bus User Message Bus...
2024/7/11 10:00 systemd Stopped D-Bus User Message Bus.
2024/7/11 10:00 systemd Closed D-Bus User Message Bus Socket.
2024/7/11 10:30 sudo pam_systemd_home(sudo:auth): New sd-bus connection (system-bus-pam-systemd-home-3269) opened.
2024/7/11 10:34 sudo pam_systemd_home(sudo:auth): New sd-bus connection (system-bus-pam-systemd-home-3539) opened.
2024/7/11 10:34 sudo pam_systemd_home(sudo:account): New sd-bus connection (system-bus-pam-systemd-home-3546) opened.
2024/7/11 10:45 sudo pam_systemd_home(sudo:auth): New sd-bus connection (system-bus-pam-systemd-home-4585) opened.
离线
谁让你 sudo 了啦……
离线
😅
dbus-update-activation-environment --systemd LANG
reboot后还是没有用(
离线
我还发现从Thunar启动的文件关联程序 也会变成English(
离线
reboot 之后当然没用了……你登录的时候执行一下。
离线
[jz@thinkpad ~]$ dbus-update-activation-environment --systemd LANG
[jz@thinkpad ~]$ th
then thunar-settings thunar-volman-settings
thunar thunar-volman
[jz@thinkpad ~]$ thunar
[jz@thinkpad ~]$
thunar还是English(
jz@thinkpad ~]$ thunar -q
[jz@thinkpad ~]$ dbus-update-activation-environment --systemd LANG
[jz@thinkpad ~]$ thunar
这样才可以, thunar变成中文了
我应该如何让它永久生效
最近编辑记录 Ypixcm (2024-07-11 12:12:37)
离线