How can I close multiple instances of Gedit windows through the command line?  Some of the windows may contain changes to documents.  So, I would like to be prompted to save them or not.  If I use pkill gedit it will simply kill all instances without prompting to save changes.    Background info: Often, I have tons of windows open over multiple workspaces.  Some of them are Gedit windows with notes.  Thus, when running shutdown -h now shutdown will block because some windows contain changes to files or unsaved notes. Saving all instances with changes would prevent me from inspecting and closing all windows one by one.
120878
I'm moving across from Mac OSX and am quite used to using the Cmd-Q shortcut to quit apps. I appreciate that Linux is set up differently and that different apps have different shortcuts for quitting (e.g. some use Ctrl-Q while others might be Alt-Q, etc.). I'm currently using Ubuntu GNOME.  Would it be possible to create a standard keyboard shortcut for quitting all apps easily and safely in Ubuntu? I'm happy to use a third-party tool or do a bit of further digging.  M
121025
I would like to be able to choose any already-open window and minimize it from the command line. Is this possible?
90932
This has been a problem that I haven't been able to figure out for sometime.  Preventing the second instance is trivial and has many methods, however, bringing back the already running process isn't.  I would like to:   Minimized: Undo the minimize and bring the running instance to the front. Behind other windows: Bring the application to the front.   The language I am using this in is VB.NET and C#.
66239
I am new to Ubuntu. I have used Sublime Text. I have realized that after I open Sublime Text from the Terminal, if I close the terminal the application  keeps running. The same isn't true for other applications like geany.   After I open the application from terminal, when I close the terminal the application also closes. I have tried &amp;exit like geany &amp;exit. But this isn't what I am looking for.   How can I keep geany running even after I close it?
110328
I am often logged in several SSH sessions at once. To logout from several sessions, I press CTRL+d, until I am back on my local machine. However, I occasionally press it once too many, and my terminal exits. Is there a way to make CTRL+d unable to close my terminal ? I am using terminator as my terminal emulator.
6687
I would like to close some view windows that I opened accidentally.  See the image below:    Edit: another note: I tried searching for the solution, but only found things like "Join Area", which don't seem to work in this situation.
32836
I need to make sure that user can run only one instance of my program at a time. Which means, that I have to check programatically, whether the same program is already running, and quit in such case.  The first thing that came to my mind was to create a file somewhere, when the program starts. Then, each other instance of the program would check for this file and exit if it found it. The trouble is, that the program must always exit gracefully and be able to delete the file it created, for this to work. In case of, say, power outage, the lock file remains in place and the program can't be started again.  To solve this, I decided to store the first program's process ID into the lock file and when another instance starts, it checks if the PID from the file is attached to some running process. If the file doesn't exist, is empty, or the PID doesn't correspond to any existing process, the program continues to run and writes its own PID to the file.  This seems to work quite fine - even after an unexpected shutdown, the chance that the (now obsolete) process ID will be associated with some other program, seems to be quite low.  But it still doesn't feel right (there is a chance of getting locked by some unrelated process) and working with process IDs seems to go beyond the standard C++ and probably isn't very portable either.  So, is there another (more clean and secure) way of doing this? Ideally one that would work with the ISO 98 C++ standard and on Windows and *nix alike. If it cannot be done platform-independently, Linux/Unix is a priority for me.
122269
I know there were some tricks with older versions of windows to accomplish this, but not sure on windows 7.  If I had a piece of software that executes a command with switches resulting in a cmd.exe window opening and closing quickly, how can I reconfigure the command prompt to NOT auto-close once the task is complete.  The trick here is that the command being executed is indeed a batch file, includes a pause statement at the end, but the way the software is trying to execute the command is failing. Since it closes so quickly, we don't know what error is being returned since it closes so quickly.
11663
I am looking for a way to clean up the mess when my top-level script exits.  Especially if I want to use set -e, I wish the background process would die when the script exits.
67258
I have a text file that I can change using other applications (for example openoffice).  But when I try to change and save it using gedit, I am getting error from gedit:  Could not save the file /media/sf_Ubuntu/BuildNotes.txt. Unexpected error: Error renaming temporary file: Text file busy   the permission of BuildNotes.txt is as follow:  -rwxrwx--- 1 root vboxsf  839 2012-10-26 12:08 BuildNotes.txt   and user id is:  m@m-Linux:/media/sf_Ubuntu$ id uid=1000(m) gid=1000(m) groups=4(adm),20(dialout),24(cdrom),46(plugdev),105(lpadmin),119(admin),122(sambashare),1000(m),1001(vboxsf)   What is the problem and how I can fix it?
38949
Suppose some author has enforced his Windows application to be single instance. Is there any way to make multiple instance of this application (aside from running inside a virtual machine or requesting the author to rewrite the app)?  If there is a readymade tool, I would like to know it. (I have tried sandboxie and Altiris SVS without luck).  If there is nothing out there, I want to program a tool/hack that will let me do this.  I am looking for pointers where to start - what will be involved, what skills would be needed. I have moderate programming skills in C and Java.  If this cannot be done, please explain why.  EDIT: I know its a bad idea but I still need to do it (for various reasons). I want a generic way that works for any application and does not introduce errors.
75781
I want to exit a process using the command line, but I can't recall the command to look up the process's ID.  Does anyone know it?
93273
I would like to clear all output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab.  I can use the clear command to clear just the current screenful, but then you can still scroll up to see all the historical output. I'm using the Terminal to trace program output and at the end I would just like to do ⌘ + A to select all the text so I can grab the output from the just last run, without having to scroll up and see where it started. I could also just open a new tab, I was just wondering if this can be done in the same window?
26921
I recently installed 12.04. When I try to edit a file with gedit, I can't use the terminal until I close the editing file or I have to open a new terminal. But I think I didn't have this problem with 11.04, however I'm not sure. Is there anyway to avoid this and to use same terminal while editing files.
49812
I can't figure out how to close or split windows or panels in 2.8. In videos, to remove a panel it seems you somehow click in the upper right corner-doesn't work for me. To split a panel you somehow drag from the border and a new window appears. Can anyone help?  Thanks, Rusty
58554
I have a script in file bla.sh and it is executable. When I click on it, the script is executed and the window is closed. I'd like the window to stay open.  Something like command cmd /k** command in Windows.  P.S. I don't want to use pause, but I want to able to write more commands after the script was executed.
70923
Windows Explorer is the default shell under Windows (since Windows 95).  Sometimes you need to restart it, so my usual way is to kill it using the Task Manager (Ctrl+Shift+Esc, click on Processes, select explorer.exe, click on End Process).  Is there a way to cleanly shut down / close Windows Explorer without logging out?