emacs after su root
I've got a problem with emacs. After I've used su to become root, emacs still tries to load the configuration file from the user I su-ed from. It's very annoying, any clues on why that happens?
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
yeah that works..but why? I don't recall any of this behaviour from my debian installation (running gentoo now)
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
su
just changes to superuser mode whereas su -
actually runs all the login scripts as well (and thus sets up paths, etc.)
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
ok..but I looked through the login scripts and I couldn't find anything that I could possible relate to the emacs configuration. The emacs manual only says that it loads ~/.emacs or ~/.emacs.el and I don't see why that wouldn't work with a regular su.
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
try looking at differences in environment variables.
like HOME and USER
like HOME and USER
This includes setting the environment variable that specifies your home directory. Can't remember the variable name offhand and I'm not in Linux atm. When you run su without the - you are effectively still the same user, just with extra superuser powers. You're not actually logged in as root.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
Ok, thx people, seems like the USER variable weren't being set when doing a regular su, I guess that's why it read the wrong configuration.
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement