Operating System - HP-UX
1834274 Members
1870 Online
110066 Solutions
New Discussion

Modifying the color settings of a UI that comes up thru Reflection X server

 
Pankaj Agrawal
Occasional Advisor

Modifying the color settings of a UI that comes up thru Reflection X server

Hi,

I am using Reflection X to connect to a HP-UX box. Once connected, I execute an executable file on the HP-UX box. This executable brings up a User Interface. Now I am interested to change the background and the foreground colors of this UI. How can we do this? Who controls these settings?

Let me know if I am not clear.

Thanks in advance
Pankaj
9 REPLIES 9
Torsten.
Acclaimed Contributor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

It's decades ago for me, but If I remember right it's the file Xresources. Search the internet for this.
Maybe someone else knows this better.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Doug Burton
Respected Contributor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

You can have (or create) a user(s)
.Xdefaults file with application info on color, font, etc.

For example (and this goes back a ways):
xload*geometry: =1264x100-0-0
xload*foreground: yellow
xload*background: MediumVioletRed

You may have application info here: /usr/lib/X11/app-defaults, or
/usr/dt/app-defaults/C, or in the location of your application itself.
Bill Hassell
Honored Contributor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

It doesn't matter whether you are using WRQ's Reflection/X, Hummingbird Exceed or any other Xwindow emulator, the colors (and hundreds or other resources) are defined by Xwindow parameters. For instance:

xclock
xclock -bg yellow -fg black
xterm -bg navy -fg white
hpterm -bg brown -fg white -xrm '*cursorColor: blue'

Now it's inconvenient to specify all the options on the command line so there is a file you can create in each user's $HOME directory called .Xdefaults . You add to this file any new defaults or overrides you want. For example:

*loginShell: true
XTerm*cursorColor: gold
XTerm*background: navy
XTerm*foreground: white
HPterm*background: brown
HPterm*foreground: white

Now as to what resource applies to a specific application, you'll need to read the man page. Checkout xterm, dtterm and hpterm for the emulators, xclock for the clock details, and so on.


Bill Hassell, sysadmin
Pankaj Agrawal
Occasional Advisor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

Thanks for the replies. I tried making .Xdefaults in the HOME directory but this changes the settings of the console that comes up thru Reflection X.

Once connected, I launch an installer (built using InstallAnywhere) executable. This brings up a GUI. I want to modify the settings (background and foreground colors) of this GUI. These do not get changed thru the .Xdefaults file.

Am i missing something?
Torsten.
Acclaimed Contributor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

The Xdefaults file will overwrite default settings regarding colors etc.
With the file located in the users home directory, it is valid for this specific user only.
I don't understand why you want to waste time by changing the colors of an installer ... btw, how did you modify the file?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Pankaj Agrawal
Occasional Advisor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

As such there isnt any need to change the colors of the installer windows...I will exactly tell u whats happening...

When the installer is run, a window pops up with blue background and black foreground...When I click next, another window comes which is blank (the entire screen is filled with blue color). Text doesnt display there...When I select the screen and paste it onto notepad, I see test...That means somehow for the particular screen, the background and foreground colors are getting the same...So thats why i thought of finding a way to modify the color settings and see if that helps
Torsten.
Acclaimed Contributor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

Be aware there are different ways to get a "window" painted on the screen. An application could use for example motif, tk, java or similar to paint. So it all depends ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

I posted the last reply before I could read yours.

Do you have other applications with a GUI running?

I remember netscape in the good old days complaining about all color table entries were already taken, it came up with only 16 colors or so ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Bill Hassell
Honored Contributor

Re: Modifying the color settings of a UI that comes up thru Reflection X server

Actually, the examples given are specific to the applications mentioned (ie, xterm, hpterm, etc). You must read the InstallAnywhere technical reference manual where it describes all the Xwindow resource names used in the program. I have no idea why a programmer defaults to using black letters on a dark blue background (but SAM does too). As you can see in the man page for xterm, there are dozens of Xresources listed. These were specifically used in that program, but there is no guarantee that the same names are used in your installer program, especially when there are multiple windows created. Typically, each window will have it's own name and resource set.

Defining colors and fonts in Xwindows is a rather large topic -- hopefully, Macrovision can supply you with a sample list of settable Xresources. This has got to be a very frequently asked question for them. This is all I found at Macrovision support:

http://support.installshield.com/kb/view.asp?articleid=Q000049

and it appears to be a very generalized answer. That's a common problem when dealing with a PC product that was ported to Unix - Xwindows isn't even mentioned in their knowledge documents. You might also try their community bulletin board.


Bill Hassell, sysadmin