> There's a machine running Ubuntu 12.04 which I need to log into sometimes
> graphically, and sometimes on ssh. Can you tell me some way to ensure that a
> command ('emacs --daemon' to be specific) gets executed each time I log in?
> I know this is done through 'startup applications' in the GUI and through
> '.bash'_profile' otherwise- but how can I make it happen exactly once in
> both instances?

Write a wrapper script to invoke "emacs --daemon" (or whatever other
command). The wrapper first checks if the command is running already
or not. If not, it will launch it. Put the wrapper in both .bashrc and
your GUI (though it depends on how your GUI is launched) startup. If
you use something like xrdp, I suspect .bashrc (or .bash_profile?) may
be sufficient.

-- 
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

Reply via email to