Do not display user name in the panel

Solution 1:

(If you dont want to install other programs)

Open a terminal and use this command to disable the name display

gsettings set com.canonical.indicator.session show-real-name-on-panel false

enter image description here

To revert it back simple use

gsettings set com.canonical.indicator.session show-real-name-on-panel true

enter image description here

After using one of the commands you need to log off and back on or use unity --replace & to reload unity.

You can also remove the user switching menu from the indicator panel with

gsettings set com.canonical.indicator.session user-show-menu false

enter image description here

and enable it with

gsettings set com.canonical.indicator.session user-show-menu true

enter image description here

but if you do so you will disable both the username and the user switching indicator. You cannot remove the user switching menu while keeping the username indicator.

Solution 2:

open dconf-editor, go to "apps -> indicator-session" and unmark "user-show-menu"

enter image description here

logout and login again