Debian Developers - Accepting .Xdefaults by default

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > April 2004 > Accepting .Xdefaults by default





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Accepting .Xdefaults by default
Jacobo221

2004-03-31, 5:36 pm

Currently, Debian doesn't support ~/.Xdefaults but does support
~/.Xresources. The ways to walk around this are to soft link or to change
it's name.
Since a $HOME directory might be shared between varius ditributions (on
boxes which might be used for testing distros, for example), to rename the
file may not work, so soft linking si the only way to walk around it. Any
way, it'd be far much better if Debian supported .Xdefaults in
/etc/X11/Xsession.d/30xfree86-common_xresources

Instead of:
if grep -qs ^allow-user-resources "$OPTIONFILE"; then
if [ -f "$USRRESOURCES" ]; then
xrdb -merge $USRRESOURCES
fi
fi

It could have something like:
if grep -qs ^allow-user-resources "$OPTIONFILE"; then
for USRRESOURCE in $USRRESOURCES; do
if [ -f "$USRRESOURCE" ]; then
xrdb -merge $USRRESOURCES
fi
done
fi

And /etc/X11/Xsession wouldn't contain:
USRRESOURCES=$HOME/.Xresources

But instead would contain:
USRRESOURCES="$HOME/.Xresources $HOME/.Xdefaults"

I'd like to know what other Debian users think. Thanx.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Henning Makholm

2004-03-31, 7:35 pm

Scripsit Jacobo221 <jacobo221@hotmail.com>

> Currently, Debian doesn't support ~/.Xdefaults but does support
> ~/.Xresources. The ways to walk around this are to soft link or to change
> it's name.


Beware! The intended semantics of .Xresources and .Xdefaults is *not
the same*!

..Xresources is meant to be loaded into the X *server* when a user logs
in. It will affect all clients started during the X session, even
clients running on remote machines.

..Xdefaults is loaded locally by each *client* as it starts up. Settings
in it will affect all clients *running* on that machine and account,
even if they connect to a remote server.

Each kind of settings is useful, and I daresay that there are Debian
users out there who depend on the ability to define either kind of
settings - even though the vast majority are probably not aware of the
difference, and many of them misuse the files because they don't know
the difference.

If you read the manpage X(7x) you'll find that Debian does not use the
name .Xdefaults bu default, but instead .Xdefaults-<hostname>. That is
presumably intentional. You should be able to override this by setting
$XENVIRONMENT in your .profile or .login file. If that does not work
(and you're sure its not your own fault, or the individual
application's), file a bug report against libXt6.

--
Henning Makholm "I Guds Faders namn, och Sonens, och den Helige
Andes! Bevara oss från djävulens verk och från Muhammeds,
den förbannades, illfundigheter! Med dig är det värre än med
någon annan, ty att lyssna till Muhammed är det värsta av allt."


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Branden Robinson

2004-04-01, 1:34 am

[CCing debian-x]

On Thu, Apr 01, 2004 at 12:26:23AM +0100, Henning Makholm wrote:
> Scripsit Jacobo221 <jacobo221@hotmail.com>
>
>
> Beware! The intended semantics of .Xresources and .Xdefaults is *not
> the same*!
>
> .Xresources is meant to be loaded into the X *server* when a user logs
> in. It will affect all clients started during the X session, even
> clients running on remote machines.
>
> .Xdefaults is loaded locally by each *client* as it starts up. Settings
> in it will affect all clients *running* on that machine and account,
> even if they connect to a remote server.
>
> Each kind of settings is useful, and I daresay that there are Debian
> users out there who depend on the ability to define either kind of
> settings - even though the vast majority are probably not aware of the
> difference, and many of them misuse the files because they don't know
> the difference.


All true. Thanks for offering this clarification.

> If you read the manpage X(7x) you'll find that Debian does not use the
> name .Xdefaults bu default, but instead .Xdefaults-<hostname>. That is
> presumably intentional.


It is. The reason is that because the application-defaults are loaded
client-side, you may want to customize them on a per-host basis. You
already get this with the server-side resources because your X session
runs out of $HOME.

> You should be able to override this by setting $XENVIRONMENT in your
> .profile or .login file. If that does not work (and you're sure its
> not your own fault, or the individual application's), file a bug
> report against libXt6.


The package's name is libxt6 (all lowercase), but yes. It's also worth
noting that, as far as I know, *only* Xt-based applications use
application-defaults. So if an X client isn't linked against libXt,
please don't blame libXt.

Thanks again.

--
G. Branden Robinson | It may be difficult to to determine
Debian GNU/Linux | where religious beliefs end and
branden@debian.org | mental illness begins.
http://people.debian.org/~branden/ | -- Elaine Cassel

Henning Makholm

2004-04-01, 3:36 pm

Scripsit Branden Robinson <branden@debian.org>
> On Thu, Apr 01, 2004 at 12:26:23AM +0100, Henning Makholm wrote:


[color=darkred]
> It is. The reason is that because the application-defaults are loaded
> client-side, you may want to customize them on a per-host basis. You
> already get this with the server-side resources because your X session
> runs out of $HOME.


Not necessarily. In fact I have accounts on three different university
sites where my $HOME is shared between all workstations and xdm
servers in the department. They all load the same .Xresources when I
log in. That would have caused me trouble if I had happened to
physically move between differently-equipped workstations often.

(Of course I know how to solve this by appropriate ad-hoc magic in
..xsession, and splitting .Xresources by hostname would not be a good
solution nevertheless, so I'm not proposing to change the default
behavior of Debian's X packages).

[color=darkred]
> The package's name is libxt6 (all lowercase), but yes.


Curses, foiled again! I just tried 'dpkg -L libXt6' and it worked.

--
Henning Makholm "Al lykken er i ét ord: Overvægtig!"


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com