Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use emacs24 and I usually start emacs as a daemon at start then use emacsclient frames.

But I've encountered a problem: After I created the first frame, then whenever I created a new frame (after the first frame is closed) there would be a system message "emacs24@myusername" is ready popped out so that the new frame loses focus (the focus is on the message), which is rather annoying. It seems that it is because even if I close all frames some buffers are still open (like Scratch and Messages). I am just wondering if there is a way to prevent the system message from popping out?


EDIT: forgot to mention that I am using Gnome 3.

share|improve this question

Here is what I do :

(defun px-raise-frame-and-give-focus ()
  (when window-system
    (x-focus-frame (selected-frame))
    (set-mouse-pixel-position (selected-frame) 4 4)
(add-hook 'server-switch-hook 'px-raise-frame-and-give-focus)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.