Programming :: Close All GUI Apps From A Script?
Oct 10, 2010How to safely close all GUI apps from a script (including waiting for the user to respond to save/discard/cancel dialogs)?
View 14 RepliesHow to safely close all GUI apps from a script (including waiting for the user to respond to save/discard/cancel dialogs)?
View 14 RepliesI'm doing a script to make some task but I would like to know how can I do the part to check the bu.log ? Cause if the files exists it will send me an email with the log, but when the file doesnt exist it will send a blank emal that why i would like to 'check the file' and if there isnt will end it.
#!/bin/sh
x="$HOME/bu.log"
if [ $x ]; then #if the file exists will do
for file in *.log
[Code].....
How can I edit the funcion to check if there isnt an arq.log and close the script?
I have found a weird behaviour on a linux application. A tty seems to get closed without calling close. The program is (very simplified) as follows:
Process 1:
configure_signals()
read_config_files()
create_threads()
wait(forever)
Thread 1:
fd=open(/dev/ttyXX)
usleep(a while)
config(fd)
I have spent quite a lot of time on this problem. It seems like the file is sometimes closed when reaching config(fd), but removing the usleep(a while) seems to remove the problem.
I am creating xml file by
File f1 = new ("Data.xml");
f1.createNewFile();
Then writing into it by using
[code]....
i created one thread in main(). I have while in thread function.
I want close the thread in main after some time. How can i close it.
I have a configuration file I put ndd commands into for servers settings and I'm running into and issue where they are only off by one character so I keep overwriting the setting.
The file has these two lines in it:
As you can see the only difference is the q0 on the one entry. With the code below I just keep changing/adding a line to the file and not just finding and fixing the each line. I cannot seem to find the right "terminator" for an exact match. I do understand why it's doing it, I just don't know what to do to fix it. What am I missing?
In the end I just want to search this file and make sure these two lines are in there and set properly.
i've written a socket server. when i launch a client, it connects to servers running on various machines on my local network, which then reply to the client with some string messages, and the client exits.
however, when i launch the client repeatedly (say 5 or 6 times in quick succession) the client is unable to bind to its local port. this appears to be because servers are still trying to connect to the client machine's port, even though the client exited and shut the socket down. the actual error i receive is "Error binding socket to 192.168.1.6:44561: Address already in use".
so, is it enough just to shutdown and close a socket? is there some way that in doing so the client machine can send a CONNECTION_REFUSED message to any machine trying to connect to it? i am using PHP, not that that should make much of a difference i hope.
the problem resolves itself after around 20 seconds as the machines trying to connect to the client timeout. i still need to fix this issue though.
I want to have a panel like the panels which exist in Gnome Desktop in my application to add menus, labels, entries, buttons and etc. How can i Do this?
How can I add charts and diagrams in my applications?
I am trying to get bash script using zentity to exit if the user presses the cancel or close buttons.The exit codes are working fine; they read 1 or 0 depending on the status but it always assumes 0. This is the portion of the script: PHP Code:
function settings(){
result=$(zenity --height=30 --width=300 --list --checklist --title='Selection'--column=Boxes --column=Selections --column="Options"
[code]...
What are the availability`s for cross platform sql , gui, application development using raw code in the Debian environment. I would rather work with raw code. I have been working with PHP MySQL, need to advance to Universe Application Development cross platform Raw Code for both mobile and desk top.
View 1 Replies View RelatedSome minimized apps no longer appear in the top menu and by that are no longer accessible.For example firefox with the minimize addon or Jungel Disk backup service.How can I reach apps that minimized them self and are not shown in the top menu?
View 2 Replies View RelatedWith 10.10 rhythmbox is integrated in the sound applet, but how can I close it without going to the file menu?
View 9 Replies View RelatedIs there a way of closing just 1 folder. I open documents folder then open a folder that's in documents then open a folder that's in the 2nd folder, if I want to close any of those folders it closes all of them. I know I can right click on a folder and select open in a new window which I then can close without closing all folders,is there a setting that let's you always open folders in a new window by double clicking on the folder?
View 2 Replies View RelatedThis is probably a really simple fix but tbh since I installed unity I'm stumped.
I didnt like the unity desktop so I've gone back to the classic desktop but I have no bar above my windows with the max/min/close option.
To add to that issue, sometimes windows open with their menus under the panel at the top of the screen so there is no way to move or close them
I just installed Ubuntu 11.04. But I have a problem. I am not able to close the apps or programs I open. The bar with the close, minimize and ( fill screen botton, what ever ) is gone! I'm not quite sure what I did.. I enabled the Cube in compiz, and the wobbily windows, and then the bar dissapeared. I put everything back to what it was, but the top bar on the widows is gone.
View 4 Replies View RelatedIn Ubuntu 10.10 Gnome . When I close the laptop lid I seem to get only two choices - hibernate or suspend. What i want is when i close the laptop lid I want nothing to happen.
There are real issues I'm having with network-Manager stopping and not starting when i go into suspend. it's a major hasle therefore I want to prevent any suspend or hibernate.
How do i do it so closing the lip just closes the lid and nothing else?
[url] I ended up copying the text to read the article.
View 2 Replies View RelatedI recently built myself a backup computer/file server running Fedora 14, and I'm trying to install the NVidia driver. For some reason, I can't seem to switch to console mode to save my f'ing life! Ctrl+Alt+F1 does nothing, as does the terminal command init 3. Seriously, I can't figure out for the life of me what could be causing this issue.
View 5 Replies View RelatedThe buttons to minimize and close, in the upper right-hand corner, have disappeared, making it impossible to close my browser and shut down my computer.I don't know what to do.
View 9 Replies View Relatedi know the command to start the x server is "startx" and ctrl alt delete is the keyboard short cut or atleast on slackware, to close X. i wanted to know what the comand is though.
View 5 Replies View Related[SOLVED] in current Tue Apr 5 06:35:07 UTC 2011kde/kdebase-4.5.5-i486-3.txz: Rebuilt.Patched kconsole to fix closing tabs.[/SOLVED] In current:close-tab in Konsole is greyed-outnew tab = okno probs in SW13.1
View 5 Replies View RelatedI would like to make iceweasel to restart after close, so its always running.
View 14 Replies View RelatedI have a laptop that I wish to keep on even when lid is closed, but I am unable to accomplish this. Does anyone have an idea where to look?
System is Fedora 13 (Rawhide).
gdm-2.29.4-1.fc13.x86_64
gnome-power-manager-2.29.1-2.fc13.x86_64
how can i close all of ports and open ssh only?
View 6 Replies View RelatedI'm working on a script to manage some stuff on my server and I'm trying to figure out how I can close my script when I'm done with it. I open it using &, but how can I kill it with another script? I'm trying to do this programmatically but I'm very unfamiliar with Linux.
View 2 Replies View RelatedI'm running Ubuntu in a virtual machine inside win7. I've installed the game FreeCol, played a bit and when i try to quit the game doesn't close. I can continue playing but i'm basically trap in the application. Is there any keyboard command i can use to force quiting the application? Or any other idea on how to proceed? Could it be a limitation of the virtualization?
View 2 Replies View Relatedwhen my PC hangs my terminal do not open and it is not possible to go to System->Administration->System Monitor and close the unresponsive programs. Is there any way to close the unresponsive programs?
View 2 Replies View RelatedI opened MPlayer, two boxes opened, both a blank and will not close. System manager does not show it and "ALT-F2" typed xkill and clicked on bottom tray button does nothing. I opened second MPlayer and it closed but not first one.
View 2 Replies View RelatedIf I want to open a terminal, run a script in it and have that script close that specific terminal wherein I ran the script, how do I do that? The exit command doesn't work.
View 7 Replies View RelatedI just installed ubuntu 10.4 and when I close my laptop, it does not go to sleep. The hard drive is still on and the computer is still working even after I have closed it.
View 9 Replies View Related