Solved

Is there a global Xdefaults?

Posted on 2000-02-23
7
965 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 50 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

809 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