So I changed the name of my computer recently, by editing /etc/hostname. The bash prompt is user@name, so I know it has worked.

But in emacs, in the window bar it says [email protected]. Tiscali is my internet provider. Before I changed it, emacs just had emacs@oldname in the window bar.

How can I remove my IP's name from the window bar in emacs?

2 Answers 2


The name in /etc/hostname is what your computer thinks it's called. That's often what is meant by hostname.

Computers connected to the Internet (including intranets) have names; more precisely, most Internet network interfaces have a name associated with their IP address. Internet nodes that are not routers generally have a single network interface worth consideration, and the name associated to this interface is called its fully qualified domain name (FQDN). The FQDN is the name you can use to designate your computer from any other Internet node (well, assuming there are no complex configurations involved). Generally, to keep confusion down, the FQDN is something like foo.example.com where foo is the host name.

When you have a single frame open, Emacs uses the value of the system-name variable as the frame title. This variable is set to the FQDN when Emacs starts. You can change it from your .emacs if you wish. This variable isn't used much, so don't worry about changing it. It is used to form a default email address when you send mail or news posts from within Emacs, but you'd almost always override that email address setting anyway.

The frame title format is determined by the frame-title-format variable (unless overridden for a specific frame). You can change it if you'd like to use something other than system-name when there is a single frame. For example, if you want to always see the buffer name in the frame title (as opposed to when there is only one Emacs frame), you can set it to "%b".

  • 1
    Here's mine: (multiple-frames "%b" ("" invocation-name "@" system-name)) Commented Sep 24, 2010 at 16:50
  • How do I change my FQDN? I know how to change /etc/hostname, but that doesn't change the fully qualified name...
    – Seamus
    Commented Sep 25, 2010 at 17:35
  • @Seamus: Simple answer: in /etc/hosts, on the line corresponding to your IP address, change or add a name containing at least one dot. True answer: It depends on your network setup and what you want to achieve (there's more than one way to determine the FQDN, and they sometimes give different results). Commented Sep 25, 2010 at 19:48

You might walk through the steps in http://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html

Emacs seems to use the full qualified domain name, so make sure this matches your desired name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .