making the application session independent


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory making the application session independent
# 1  
Old 11-06-2002
making the application session independent

Hi all,

I am actually new to Unix programming and this is my first question to this forum.

I have an application and i want it to run independent of the command shell.

For example, i run the application from a telnet session. But when i close my session, application is terminated. I just want it not to terminate on session termination..

Thanks,
# 2  
Old 11-06-2002
nohup the application and run it in the background:

# nohup /path/to/application &

Alternatively place the above command in a script and execute that script, very simple script (for bourne & bash shell) would look like:

#! /bin/sh

PATH=$PATH

nohup /path/to/application &
# 3  
Old 11-06-2002
Re: making the application session independent

Quote:
Originally posted by bokhari_jawad
Hi all,

I am actually new to Unix programming and this is my first question to this forum.

I have an application and i want it to run independent of the command shell.

For example, i run the application from a telnet session. But when i close my session, application is terminated. I just want it not to terminate on session termination..

Thanks,
I have used nohup with great success. Another way to do it is to use `screen` that allows you to run an application and then disconnect the virtual screen and come back to it at a later time as if you had never disconnected.

screen is handy when you want to run an interactive program and then exit the telnet session and come back to it later.

In fact, right now screen is running the Unreal Tournament 2003 Dedicated Server on my FreeBSD box at the house. screen works like a champ.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Difference between the desktop session and console session

what is the difference between desktop session and console session in solaris as i am wondering we use option -text for the former and -nowin for the later (1 Reply)
Discussion started by: kishanreddy
1 Replies

2. Shell Programming and Scripting

Session independent process

Hi i am trying to run a report which takes approx 5 hours to complete so what i did i put that reporting command in background and then this reporting process started executed in background but the problem is when i close that session that background job lost :( .... please help me that... (3 Replies)
Discussion started by: aishsimplesweet
3 Replies

3. Shell Programming and Scripting

Determining if session is a login session

Besides 'who am i' and 'tty' what commands could be used to determine if a session is interactive as compared to a web process or cron process. Any command should work with the common unix variants. (3 Replies)
Discussion started by: jgt
3 Replies

4. Solaris

I am not able to login in gnome session and java session in Sun solaris 9& 10

I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies

5. Shell Programming and Scripting

Hiding Directories on a Session by Session basis

Hi, Apologies if anyone has read my recent post on the same subject in the Linux forum, just thought actually the solution might more likely come from scripting. Essentially, I am trying to restrict access to directories based on the user's name AND their location on a session-by-session... (3 Replies)
Discussion started by: en7smb
3 Replies

6. Linux

Launch application in gnome session of another user.

A gnome session is launched by UserA of System A, I am connected to userB of System B(or A) through PUTTY. I want to launch an application for eg: gedit through Putty in the display of system A. how can I achieve this. for eg:- root is logged in to System A, with gdm. DISPLAY=0.0, ip =... (4 Replies)
Discussion started by: Sivaswami
4 Replies

7. UNIX for Dummies Questions & Answers

Machine Independent??

Hi What do we mean when we say " Unix is Machine Independent?" Can anybody explain with example? Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

8. Shell Programming and Scripting

sqlplus session being able to see unix variables session within a script

Hi there. How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly. sqlplus << EOF user1@db1/pass1 BEGIN PACKAGE1.perform_updates($1,$2,$3); END; EOF Thanks in advance, Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies

9. UNIX for Dummies Questions & Answers

Making Application by bash

I'm using Mac OSX. And i want to make an visual application based on bash command. But, apple script doesn't support Terminal command. So please tell me how to turn my dream into a reality. :o I mean purely by bash! (0 Replies)
Discussion started by: Euler04
0 Replies
Login or Register to Ask a Question