all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Sanest way to make emacs behave on a Solaris OS
Date: Wed, 07 Aug 2013 02:22:01 +0200	[thread overview]
Message-ID: <871u66uz86.fsf@VLAN-3434.student.uu.se> (raw)
In-Reply-To: ica9kv1za5.fsf@home.home

Dan Espen <despen@verizon.net> writes:

> #if ( HEIGHT == 900 )     /* Traditional Sparc */
> Rxvt.geometry: 80x55
> #elif ( HEIGHT == 1024 )  /* Sparc 21 inch */
> Rxvt.geometry: 80x65
> #elif ( HEIGHT == 768 )   /* Exceed in 1024x768 mode */
> Rxvt.geometry: 80x47
> #else                     /* I have no idea... */
> Rxvt.geometry: 80x40
> #endif

I did some research on this, and put it a short article.

I will probably send it to some Linux aficionados and their
publications, so I made an effort to be more pedagogical in tone,
than I usually am. Anyway, suggestions how to improve are welcome.

But this post is also a continuation of this very discussion, so
don't worry!

Xdefaults vs. Xresources

The old solution was: Whenever an X ("Xlib" - ?) application is
invoked, it looks in ~/.Xdefaults for settings, and then
executes. The file had to be on the same filesystem, in the user's
HOME.

The "new" solution is: Whenever an X application is invoked, it
looks for settings in RESOURCE_MANAGER (XA_RESOURCE_MANAGER - ?)
in the root window of screen 0. Settings are there, if xrdb has
been run since the start of X. If not, the *fallback* is to look
for settings in Xdefaults (every time, for every application,
exactly as the old solution).

xrdb doesn't have to read ~/.Xresources, that's a convention. It
can read any file, even ~/.Xdefaults. (Note that xrdb *has* to be
used - some say ~/.Xresources is ignored because of GNOME and GDM
- this is not the case - even with xinit or startx, xrdb has to be
used.)

Xresources makes for flexibility, as any user can use, or not use,
xrdb, and use it on any file.

Xresources makes for mobility, as ~/.Xdefaults has to be in the
user's HOME folder, on the same file system. To test the enhanced
mobility, after reading resources with xrdb, do the following:

1. In X, and a WM (e.g., Openbox), and a terminal (e.g., urxvt),
ssh to a remote system with the -Y option. There, start xterm, or
any other application that you have configured on your local
system, but not on the system, to which you ssh'd. Then, do the
same on you local system: start xterm. They look the same!

2. Now, on your local system, run 'xrdb -remove'. Again, start
xterm on both the remote and the local system - again, they look
the same, only now, they aren't configured.

3. Last, to demonstrate the limited scope of Xdefaults, without
using xrdb since step 2, on you local system, run 'cp
~/.Xresources ~/.Xdefaults' (after salvaging anything of value
from Xdefaults), then run xterm on both remote and local
system. The remote xterm is unconfigured, but the local xterm is -
only, this time, from Xdefaults.

Notes:

The #1 Google hit on this issue recommends making ~/.xinitrc an
executable, with 'chmod +x' - this is not needed.

Also, the same article exemplifies the use of xrdb in .xinitrc
with a trailing '&', making xrdb a background process. This isn't
right, as the next program run from .xinitrc may use the very same
settings, that xrdb is in the process of setting up, and that must
be completed before any application that depends on it can be
run. Simple cure: remove the '&'.

Some xterm settings useful for testing:

xterm*autoWrap:        true
xterm*pointerMode:     2
xterm*geometry:        77x28
xterm*background:      black
xterm*foreground:      green4
xterm*faceName:        default
xterm*metaSendsEscape: true

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


  parent reply	other threads:[~2013-08-07  0:22 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2072.1375151019.12400.help-gnu-emacs@gnu.org>
2013-07-30  2:32 ` Sanest way to make emacs behave on a Solaris OS Dan Espen
2013-07-29 18:18   ` Harry Putnam
     [not found]   ` <mailman.2176.1375205273.12400.help-gnu-emacs@gnu.org>
2013-07-30 18:00     ` Dan Espen
2013-07-30 18:16 ` Emanuel Berg
2013-07-31  3:23   ` Harry Putnam
     [not found]   ` <mailman.2199.1375241187.12400.help-gnu-emacs@gnu.org>
2013-07-31 17:55     ` Emanuel Berg
2013-07-31 18:26       ` Emanuel Berg
2013-08-02 12:48       ` Harry Putnam
2013-08-03  7:03         ` Bob Proulx
2013-08-05  2:32           ` Harry Putnam
2013-08-05  2:51             ` Stefan Monnier
     [not found]             ` <mailman.2500.1375671147.12400.help-gnu-emacs@gnu.org>
2013-08-05  7:59               ` Emanuel Berg
2013-08-05 13:43                 ` Stefan Monnier
2013-08-04  5:32                   ` Harry Putnam
2013-08-05 22:40                     ` Stefan Monnier
2013-08-04 10:35                       ` Harry Putnam
2013-08-06  5:49                         ` Bob Proulx
2013-08-06 12:52                       ` Harry Putnam
2013-08-06 13:09                         ` Peter Dyballa
     [not found]                         ` <mailman.2603.1375794577.12400.help-gnu-emacs@gnu.org>
2013-08-06 21:33                           ` Emanuel Berg
2013-08-05 13:55                 ` Dan Espen
2013-08-05 20:16             ` Bob Proulx
2013-08-04 10:10               ` Harry Putnam
     [not found]               ` <mailman.2580.1375742208.12400.help-gnu-emacs@gnu.org>
2013-08-05 22:47                 ` Emanuel Berg
     [not found]             ` <mailman.2569.1375733828.12400.help-gnu-emacs@gnu.org>
2013-08-05 22:04               ` Emanuel Berg
2013-08-05 22:29                 ` Bob Proulx
     [not found]                 ` <mailman.2579.1375741786.12400.help-gnu-emacs@gnu.org>
2013-08-05 22:44                   ` Emanuel Berg
     [not found]           ` <mailman.2498.1375670121.12400.help-gnu-emacs@gnu.org>
2013-08-05  7:58             ` Emanuel Berg
2013-08-05 14:48               ` Eli Zaretskii
     [not found]               ` <mailman.2536.1375714107.12400.help-gnu-emacs@gnu.org>
2013-08-05 15:32                 ` Dan Espen
2013-08-05 16:50                   ` Eli Zaretskii
2013-08-05 18:03                   ` Emanuel Berg
2013-08-05 18:51                     ` Dan Espen
2013-08-05 17:51                 ` Emanuel Berg
2013-08-05 18:23                   ` Eli Zaretskii
2013-08-05 19:25                     ` Óscar Fuentes
     [not found]                     ` <mailman.2559.1375730782.12400.help-gnu-emacs@gnu.org>
2013-08-05 22:23                       ` Emanuel Berg
     [not found]                   ` <mailman.2552.1375727048.12400.help-gnu-emacs@gnu.org>
2013-08-05 18:25                     ` Emanuel Berg
2013-08-05 19:03                       ` Eli Zaretskii
     [not found]         ` <mailman.2419.1375513430.12400.help-gnu-emacs@gnu.org>
2013-08-03 10:42           ` Emanuel Berg
2013-08-05 20:04             ` Bob Proulx
     [not found]             ` <mailman.2567.1375733090.12400.help-gnu-emacs@gnu.org>
2013-08-05 21:53               ` Emanuel Berg
2013-08-05 23:21               ` Emanuel Berg
2013-08-05 23:41               ` Dan Espen
2013-08-06  5:54                 ` Bob Proulx
2013-08-06 21:15                 ` Emanuel Berg
2013-08-07  0:38                   ` Dan Espen
2013-08-07 12:06                     ` Emanuel Berg
2013-08-08 15:36                       ` Emanuel Berg
2013-08-07  0:22                 ` Emanuel Berg [this message]
2013-08-08 15:43                 ` Emanuel Berg
2013-08-08 18:08                   ` Dan Espen
2013-08-08 20:19                     ` Emanuel Berg
     [not found]       ` <mailman.2372.1375447876.12400.help-gnu-emacs@gnu.org>
2013-08-02 18:34         ` Emanuel Berg
2013-08-02 13:02   ` Harry Putnam
     [not found]   ` <mailman.2374.1375448728.12400.help-gnu-emacs@gnu.org>
2013-08-02 18:39     ` Emanuel Berg
2013-08-02 19:12       ` Emanuel Berg
2013-08-02 18:52     ` Emanuel Berg
2013-08-02 19:32       ` Emanuel Berg
2013-07-30  2:20 Harry Putnam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871u66uz86.fsf@VLAN-3434.student.uu.se \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.