* starting emacs remote doesn't load .emacs
@ 2007-10-10 11:14 Stefan Horomnea
2007-10-10 12:09 ` Stefan Horomnea
[not found] ` <mailman.1922.1192019338.18990.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Stefan Horomnea @ 2007-10-10 11:14 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I am running emacs21 on FreeBSD. If I start emacs directly from the
machine, it loads and has effect the ~/.emacs file.
If i log on the machine remotly via ssh (from another machine via xterm)
then the emacs doesn't find the same ~/.emacs file. So everything I
write in my .emacs file on the remote machine is useless. Why it can't
find it ? How can I debug this ?
Thanks,
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: starting emacs remote doesn't load .emacs
2007-10-10 11:14 starting emacs remote doesn't load .emacs Stefan Horomnea
@ 2007-10-10 12:09 ` Stefan Horomnea
2007-10-10 18:05 ` Peter Dyballa
[not found] ` <mailman.1922.1192019338.18990.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 7+ messages in thread
From: Stefan Horomnea @ 2007-10-10 12:09 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
Ok, I got it :)
I logged as bob user and then su to root. Emacs wasn't looking for
/root/.emacs but for /home/bob/.emacs
i just linked: ln -s /root/.emacs /home/bob/.emacs
That thing it does according to the manual:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init
Stefan Horomnea wrote:
> Hello,
>
> I am running emacs21 on FreeBSD. If I start emacs directly from the
> machine, it loads and has effect the ~/.emacs file.
> If i log on the machine remotly via ssh (from another machine via
> xterm) then the emacs doesn't find the same ~/.emacs file. So
> everything I write in my .emacs file on the remote machine is useless.
> Why it can't find it ? How can I debug this ?
>
> Thanks,
> Stefan
>
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: starting emacs remote doesn't load .emacs
[not found] ` <mailman.1922.1192019338.18990.help-gnu-emacs@gnu.org>
@ 2007-10-10 17:31 ` Stefan Monnier
2007-10-11 5:35 ` Tim X
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2007-10-10 17:31 UTC (permalink / raw)
To: help-gnu-emacs
> I logged as bob user and then su to root.
I strongly recommend you stay away from "su root" and use "su - root" (or
just "su -") instead. That will properly reset your environment and thus
avoid problems such as root reading/overwriting your .emacs file.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: starting emacs remote doesn't load .emacs
2007-10-10 12:09 ` Stefan Horomnea
@ 2007-10-10 18:05 ` Peter Dyballa
0 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2007-10-10 18:05 UTC (permalink / raw)
To: Stefan Horomnea; +Cc: help-gnu-emacs
Am 10.10.2007 um 14:09 schrieb Stefan Horomnea:
>
> I logged as bob user and then su to root. Emacs wasn't looking for /
> root/.emacs but for /home/bob/.emacs
> i just linked: ln -s /root/.emacs /home/bob/.emacs
You could also use: emacs -u bob.
--
Greetings
Pete
People say that if you play Microsoft CD's backwards, you hear
satanic things, but that's nothing, because if you play them
forwards, they install Windows.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: starting emacs remote doesn't load .emacs
[not found] ` <mailman.1922.1192019338.18990.help-gnu-emacs@gnu.org>
2007-10-10 17:31 ` Stefan Monnier
@ 2007-10-11 5:35 ` Tim X
2007-10-11 14:19 ` Joel J. Adamson
1 sibling, 1 reply; 7+ messages in thread
From: Tim X @ 2007-10-11 5:35 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Horomnea <stefan@softexperience.ro> writes:
> Hello,
>
> Ok, I got it :)
>
> I logged as bob user and then su to root. Emacs wasn't looking for
> /root/.emacs but for /home/bob/.emacs
> i just linked: ln -s /root/.emacs /home/bob/.emacs
>
this is a bad slution on many levels.
1. Read the man page on su and look at the difference between su and su -
If you want things to be relative to the root user environment, you need
the -
2. It is a bad idea to run any program as root unless you absolutely have
to. there are many reasons for this, mainly relating to security and not
'shooting yourself in the foot'. If you think you have to run as root
all the time, then there is something you have misunderstood. Let us
know why you feel you need to run as root all the time and we can
probably explain things so that you won't need to. There are rare
occasions where it does make sense to run emacs as root, but these are
rare and without meaning to sound rude, given your unawareness of how su
and shell environments interact, I suspect you don't fall into one of
those rare situations.
3. If you are running emacs 22, you iwll have tramp installed. tramp will
allow you to easily edit files owned by root or execute commands as
root. Use this rather than running emacs as root.
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: starting emacs remote doesn't load .emacs
2007-10-11 5:35 ` Tim X
@ 2007-10-11 14:19 ` Joel J. Adamson
2007-10-12 2:43 ` Tim X
0 siblings, 1 reply; 7+ messages in thread
From: Joel J. Adamson @ 2007-10-11 14:19 UTC (permalink / raw)
To: help-gnu-emacs
Tim X <timx@nospam.dev.null> writes:
> Stefan Horomnea <stefan@softexperience.ro> writes:
> 3. If you are running emacs 22, you iwll have tramp installed. tramp will
> allow you to easily edit files owned by root or execute commands as
> root. Use this rather than running emacs as root.
To open a file, use /su::<filename>
To use dired in root mode /su::/directory
Then get out of root mode as soon as possible (we're telling you this
because we've made mistakes ourselves --- well, at least I have).
Joel
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: starting emacs remote doesn't load .emacs
2007-10-11 14:19 ` Joel J. Adamson
@ 2007-10-12 2:43 ` Tim X
0 siblings, 0 replies; 7+ messages in thread
From: Tim X @ 2007-10-12 2:43 UTC (permalink / raw)
To: help-gnu-emacs
jadamson@partners.org (Joel J. Adamson) writes:
> Tim X <timx@nospam.dev.null> writes:
>
>> Stefan Horomnea <stefan@softexperience.ro> writes:
>
>> 3. If you are running emacs 22, you iwll have tramp installed. tramp will
>> allow you to easily edit files owned by root or execute commands as
>> root. Use this rather than running emacs as root.
>
> To open a file, use /su::<filename>
>
> To use dired in root mode /su::/directory
>
> Then get out of root mode as soon as possible (we're telling you this
> because we've made mistakes ourselves --- well, at least I have).
>
Hehehe. Night before end of year meeting with my supervisor. Noticed a
package I'd installed that I no longer wanted. Cd to the root of the
package dir and entered rm -rf *. Sitting there, quite tired and not paying
careful attention. Noticed lines coming up about not being able to delete
from a read only device. thinking, thats strange. why would I see those
messages?
then it hit me. I was still logged in as root. The cd had left me at the /
dir, so rm -rf * was deleteing my whole file system. The messages were a
result of trying to delete files from my cdrom.
My partner gets very worried as I walk into the lounge room, sit down and
just laugh in a disturbing manic way.
Worst part, I already knew it was a bad idea to run as root when not
necessary. However, I thought I knew what I was doing and would be careful
enough - after all, I had been working as a sys admin for a number of years
and was pretty experienced.
Two lessons learnt - never run as root unless you have to and be careful of
the over confidence and arrogance that can come with experience!
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-12 2:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10 11:14 starting emacs remote doesn't load .emacs Stefan Horomnea
2007-10-10 12:09 ` Stefan Horomnea
2007-10-10 18:05 ` Peter Dyballa
[not found] ` <mailman.1922.1192019338.18990.help-gnu-emacs@gnu.org>
2007-10-10 17:31 ` Stefan Monnier
2007-10-11 5:35 ` Tim X
2007-10-11 14:19 ` Joel J. Adamson
2007-10-12 2:43 ` Tim X
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.