Ubuntu :: Automatically Restart A Program On Close?
May 18, 2010
I'm trying to get a program to automatically reload if I accidentally close it. This is a remote access program, so it has to be relaunched without me doing anything to help it along if it crashes or I accidentally close it. I noticed that someone came up with a way to solve this back in 2007 [URL].. but the files don't appear to exist any more for it to work. how I might get a program to automatically reload on exit?
I have just finished the upgrade of the latest version and I'm at the point of my system restating.
My system automatically tried to restart but on the restart I got the 'terminal' view. It stopped when asking for my username (it never normally asks for this before the grub menu) and then password. I didn't get any further than that.
I now have on my screen (still in the terminal view before the grub menu)
"name@name-desktop:...$ "
I'm on my phone now so I don't actually have the symbol for before the dollar sign but your know what it is. The raised S on a 90 degree angle.
Is it possible for Pidgins IRC to automatically close NickServ windows after authentication? Because right now it shows about 4-5 different windows everytime I login and it would be interesting if there is a away to remove them after authetication.
The drop down menu will not close automatically when move mouse outside the menu block ,it just disappear when you click outside the menui use gnome desktop
I can click to close a program to close it and it will lock. No matter what I do; (click on EDIT OR FILE, etc, the system will lock. This happens several times each day. I shut down using ALT + SYSRQ + R, S, E, I, U, then B for a soft shutdown. I have used Ubuntu before, but this is a fresh install after having problems with the computer. Computer is a Dell 2400.
I'm trying to make a script that will copy over the settings file for firefox everytime firefox is closed. What would be the best way to go about doing this.
play on linux is the only program sorry what it is doing is when i go to install a game and click apply it just stops then when i go to close the program down it says its not responding and wants me to either wait or force quit?
For a kiosk scenario, I run this script to close & restart Firefox when the screensaver is activated (the monitor also goes to sleep).I want to run a loop that, if Firefox is closed, it will automatically re-open. Is there a way to use dbus-monitor to accomplish this?Quote:
#!/usr/bin/perl my $cmd = "dbus-monitor --session "type='signal',interface='org.gnome.ScreenSave r', member='ActiveChanged'"";
I have a box Suse 11.1 with a service that (I dont know why) every day stop at the same time. Im finding why it come to a halt but in the meantime I would like restart it automatically.As root I insert in crontab the line:25 16 * * * /etc/init.d/service startBut it don works If I launch manually /etc/init.d/service start (or stop) it works
I need to know: how do not automatically restart GNU/Linux after a critical system failure(kernel panic). For some reason the pc is rebooted, actually throws the error screen Reboot just moments before, but I can't to read it before you reboot.
some times network disconnected automatically. if we restart rhe server it automatically starts to work. again 2 or 3 days, the same senario is happening. on this server 2 database is running, it makes lot of problem to us. what will be the problem? is any connection parameter is there? (ie i mean only 50 numbers of client connection is only allowed like.) or any problem in NIC card or NIC driver.
There are two host agent process ( hprsmha -WD and RSMHA ) running on my SLES 10 server suddenly hangs which is critical for my daily scheduled backup jobs.I want to create a script which checks for the 2 process and restart it automatically.so i can put it to daily cron job.My knowledge with scripting is so poor. Following are the commands i am running manually to stop and start the process.
cd /etc/init.d ./hprmsha stop ./hprsmha_wd stop ./hprsmha_wd start ./hprsmha start
My network is windows pppoe. How can I configure it for Fedora 11? Is there any graphical configuration tool available for that? Also, ubuntu 9.04 logs into pppoe network after restarting as I've made some changes in /etc/network/interfaces. Is there any option available for Fedora 11 to automatically log in to pppoe network after restarting?
I am using # uname -rmi 2.6.18-194.26.1.el5PAE i686 i386
# cat /etc/*release* cat: /etc/lsb-release.d: Is a directory Red Hat Enterprise Linux Server release 5 (Tikanga) CentOS release 5.5 (Final)
I have noticed that after few days of ideal system it will stop its network interface. To resolve this I have to login to the machine it self and then issue # service network start Is this a feature. If this is not a feature then what is this. As an workaround I am thinking of adding service network restart in cron tab for everyday in night when I am not using it.
What I would like to do is if the app crashes which kills xinit for the system to either kill login (which will auto login and restart the app) or just to execute the startx command (which auto launches the app) as if typed in from the keyboard. I am trying to find a way that will use the least amount of system resources, rather than a loop.
I have installed Blender from Blender.org. I have installed it my home directory. After launching Blender the icon appears in the unity launcher. Then I fixed the icon in the launcher via the context menu. After restart the Blender icon does not reappear? How can I realize that the Blender icon shows up very time after starting Ubuntu?
Code: Continue? [y/n/?] (y): y Removing gxine-0.5.905-0.pm.2.9 [done]
There are some running programs that use files deleted by recent upgrade. You may wish to restart some of them. Run 'zypper ps' to list these programs.
I run Ubuntu 10.10, recently I got this problem. if I open more than one program, and click on icon of them on task bar to switch between them, KDE crash and restart with log in screen. now since 2-3 days this restart also happening when I ALT+TAB to switch between running programs .
I tried to set up an automatic program restart on Debian Lenny for fail2ban and asterisk. Google helped me to find some HowTos. However, all what I tried so far doesn't work. The latest version: According some instructions the following commands have been written in a file called auto_start_stop:
Code: #! /bin/sh
-> saved in the folder /etc/init.d and -> its properties changed with a right-click to 075. -> The links have been created with update-rc.d auto_start_stop defaults
I am facing problems to restart PADS(Passive asset detection system) from java program.I used the root as a user. So from the command prompt I can start PADS with out sudo ,but when I try to start PADS from the my java program i.e.
Process proc=Runtime.getRuntime().exec("pads restart");
It throws the error in log that FATAL error ! you not root and permission denied.
Then I tried the same with sudo
Process proc=Runtime.getRuntime().exec("sudo pads restart";
Here it create another two process extra 1 for stop the pads 2) for start the pads
It does not kill the previous process of PADS .and both the process get hung.
In gui validation if user enters string in integer requiring field, a dialog box pops out. So on clicking the button i want to stop the program execution and return to the previous jframe(either the same one or newly created object of it).
How can i handle this in java. I tried calling main(); but it doesn't work. Also System.exit(0); doensn't work.
I'm running Debian Squeeze x64 and have an odd problem with both Empathy and Pidgin. After I launch the program and add my accounts everything works fine. When I shut down either program and restart the accounts will not connect. I have to delete the accounts and re-add them and all is good until the next time. It's not a firewall issue as I've tried it with the firewall turned off.
Does anyone know how I can make a program run automatically when a file appears in a particular directory? I have two computers, one to program the firmware on a microcontroller (command line only), and the other is my desktop machine running Ubuntu. I have an NFS share between the two. What I want is to be able to drop a new firmware load into the shared directory from the desktop, and have the other computer notice it and program the microcontroller with it. Right now I have to open an SSH session to the other computer, run the program manually, and then delete the file. I would like to automate all of that.