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.
Answer 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.
Answer 2 :
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