PDA

View Full Version : [SOLVED] .Xresources, emacs



ceb
May 19th, 2010, 04:17 PM
Hi,

I'm using Ubuntu 8.04 LTS.

I have the following in my .Xresources file:


emacs*Background: DarkSlateGray
emacs*Foreground: Wheat
emacs*pointerColor: Red
emacs*cursorColor: Red
emacs*bitmapIcon: on
emacs*font: -*-courier-medium-r-normal-*-18-*-75-75-m-110-*-*
emacs.geometry: 80x50


When I launch emacs from a terminal window, these settings are applied. When I launch emacs from the Ubuntu menu, though, the settings are not applied. I have no idea how to tell Ubuntu about these settings, or even what to search for to find out. In previous versions of Ubuntu I have managed to muddle my way through getting emacs to launch from outside a terminal with my preferred settings, but I never understood how, and haven't been able to repeat it this time. Could someone give me a pointer?

Thanks very much,
Chris

ceb
May 20th, 2010, 04:55 PM
Have I asked in the wrong forum? I couldn't find an answer by searching these forums or google.

Even if someone could suggest somewhere to go to get an answer, I'd be very grateful.

Thanks

m_duck
May 20th, 2010, 05:17 PM
I couldn't duplicate the problem exactly on my system, but try putting those details in .Xdefaults instead of .Xresources.

With those details in .Xresources on my computer, emacs ignored them regardless of how I started it, however in .Xdefaults the settings were read. Note: I'm not using Ubuntu at present so this may or may not be of use.

ceb
June 4th, 2010, 10:53 AM
I couldn't duplicate the problem exactly on my system, but try putting those details in .Xdefaults instead of .Xresources.

Thanks, I tried that, but it didn't help. I also tried .Xdefaults-machinename and .Xresources-machinename.

Any other ideas?

jpkotta
June 5th, 2010, 05:12 AM
Have you tried
xrdb -merge ~/.Xresources

BoneKracker
June 5th, 2010, 05:24 AM
Have you tried
xrdb -merge ~/.Xresources

I'm not an Ubuntu user, but shouldn't the distro's startup scripts for X be automatically taking care of merging ~/.Xresources?

jpkotta
June 5th, 2010, 09:45 PM
I'm not an Ubuntu user, but shouldn't the distro's startup scripts for X be automatically taking care of merging ~/.Xresources?

Yep, but you have to start a new X session if you edit ~/.Xresources, or use xrdb manually. BTW, it looks like the Xsession scripts only check ~/.Xresources, not ~/.Xdefaults.

BoneKracker
June 6th, 2010, 03:24 AM
Yep, but you have to start a new X session if you edit ~/.Xresources, or use xrdb manually. BTW, it looks like the Xsession scripts only check ~/.Xresources, not ~/.Xdefaults.

If I'm understanding you correctly, you mean one must restart the X session for the ~/.Xresources to be automatically merged. Yes, that would make complete sense. So issuing the command manually would avoid needing to restart X. Yes, it's coming back (haven't messed with this stuff in a while.)

As to .Xresource vs. .Xdefaults, it is my fuzzy recollection that .Xdefaults is sort of deprecated and the "correct", "new", or "preferred" way of doing it now is .Xresources. Of course, the web is still full of howtos and what-not that make reference to .Xdefaults.

PenguinSHT
July 12th, 2010, 10:31 AM
Thanks, I tried that, but it didn't help. I also tried .Xdefaults-machinename and .Xresources-machinename.

Any other ideas?

Hi Ceb,

Have you solved your problem? I encountered exactly the same problem but have no idea how to solve it.

bigheadjer
October 27th, 2010, 09:27 PM
I fixed this by having duplicated entries in .Xdefaults for both emacs and emacs23 (which is the command line that the Ubuntu menu uses to launch emacs -- note I'm using 10.04 LTS so you'll have to check your own system for what the version should be).

ceb
November 30th, 2010, 02:26 PM
I fixed this by having duplicated entries in .Xdefaults for both emacs and emacs23 (which is the command line that the Ubuntu menu uses to launch emacs -- note I'm using 10.04 LTS so you'll have to check your own system for what the version should be).

Thanks for this tip - it was the solution for me!