Restart automatically if application gets killed

I have this issue for two precise applications:
1. Mplayer - Wich I use as wallpaper but sometimes gets killed
2. Osdlyrics - It gest killed for no special reason (Seg fault)
I want to make a script so this applications be restarted in case they get killed, how could I track that and restart it?
Thank you

OK I'll show you what I have :
[Service]
Type=simple
ExecStart=/usr/bin/wallpaper
ExecStartPre=/usr/bin/xfdesktop
Restart=always
systemd status wallpaper.service throws:
wallpaper.service
Loaded: loaded (/etc/systemd/system/wallpaper.service; static)
Active: failed (Result: start-limit) since sáb 2013-11-02 12:10:38 CST; 11s ago
Process: 13911 ExecStartPre=/usr/bin/xfdesktop (code=exited, status=1/FAILURE)
Main PID: 1743 (code=exited, status=0/SUCCESS)
If I remove the line of xfdesktop the output shows as active but nothing is displaying
THis is my /usr/bin/wallpaper :
#!/bin/bash
WIND=$(xwininfo -name Escritorio | egrep -E '0x' | cut -d':' -f3 | cut -d'"' -f1| cut -d' ' -f2)
echo "Desktop is " $WIND
mkfifo /tmp/mplayer-control
touch /tmp/wallpaper-status
DesktopMovie -wid $WIND -x 1366 -y 768 -slave -input file=/tmp/mplayer-control -shuffle -loop 0 -playlist /home/axelectrik/.config/wallpaper/playlist.m3u &> /tmp/wallpaper-status &
echo "Playing" $WIND
ANd the output of /tmp/wallpaper-status is:
Cannot find HOME directory.
The wid option must be an integer: -x
Error parsing commandline option "-wid": Option parameter could not be parsed
MPlayer2 2.0-726-g6c87a98 (C) 2000-2012 MPlayer Team
So I don't know why the service cannot start xfdesktop, or if is already started why xwininfo is not giving the xfdesktop window ID so mplayer starts over there.
Last edited by axelectrik (2013-11-02 18:23:21)

Similar Messages

  • Dock application gets killed itself on Lion, how to debug this issue?

    Hi, Dock application gets killed itself and it dissappears and relaunches itself after for few seconds, This is happening for every 5 min or so. it is quite annoying problem. how to debug this issue? any help?

    When I look the system logs - there is an exception each time I try to run the application or open a window:
    9/5/09 10:33:12 PM Linear[23545] Cannot create BOOL from object <Regression: 0x1461f0> of class Regression

  • Java application getting killed automatically in Solaris

    Hi to all,
    I have developed a Java application for Solaris 10.
    But it is getting killed after some time.
    And at the terminal, I got message as Killed.
    I am new to Solaris.
    Can anybody help me?

    Nijai.Ashish wrote:
    Hi to all,
    I have developed a Java application for Solaris 10.
    But it is getting killed after some time.
    And at the terminal, I got message as Killed.
    I am new to Solaris.
    Can anybody help me?Are you hitting a resource limitation for your user account (e.g. only allotted a certain amount of CPU time)?

  • Secure server instance restarts automatically

    Hi All,
    I am using iPlanet Web Server 6.0 SP1 with weblogic app server ( no LDAP ) to host a website on Windows 2000 machine. I have two virtual server instances of iPlanet. The one that is configured for SSL, gets restarted automatically. I get following error in event log of system or error log of that instance.
    ncorrect Parameter     security ( 3780): for host 202.68.143.70 trying to HEAD /index.html, acl-state reports: access of D:/iPlanet/Servers/docs/web/index.html denied by ACL path=d:/iplanet/servers/docs/web/ directive 1
    The ACL entries are OK.
    Could anybody please help me out?

    The error message states that the server denied access to a client who was trying to access D:/iPlanet/Servers/docs/web/index.html. It denied access as it was instructed to by the first access control directive configured on the path d:/iplanet/servers/docs/web/. If you don't want to deny access to D:/iPlanet/Servers/docs/web/index.html, you should review your ACL file configuration.
    The Service Pack Release Notes document the issues addressed by that Service Pack. You can view the Release Notes on docs.sun.com at http://docs.sun.com/db/prod/s1websrv#hic

  • N95 gets restart automatically while video recordi...

    Whenever I try to record video more than 4-5 min, my N95 gets restarted automatically while recording and doesnt even save the video. But when I record smaller video say 1-2 min everything is fine. I have Phone from O2 germany and Nokia website says that I have latest software version installed.
    Please help me to fix this problem.
    thank you

    I have reboot problems as well. I haven't had the chance to try long video but it will reboot on almost any application.
    As soon as the battery load is too high (it does get warm). I think it has to do with not being able to supply the current draw so the voltage drops and the phone reboots.
    For me it was Maps that caused the reboot, or if I'm in maps and I get a phone call it would reboot. I could even get it to reboot when I was scrolling through the contact list non-stop.
    See my post for more info. /discussions/board/message?board.id=smartphones&thread.id=102019

  • BPEL instance getting restarted automatically

    Hi All,
    The BPEL instance is getting restarted automatically for every 10 minutes.
    Below is the error found in the log.
    Any help will be appareciated..
    <2010-08-27 18:15:43,486> <INFO> <collaxa> <ConnectionFactoryImpl::init> Initialized connection factory jdbc/BPELServerDataSourceWorkflow
    <2010-08-27 18:15:43,486> <INFO> <collaxa> <ConnectionFactoryImpl::init> Initialized connection factory jdbc/BPELServerDataSource
    10/08/27 18:15:43 System.getProperty(dehydration.store)=null
    <2010-08-27 18:15:44,044> <INFO> <collaxa> <ServerManager::__init> Detected datasource 'oracle'
    <2010-08-27 18:15:44,061> <INFO> <collaxa> <gsServerSchemaManager::validateCompatibility> Detected database version '2.0.4'
    <2010-08-27 18:15:44,062> <INFO> <collaxa> <ServerAdaptorManager::init> Initialized adaptors for platform 'ias_10g'
    10/08/27 18:15:45
    GMS: address is 10.90.188.91:11326
    -------------------------------------------------------

    Hi,
    Could some one please help me.
    I suppose it could be of a below property?
    Could some one please explain what this is all about?
    <web-app application="jamagent" name="jamagent" load-on-startup="true" root="/jamagent" ohs-routing="false" />

  • Process getting killed automatically

    Hi
    I am using jdk 1.5 and java processes are getting killed automatically on server. Processes were working on test servers. Is anybody facing the same issue or knowledge about the same.
    Regards,
    Niraj

    Niraj,
    Can you explain your scenario a bit more clearer.?
    Mandrake

  • Does this application in memory get killed over a period?

    Hi I am a Iphone 4G owner recently, want check if someone already knows about. I know someone must have had this question before. In this new multitasking, we open multiple apps and it appears back and forth when we press home button two times.
    Is this apps gets killed over a period of time automatically? or do we need to kill them manually? Or is there any apps can take care off it.
    I am on IOS 4

    Read here to understand the multitasking bar:
    http://whenwillapple.com/blog/2010/04/19/iphone-os-4-multitasking-explained-agai n/

  • TS2755 Application gets hanged in centre..cant open any application and cant able to restart too

    Application gets minimized in the centre while closing the application..cant open the any of the menu since its gets hanged at the centre...cant able to restart the device...

    Did you try reseting your iPad. Press and hold both the home and power buttons for 10-15 seconds till the Apple logo appears. Release both buttons. Wait 15-20 seconds till your iPad starts on it's own.

  • Lenovo Vibe Z2 Pro getting restart automatically.

    Hi
    I am using Lenovo Vibe Z2 pro and i have observed from last couple of week this phone gets restart automatically and then it's shows one sign in the top up of the screen, this sign is with the phone and red bubble in the secure icon.
    Can anybody help me to understand and fix this problem ?
    Thanks

    The phone is DSDS(Dual Sim/Dual Standby) not DSFA(Dual Sim/Full active).
    ''If one of your SIMs are in use, the other SIM will automatically be put on hold.'' Put on hold=not available
    ''Could you tell me how i can disable the secure zone ?'' It would be better to put that question HERE.
    Hope this helps.
    Regards
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as ''ACCEPT AS SOLUTION"! 
    Unsolicited PM's will not be answered! ....Please post your question/s in the appropriate forum board.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • How to get Mavericks server that is connected to a UPS to restart automatically after a power outage.

    This is driving me crazy. Is there anyone running Mavericks as a mission critical server on Backup Power Supplies that has a way to get the servers to restart automatically after a power outage. The UPS vendors all have software for Windows, but not Macs, and the setting in System Preferences, doesn't work with the UPS's Iv'e tried (2 different APC models (Smart and Back-UPs), one Triplite (Smart) and one CyberPower, (all claiming to be Mac compatible))

    APC do apparently still do a command-line daemon (PowerChute Network Shutdown) which monitors over the network the UPS and will cleanly shutdown the Mac. For lower-end UPS devices these are typically connected via a USB cable and the built-in Apple System Preferences let you control the options - if it is a model supported. There is however a big limitation of using a USB connection which is that you can only connect a single computer to a UPS via USB and of course most companies have multiple servers.
    It maybe that what is happening even if you use APC's software is the following -
    Power failure detected by UPS
    Signal sent to Mac
    Computer does a clean shutdown
    Power restored
    UPS has no way to tell Mac because it is shutdown and Mac does not support 'Wake on LAN' if fully shutdown
    The Mac does have an option to 'Startup automatically after a power failure'. However this might only take place if the Mac is not cleanly shutdown, it could be that if the Mac is cleanly shutdown it does not count this as a power failure. If this is correct then there is nothing that can be done as users to resolve this, the only way it could be resolved would be if Apple provided a way for a tool like APCs software to both do a clean shutdown and set a flag as this being due to a power failure so that when the Mac does detect the power being restored it triggers the Mac in to booting.
    In the dim and distant past when Macs used ADB to connect keyboards and mice the ADB interface did support an external power-on signal. This does not exist for USB.
    Personally I have regarded the APC software (PowerChute Network Shutdown 3.0.1) to be so badly supported and so old as to be too risky to use. It lists 10.7 and 10.8 but not 10.9 and uses Java 1.6 which itself is unsupported. There is a third-party tool you might want to look at called NUT (Network Ups Tools) see http://www.networkupstools.org
    NUT is free and lets you do clever things like -
    Connect a single computer via serial or USB to the UPS
    Act as a 'server' over the network to other computers sharing the UPS
    When power failure is detected the NUT 'server' sends a signal to the NUT 'clients' so all of them know that there is a power failure and can do their own clean shutdowns
    This gets round only being able to connect a single computer via USB.

  • Cancelled messages getting restarted automatically

    Hi all,
        I am facing one issue in pi 7.0, we cancelled some messages in sxi_monitor, but after cancellation also these messages are getting restarted automatically. please help me to solve these issue.
    Regards
    Pradeep P N

    Hi Raja
    Yes we configured restart of failed messages, but after cancelling the messages i think it won't get restart automatically. if i am wrong please correct me.
    Rgds
    Pradeep P N

  • IPlanet 6 restarts automatically

    Hi.
    I am using iPlanet 6.0. When I try to access a certain screen, sometimes the web server restarts automatically, sometimes it just crashes, and sometimes it works properly. I can't find any error msg logged in the server error log or access log.
    Does any one have any ideas as to what might be causing my web server to restart/crash?
    Thanks.

    These are the only messages I can find in the error and access log:
    [25/Jun/2004:18:14:20] info ( 2792):      /listing/ls1200ha.jsp: init      
    [25/Jun/2004:18:14:32] info ( 336):      Installing a new configuration      
    [25/Jun/2004:18:14:32] info ( 336):      [LS ls1] <server>, port 8563 ready to accept requests      
    [25/Jun/2004:18:14:32] info ( 336):      A new configuration was successfully installed      
    [25/Jun/2004:18:14:32] info ( 336):      Using the Java HotSpot(TM) Server VM v1.3.1_03 from Sun Microsystems Inc.      
    [25/Jun/2004:18:14:32] info ( 336):      Java VM classpath: c:\ph2c\bin3\class;c:\ph2c\bin3\conf;c:\ph2c\bin3\xml;c:\ph2c\bin3\class\lib\activation.jar;c:\ph2c\bin3\class\lib\classes12.zip;c:\ph2c\bin3\class\lib\jdbc2_0-stdext.jar;c:\ph2c\bin3\class\lib\crimson.jar;c:\ph2c\bin3\class\lib\jaxp.jar;c:\ph2c\bin3\class\lib\xalan.jar;c:\ph2c\bin3\class\lib\jce.zip;c:\ph2c\bin3\class\lib\jce1_2_1.jar;c:\ph2c\bin3\class\lib\local_policy.jar;c:\ph2c\bin3\class\lib\sunjce_provider.jar;c:\ph2c\bin3\class\lib\US_export_policy.jar;c:\ph2c\bin3\class\lib\servlets.jar;c:\ph2c\bin3\class\lib\jndi.jar;c:\ph2c\bin3\class\lib\icu4j.jar;c:\ph2c\bin3\class\lib\mail.jar;c:\ph2c\bin3\class\lib\oromatcher.jar;c:\ph2c\bin3\class\iText;c:\ph2c\bin3\class\webdms;c:\ph2c\bin3\class\ISWeb;C:/iPlanet/Servers/bin/https/jar/NSServletLayer.jar;C:/iPlanet/Servers/bin/https/jar/NSJavaUtil.jar;C:/iPlanet/Servers/bin/https/jar/NSJavaMiscUtil.jar;C:/iPlanet/Servers/bin/https/jar/servlet.jar;C:/iPlanet/Servers/bin/https/jar/servlet-2.3-filters-api.jar;C:/iPlanet/Servers/bin/https/jar/jsp092.jar;C:/iPlanet/Servers/bin/https/jar/jaxp.jar;C:/iPlanet/Servers/bin/https/jar/crimson.jar;C:/iPlanet/Servers/bin/https/jar/xalan.jar;C:/iPlanet/Servers/bin/https/jar/jspengine.jar;      
    [25/Jun/2004:18:14:32] info ( 336):      Loading IWSSessionManager by default.      
    [25/Jun/2004:18:14:32] info ( 336):      IWSSessionManager: Maximum number of sessions is 1000      
    [25/Jun/2004:18:14:33] info ( 336):      Successfully initialized web application environment (web-apps.xml) for virtual server (https-ph2c_com3)      
    [25/Jun/2004:18:14:33] info ( 336):      Internal Info: loading servlet /listing/ls1200ha.jsp      
    [25/Jun/2004:18:14:33] info ( 336):      /listing/ls1200ha.jsp: init      
    [25/Jun/2004:18:14:33] info ( 336):      Internal Info: loading servlet /base/error.jsp      
    [25/Jun/2004:18:14:33] info ( 336):      /base/error.jsp: init      
    [25/Jun/2004:18:14:35] info ( 336):      Internal Info: loading servlet /base/error_db.jsp      
    [25/Jun/2004:18:14:35] info ( 336):      /base/error_db.jsp: init     
    [25/Jun/2004:18:14:15 +0800] "GET /listing/ls0160.jsp?SRC=%2Flisting%2Fls0510ha.jsp%3FAPP_ID%3D1366830&CM_APP_COMP_NO=3 HTTP/1.0" 200 16300
    [25/Jun/2004:18:14:15 +0800] "GET /include/styles.css HTTP/1.0" 304 -
    [25/Jun/2004:18:14:15 +0800] "GET /include/modal_ns4.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:15 +0800] "GET /include/strings.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:15 +0800] "GET /include/utils.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:15 +0800] "GET /include/number.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:16 +0800] "GET /include/messages.jsp HTTP/1.0" 200 3482
    [25/Jun/2004:18:14:16 +0800] "GET /include/lbjs02.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:16 +0800] "GET /include/action.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:17 +0800] "GET /images/print.gif HTTP/1.0" 200 927
    [25/Jun/2004:18:14:17 +0800] "GET /images/radio_y.gif HTTP/1.0" 200 95
    [25/Jun/2004:18:14:17 +0800] "GET /images/radio_n.gif HTTP/1.0" 200 87
    [25/Jun/2004:18:14:33 +0800] "GET /listing/ls1200ha.jsp?PROF_TYPE=C&CM_APP_COMP_NO=3&CTP_DOC_TYPE=CODE%20OF%20ETHICS&SUB_MEAN=P HTTP/1.0" 200 966
    [25/Jun/2004:18:14:34 +0800] "GET /include/action.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:34 +0800] "GET /base/error_db.jsp?_ACTION=&SCREEN_ID=&MSG=AZ-000503%3A+Session+timed+out.+Please+logout+from+the+system+by+clicking+the+Logout+button+and+login+again.++Thank+you. HTTP/1.0" 200 2200
    [25/Jun/2004:18:14:34 +0800] "GET /include/styles.css HTTP/1.0" 304 -
    [25/Jun/2004:18:14:35 +0800] "GET /include/action.js HTTP/1.0" 304 -
    [25/Jun/2004:18:14:35 +0800] "GET /images/line.gif HTTP/1.0" 200 1818
    Is there any way for me to know the cause of the crash?
    Thanks.

  • Kjs engine gets killed

    see server performance
    load averages: 0.27, 0.24, 0.25 18:08:44
    117 processes: 114 sleeping, 2 zombie, 1 on cpu
    CPU states: 90.5% idle, 2.4% user, 7.1% kernel, 0.0% iowait, 0.0% swap
    Memory: 2048M real, 128M free, 1619M swap in use, 3992M swap free
    PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
    1473 root 55 12 0 270M 215M sleep 3:06 1.61% .kjs
    27817 root 69 58 0 304M 246M sleep 21:54 1.43% .kjs
    20332 root 57 58 0 436M 363M sleep 43:07 1.22% .kjs
    1571 root 55 11 0 265M 209M sleep 3:10 1.13% .kjs
    20363 root 57 58 0 372M 312M sleep 38:00 1.12% .kjs
    29370 root 1 43 0 2248K 1544K cpu/0 1:09 0.66% top
    20322 root 31 58 0 41M 39M sleep 9:02 0.39% .kxs
    but ks engines killed automatically in iplanet apps server.No specifice errors
    Below errors comes and engines gets killed
    [17/Feb/2005 12:30:13:1] warning: UTIL-013: GXGUID: NameTrans lookup failed (Applogic Servlet com_EmployeeReferralFriendsViewJobsAtIntra)
    [17/Feb/2005 12:33:20:5] warning: UTIL-013: GXGUID: NameTrans lookup failed (Applogic Servlet com_EmployeeReferralFriendsViewJobsAtIntra)
    [17/Feb/2005 14:14:02:9] warning: UTIL-013: GXGUID: NameTrans lookup failed (Applogic Servlet com_EmployeeReferralFriendsViewJobsAtIntra)
    [17/Feb/2005 15:25:59:3] error: CONN-003: socket receive error (RecvBuffer 1) (conn 0x10c72d8, sock 24, host 0xac8312f, port 0)
    [17/Feb/2005 15:25:59:3] error: CONN-003: socket receive error (RecvBuffer 1) (conn 0x10f7be8, sock 34, host 0xac8312f, port 10824)
    [17/Feb/2005 16:53:05:0] error: CONN-003: socket receive error (RecvBuffer 1) (conn 0x1575978, sock 28, host 0xac8312f, port 10822)
    [17/Feb/2005 16:53:05:0] error: CONN-003: socket receive error (RecvBuffer 1) (conn 0x14cd6c8, sock 32, host 0xac8312f, port 0)
    [17/Feb/2005 16:54:24:0] error: CONN-003: socket receive error (RecvBuffer 1) (conn 0xab08d8, sock 34, host 0xac8312f, port 10824)
    [17/Feb/2005 16:54:24:1] error: CONN-003: socket receive error (RecvBuffer 1) (conn 0xa655a0, sock 26, host 0xac8312f,.Pls suggest me what could be the problem.

    You might have more luck posting your question in the Sun ONE Application Server 6 forum.

  • Restart Lion without applications opening

    Every time I restart my computer, iTunes and BBC iPlayer start automatically even though I have disabled the preference in the system preferences, general, and untick the reopen windows box on logging out. Is there a preference file that I can delete to get Lion to do a 'blank' restart?
    The applications are not in the login items under user and groups preferences either. It seems that Lion is 'stuck' at a point that the BBC iPlayer crashed and restarts with the same problem, making it impossible to launch, delete or reinstall the iPlayer. I can get it to work for a while, but everytime I log out and in again, the problematic situation returns with iPlayer opening automatically, into the 'crashed' state.
    Thanks for you help!
    Francois

    [deleted by me]

Maybe you are looking for