How do I change the desktop name on the Unity panel?

33,343

Solution 1

You would likely need to build the unity or unity-2d source. Currently, in unity-5.12, it would be found in /plugins/unityshell/src/PanelMenuView.cpp, line 78:

 _desktop_name(_("Ubuntu Desktop"))

In unity-2d, unity-2d 5.12: /panel/applets/appname/appnameapplet.cpp, line 369:

d->m_label->setText(u2dTr("Ubuntu Desktop"));

Solution 2

There's a much quicker way than doug's method, by abusing the gettext translation system. Assuming you are using an English locale:

#Make a temporary text file using vim/gedit/cat/whatever
cat > /tmp/foo.po
msgid "Ubuntu Desktop"
msgstr "A Badger With A Gun"
^D

cd /usr/share/locale/en/LC_MESSAGES
sudo msgfmt -o unity.mo /tmp/foo.po

Then, either log out and back in, or just execute:

unity --replace

Solution 3

It appeared that, The Text on top-left corner uses the value from the file /usr/lib/os-release file. So, We need to edit the value for NAME key on that file only.

  1. Open with nano

    sudo nano /usr/lib/os-release
    
  2. Change the value of NAME from the first line. I changed it to L Buntu just for testing. The file's content after change

    NAME="L Buntu"
    VERSION="16.04.1 LTS (Xenial Xerus)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 16.04.1 LTS"
    VERSION_ID="16.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    UBUNTU_CODENAME=xenial
    
  3. Logout and Login again to see the change.

    Here is a tiny screenshot after change.

    screenshot after change

Tested on 16.04.

Solution 4

This is a bit unusual and may be reverted if you update Unity, but this should be possible.

  1. Open GEdit (or any other text editor) and insert the following:

    msgid "Ubuntu Desktop"
    msgstr "Mac OS X"
    
  2. Save the file wherever you'd like with the .po extension. I'll refer to it as ~/desktop.po.

  3. Open up the terminal and execute the following commands:

    cd /usr/share/locale/en/LC_MESSAGES
    sudo msgfmt -o unity.mo ~/desktop.po
    
  4. Log out and log back in and the text should have changed.

This is taking advantage of the translation system in Ubuntu to make it consider the English translation of "Ubuntu Desktop" to be "Mac OS X".

Share:
33,343

Related videos on Youtube

tanmay.01
Author by

tanmay.01

Updated on September 18, 2022

Comments

  • tanmay.01
    tanmay.01 over 1 year

    enter image description here

    How do I change my desktop name from Ubuntu Desktop to XYZ's Desktop via the Unity panel?

  • tanmay.01
    tanmay.01 almost 12 years
    Thank you for your response i am currently using 5.12 and will try compiling it from src..
  • UbuntuRob1
    UbuntuRob1 over 11 years
    Thanks Andrew. I've got to the point where i need to enter sudo msgfmt,but i get this: "(ubuntu@ubuntu:~$ sudo msgfmt -o unity.mo /home/ubuntu/documents/desktop.po) (sudo: msgfmt: command not found). Any ideas what might be happening? Hope you can help once again as i would love to get this done, it will all make sense once you see what i am doing as i know it looks a little odd at the moment.
  • UbuntuRob1
    UbuntuRob1 over 11 years
    I'm confused as to why this thread has been shut down because i already said that i didn't understand the previous topic, but a link has been posted anyway and the thread closed regardless of my comments. It's impossible for me to learn from reading something i simply don't understand. Is there any chance i could have it reopened please? I don't mean to sound rude but i don't get why threads have to be closed the minute an answer appears. Thanks.
  • Andrew Johnson
    Andrew Johnson over 11 years
    You can install msgfmt with sudo apt-get install gettext
  • Nate Totten
    Nate Totten over 10 years
    I do not advise using unity --replace, it made my interface unusable. Logging out and back in worked fine though. Also, using an empty string for msgstr doesn't work. You have to use whitespace as your string (e.g. " ") to remove the message.
  • Parto
    Parto about 10 years
    This is awesome.
  • mchid
    mchid about 10 years
    setsid unity will restart unity in 13.10