all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs running as root with different colors than the standard one.
@ 2012-07-13  0:19 Alexandre Schenberg
  2012-07-13  6:00 ` PJ Weisberg
  2012-07-13 15:41 ` Doug Lewan
  0 siblings, 2 replies; 9+ messages in thread
From: Alexandre Schenberg @ 2012-07-13  0:19 UTC (permalink / raw)
  To: help-gnu-emacs

As the title says, when I executes emacs as root, it uses colors
different when compared with it running with the privileges of a
regular user.
So I would like to know where these colors settings might be stored,
so that I can copy then to use as a regular user.
P.S:  There isn't a .emacs file under root
P.S2: Only when running emacs directly as root it uses the mentioned
colors, when I use "su" it uses the standard colors.

Thanks for any advices.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs running as root with different colors than the standard one.
  2012-07-13  0:19 Emacs running as root with different colors than the standard one Alexandre Schenberg
@ 2012-07-13  6:00 ` PJ Weisberg
  2012-07-13 15:41 ` Doug Lewan
  1 sibling, 0 replies; 9+ messages in thread
From: PJ Weisberg @ 2012-07-13  6:00 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, Jul 12, 2012 at 5:19 PM, Alexandre Schenberg
<ale.schenberg@gmail.com> wrote:
> As the title says, when I executes emacs as root, it uses colors
> different when compared with it running with the privileges of a
> regular user.
> So I would like to know where these colors settings might be stored,
> so that I can copy then to use as a regular user.
> P.S:  There isn't a .emacs file under root
> P.S2: Only when running emacs directly as root it uses the mentioned
> colors, when I use "su" it uses the standard colors.
>
> Thanks for any advices.
>

Are you sure there's no .emacs file for root?  Check the value of
user-init-file (use 'C-h v').  If that really doesn't correspond to
any file, then try running 'emacs -q' as your normal user.  That'll
tell Emacs not to load your init file, so you can see if maybe there's
something in *your* init file that's causing the colors to be
different.

-PJ

Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Emacs running as root with different colors than the standard one.
  2012-07-13  0:19 Emacs running as root with different colors than the standard one Alexandre Schenberg
  2012-07-13  6:00 ` PJ Weisberg
@ 2012-07-13 15:41 ` Doug Lewan
  2012-07-15  6:28   ` Alexandre Schenberg
       [not found]   ` <mailman.4808.1342333701.855.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 9+ messages in thread
From: Doug Lewan @ 2012-07-13 15:41 UTC (permalink / raw)
  To: Alexandre Schenberg, help-gnu-emacs@gnu.org

There could be something in site-lisp on your OS that makes root different. (Often /usr/share/emacs/site-lisp or /usr/share/emacs/VERS.ION/site-lisp, but not always.)

FWIW I use different colors for different users on different machines all the time. It makes distributed development /much/ easier. 

And for dangerous users like root I use unpleasant colors that really get my attention. It makes it much easier to not do stoopid things.

,Doug

> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of Alexandre Schenberg
> Sent: Thursday, 2012 July 12 20:19
> To: help-gnu-emacs@gnu.org
> Subject: Emacs running as root with different colors than the standard
> one.
> 
> As the title says, when I executes emacs as root, it uses colors
> different when compared with it running with the privileges of a
> regular user.
> So I would like to know where these colors settings might be stored,
> so that I can copy then to use as a regular user.
> P.S:  There isn't a .emacs file under root
> P.S2: Only when running emacs directly as root it uses the mentioned
> colors, when I use "su" it uses the standard colors.
> 
> Thanks for any advices.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs running as root with different colors than the standard one.
  2012-07-13 15:41 ` Doug Lewan
@ 2012-07-15  6:28   ` Alexandre Schenberg
       [not found]   ` <mailman.4808.1342333701.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Alexandre Schenberg @ 2012-07-15  6:28 UTC (permalink / raw)
  To: Doug Lewan; +Cc: help-gnu-emacs@gnu.org

"C-h v" asks me to: "describle variable"
emacs -q doesn't change anything, both as normal user (keep the
default color used by the normal user) or as root (keeps the default
color used by root)

There is only a file in /usr/share/emacs/VERS.ION/site-lips that
doesn't have anything to do with color and several files in
/usr/share/emacs/site-lisp

2012/7/13, Doug Lewan <dougl@shubertticketing.com>:
> There could be something in site-lisp on your OS that makes root different.
> (Often /usr/share/emacs/site-lisp or /usr/share/emacs/VERS.ION/site-lisp,
> but not always.)
>
> FWIW I use different colors for different users on different machines all
> the time. It makes distributed development /much/ easier.
>
> And for dangerous users like root I use unpleasant colors that really get my
> attention. It makes it much easier to not do stoopid things.
>
> ,Doug
>
>> -----Original Message-----
>> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
>> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
>> Behalf Of Alexandre Schenberg
>> Sent: Thursday, 2012 July 12 20:19
>> To: help-gnu-emacs@gnu.org
>> Subject: Emacs running as root with different colors than the standard
>> one.
>>
>> As the title says, when I executes emacs as root, it uses colors
>> different when compared with it running with the privileges of a
>> regular user.
>> So I would like to know where these colors settings might be stored,
>> so that I can copy then to use as a regular user.
>> P.S:  There isn't a .emacs file under root
>> P.S2: Only when running emacs directly as root it uses the mentioned
>> colors, when I use "su" it uses the standard colors.
>>
>> Thanks for any advices.
>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs running as root with different colors than the standard one.
       [not found]   ` <mailman.4808.1342333701.855.help-gnu-emacs@gnu.org>
@ 2012-07-15  8:43     ` Pascal J. Bourguignon
  2012-07-15 11:09       ` Cecil Westerhof
  0 siblings, 1 reply; 9+ messages in thread
From: Pascal J. Bourguignon @ 2012-07-15  8:43 UTC (permalink / raw)
  To: help-gnu-emacs

Alexandre Schenberg <ale.schenberg@gmail.com> writes:

>>> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
>>> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
>>> Behalf Of Alexandre Schenberg
>>> Sent: Thursday, 2012 July 12 20:19
>>> To: help-gnu-emacs@gnu.org
>>> Subject: Emacs running as root with different colors than the standard
>>> one.
>>>
>>> As the title says, when I executes emacs as root, it uses colors
>>> different when compared with it running with the privileges of a
>>> regular user.
>>> So I would like to know where these colors settings might be stored,
>>> so that I can copy then to use as a regular user.
>>> P.S:  There isn't a .emacs file under root

Then why don't you create it?

>>> P.S2: Only when running emacs directly as root it uses the mentioned
>>> colors, when I use "su" it uses the standard colors.

Put that:

    (when (= (user-uid) 0)
      (set-background-color "red")
      (set-foreground-color "black"))

both in your ~/.emacs and in root's.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs running as root with different colors than the standard one.
  2012-07-15  8:43     ` Pascal J. Bourguignon
@ 2012-07-15 11:09       ` Cecil Westerhof
  0 siblings, 0 replies; 9+ messages in thread
From: Cecil Westerhof @ 2012-07-15 11:09 UTC (permalink / raw)
  To: help-gnu-emacs

Op zondag 15 jul 2012 10:43 CEST schreef Pascal J. Bourguignon:

> Put that:
>
> (when (= (user-uid) 0)
> (set-background-color "red")
> (set-foreground-color "black"))
>
> both in your ~/.emacs and in root's.

Does not seem to work. I put as the last statement into my .emacs:
    (when (= (user-uid) 0)
      (set-foreground-color "#a9eadf"))

The messages while starting are in the asked color, but after being
started the text is not.

So I changed it to:
    (when (= (user-uid) 0)
      (run-with-timer 2 nil
                      '(lambda () (set-foreground-color "#a9eadf"))))

Now the messages are not, but the text (very soon) after being started
is.

And now I put it on a more sensible place. ;-}

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs running as root with different colors than the standard one.
       [not found] <mailman.4673.1342138855.855.help-gnu-emacs@gnu.org>
@ 2012-07-16  0:58 ` Jason Rumney
  2012-07-18  9:11   ` Alexandre Schenberg
  0 siblings, 1 reply; 9+ messages in thread
From: Jason Rumney @ 2012-07-16  0:58 UTC (permalink / raw)
  To: gnu.emacs.help; +Cc: help-gnu-emacs

On Friday, 13 July 2012 08:19:03 UTC+8, Alexandre Schenberg  wrote:

> As the title says, when I executes emacs as root, it uses colors
> different when compared with it running with the privileges of a
> regular user.
> So I would like to know where these colors settings might be stored,
> so that I can copy then to use as a regular user.

Redhat based distributions used to (I haven't used one for a number of years, so don't know if it is still the case) include a .Xdefaults in root's home directory that set the background and foreground colors for various applications to make it obvious that you were using the application as root.

Perhaps that is the case here?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs running as root with different colors than the standard one.
  2012-07-16  0:58 ` Jason Rumney
@ 2012-07-18  9:11   ` Alexandre Schenberg
  0 siblings, 0 replies; 9+ messages in thread
From: Alexandre Schenberg @ 2012-07-18  9:11 UTC (permalink / raw)
  To: Jason Rumney; +Cc: help-gnu-emacs, gnu.emacs.help

Bingo, that's it. Actually, not precisely, since in my case there
isn't a .Xdefaults. However I saw a file that by it's name made me
think that could be it. And it was the .Xresources file.


P.S: Create the .emacs file in root wouldn't solve my problem since
what I want was just find the colors used by root to use as regular
use.

Thanks to all for the effort.

2012/7/15, Jason Rumney <jasonrumney@gmail.com>:
> Redhat based distributions used to (I haven't used one for a number of
> years, so don't know if it is still the case) include a .Xdefaults in root's
> home directory that set the background and foreground colors for various
> applications to make it obvious that you were using the application as
> root.
>
> Perhaps that is the case here?
>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs running as root with different colors than the standard one.
       [not found] <mailman.4855.1342400337.855.help-gnu-emacs@gnu.org>
@ 2012-07-21  0:22 ` jidanni
  0 siblings, 0 replies; 9+ messages in thread
From: jidanni @ 2012-07-21  0:22 UTC (permalink / raw)
  To: help-gnu-emacs

Look for Hotpink in http://jidanni.org/comp/configuration/.emacs



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-07-21  0:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-13  0:19 Emacs running as root with different colors than the standard one Alexandre Schenberg
2012-07-13  6:00 ` PJ Weisberg
2012-07-13 15:41 ` Doug Lewan
2012-07-15  6:28   ` Alexandre Schenberg
     [not found]   ` <mailman.4808.1342333701.855.help-gnu-emacs@gnu.org>
2012-07-15  8:43     ` Pascal J. Bourguignon
2012-07-15 11:09       ` Cecil Westerhof
     [not found] <mailman.4673.1342138855.855.help-gnu-emacs@gnu.org>
2012-07-16  0:58 ` Jason Rumney
2012-07-18  9:11   ` Alexandre Schenberg
     [not found] <mailman.4855.1342400337.855.help-gnu-emacs@gnu.org>
2012-07-21  0:22 ` jidanni

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.