Sponsored Content
Top Forums Shell Programming and Scripting how to run a command as soon as user exits from session Post 302542576 by fengfeng919 on Thursday 28th of July 2011 03:54:21 AM
Old 07-28-2011
I first time come here, are you want to execute a command when you logout system ? if i say it's right , you can write some command in the logout script under in the root !
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run a command with some other user id

Hi Say I am running a script using my user id csaha. How can I run any specific command in the same sctipr using any other user id (say root). Definitely I have the password of root. Any idea how the same can be achieved ??? Example: I need to run a script using my id (csaha) only on... (4 Replies)
Discussion started by: csaha
4 Replies

2. Shell Programming and Scripting

Script exits with $? not 0 randomly, how can I see what command failed?

Hi! I have this situation with 3 shellscripts. One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1. Script 1 in turn runs script 2 (import_catalogs_buyer.sh) Sometimes, seemingly... (2 Replies)
Discussion started by: trailsmoke
2 Replies

3. AIX

run which command to check the actual user

hi gurus, i have a question: when run which javac under a user account I got the following results: PROD DB Server: /usr/java14/bin/javac DR DB Server: /usr/java14/bin/javac DEV DB Server: /usr/java5_64/bin/javac The .profile in all environments are same. so how do know who is the... (1 Reply)
Discussion started by: lweegp
1 Replies

4. Shell Programming and Scripting

Save the output of the command run as other user

Dear All, I am writing a script and kind of stuck in a small thing. Cannot figure it out. so please help I am logged in as root user. I want to switch user to "user1" inside the script and execute a specific command lets say "pwd" and come back where i started. I know how to switch user,... (16 Replies)
Discussion started by: suhail.sadaqat
16 Replies

5. UNIX for Advanced & Expert Users

How can I run command with super user privledge

Hello All, I am working on UNIX like environment. This environment is ported from UNIX. Here when we need to build product set, we need to run some script with super user privledge (which we normal user dont have) Is there any way (some C program or some script) through which any normal... (2 Replies)
Discussion started by: joshi123
2 Replies

6. Shell Programming and Scripting

'script' command exits immediately

I'm trying to capture the output of some commands with the 'script' utility. Normally, I would type 'script /path/to/output/file', then enter commands, then hit ctrl+D to end the 'script' capture. I'm having trouble with it on a server. Upon starting 'script', it exits immediately before I type... (6 Replies)
Discussion started by: jalburger
6 Replies

7. Shell Programming and Scripting

tuxedo command run from another user

Hi , I would like to know, whether if it is possible or not. I am runing one tuxedo command script. This script should run on another userID and stored the data on another UserID. For Example: UserA : The Script is available in this userID location. . If i run that script then it... (3 Replies)
Discussion started by: Mani_apr08
3 Replies

8. Shell Programming and Scripting

Check when user exits SUDO

Hello to everyone, I'm new here and would like to thank everybody for the upcoming support, I know that I will have my question answered here, this community is huge. :) First of all, I´m a DBA and work on a daily basis on Unix environments of all kinds (HP-UX, Solaris, AIX, etc). I have... (8 Replies)
Discussion started by: ZeroBR
8 Replies

9. Shell Programming and Scripting

Execute a command after ssh exits

In my .tcshrc I define and run an alias to set my terminal title. The title contains the hostname. I do this because I ssh to other machines a lot and I always need to know which host I am typing in. The alias is defined and run in the .tcshrc like this... alias tt 'echo -n "^0;`hostname -s`^G"'... (5 Replies)
Discussion started by: salvadorjoshua
5 Replies

10. UNIX for Advanced & Expert Users

Run compile command make as another user

Hello I'm trying to compile LibreOffice core from github.com. But this can - as far as I know - not be done as root user. So I compiled it as login user (the user as I log in) and compilation works. Now I try to compile LibreOffice core as a user I created using useradd: useradd -r -U -m... (2 Replies)
Discussion started by: go4bash
2 Replies
gnome-cleanup(1)						   User Commands						  gnome-cleanup(1)

NAME
gnome-cleanup - cleans GNOME user preferences SYNOPSIS
gnome-cleanup user DESCRIPTION
gnome-cleanup erases all GNOME user preferences, returning the user to the default look and feel. This can be used to undo undesired pref- erence settings, or to correct the desktop if the preferences become corrupt. The GNOME preference files are automatically recreated the next time the user logs into a GNOME session. By default this program erases the configuration files for the user running the command. However, a different user can be specified on the command line. Of course, configuration files are only erased if the user running gnome- cleanup has appropriate file permissions to erase the user's configuration files. gnome-cleanup will display a listing of all preference files that it will erase before erasing any files, and prompts the user to confirm that they would like to erase these files. Files are erase only after receiving a positive confirmation from the user. gnome-cleanup cannot be run while logged into a GNOME session. Users should run this program when logged into another session, for exam- ple, the Failsafe session. If the user tries to run this program while already logged into GNOME, an error message is displayed. OPTIONS
None. OPERANDS
The following operands are supported: user Specify the user whose configuration files will be erased. The files will only be erased if the user running gnome-cleanup has file permissions to erase the user's configuration files. This is useful, for example, if you want to run the script as the root user to erase the configuration files for a specific user. If user is not specified, the user is the same as the user who runs the gnome-cleanup command. EXAMPLES
Example 1: Erase GNOME user preferences example% gnome-cleanup After displaying a list of preference files that will be erase, the following question is displayed: Do you wish to remove these files (Y/N) The files are erase only if the user provides a positive response. 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-cleanup Executable for GNOME cleanup. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-panel | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003, 2007. SunOS 5.11 27 Nov 2007 gnome-cleanup(1)
All times are GMT -4. The time now is 01:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy