[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Is there a global Xdefaults?

Posted on 2000-02-23
7
Medium Priority
?
1,082 Views
Last Modified: 2008-03-10
I installed a newer version of Xfig, and to get proper color, I added "*customize -color" to my .Xdefaults file.

This is a very general option, which is good to have there for everyone. However, I have about 100 users on my system, so editing everyones .Xdefaults is a bit of work. (Sure, I already did it with "for" and echo >>", but nevertheless...)

So, I'm wondering if there is a global system-wide .Xdefaults where I can put this (and other) options, much like /etc/profile, where I can add e.g. a PATH to all users without modifying every single $HOME/.bash_profile.

Many thanks,
Anders Blom
blom@teorfys.lu.se
0
Comment
Question by:blom
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:kiffney
ID: 2550840
Look at 'man xrdb', I think that will cover what you want.  Different window managers handle resources differently, so you need to use something like this to set global resources for X sessions.
0
 
LVL 2

Accepted Solution

by:
Reinier earned 150 total points
ID: 2551200
What distro are you using? the customization -color has been in the RedHat ~/.Xdefaults for ages.

Anyway, I don't think there is a global Xdefaults that you will find on any distro. Still many distros have created one. E.g. RedHat's xdm /etc/X11/xdm/Xsession script looks for  "/usr/X11R6/lib/X11/xinit/.Xresources". Plus that most apps install a resources file /usr/X11R6/lib/X11/app-defaults/.

This tells you how to find one on your system. Do you use xdm/kdm/gdm? Go to their directory in /etc/X11/ and search through the session scripts for the place that they look for. Edit or create that file. If the session script doesn't look for a global Xdefaults then create one yourself at a handy place and read it in from the session script with "xrdb -merge /path/to/your/Xdefaults/".
0
 

Author Comment

by:blom
ID: 2554089
Thanks for your speedy reply!

I'm using RedHat 6.1 now but many users' dotfiles date back to very old Slackware days. I think the /etc/skel dir is outdated, and needs to be remade.

The structure of /etc/X11 is tricky, with soft-links left and right and a lot of "defaults" files. It was rather difficult to figure out if I was using gdm or xdm, since all "defaults" files pointed to xdm, but when I ran "ps -aux | grep xdm" there was nothing (but gdm there was). Maybe this is because I'm administrating the server through ssh from another machine. I'll check when I actaully get on the machine itself.

What are the "session scripts" named?

As you see, I'm not a novice but not an expert either, but I'm learning. That is why some parts of my questions may seem very simple. Thanks again for taking your time to assist!

/Anders
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:blom
ID: 2554315
Thanks for your speedy reply!

I'm using RedHat 6.1 now but many users' dotfiles date back to very old Slackware days. I think the /etc/skel dir is outdated, and needs to be remade.

The structure of /etc/X11 is tricky, with soft-links left and right and a lot of "defaults" files. It was rather difficult to figure out if I was using gdm or xdm, since all "defaults" files pointed to xdm, but when I ran "ps -aux | grep xdm" there was nothing (but gdm there was). Maybe this is because I'm administrating the server through ssh from another machine. I'll check when I actaully get on the machine itself.

What are the "session scripts" named?

As you see, I'm not a novice but not an expert either, but I'm learning. That is why some parts of my questions may seem very simple. Thanks again for taking your time to assist!

/Anders
0
 
LVL 2

Expert Comment

by:Reinier
ID: 2554464
Sorry, I don't have gdm installed on any of my machines, but I know it's config dir is /etc/X11/gdm under RedHat. You must be able to find the scripts there.
0
 

Author Comment

by:blom
ID: 2557692
Sorry for being slow... I couldn't figure out which of gdm or xdm was actually my window manager. Now I think I got it:

In /etc/X11/gdm/Sessions there is a softlink Default which executes /etc/X11/xdm/Xsession and in that script I found "xrdb -merge ..." which I think will do the trick for me!

Also: sorry for the multiposting -- Netscape reposted the data form when I hit Reload.

Thanks!
0
 
LVL 2

Expert Comment

by:Reinier
ID: 2557898
Yep, that ...../Sessions/Default link is right one.

Succes with it.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month20 days, 14 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question