(SOLVED) Closing a terminal window

When I am through using the terminal window, I hit the X at the top right corner but get this message: There is still a process running in this terminal. Closing the terminal will kill it.
Why do I get this? I think I have nothing running. is there a bug?
Last edited by mcduling (2011-12-19 22:23:54)

It is complaining because you are still running su. That's a fair warning, not a bug.
If you don't like it, use sudo instead. It's safer anyway than leaving a terminal sitting around in su-mode for arbitrary lengths of time.
Edit: btw, if you have run su to gain root access, and you want to close the terminal, you can get out of su by typing "exit". Then you should be able to close the terminal.
But really, don't use su. That's just asking for trouble. Sudo is your friend.
Last edited by /dev/zero (2011-12-19 09:59:43)

Similar Messages

  • Closing active terminal window with applescript

    I made a very basic script to lock my screen, and I like how it works. Some of my co-workers would also like it but it has one problem.
    When the script runs, a terminal box pops up at the end saying [process complete]. I can click through this and I don't care, they do.
    I can't just killall terminal because we use terminal and that could kill our work.
    We sometimes need to see output from a script and like the process complete, so don't want to reconfigure our systems to never display it.
    I'm trying to find a way to use applescript or something to kill the active terminal window, or the window with the title of LockScreen or something.
    Anyone have an idea?
    I was hoping something like this would exist but it doesn't seem to: tell application "Terminal" to close window

    Here is an easy approach.  Start Applications -> Automator
    Select Application
    In Automator search for "Start Screen Saver".  This should be under Library->Utilities
    Drag "Start Screen Saver" to the right side panel.
    Save the Automator app.
    If the user has System Preferencs -> Security -> Require Password ... set, then one the screen saver has started running, it will require the user to enter their password before getting control back.
    This Automator app can be double clicked, it will not require the terminal.
    With respect to your script.  If this is a shell script, AND if you wish to continue using it, then you could create an Automator app that uses "Run Shell Script" under Automator Library->Utilities.  This will also NOT require the use of Terminal, however, be aware that when Automator runs a shell script it DOES NOT have the same environment as when you are running a shell script at your Terminal prompt.  There are very few environment variables set, and for example the USER, HOME, current working directory, PATH, etc... may not be the same.  If you have dependencies on specific environment information, you may want to write a simple automator script the using "Run Shell Script" to output various environment information into a file so you can see what you have to work with
    (id -a
    pwd
    echo "$#"
    echo "$@"
    printenv
    ) >/tmp/automator.environment.txt

  • Accidentally closed a Terminal window

    Is there any way to recover the window if the process is still running?

    In most cases, when you close a window, any process running in that window (or, more technically, the shell) will terminate.
    That's not always the case, but you usually have to go to extra lengths to make a process persist beyond the current shell session.
    So the chances are that the process is no longer running anyway.
    AFAIK, the screen suggestions will only work for a process that was launched via screen. You cannot attach to an arbitrary process.

  • [SOLVED] keeping terminal window open for scrot keyboard shortcut

    Hey,
    Im trying to bind a keyboard shortcut to scrot with the -s command (for selecting window). Normal scrot command works fine straight away, but with the -s command a terminal window needs to be open that waits for the selection. i have created a file called lscrot with the following code:
    1 #!/bin/bash
    /usr/bin/terminal --working-directory=$HOME/dump/ --geometry 0x0-0-0 -e "/usr/bin/scrot -s"
    i have put the file in /usr/bin folder with 755 permissions.
    if i right click the file and choose "execute", the new terminal window will stay open and i can select an area to take a screenshot of, but when i bind it to a shortcut key (using xfce) the new terminal window will close immediately rendering the shortcut useless.
    how does one fix this?
    thanks
    Last edited by iOfWhy (2012-06-10 13:41:55)

    hmmm, ok. binding keys to /usr/bin/scrot works fine, but /usr/bin/scrot -s does not. dont really know where to begin searching for a fix...
    EDIT: im assuming there is something elementary i am missing. after further testing, launching for example scrot ~/dump/test.png from console works fine, but not when i bind it to a keyboard shortcut. however, scrot test.png works to bind. does anyone know anything more about XFCe and binding keyboard shortcuts?
    EDIT2: ok so im honing in a little bit, i realised that the first times i use the keyboard shortcut it works. forcing the terminal window to stay open after command has been executed i see following error:
    giblib error: couldn't grab keyboard:Resource temporarily unavailable
    Searching the net i found old bug that was closed without (seemingly) being solved.
    https://groups.google.com/group/linux.d … 2056017d9a
    Any ideas?
    EDIT3: ok so found a solution, "sleep". Adding sleep 0.1 to the top of the screenshot script seemed to help. seems you need to give sometime to release the keyboard for scrot to use. would still be great if anyone knew how to get it to work by using a direct command in the keyboard shortcut bindings. ie binding in straight to "scrot -s". using Alt+F2 then typing in scrot -s works fine, so i really dont see why i cant bind a keyboard command straight to that.
    NOTE: how do i see xsession errors? I find no .xsession-errors file in my home directory. been searching for months.
    Last edited by iOfWhy (2012-06-10 13:33:56)

  • 'Run' terminal window not closing

    I have an Java application which I have created an installation package for using InstallAnywhere.
    On Solaris when launching the application using the alias from a terminal window it works fine. But, when I launch the application from the File Manager, by double-clicking, it creates an 'extra' terminal window called 'Run', this terminal window doesn't terminate when I exit my application.
    How can I prevent this, can I prevent the 'Run' window from starting using some sort of setting, or can I somehow make sure it is closed togheter with the application?
    On Linux (SuSE10) the OS asks how I would like to run my application so I don't have the same problem there.

    Hi Kanwalpreet
    For basic idea please refer to the following link
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">Dialog Boxes in WebDynpro</a>
    Go Through <b>page 16</b> of the PDF Document
    Regards
    Chaitanya.A

  • Closing Terminal window tabs shrinks Terminal window height

    Open a Terminal window, press Command-T to create a tab, and then Ctrl-D to close that new tab, the Terminal window height decreases by one row.
    This most certainly appears to be a bug. How do I report this to Apple?

    I am also experiencing this problem, however if you use the Basic setting the problem doesn't exist.
    I am using Novel and I have the problem. It's quite annoying.
    I noticed that if you set the fontsize to 12 then this problem exhibits, however if I change the size to 11pt or 10pt (10 is the default for Basic, 12 is default for Novel) then I don't have the bug.
    Message was edited by: TonyKL

  • [Solved] Have Cron Job Open Terminal Window

    I want to run a ping script every morning to check the liveliness and latency of specific servers. The script itself works fine but I can't figure out how to have cron open up a terminal window so I can see the script running.
    This is what I have so far:
    #runs /home/bran/pingservers.sh everyday at 8:30 am
    10 10 * * * env DISPLAY=:0 konsole -e ~/pingservers.sh
    But it doesn't open anything I don't even know if the job is even executing.
    Last edited by brando56894 (2013-05-20 14:25:42)

    I am unsure how to get the script to open a terminal, but the journal should have some information on whether the script is running or not and if there are any errors.
    brando56894 wrote:
    I don't even think cron jobs are running at all. I changed my job to
    1 * * * * /bin/echo hello world
    and it hasn't done anything...
    As far as the job above, I just wanted to note that you have it set to run on the first minute of every hour. If you were looking for every second minute, you would want the following:
    */1 * * * * /foo/bar
    Last edited by BluMongoose (2013-05-14 22:01:48)

  • IRSSI and Terminal Window [SOLVED]

    Hello,
    I recently installed Arch with Fluxbox in order to try it and I'm wondering if there is a way to start a terminal window then automatically have it run a command.
    For example, I'm currently working on editing my fluxbox menu and want to be able to open irssi automatically from the menu rather than having to open a terminal window to start it.  At first I tried just setting the command as "irssi" but this doesn't do anything.  Is there some way I can open a terminal window then have it execute irssi automatically?
    Thanks in advance!
    Last edited by celestialorb (2009-07-31 03:51:44)

    Yes you can do this, but the method is semi-dependent upon which terminal you're using. Urxvt looks like this:
    urxvt -e sh -c irssi
    where sh is the shell you want to launch the command under.
    EDIT: Beaten to the punch. You can use smurnjiff's method, if it works for you - but I've found that unless you specify a shell, urxvt fails to keep a window around long enough to do anything with the command. Works fine with one shot deals though - such as 'mpc prev' or similar.
    Last edited by synorgy (2009-07-31 03:44:45)

  • Code to close terminal window?

    I am running code in an IDE and want to be able to have any existing terminal window close before the code is run.  This way I don't have to keep closing them manually every time I run the code again.  I'm coding in C.  Any ideas?
    Thanks

    What about setting the
    Terminal -> Preferences -> Settings -> Shell -> When the shell exits: Close the window
    Now just make sure that the last thing your script does is exit from the shell and your window will be closed.
    Then again, do you "Really" need a Terminal session to run your code?
    That is to say, running programs and scripts can be done without needing a terminal session.  The Terminal session is just a window to the command line, and you do not need to display anything via the Terminal display, then there is no reason to have it open to run your program.
    You can use Applescript ("do shell script" statement), or Automator ("run shell script" action), or you can use a 3rd party utility such as Platypus that will put your program or script in a double clickable app that does not need a Terminal session.
    Another option is to use a different Terminal emulator, such as iTerm which also has the ability to close the window when the shell exits.  It can even automatically quit iterm when the last window is closed.

  • Terminal Window asking for password when opening

    I don't know what happens but everytime I open a terminal window its ask me for password. If I type my admin password it starts saying that can't found my ~ directory and starts in :/ instead of :~
    It is also showing ttys001 instead of 000 as usual.
    I don't know what it is, I think it have some relation with closing terminal windows without logging out of a ssh section, but I don't know how to resolve it. I tried reboot, "exit", delete com.apple.terminal
    Any sugestion?

    sgobin wrote:
    I don't know what happens but everytime I open a terminal window its ask me for password. If I type my admin password it starts saying that can't found my ~ directory and starts in :/ instead of :~
    It is also showing ttys001 instead of 000 as usual.
    I don't know what it is, I think it have some relation with closing terminal windows without logging out of a ssh section, but I don't know how to resolve it. I tried reboot, "exit", delete com.apple.terminal
    This is just a wild guess, but might there be a "sudo" command in a file in your home directory that's run when you launch a Terminal session, such as .bash_profile, .bash_login, or .profile? (This list assumes that you're using bash as your shell.)

  • Terminal window blinking cursor will not accept keyboard entry

    Have SunBlade100 w/ Solaris8.
    This is probably a dumb beginner question...
    When I enter certain commands at the terminal window - in this particular case
    # cat /dev/cua/a
    and I hit <return> the cursor skips to the next line, and
    continues blinking , and will not accept any keyboard entries.
    1. What is the significance of this? Is the cursor waiting further action, and if so, what?
    2. How do I get back to the prompt?
    3. Under this condition, is it safe to exit the terminal window by closing from the Window menu? (I can't type "exit" because the cursor won't accept keyboard entries, and Help for "closing the terminal" warns against closing from the Window menu because any background processes will not be terminated (and this may cause problems).
    Thanks in advance for any info on this.

    Thanks again for the info. <control>+C was exactly what I was looking for. It's coming back to me now-- the last time I had contact w/ UNIX was back in '85 at UC Berkeley (no GUI's back then!).
    I'm assuming that <control>+C is a graceful (i.e. relatively harmless way to exit the command.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Terminal window scrollback is saved somewhere?

    Dear Mac enthusiasts,
    Every Terminal window has a history, which is evident because you can scroll all the way back. In the Terminal Preferences there is even an option where you can set the Scrollback to unlimited, or limit it to a number of lines.
    My question is, is this history saved somewhere in a hidden system file or something like that? Or is it only saved in the Terminal process memory which means when you close the window, or worse, exit Terminal, this history is gone forever?
    The practical thing I'd like to be able to do is to access the scrollback info from a Terminal window that has already been closed. I catted (unix command cat) a file, then deleted the file, then closed the window, but I'd like to recover the contents of that file in this way.  I know, stupid, but if there is a solution, I'd like to hear it!
    Best regards,
    Jan

    S.Fanara wrote:
    Dear VikingOSX,
    I created an account and logged in just so say Thanks! The info you gave is golden! In Terminal I tiped open ~/.bash_history and the entire history of anything I've ever typed in Terminal was there. I edited removing mistakes and what I didn't need (as sometimes I need to scrollback and remember the command I used for specific operations) so that is a small "memorandum" id commands if you will.
    Once again thanks so much for the useful info provided!
    The history command is history.  For instance:
    history
    history | grep -i cat
    You can also use the recall operator and related — all of this is part of how bash works.

  • How to use string control as terminal window

    Hello All
    I am trying to create a terminal window in my VI and to do this i have a string control and a string indicator.
    I want the user to be able to write a command in the terminal and when hitting enter the control should update, but not before! I would
    like the user to be able to enter multiple commands without having to re-click the control with the mouse, so it has to stay in the
    control window. 
    The output from this string control is input to a invoke node to an external motor controller, which replies with a string input to the string indicator.
    Tried to do some event case, but not quite sure how I am going to detect only the enter command.
    Any ideas how to preceed?
    Thanks
    Regards
    Tommy
    Solved!
    Go to Solution.

    Yeah, in your event structure, look for an event of your string control called "key down"...on the left, there are several parameters coming up (char, vkey etc.) where you can use for example the char to look for char=13 (return).
    look here: http://zone.ni.com/reference/en-XX/help/371361B-01/lvprop/control_key_down/
    good luck
    christian 
    THINK G!! ;-)
    Using LabView 2010 and 2011 on Mac and Win
    Programming in Microsoft Visual C++ (Win), XCode (Mac)

  • Unable to Open Terminal Window

    Hello,
    I am trying to do research on how to fix my current problem of not being able to open my terminal window.  When attempting to do so I get the following error message:
    You are unauthorized to run this application.
    The administrator has set your shell to an illegal value.
    I looked at some previous posts and some people said download iterm2 and put the following command: sudo chsh -s /bin/bash my_username.  After this enter password and it should be fixed.  However when doing that I get the following response: SC is not in the sudoers file.  This incident will be reported.
    Couple of things, firstly SC (which is me) is the administrator to this computer (this is my computer and there are no other users on it). 
    Either way can anyone give some suggestions on how to solve this problem so that I am able to open the terminal window.
    Much thanks in advance for anyones assistance.
    Sami

    Create a new administrator account in which to change your shell and also fix the sudoers file, which is apparently corrupt. It should have the following content:
    # sudoers file.
    # This file MUST be edited with the 'visudo' command as root.
    # Failure to use 'visudo' may result in syntax or file permission errors
    # that prevent sudo from running.
    # See the sudoers man page for the details on how to write a sudoers file.
    # Host alias specification
    # User alias specification
    # Cmnd alias specification
    # Defaults specification
    Defaults          env_reset
    Defaults          env_keep += "BLOCKSIZE"
    Defaults          env_keep += "COLORFGBG COLORTERM"
    Defaults          env_keep += "__CF_USER_TEXT_ENCODING"
    Defaults          env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"
    Defaults          env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"
    Defaults          env_keep += "LINES COLUMNS"
    Defaults          env_keep += "LSCOLORS"
    Defaults          env_keep += "SSH_AUTH_SOCK"
    Defaults          env_keep += "TZ"
    Defaults          env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
    Defaults          env_keep += "EDITOR VISUAL"
    Defaults          env_keep += "HOME MAIL"
    # Runas alias specification
    # User privilege specification
    root          ALL=(ALL) ALL
    %admin          ALL=(ALL) ALL
    # Uncomment to allow people in group wheel to run all commands
    # %wheel          ALL=(ALL) ALL
    # Same thing without a password
    # %wheel          ALL=(ALL) NOPASSWD: ALL
    # Samples
    # %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
    # %users  localhost=/sbin/shutdown -h now

  • Terminal window application for PPP

    what's that?

    sgobin wrote:
    I don't know what happens but everytime I open a terminal window its ask me for password. If I type my admin password it starts saying that can't found my ~ directory and starts in :/ instead of :~
    It is also showing ttys001 instead of 000 as usual.
    I don't know what it is, I think it have some relation with closing terminal windows without logging out of a ssh section, but I don't know how to resolve it. I tried reboot, "exit", delete com.apple.terminal
    This is just a wild guess, but might there be a "sudo" command in a file in your home directory that's run when you launch a Terminal session, such as .bash_profile, .bash_login, or .profile? (This list assumes that you're using bash as your shell.)

Maybe you are looking for

  • Raise_Exception in CL_CGPL_STATUS_MANAGEMENT=====CP

    Hello Expert, Please help me with Raise_Exception dump.Customer is facing this problem daily .we have debugged program many time and all but we are not able to find any clue.Its based on Fund plan id and campaign. And i have checked SAP Note-1475108.

  • Uploaded Photos  do not appear in catalogue

    I have Photoshop Elements version 3.0 on Windows XP.Uploaded pics do not appear in catalogue.If I retry to upload the pics the following message appears'file already exists C:\DOCUMEN~1\Owner\LOCALS~1\Temp\PSAlbumimport\2009-03-07-1142-22\DCIM\107CAN

  • Solaris 10 x86 jumpstart installing from cd instead of install server

    Hi all, I am building a Solaris 10 x86 jumpstart server and was able to jump the client to a certain point. The jump appears to be running but for some reason stops after the first CD ( very peculiar considering the jumpstart is automated). After wat

  • Leading zero in numeric field

    I need to create a numeric field that has 7 digits and can start with one or 2 leading zeros

  • What is the significance of 0TCT_VC23 virtualcubes in technicalcontent

    HI Experts, Kindly let me know the significance of 0TCT_VC23  virtual cubes in Technical content. If i use only basic cubes will i get all the required data? Is it neccessary to use VIRTUAL Cubes also. Regards, RG