1833777 Members
2053 Online
110063 Solutions
New Discussion

xrdb -merge

 
SOLVED
Go to solution
Shachar Twito_1
Occasional Contributor

xrdb -merge

As I understand, the "xrdb -merge " option suppose to allow an application not to harm current running applications (regarding colors, etc.), and yet to work without any problem.
Is It true? What is the influence on my application (that needs that file) and other applications? Does the behavior differ with SUN's?

Thanks a lot
Shachar
3 REPLIES 3
Alex Glennie
Honored Contributor

Re: xrdb -merge

Most applications using the X Toolkit Intrinsics also have the
resource foreground (class Foreground), specifying the color to use
for text and graphics within the window.

By combining class and instance specifications, application
preferences can be set quickly and easily. Users of color displays
will frequently want to set Background and Foreground classes to
particular defaults. Specific color instances such as text cursors
can then be overridden without having to define all of the related
resources. eg : HPterm*cursorColor:gold HPterm*multiScroll:on HPterm*jumpScroll: on
XLoad*Background:gold XLoad*Foreground:red XLoad*highlight:black XLoad*borderWidth:0
emacs*Geometry:80x6500 emacs*Background:#5b7686
emacs*Foreground: white
emacs*Cursor: white

If these resources were stored in a file called .Xresources in your
home directory, they could be added to any existing resources in the
server with the following command: % xrdb -merge$HOME/.Xresources

In general running xrdb -merge, or using an Xdefaults file *should* not harm other applications providing every application has been written in an "X - friendly" manner ie in the case of colours there is always a finite number of resources in this case colour cells allocated to the Xserver, should an application be requesting a large number of colour resources it *could* affect other applications in a number of ways :

application can only run in B&W
application cannot start at all
colour flashing between one application and another due to different colormaps .

fyi : under normal circumstances you cal always reverse the changes, interrogate current X resources using xrdb -q but be aware window managers resources *may* take precedence over Xresources : consult relevant window manager documentation : eg CDE Advanced Admin/user Guide.

X is multi platform and as such shouldn't change on Solaris.

running Xrdb on currently running applications under normal circumstances won't do anything : you'd need to restart the application for a change to take effect and/or restart the window manager I think. It would also depend on how specific the resource was ie hpterm*savelines: , HPterm*saveline : and *savelines : all have different orders of precedence the last one likely to affect dtterm and xterms too !

Hope that helps ?
Shachar Twito_1
Occasional Contributor

Re: xrdb -merge

Thanks Alex, but...
You're answer is too complicated for me. All I know is that there are different parameters inside this file. The question is that if using the -merge option, what happens to parmaeters with the same name that already where defined in the system before (are their value is deleted? can two values for the same parameters can co-exist, one for each application, depending on the application needs?)?

Thanks,
Shachar
Alex Glennie
Honored Contributor
Solution

Re: xrdb -merge

give me an example ie an xrdb merge file and what you think it may conflict with ie entries in an Xdefaults file.

I think from the explanation the answer is no : eg if I start xclock with -hd red (a resource> I get an Xclock with red hands .....

if I then run xclock -hd black or run xrdb -merge with a file with the equivalent resource to change the hands to black I'll see 2 clocks one with red hands and one with black.

The resources generally only effect new Xlient decoration etc not existing Xclients who may have used an old resource before xrdb -merge was run.