Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How do I make it so that gnome-do launches "emacsclient -n -g" instead of emacs?

I've got an init script setup to launch emacs daemon, and I can run emacsclient from the terminal. However, I'd like to be able to launch an emacs GUI that connects to the daemon from gnome-do.

Any ideas?

share|improve this question
up vote 3 down vote accepted

Create a custom Applications menu item. Use something like "GNU Emacs 23 (Client)" in the name field and emacsclient -c for the command. Gnome Do should automatically pick up on this and allow you to launch an emacsclient from Do.

(If you're typing something like "emacs" in Do to launch Emacs, you might need to use the down arrow a few times to select the new client item until Do gets the hint)

share|improve this answer
Er, I said -c, but you should be able to use whatever flags you want. -n doesn't seem to be necessary, though. – nocash May 10 '10 at 16:04

For the most part Do uses what xdg to find out what to do with files, so if you use a desktop environment (e.g. Gnome or KDE) you can set the preferred application to emacsclient -n -g for the typical filetypes in there and Do should pick it up.

share|improve this answer

Could you wrap the emacsclient invocation in a shell script and make sure it's in your $PATH? That way, when you run Gnome-Do, you could just type in your shell script and it should execute.

I did this with a customized launcher for Flex Builder. I wrote a shell-script which invoked the command-line; added it to my ~/bin directory (which is in my $PATH); and it runs via Gnome-Do.

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.