您尚未登录。

#1 2024-07-10 14:56:19

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

(已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

起因:
我的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)

离线

#2 2024-07-10 15:01:15

oldherl
会员
注册时间: 2017-10-14
帖子: 19

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

没看到图。
我建议保留一个软链接 /home/ypixcm 指向 /home/jz ,因为可能有些软件记住了原来的绝对路径

离线

#3 2024-07-10 15:04:32

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

oldherl 说:

没看到图。
我建议保留一个软链接 /home/ypixcm 指向 /home/jz ,因为可能有些软件记住了原来的绝对路径

谢谢回复 我已经更新了截图和日志当时没有输入完

离线

#4 2024-07-10 17:20:10

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

看起来就是 thunar 和 xfce4-panel 啥的没有启动成功。看看 ~/.xsession-errors?

离线

#5 2024-07-10 18:04:07

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

http://fars.ee/zWF_
我已经将/home/jz/.* 包含“ypixcm”字眼的配置文件都改成了“jz” xfce正常启动 我不知道“/”下有没有漏网之鱼(
总之linux改一个用户名比我想象的困难😅

最近编辑记录 Ypixcm (2024-07-10 18:04:40)

离线

#6 2024-07-10 18:47:00

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

看来 xfce4-session 还惦记着你的老家。

改名是个挺复杂的事情。Windows 上也一样(而且 Windows 会截取账号的前五个字符当用户名,使得你不得不事后再改……)。

离线

#7 2024-07-10 20:05:20

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

谢了😄

离线

#8 2024-07-11 09:41:47

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

我碰到了一个新的问题( Thunar变成英文了,其他的xfce组件、程序 都是中文

离线

#9 2024-07-11 10:26:46

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

把你的 LANG 环境变量导入到 systemd 和 dbus?

dbus-update-activation-environment --systemd LANG

离线

#10 2024-07-11 10:49:38

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

[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.

离线

#11 2024-07-11 11:05:23

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

谁让你 sudo 了啦……

离线

#12 2024-07-11 11:42:01

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

😅
dbus-update-activation-environment --systemd LANG

reboot后还是没有用(

离线

#13 2024-07-11 11:51:44

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

我还发现从Thunar启动的文件关联程序 也会变成English(

离线

#14 2024-07-11 11:58:30

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

reboot 之后当然没用了……你登录的时候执行一下。

离线

#15 2024-07-11 12:05:00

Ypixcm
会员
注册时间: 2024-07-10
帖子: 16

Re: (已解决)修改用户名 遗漏 操作导致xfce无法正常启动 / D-Bus 错误 thunar变成英文

[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)

离线

页脚