LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-01-2010, 12:01 AM   #1
kapila_sr
Member
 
Registered: Jul 2008
Posts: 33

Rep: Reputation: 15
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
 
Old 03-01-2010, 08:29 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,680

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by kapila_sr View Post
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.
 
Old 03-01-2010, 10:06 PM   #3
kapila_sr
Member
 
Registered: Jul 2008
Posts: 33

Original Poster
Rep: Reputation: 15
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
 
Old 03-02-2010, 10:00 AM   #4
zeroquaranta
LQ Newbie
 
Registered: Feb 2010
Posts: 22

Rep: Reputation: 0
have you tried typing
Code:
vncserver -kill <hostname>:1
?
 
Old 03-03-2010, 02:17 AM   #5
kapila_sr
Member
 
Registered: Jul 2008
Posts: 33

Original Poster
Rep: Reputation: 15
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
 
Old 03-03-2010, 06:17 AM   #6
zeroquaranta
LQ Newbie
 
Registered: Feb 2010
Posts: 22

Rep: Reputation: 0
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>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL4 gnome-session cannot open display: steven.c.banks Linux - Server 1 11-25-2008 08:31 PM
RHEL4 ES VNC Issues deadlock Red Hat 2 01-03-2008 03:12 AM
rhel4 vnc problem, where to configure GUI vnc server? hocheetiong Linux - Newbie 1 10-24-2007 06:05 AM
Enabling Desktop Effects Resets my Session wera662001 Linux - Laptop and Netbook 1 02-19-2007 04:31 PM
VNC Session mindjet SUSE / openSUSE 4 02-11-2006 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration