Solved

Is there a global Xdefaults?

Posted on 2000-02-23
7
979 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

737 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