0

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!

1

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.

| improve this answer | |
0

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

| 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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