emacs not finding Xdefaults
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
emacs not finding Xdefaults         


Author: rustom
Date: Nov 28, 2007 06:10

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
6 Comments
Re: emacs not finding Xdefaults         


Author: Peter Dyballa
Date: Nov 28, 2007 07:00

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
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
Show full article (0.98Kb)
no comments
Re: emacs not finding Xdefaults         


Author: rustom
Date: Nov 28, 2007 07:42

On Nov 28, 8:00 pm, Peter Dyballa 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 > ...
Show full article (1.32Kb)
no comments
Re: emacs not finding Xdefaults         


Author: James Cloos
Date: Nov 28, 2007 12:07

>>>>> "rustom" == rustom 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.
Show full article (1.34Kb)
no comments
Re: emacs not finding Xdefaults         


Author: rustom
Date: Nov 29, 2007 06:13

On Nov 29, 1:07 am, James Cloos jhcloos.com> wrote:
>>>>>> "rustom" == rustom 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 ...
Show full article (1.83Kb)
no comments
Re: emacs not finding Xdefaults         


Author: rustom
Date: Dec 6, 2007 19:54

> On Nov 29, 1:07 am, James Cloos jhcloos.com> wrote:
>
>> I usually keep a symlink ~/.Xdefaults-$(hostname) pointing to .Xdefaults
>> to make management easier.
>
On Nov 29, 7:13 pm, rustom 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.
no comments
Re: emacs not finding Xdefaults         


Author: Peter Dyballa
Date: Dec 7, 2007 01:25

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.
no comments