我已经在/etc/hostname和/etc/hosts上更改了名称,但右上角的显示名称没有变化。
/etc/hostname
和/etc/hosts
包含了你的主机名(也就是计算机名称)。关机按钮旁边显示的是你的用户名。
不建议仅为了显示不同的名称而更改你的用户名。如果想要显示你的真实姓名而不是用户名,打开终端并运行以下命令:
gconftool -s /system/indicator/me/display --type int 2
chfn -f "FirstName LastName" *username*
getent passwd $USER | cut -d ':' -f 5 | cut -d ',' -f 1
或者
finger -m $USER | head -n 1 | sed 's/\(.*\)Name\:\s\(.*\)$/\2/g'