unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs not finding Xdefaults
@ 2007-11-28 14:10 rustom
  2007-11-28 15:00 ` Peter Dyballa
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: rustom @ 2007-11-28 14:10 UTC (permalink / raw)
  To: help-gnu-emacs

I have a .Xdefaults file containing things like

emacs-snapshot-gtk*Background: Wheat
emacs-snapshot-gtk*font: -adobe-courier-medium-r-normal--12-120-75-75-
m-70-iso8859-1

I also have emacs-snapshot-gtk in my startup programs in gnome.

Strangely when X starts it does not use these settings but if I start
emacs-snapshot-gtk from the shell it finds them.

The last time this happened when I ran xrdb < .Xdefaults the problem
got corrected. This time no such luck.

The only clue of what brought this on is that I edited .bashrc and
introduced a syntax error.
Even after removing it however the error is still there.

System: debian etch

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

* Re: emacs not finding Xdefaults
  2007-11-28 14:10 emacs not finding Xdefaults rustom
@ 2007-11-28 15:00 ` Peter Dyballa
       [not found] ` <mailman.4248.1196262037.18990.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2007-11-28 15:00 UTC (permalink / raw)
  To: rustom; +Cc: help-gnu-emacs


Am 28.11.2007 um 15:10 schrieb rustom:

> Strangely when X starts it does not use these settings but if I start
> emacs-snapshot-gtk from the shell it finds them.

There should be some file that starts the X session, a file like  
~/.xinitrc. One of the statements inside should be

	xrdb -merge $userresources

before the first X client is launched, where $userresources could  
also be an explicite file name. This way your X resource settings  
should be present for all X clients, including GNU Emacs.

If you determine the process ID of an X client that was launched at  
startup (xterm, maybe), the could invoke

	pstree -w -p <that PID<

and find out how your X session started.


Besides this, are you sure that ``emacs-snapshot-gtk*font´´ is the  
right name? For me ``Emacs*font´´ is sufficient ...

--
Greetings

   Pete      <\
              _\     O  _
             |o \  _\\_/-\='
_____________(_)|-(_)  (_)___________________________________

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

* Re: emacs not finding Xdefaults
       [not found] ` <mailman.4248.1196262037.18990.help-gnu-emacs@gnu.org>
@ 2007-11-28 15:42   ` rustom
  0 siblings, 0 replies; 8+ messages in thread
From: rustom @ 2007-11-28 15:42 UTC (permalink / raw)
  To: help-gnu-emacs

On Nov 28, 8:00 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 28.11.2007 um 15:10 schrieb rustom:
>
> > Strangely when X starts it does not use these settings but if I start
> > emacs-snapshot-gtk from the shell it finds them.
>
> There should be some file that starts the X session, a file like
> ~/.xinitrc. One of the statements inside should be
>
>         xrdb -merge $userresources
>
> before the first X client is launched, where $userresources could
> also be an explicite file name. This way your X resource settings
> should be present for all X clients, including GNU Emacs.
>
> If you determine the process ID of an X client that was launched at
> startup (xterm, maybe), the could invoke
>
>         pstree -w -p <that PID<
>
> and find out how your X session started.
>
> Besides this, are you sure that ``emacs-snapshot-gtk*font´´ is the
> right name? For me ``Emacs*font´´ is sufficient ...
>
> --
> Greetings
>
>    Pete      <\
>               _\     O  _
>              |o \  _\\_/-\='
> _____________(_)|-(_)  (_)___________________________________

Thanks for the detailed answer -- also for telling me about pstree --
very useful.

But now its working of itself!! All that I (think I)  did was reboot
the machine once inbetween. :-) ;-)
So I guess the asymptote of all OSes is windows

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

* Re: emacs not finding Xdefaults
  2007-11-28 14:10 emacs not finding Xdefaults rustom
  2007-11-28 15:00 ` Peter Dyballa
       [not found] ` <mailman.4248.1196262037.18990.help-gnu-emacs@gnu.org>
@ 2007-11-28 20:07 ` James Cloos
       [not found] ` <mailman.4270.1196280526.18990.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 8+ messages in thread
From: James Cloos @ 2007-11-28 20:07 UTC (permalink / raw)
  To: rustom; +Cc: help-gnu-emacs

>>>>> "rustom" == rustom <rustompmody@gmail.com> writes:

rustom> I have a .Xdefaults file containing things like

rustom> Strangely when X starts it does not use these settings but if I
rustom> start emacs-snapshot-gtk from the shell it finds them.

There are two ways an ~/.Xdefaults file can get used.

Many server startup script merge any ~/.Xdefaults files into the
server's resource db.  This finds ~/.Xdefaults files on the box where
the X server process runs.  (That distinction becomes relevant whenever
remote clients are run using the local server for their DISPLAY.)

Also, libX11 will load in any ~/.Xdefaults files it finds whenever a
client starts up.  Except that it will ignore ~/.Xdefaults if any
resources are already in the server's resource db.

Finally, libX11 will also look for and load resources from
any ~/.Xdefaults-$(hostname) files it finds.

In the case of remote clients, libX11 of course only sees files on the
box where the client is running.

If you use ~/.Xdefaults-$(hostname) (of course replacing $(hostname)
with the output of /bin/hostname) instead of ~/.Xdefaults you can be
sure it is loaded every time a client starts.

I usually keep a symlink ~/.Xdefaults-$(hostname) pointing to .Xdefaults
to make management easier.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

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

* Re: emacs not finding Xdefaults
       [not found] ` <mailman.4270.1196280526.18990.help-gnu-emacs@gnu.org>
@ 2007-11-29 14:13   ` rustom
  2007-12-07  3:54     ` rustom
  0 siblings, 1 reply; 8+ messages in thread
From: rustom @ 2007-11-29 14:13 UTC (permalink / raw)
  To: help-gnu-emacs

On Nov 29, 1:07 am, James Cloos <cl...@jhcloos.com> wrote:
> >>>>> "rustom" == rustom <rustompm...@gmail.com> writes:
>
> rustom> I have a .Xdefaults file containing things like
>
> rustom> Strangely when X starts it does not use these settings but if I
> rustom> start emacs-snapshot-gtk from the shell it finds them.
>
> There are two ways an ~/.Xdefaults file can get used.
>
> Many server startup script merge any ~/.Xdefaults files into the
> server's resource db.  This finds ~/.Xdefaults files on the box where
> the X server process runs.  (That distinction becomes relevant whenever
> remote clients are run using the local server for their DISPLAY.)
>
> Also, libX11 will load in any ~/.Xdefaults files it finds whenever a
> client starts up.  Except that it will ignore ~/.Xdefaults if any
> resources are already in the server's resource db.
>
> Finally, libX11 will also look for and load resources from
> any ~/.Xdefaults-$(hostname) files it finds.
>
> In the case of remote clients, libX11 of course only sees files on the
> box where the client is running.
>
> If you use ~/.Xdefaults-$(hostname) (of course replacing $(hostname)
> with the output of /bin/hostname) instead of ~/.Xdefaults you can be
> sure it is loaded every time a client starts.

Cant say I understand all the subtleties.  What I can say is that this
is one single PC. So how separated client and server issues should
arise is not clear.

>
> I usually keep a symlink ~/.Xdefaults-$(hostname) pointing to .Xdefaults
> to make management easier.

Well I can do that. But as I said I dont fully understand what you've
said (and the problem solved itself (not something a programmer feels
too happy about (sorry for the lispy () ))) so rather I'll bear your
advice in mind and the next time I have a similar problem I'll try
this.
Thanks

Rustom

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

* Re: emacs not finding Xdefaults
  2007-11-29 14:13   ` rustom
@ 2007-12-07  3:54     ` rustom
  2007-12-07  9:25       ` Peter Dyballa
  2007-12-07 17:11       ` reader
  0 siblings, 2 replies; 8+ messages in thread
From: rustom @ 2007-12-07  3:54 UTC (permalink / raw)
  To: help-gnu-emacs


> On Nov 29, 1:07 am, James Cloos <cl...@jhcloos.com> wrote:
>
> > I usually keep a symlink ~/.Xdefaults-$(hostname) pointing to .Xdefaults
> > to make management easier.
>
On Nov 29, 7:13 pm, rustom <rustompm...@gmail.com> wrote:
> Well I can do that....
> ... the next time I have a similar problem I'll try this.

Well the problem recurred and I tried this but this did not work.
What worked was a. xrdb < .Xdefaults followed by reboot (logout not
enough)

What triggered? Dunno but I think it was having one system firefox
(iceape actually) interleaved with the newest firefox 3 alpha5.

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

* Re: emacs not finding Xdefaults
  2007-12-07  3:54     ` rustom
@ 2007-12-07  9:25       ` Peter Dyballa
  2007-12-07 17:11       ` reader
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2007-12-07  9:25 UTC (permalink / raw)
  To: rustom; +Cc: help-gnu-emacs


Am 07.12.2007 um 04:54 schrieb rustom:

> Well the problem recurred and I tried this but this did not work.
> What worked was a. xrdb < .Xdefaults followed by reboot (logout not
> enough)


This is pretty useless. And this substitutes all X resource settings  
valid until then to those in the .Xdefaults file. And they're then  
are only valid till the reboot ...

Could these commands help you?

	man xrdb
	man xinit
	man startx

--
Greetings

   Pete

Clovis' Consideration of an Atmospheric Anomaly:
         The perversity of nature is nowhere better demonstrated
         than by the fact that, when exposed to the same atmosphere,
         bread becomes hard while crackers become soft.

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

* Re: emacs not finding Xdefaults
  2007-12-07  3:54     ` rustom
  2007-12-07  9:25       ` Peter Dyballa
@ 2007-12-07 17:11       ` reader
  1 sibling, 0 replies; 8+ messages in thread
From: reader @ 2007-12-07 17:11 UTC (permalink / raw)
  To: help-gnu-emacs

rustom <rustompmody@gmail.com> writes:

>> On Nov 29, 1:07 am, James Cloos <cl...@jhcloos.com> wrote:
>>
>> > I usually keep a symlink ~/.Xdefaults-$(hostname) pointing to .Xdefaults
>> > to make management easier.
>>
> On Nov 29, 7:13 pm, rustom <rustompm...@gmail.com> wrote:
>> Well I can do that....
>> ... the next time I have a similar problem I'll try this.
>
> Well the problem recurred and I tried this but this did not work.
> What worked was a. xrdb < .Xdefaults followed by reboot (logout not
> enough)
>
> What triggered? Dunno but I think it was having one system firefox
> (iceape actually) interleaved with the newest firefox 3 alpha5.

Not sure if this might be true on debian but on some linux distros the
.Xdefaults file became obsolete in favor of .[Xx]resources some time
back. 

I symlink an ~/.Xresources file to ~/.Xdefaults so both bases are
covered.

(ln -s ~/.Xdefaults ~/.Xresources  - just on the off chance you didn't
know how)

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

end of thread, other threads:[~2007-12-07 17:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 14:10 emacs not finding Xdefaults rustom
2007-11-28 15:00 ` Peter Dyballa
     [not found] ` <mailman.4248.1196262037.18990.help-gnu-emacs@gnu.org>
2007-11-28 15:42   ` rustom
2007-11-28 20:07 ` James Cloos
     [not found] ` <mailman.4270.1196280526.18990.help-gnu-emacs@gnu.org>
2007-11-29 14:13   ` rustom
2007-12-07  3:54     ` rustom
2007-12-07  9:25       ` Peter Dyballa
2007-12-07 17:11       ` reader

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).