Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem in Unix script to exit from Putty Post 302589971 by frappa on Friday 13th of January 2012 08:50:48 AM
Old 01-13-2012
try
Code:
env | grep SSH_CLIENT | awk ' { print $2 } '

that should return the PID of ssh client session.
Then maybe you can kill the session by killing that PID.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

changing shells in unix (im using putty)

hi. im new here. im taking a UNIX OS class and im in need of some help how do i change my shell in UNIX? for homework i need to edit the tcshrc file (to include aliases) in my home directory but its not there. so i think switching shells will create the file. am i correct? I'm using PuTTy.... (1 Reply)
Discussion started by: alpha_centauri
1 Replies

2. UNIX for Dummies Questions & Answers

reg putty problem

Hi, i am using PUTTY 0.51 release for connecting the Red hate linux box in SSH mode. its working fine but i can't able to scoll the scoll bar using scroll wheel inthe mouse. please suggest me how to solve it. thanks in advance. thanks and regards, ilayans (2 Replies)
Discussion started by: ilayans
2 Replies

3. UNIX for Dummies Questions & Answers

Problem with putty and password

I am using putty to ssh into my linux machine, I followed the steps to create password less authentication. 1. generated both private and public key 2. copied the public key over to the ~/.ssh/authorized_keys file 3. loaded Private key with pagent (when it didnt work i used Auth in Putty to... (2 Replies)
Discussion started by: bensen
2 Replies

4. Shell Programming and Scripting

problem in exit status of the command in a shell script-FTP

Hi All, I have developed below script for FTP a file from unix machine to another machine. ftpToABC () { USER='xyz' PASSWD='abc' echo "open xx.yy.zbx.aaa user $USER $PASSWD binary echo "put $1 abc.txt" >> /home/tmp/ftp.$$ echo "quit" >> /home/tmp/ftp.$$ ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies

5. Shell Programming and Scripting

PUTTY via UNIX script

HELP!!!! I want to execute a PUTTY telnet connection via UNIX script??? Any help please?? Thanks (1 Reply)
Discussion started by: tontal
1 Replies

6. UNIX for Advanced & Expert Users

Unix user with root power problem in to login in putty

Hello, I created a user in my AIX 5.3 system and i modified /etc/passwd file in and assigned this user the uid=0 like root user. The problem is that when this user log into the system through putty it asks for root password instead of the user password. As a result of this, if i reset the... (4 Replies)
Discussion started by: omonoiatis9
4 Replies

7. Shell Programming and Scripting

Exit code from piping in unix shell script

Hi , I have following code in my shell script : "$TS_BIN/tranfrmr" "${TS_SETTINGS}/tranfrmr_p1.stx" "${TS_LOGS}/tranfrmr_p1.err" | ( "$TS_BIN/cusparse" "${TS_SETTINGS}/cusparse_p2.stx" "${TS_LOGS}/cusparse_p2.err" | ( "$TS_BIN/tsqsort" "${TS_SETTINGS}/srtforpm_p3.stx"... (8 Replies)
Discussion started by: sonu_pal
8 Replies

8. Shell Programming and Scripting

How to exit a shell script if a unix command does not return any value for 10 seconds?

Hi, Can anyone help me how to exit a shell script if a unix command inside does not return any value for 10 seconds? The scenarios is like this. I want to login to a application using shell script where the connection string is mentioned.but suppose this connection string is not... (10 Replies)
Discussion started by: arijitsaha
10 Replies

9. Windows & DOS: Issues & Discussions

Connecting to UNIX from Windows without using putty

Hi Is there any command which we can try connecting unix from windows without using any third party tool. Thanks in advance KVB (9 Replies)
Discussion started by: bikky6
9 Replies

10. Shell Programming and Scripting

Make expect exit the UNIX script in erreneous condition

Hi, I am writing a menu driven program using shell script. THe script will be collecting data by logging into the other servers and bringing back the data to home server to process it and accordingly issue commands. TO automate commands execution , I am using expect script. However I am not able... (5 Replies)
Discussion started by: ashima jain
5 Replies
gnome-session-save(1)                                              User Commands                                             gnome-session-save(1)

NAME
gnome-session-save - saves or terminates the current GNOME session SYNOPSIS
gnome-session-save [--kill] [--gui] [gnome-std-options] DESCRIPTION
gnome-session-save can be used from a GNOME session to save a snapshot of the currently running applications. This session will be restored at your next GNOME startup session. OPTIONS
The following options are supported: --gui Shows a dialog when the session is saved, and reports errors in dialog boxes instead of printing to stderr. --kill Terminates the GNOME session. gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. EXAMPLES
Example 1: Saving the user's current session example% gnome-session-save Example 2: Terminating the user's current session example% gnome-session-save --kill Example 3: Using the GUI to terminate the user's current session example% gnome-session-save --kill --gui EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-session-sThe command-line executable for the application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-session | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gnome-std-options(5), default.session(5), gnome-smproxy(1), gnome-session(1) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003. SunOS 5.10 13 Jan 2003 gnome-session-save(1)
All times are GMT -4. The time now is 02:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy