-   Linux - General (
-   -   X Windows Security (

aungtn 08-27-2000 10:14 PM


I have a problem with running TCL/TK program(Alarms system) in X Windows.How can we automatically run a X program at linux startup.I think it is the X security problem. It works on Mandrake 6.0. but not on any Redhat. We are using Redhat for our system . Is there any way to hack the security of Redhat X ?


jeremy 08-27-2000 10:27 PM

If you boot right into X with xdm you should have an .xsession file which will run external programs. If you do not boot right into X you could put the command you want to run at the end of the startx script.

If you have an other questions the following info would help:

What program are you trying to run?
Do you boot right into X?
Do you get an error message?
What did you do to get it to work in mandrake?

aungtn 08-27-2000 10:49 PM

Yes I boot into X and the system go to Xdm login screen.

My TCL/TK program is just to show a alert windows on X windows screen. Thereis no problem ,if I login into the X and run it.

In mandrake I just put a script to run my TK program in inittab.(with some delay to wait the X comes up).It work without anybody login into system.

here is the error on redhat .
Xlib: connection to "0:0.0" refused by server
Xlib: Client is not authorized to connect to Server


jeremy 08-27-2000 11:05 PM

How are you starting the script now? Have you tried using .xsession? Sounds like the user you are starting the script as does not have permission to connect to the X server. I would recommend typing "man Xsecurity" at a prompt and going from there. If you still have a question or need some clarification don't hesitate to ask.

bickford 08-28-2000 12:51 AM

You might need to do a "+xhost localhost" in order to allow it to connect to the XServer. It sounds rediculous but I'm pretty sure that might fix it.....

bickford 08-29-2000 04:18 PM

And of course by +xhost localhost I mean xhost +localhost. My bad!

aungtn 08-29-2000 08:42 PM

Re: doh
Thanks for the helps.
xhost works if someone is login to X and give the authority to others .My proble is to run a X program while Xwindows is at Xdm login prompt.

the followings is the script I put in the inittab.

export DISPLAY=:0.0

sleep 10

/usr/local/my_alarms/bin/alarm_process.tcl &

All times are GMT -5. The time now is 05:47 PM.