Difference between logout from Gnome and Telnet


 
Thread Tools Search this Thread
Operating Systems Linux Difference between logout from Gnome and Telnet
# 1  
Old 12-17-2007
Difference between logout from Gnome and Telnet

Hi,
I have a java process started as a background job from Gnome Shell and logs out, that process is killed whereas when I started the same process from a telnet console and then logs out of the telnet session, that process is running properly. Can some one guide me with whats actually happening in both these scenarios. Introducing a nohup while starting the backup processes, it was working fine in both the cases.

Thanks,
Suresh
# 2  
Old 12-17-2007
Quote:
Originally Posted by usureshb
Introducing a nohup while starting the backup processes, it was working fine in both the cases.
Two things are going on, job control and controlling terminals.

SIGHUP is a signal generated when a session closes, or a terminal hangs up.

The correct thing to do is use nohup to prevent the SIGHUP handler killing the process.
# 3  
Old 12-17-2007
Dear Porter,
Thanks you very much for the replySmilie.

I have a doubt.

Do you mean to say that the SIGHUP signal will be send up only in case of closing the Gnome Shell and it will not be triggered when you closes the telnet session.

Also when I tested with setting the DISPLAY variable as empty
ie., export DISPLAY=
in the Gnome Shell, started the java application without a nohup in the background and logged out, it is still running properly.

Sorry, I am quite new to linuxSmilie, so I can't understand what is exactly happening.

Regards,
Suresh
# 4  
Old 12-17-2007
Quote:
Originally Posted by usureshb
Also when I tested with setting the DISPLAY variable as empty
ie., export DISPLAY=
in the Gnome Shell, started the java application without a nohup in the background and logged out, it is still running properly.
Excellent! So your program, if you let it, tries to connect to the current DISPLAY then gets all upset if that connection gets removed at a later date.

Great problem determination there!

When you do "ps -ef", there is a column for the controlling terminal (it will either be a real terminal or a pseudo-terminal). Is one still attached to the java process or is it blank?
# 5  
Old 12-18-2007
Dear Porter,
Thanks for your reply. But I couldn't understand which column u r mentioning. When I put a ps -ef, the column headers shown are as follow:
UID PID PPID C STIME TTY TIME CMD

Also in the column list, I can't find any keywords like terminal. I run the command ps -ef from an external telnet terminal before and after the gnome session logout. I found that the following process are missing in the command result after logout. Is this anything has to do with the "DISPLAY" variable ?

/usr/X11R6/bin/X :0 -audit 0 -auth /v
/usr/bin/gnome-session
/usr/libexec/gconfd-2 13
/bin/bash /etc/X11/xdm/Xsession
and my java process.

Also why is DISPLAY variable not considered when I telnet and then logged out.

Regards,
Suresh
# 6  
Old 12-18-2007
Quote:
Originally Posted by usureshb
the column headers shown are as follow:
UID PID PPID C STIME TTY TIME CMD

I can't find any keywords like terminal.
TTY = TeleType = Terminal

Quote:
Originally Posted by usureshb
Also why is DISPLAY variable not considered when I telnet and then logged out.
DISPLAY is for X-Windows, it tells a program how to connect to a graphical terminal. Telnet is a character based stream.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to calculate difference of split and sum the difference

In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13. I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. Programming

what is the main difference between difference between using nonatomic lseek and O_APPEND

I think both write at the end of the file ...... but is there a sharp difference between those 2 instruction ..... thank you this is my 3rd question today forgive me :D (1 Reply)
Discussion started by: fwrlfo
1 Replies

3. UNIX for Dummies Questions & Answers

Difference Between Krb5-telnet And Ekrb5-telnet

Hi, I want to know the difference between these two services. Both are under xinetd. Both are used for enabling and disabling Telnet service. So, can somebody please explain me the difference between the two ? Thanks in advance :) (0 Replies)
Discussion started by: kashifsd17
0 Replies

4. Shell Programming and Scripting

Backup & restore Gnome Desktop and all settings in Gnome

Hi I'm looking for scripts to backup & restore Gnome Desktop and all settings in Gnome. (0 Replies)
Discussion started by: ccc
0 Replies

5. UNIX for Dummies Questions & Answers

Automatically login in the telnet from present telnet

Hi, I was writing one script which includes to switch to the another telnet automatically from the present telnet server. I was using rlogin but firstly it takes the same user name of the present telnet and secondly it is prompting for the password. But i want to switch to the another telnet... (2 Replies)
Discussion started by: Prateek
2 Replies

6. UNIX for Advanced & Expert Users

Telnet from shell script , further need to logout if log in not authenticate

Using unix shell script file I need to telnet to a IP further send a command to the telnet IP and get the response to a file with out using "expect" utility and I have achieved this by below command. (sleep 3; echo admin; sleep 3; echo mypass; sleep 5;echo "show status-list"; sleep 5; echo... (3 Replies)
Discussion started by: raghunath Rao
3 Replies

7. UNIX for Advanced & Expert Users

difference between logging into unix through f-secure ssh client and telnet

hi, what is the difference between logging into unix through f-secure ssh client and telnet is there any more security check is involved can any one explain thanks in advance (1 Reply)
Discussion started by: trichyselva
1 Replies

8. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

9. UNIX Desktop Questions & Answers

KDE & Gnome, wat is the difference?

i have been reading some atticles but i still do not understand the diferrence btw KDE & Gnome. Someone once told me he prefers Gnome to KDE 'coz of it's audio support & Redhat says ver 7.3 has KDE 3.0 & Gnome 1.4. So could someone explain? (2 Replies)
Discussion started by: da_gee
2 Replies
Login or Register to Ask a Question