Solved

Is there a global Xdefaults?

Posted on 2000-02-23
7
931 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:blom
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Yep, that ...../Sessions/Default link is right one.

Succes with it.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now