unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Bob Proulx <bob@proulx.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Sanest way to make emacs behave on a Solaris OS
Date: Mon, 5 Aug 2013 14:04:30 -0600	[thread overview]
Message-ID: <20130805200429.GA5734@hysteria.proulx.com> (raw)
In-Reply-To: <87mwoz2gzr.fsf@VLAN-3434.student.uu.se>

Emanuel Berg wrote:
> Bob Proulx writes:
> > Use of .Xdefaults is rather superseded by the .Xresources file.
> > The difference between the two is subtle.  But .Xresources tends
> > to be preferred because of the way that it is applied.  The
> > .Xresources is applied to the $DISPLAY through xrdb.  The
> > .Xdefaults is applied through the presence in the $HOME
> > directory, but only if the xrdb is empty.  So once you have a
> > .Xresources the .Xdefaults is no longer used.
> 
> That's interesting. On my school's Solaris/SunOS, in my home
> directory, there wasn't any .Xresources to begin with, but there
> was an .Xdefaults. It would have been interesting to examine the
> the contents of that file, but I was so eager to try the
> .Xresources solution that I just deleted the .Xdefaults, to be
> sure it didn't influence in any way. And now, you're saying that
> was unnecessary, because it is only applied if there isn't a
> populated xrdb/.Xresources. You live, you learn.

The difference is a little subtle if you are not in a situation to
notice how they are different from each other.  Let me give an
example.

You and I are both working on a server machine for some task using a
shared login.  (Let's not debate the shared login aspect.  Much of
this was set up decades ago.  At one time on local private friendly
networks that was very commonly done.  And this also applies to a
single user with different device displays too.)

You log into the machine and either tunnel X with ssh -X or you set
DISPLAY and allow it to forward raw to your desktop display.  I do the
same.  Say that I like white on black text and you like black on white
text.  However this could be any given customization.  It is only
important that we like different things.  We both start up the same
graphics application for the purposes of the shared task.

An alternative difference could be that you are working on a very
large widescreen monitor and want to set sizes, fonts, dpi, to match
your large screen.  I am working off of a 7 inch tablet and wish to
set sizes, fonts, dpi, to match my more limited work space.  Just for
another example.

Using $HOME/.Xdefaults on the server then we both share the same
customization.  I edit the file and make it my way.  I am happy and
you are unhappy.  You edit the file and make it your way.  You are
happy and I am unhappy.  The use of .Xdefaults works after a fashion
but it is limited and unable to make both of us happy at the same
time.  We can really only keep personalized copies of the .Xdefaults
file and switch by copying or linking it into place when we are
running and hope we are never running at the same time.

Due to this problem it is learned that these types of customization
problems are properties of the display and not of the user.  They
should be attached to the $DISPLAY and not to the $HOME.  Attaching
properties to the $DISPLAY instead of $HOME is the distinction between
using .Xresources and .Xdefaults.

Enter xrdb and the ability to set DISPLAY properties.  You have on
your desktop, not the server, a .Xresources file.  I have the same.
You put your customizations in your file and I put my customizations
in my file.  You load the contents into your $DISPLAY and I load my
contents into my $DISPLAY.  X graphical applications will look for
resources there first.  If that database exists and is available then
those will apply and no $HOME/.Xdefaults will be loaded.  Using this
strategy customization is a property of the $DISPLAY and not $HOME.

This also allows a single user to have a small screen tablet with one
set of customization and a large screen desktop with a different set
of customization because each will have a different $DISPLAY.  So it
applies generically to more than just shared logins between different
users.  It also applies to shared logins of the same user on different
displays.

In the case of a single user on a single device everything is
collapsed into a single case and it would be hard to tell the
difference.  But if you have several devices sharing an account, even
if it is the same user, then the difference allows customization to be
different for each display device.

I hope this explanation makes sense and is useful.

Bob



  reply	other threads:[~2013-08-05 20:04 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 [this message]
     [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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20130805200429.GA5734@hysteria.proulx.com \
    --to=bob@proulx.com \
    --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.
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).