TSR programs

Thread Tools Search this Thread
Top Forums Programming TSR programs
# 1  
Old 02-26-2002
TSR programs

I want to write a tsr routine which use to replace the screen saver
program, is it possible in unix? how to write a tsr in UNIX?
what is address of screen saver program so that i can replace
my routine in that address.
# 2  
Old 02-26-2002
TSR, as in Terminate and Stay Resident?
What exactly are you trying to accomplish with this?
# 3  
Old 02-26-2002

Actually i want to shutdown all the terminals if user has not
touched the keyboard for 15 or 20 minutes , so only i want the
screen saver routine address so that i can repalce with my routine.
# 4  
Old 02-26-2002

actually i want to shutdown all the terminals if the user has not
touched the keyboard for 15 or 20 minutes , so only i want the address of screen saver routine so that i can replace with my routine.
# 5  
Old 02-26-2002
Well, this could more easily be done, in my non-experienced opinion. Why not simply kill off any user / terminal after a certain amount of time? Or modify the screensaver / xlock utility to quit and kill all other processes (source for many versions of these are available)?
Or, you could install idled, which does it all for you?

I figure, why re-write the wheel?
Besides, I don't think the screensaver is at any given "address"... Unix is not DOS, and will load programs into memory as needed and called - the memory address will change every time.
(Although I may be way off...)
# 6  
Old 02-26-2002
Please keep this all in one area.
For everyone's reference, the original thread is here:
# 7  
Old 02-26-2002
I merged the threads.

UNIX doesn't have a TSR concept. If you exit, the program dies. You can use facilities like select or signal to cause the program to wait for an event to occur.

UNIX typically runs on cpu's that have a MMU. In this case the address of every process is 0. Each process gets its own address space.

You need to define what you mean by "shutting down a terminal". My X terminal is on my desk. If I open a session to a computer in, say, Europe, that remote system has no way to know that I may also have session open to a system in Japan. Nor do either system have the power to shutdown my x terminal.

What the remote systems can do is to terminate my session if that session is idle for a length of time. You can write a daemon that scans for idle sessions and kills them. With most shells, you can also program them to terminate after a while. With ksh, you set the variable called TMOUT to do this.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

2. Shell Programming and Scripting

Scripting Programs

Hi does anyone know some good shell scripting programs, like visual studio for C++/C#? (8 Replies)
Discussion started by: Mack1982
8 Replies

3. Shell Programming and Scripting

Installation of programs

I have installed a program and put the stuff on /usr/local/ However when I run a script it gives an error GMT Fatal Error: /home/chrisd/Dimech/GMT4.5.2/share/PS_font_info.d: No such file or directory (1 Reply)
Discussion started by: kristinu
1 Replies

4. UNIX for Dummies Questions & Answers

Are programs like sys_open( ) ,sys_read( ) et al examples of system level programs ?

Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Discussion started by: vishwamitra
1 Replies

5. UNIX for Dummies Questions & Answers

help with calling programs

Hi. I have a problem in running a program in linux system. This program (damaver.l86) is in the path /home/shenk/damaver/, and it needs to call another program (supcomb.l86) in another path /home/shenk/supcomb/. I tried to modified the .bash_profile, but it didn't work. The error message is always... (1 Reply)
Discussion started by: shenk
1 Replies

6. UNIX for Dummies Questions & Answers

Installing Programs

Hello, I have a simple question. How do make it so i can lauch a program from the shell. For instance I want to install firefox 2 and I wanna launch it with ff2 in the terminal, so i tried this to my .bashrc file: alias ff2='/path/./firefox' and its not working as I would hope. anywho,... (2 Replies)
Discussion started by: SeamusHC
2 Replies

7. Shell Programming and Scripting

shell programs

how to write pipe for finding out the login names and login time of the users whose login name begins with p. (1 Reply)
Discussion started by: rameshparsa
1 Replies

8. Solaris

Solaris programs

Greetings, I have installed the Solaris 10 in my computer, this system is really interesting, and where I can find more free programs for download to install? Anyone knows? (2 Replies)
Discussion started by: FBorges22
2 Replies

9. UNIX for Dummies Questions & Answers

Where did my programs go?

I notice that (Mandrake) Linux and Windows do not seem to operate alike in terms of installing third party software. Windows, on one hand, creates icons and adds items to the Start Menu, with the help of the InstallShield--or equivalent, of course, but Linux, on the other hand, seems to care... (3 Replies)
Discussion started by: helvetica
3 Replies
Login or Register to Ask a Question