Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is there a global Xdefaults?

Posted on 2000-02-23
7
Medium Priority
?
1,065 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 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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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.
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 Month10 days, 10 hours left to enroll

618 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