LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   VNC enabling for session on RHEL4 (https://www.linuxquestions.org/questions/linux-server-73/vnc-enabling-for-session-on-rhel4-792267/)

kapila_sr 03-01-2010 12:01 AM

VNC enabling for session on RHEL4
 
Dear ALL,

I am developing a some application which running on rhel4 os. And its functions will handle via the web application.
So we have provided an option to login (via vnc) to the server on web application when we need.

so how we can enable vnc for a session (like 30 minit) ?

I'm using default vnc installation while installing rhel 4 nothing more installed by downloading.

I try to like this

When I click session button on web page, I execute this command from my code
"service vncserver start"

then I can access server via vnc

but when I click on disable button on web page, I execute this command from my code

"service vncserver stop"

but still I can login to server via vnc



Regards
-Kapila

TB0ne 03-01-2010 08:29 PM

Quote:

Originally Posted by kapila_sr (Post 3880631)
Dear ALL,

I am developing a some application which running on rhel4 os. And its functions will handle via the web application.
So we have provided an option to login (via vnc) to the server on web application when we need.

so how we can enable vnc for a session (like 30 minit) ?

I'm using default vnc installation while installing rhel 4 nothing more installed by downloading.

I try to like this

When I click session button on web page, I execute this command from my code
"service vncserver start"

then I can access server via vnc

but when I click on disable button on web page, I execute this command from my code

"service vncserver stop"

but still I can login to server via vnc

Well, either the code on your web page is not working, or the VNC session is being kept open, because the web session is still active.

If you want it to close after 30 minutes, you can run at AT job to run the script to shut the service down. Or try to close your browser and see if the VNC session stops.

kapila_sr 03-01-2010 10:06 PM

Thanks your response.

But problem still with me. I just try to do this without web application. It means

First I run "service vncserver start" command using console in server. And then I tried to login to server from remote PC via VNC it was success.
Second what I did, I run the "service vncserver stop" command using console in server . And same thing I tried but it was also success.

Why can we login even if vncserver has stopped?

Regards
-kapila

zeroquaranta 03-02-2010 10:00 AM

have you tried typing
Code:

vncserver -kill <hostname>:1
?

kapila_sr 03-03-2010 02:17 AM

Im getting this error

[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]# vncserver -kill localhost.localdomain:1

Can't find file /root/.vnc/localhost.localdomain:1.pid
You'll have to kill the Xvnc process manually

zeroquaranta 03-03-2010 06:17 AM

I would make this try: launch manually a vnc server by simply typing
Code:

vncserver
If launch is successful you should get some informations, like
Code:

New '<hostname>:<id> (root)' desktop is <hostname>:<id>

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/<hostname>:<id>.log

and it should also create the file <hostname>:<id>.pid under the same directory.

Then try to kill the sever with
Code:

vncserver -kill <hostname>:<id>


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