System Administration

How to automatically run xhost +servername after boot up

 
SOLVED
Go to solution
Pham Quoc Trung
Advisor

How to automatically run xhost +servername after boot up

Hi,

I need to run Xwindow emulator at a remote PC from my SuSE8 server. Everytime after booting up the server, I need to login as root to run the command

xhost +servername

How can I config the SuSE8 to run above coomand automatically after booting up?

In AIX, there is no need to run this command in order to run Xwindow emulator at a remote PC.

Please advice. Thanks.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: How to automatically run xhost +servername after boot up

Linux also does not need this command to allow X windows emulators on a remote pc to connect and attach.

Here are some areas to investigate.

It could be being blocked by your firewall.

check /etc/sysconfig/iptables

or

/etc/sysconfig/ipchains

depending on which firewall you installed.

You could also try testing by simply shutting off the firewall.

service ipchains stop
service iptables stop

Then test.

If this fixes your problem, then its a matter of finding out which port is being block and authorizing it in the firewall.

Its probably not that simple, because there are multiple areas that could be causing your issue.

Running the command you are asking about may not work(though your post seems to indicate it does) and for certain will open your box wide open to a security hole big enough to drive an Abrams tank through.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vitaly Karasik_1
Honored Contributor
Solution

Re: How to automatically run xhost +servername after boot up

you can add "xhost" command xinitrc script (or xinitrc.d directory),

but, AFAIK, you don't have display before login,

regards,
Vitaly
Pham Quoc Trung
Advisor

Re: How to automatically run xhost +servername after boot up

Hi,

Great. It works. Thanks.

One more question. How can I chang profile to let user login from remote Xwindows to set, say ORACLE_HOME, PATH etc ?

Thanks
Frerk Friedrichsen_1
Occasional Advisor

Re: How to automatically run xhost +servername after boot up

Hi,

you have to configure the profile file for each user. Which profile file you have to change depends on the used shell.

In case of bash, edit .bash_rc like this:

PATH=$PATH:/yourpath:/youpath
ORACLE_PATH...=/youroraclepath
export PATH ORACLE_PATH

best regards Frerk F
hang loose