Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i want to run the cmd:

#!/bin/bash    
emacs --daemon

to start emacs as server. i write it in a file myinit in etc/init.d and make a link S90myinit in etc/rcS.d, it works for root user, but login as normal user and run emacsclient, it doesn't work.

why? help,thanks!

share|improve this question
add comment

2 Answers

Dont bother. Simply use the alternate editor option. My EDITOR is set ~/bin/edit where edit is a script containing the following:-

#!/bin/bash
# edit
export GDK_NATIVE_WINDOWS=1
exec emacsclient --alternate-editor="" "$@"

This will start the daemon if its not already active.

share|improve this answer
add comment

You have to run Emacs as the user you want use Emacs. Usually the best is to not run it at boot time but at login time using e.g. Gnome's autostart feature.

If you really want to run it at boot time use something like

 su -l your_user -c /some/script 

where you replace /some/script with the path of a shell script that starts Emacs and *your_user* with your user

share|improve this answer
    
thanks. i use lxde,so no gnome autostart. i write a python script to check emacs,it's simple and works well. –  chenge Jul 2 '10 at 10:56
add comment

Your Answer

 
discard

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.