Operating System - Linux
1752689 Members
5451 Online
108789 Solutions
New Discussion юеВ

Re: To disbale X11 service on linux box.

 
SOLVED
Go to solution
Steven E. Protter
Exalted Contributor

Re: To disbale X11 service on linux box.

Shalom,

even at run level 5, if you stopped the xfs service your system would stop listening on X.

You could in addition set up iptables firewall rules to further protect your system.

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
HP-UX_Ali
Regular Advisor

Re: To disbale X11 service on linux box.

Hi All,

After commenting a line /etc/inittab X server still listening .....

Pls advice...

Thanks

Regards
TTr
Honored Contributor

Re: To disbale X11 service on linux box.

> After commenting a line /etc/inittab X server still listening .....

Did you run "telinit q" after commenting out the line in /etc/inittab as Matti pointed out? Commenting out the line in /etc/inittab is not enough.
HP-UX_Ali
Regular Advisor

Re: To disbale X11 service on linux box.

Yes telinit -q has been done...
as port 6001 was referring to xvnc service. i have stopped the service and killed the process for port listening to 6001. as of now port is not listening. but if there is any chance after reboot again it will up.

Kindly confirm.... if yes what is to be done permanently.

Thanks.
Steven Schweda
Honored Contributor

Re: To disbale X11 service on linux box.

> [...] i have stopped the service [...]

How, exactly? As usual, it might help if you
showed the actual commands you used instead
of giving us vague descriptions and
interpretations of what you think was
supposed to happen when you did whatever you
actually did.

> [...] but if there is any chance after
> reboot again it will up.

Where in the start-up scripts was this "xvnc
service" started? If you didn't change
anything in the start-up sequence, then I'd
expect the thing to be started again at the
next system boot.

> [...] what is to be done permanently.

That's a question????

Find out where in the system start-up scripts
this thing gets started. Then disable that
script somehow. The details of how to do
that may depend on which kind of "linux box"
you have, and which script does what how.
With my weak psychic powers, I can't see any
of your start-up scripts.
Matti_Kurkela
Honored Contributor

Re: To disbale X11 service on linux box.

If that VNC server has been installed using a RedHat standard package, it should be visible in the output of "chkconfig --list" as "vncserver". If the output says "on" at the runlevel 5 column, then vncserver has been configured to start automatically at system boot.

To prevent the vncserver from starting at system boot, run "chkconfig vncserver off".

By the way, all RedHat-packaged services that are controlled by xinetd or standard System V init scripts can be enabled or disabled using "chkconfig ". This feature can easily be extended to custom services too, by adding two specially-defined comment field to the appropriate init scripts.

Although simply killing the Xvnc server is a valid way to shut it down, there is a command for starting/stopping any services based on System V init scripts: "service ". This takes effect immediately, but does not change whether the service will be restarted at reboot or not.

See "man chkconfig" and "man service". These are basic RedHat configuration commands; as a sysadmin, you are expected to understand these commands.

MK
MK
HP-UX_Ali
Regular Advisor

Re: To disbale X11 service on linux box.

Hi Matti

Thank you very much matti. your brief explanation helped me a lot and resloved the issue.
full marks to you.... :)

Hence closing above thread.