Xrs option and shutdown hooks

I want to use a Java program as a service on Windows NT. I pass the -Xrs option to the VM in order to prevent it from stopping when a logoff signal is sent by the system. A problem occurs when I try to add a shutdown hook in my Java program, the following error is printed and the JVM aborts:
Exception in thread "main" java.lang.IllegalArgumentException: Signal already used by VM: SIGINT
at sun.misc.Signal.handle(Signal.java:152)
at java.lang.Terminator.setup(Terminator.java:42)
at java.lang.Shutdown.add(Shutdown.java:88)
at java.lang.Runtime.addShutdownHook(Runtime.java:193)
Does anybody know if this is normal behaviour, or is there a bug in the JVM?

I have the same trouble, do you find a solution to solve it?
I want to use a Java program as a service on Windows
NT. I pass the -Xrs option to the VM in order to
prevent it from stopping when a logoff signal is sent
by the system. A problem occurs when I try to add a
shutdown hook in my Java program, the following error
is printed and the JVM aborts:
Exception in thread "main"
java.lang.IllegalArgumentException: Signal already
used by VM: SIGINT
at sun.misc.Signal.handle(Signal.java:152)
at
at
at java.lang.Terminator.setup(Terminator.java:42)
at java.lang.Shutdown.add(Shutdown.java:88)
at
at
at
t java.lang.Runtime.addShutdownHook(Runtime.java:193)
Does anybody know if this is normal behaviour, or is
there a bug in the JVM?

Similar Messages

  • HT4623 Hi I have a question, I am operating my iPhone 4S on 6.1.1iOS, as my power button is not working, I have jailbreoked my device so that I have a option to restart and shutdown my device. If i upgrade to iOS 7 do i have such option?

    Hi I have a question, I am operating my iPhone 4S on 6.1.1iOS, as my power button is not working, I have jailbreoked my device so that I have a option to restart and shutdown my device. If i upgrade to iOS 7 do i have such option?

    Jailbreaking your iPhone forfeits your ability to receive any support on that phone, including from this forum.
    You'll have to search elsewhere for answers to your issue.

  • 'Install Updates and Shutdown' option not appearing for Windows 8.1 users

    Windows 8.1 users are reporting, and I have verified, that they are not being prompted to install Windows updates while shutting down, even though the updates are downloaded.  Here are the relevant Windows Update gpo's from a sample Group Policy Result
    for a typical user on one of our Windows 8.1 workstations:
    (Note: The "Specify intranet Microsoft update service location" is the last policy in the updates section, and the value specified there is not relevant to this question.)
    These same settings when applied to Windows XP workstations used to prompt users to install updates at shutdown.  That is, the default shutdown option was "Install Updates and Shutdown".  That was a great workflow because all client workstations
    were shut down every night and the user didn't have to worry about updates installing while they were using the workstation.  All client workstations are now running Windows 8.1 Pro and the only way updates are getting installed is by manually pulling
    up the Windows Update dialog and initiating updates from there.  That is even worse than automatic updates that install during business hours.
    I do notice that
    a notification that updates are available appears in the login screen, but one can not take action upon it from there, and most users don't know how to find the update screen once they sign in; and
    once updating is begun, then the Install Updates and Shutdown option becomes a default - but by that point its rather cosmetic: that is the only option (to configure the partially installed updates during shutdown) and there is nothing
    that could be done to NOT do that at that point. 
    Is anyone having similar issues?  As far as I can tell right now, there is no ability to actually switch the user's default option to
    Install Updates and Shutdown in the same way as in previous Windows editions even though the GPO is identical.

    Hi,
    >>Is anyone having similar issues?  As far as I can tell right now, there is no ability to actually switch the user's default option to
    Install Updates and Shutdown in the same way as in previous Windows editions even though the GPO is identical.
    Regarding this point, the following blog may provide a good explanation.
    Minimizing restarts after automatic updating in Windows Update
    http://blogs.msdn.com/b/b8/archive/2011/11/14/minimizing-restarts-after-automatic-updating-in-windows-update.aspx
    Best regards,
    Frank Shen

  • {Solved} Windows 8.1 Doesn't show users when windows loads, only shows options for accessibility and shutdown/restart

    I just recently come into a problem on a dell all-in-one, where the computer has been updated to windows 8.1 and doesn't show users, only a blue screen with the power options and accessibility options and here is how I fixed it.
    Note: you will lose your desktop apps
    1. Turn on computer and let load to the blue screen with the options
    2. While holding down shift click on the power button and then click restart (while still holding shift)
    3. Hold shift until the advanced recovery options comes up
    4. click on Troubleshoot>Refresh your PC
    5.Enter password for user account
    6. Let it do its magic

    Hi,
    Thanks for your sharing. And it will benifit others who encounter the similar issue as yours.
    This issue can be caused by corrupted winlogon components.
    You are right to refresh to repair the system.
    Kate Li
    TechNet Community Support

  • Shutdown hooker, how does it work?

    hello All:
    I am writting a Java service that might crash for unknown reasons. As a failover mechanism, i was thinking to use shutdown hook to do house cleaning work such as closing db connection, notifying the client of this service, etc.
    However, people point it out that #1, inside shutdown hook it is ok to close db connection, but notifying client won't work; #2, shutdown hook is not reliable and likely not be called in the first place when the system crashes. Like that in the Linux env, it can be killed by "kill" or "kill -9", the impact on the service can be different.
    Anyone can make a comment about the above statements? And what's the best options in a crashing sceanario?
    Thanks,
    Sway

    mlk wrote:
    pierrot_2 wrote:
    Right, if I knew I had to pucker up, I'd put my head between my legs first... but there's no way to tell. Is there anything else you can use to moniter external conditions -- a backup battery?Some UPSes can inform the host that is has lost power and should shut down (but that is not a Java problem but a general OS/server setup issue). But you can't guard against everything (kill -9, running on a VM and someone killing your VM in that). The best you can do is attempt to make sure that you leave the world in as sane state as possible (for example good use of transactions) and make sure your monitoring solution works.Best example of that I ever encountered was a computer with 2 independent power supplies hooked up to an extension cable with a splitter, going into a single UPS and a single wall outlet.
    Someone tripped over the cable, pulling it out of the UPS outlet, thus killing the power to the machine past the point where the UPS is set to guard against power failure, and due to the idiotic arrangement which compromised the very reason (failsafe) there were 2 power supplies causing the machine to turn off.
    No amount of software can guard against such stupidity, yet we were told to modify the software so that it would continue to run in case of power failure (not joking, really happened).
    After much debate we modified it to constantly monitor and document its own state so it could restart where it left off before a power failure.

  • Shutdown hook not getting called when running tomcat as a service

    I have a shutdown hook as part of a lifecycle <Listener> tomcat6 class, which gets created and registered in the class's constructor (class is referenced in the server.xml). The hook gets called during shutdown when tomcat has been started from a shell, but not when tomcat has been installed as a service. The -Xrs flag doesn't make a difference either way. I am running java 6u12 server VM (haven't tried client) and prior versions. Does anyone have any ideas? This has been tested by starting/stopping from the Control Panel, and also with 'tomcat6 //TS/ServiceName' (i.e. in test mode)
    One possibility is that tomcat internally calls Runtime.halt(), but the shutdown process appears to be normal and the same with either scenario. The other possibility is that the JVM has an issue. The tomcat user groups don't have anything to offer.
    Thoughts?
    tia

    sanokistoka wrote:
    jschell wrote:
    sanokistoka wrote:
    Let me ask the last question in a better way: Does anyone have any GOOD ideas?Get back to us when you have found your good solution.Stop wasting bandwidth. I didn't post here to be a smart ars like you and pretend that I have a solution to a rare problem... FYI - the workaround is to use the tomcat lifecycle events (AFTER_STOP_EVENT) to achieve the same - why do you think I mentioned it's a tomcat listener in the first place? Feel free to educate me.
    So you are claiming that Runtime.getRuntime().addShutdownHook() that you posted in the above is not part of the java API?
    Or perhaps that everything that is added via addShutdownHook() runs?
    Surely you are not claiming that it isn't calling addShutdownHook() in the first place?
    Get a life and a job.I have both but thanks for the concern.
    sanokistoka wrote:
    swamyv wrote:
    There are free tools available to debug windows. I think gdb is one of them. If you search you can find some good tools.
    If you find any good tools that you like share it with us.
    Yes I will try gdb (have cygwin) and see where this takes us - not sure if the JVM or tomcat6.exe have the symbols to get a meaningful stack trace. As luck would have it, [https://issues.apache.org/bugzilla/show_bug.cgi?id=10565|https://issues.apache.org/bugzilla/show_bug.cgi?id=10565] claims that "shutdown hooks are not supported in a container environment" although there is no such restriction in the servlet spec, which would make this a tomcat issue (it does sound like that tomcat6.exe wrapper is somehow involved). Unfortunately, tomcat does NOT issue the AFTER_STOP_EVENT if killed before it has completed its start-up (it appears its own shutdown hook, which sends the event, is not registered until it has fully come up); thus the need for a shutdown hook (at least, up until it's fully up). A shutdown hook is still required in my case for clean-up after tomcat is completely out of the picture. It sounds like the proper architecture here is to really embed tomcat in an application, and create a shutdown hook at the outer level.
    Educate me some more. The above description certainly seems like you are suggesting that both of the following are true.
    1. It is not a bug in the VM.
    2. The problem, for your implementation, is in how the wrapper terminates the windows service.
    Perhaps what is actually happening it that addShutdownHook() is never being called at all? Thus of course any processing of the thread associated with that would never, ever run.
    And that happens because you are banging on the stop service so fast that it doesn't actually have time to spin up?

  • Shutdown hook

    I have a java program with a main method implementing shutdown hook.
    public static void main(String[] args) throws EcwException {
    CreateAllCharts createAllCharts = new CreateAllCharts();
    Runtime.getRuntime().addShutdownHook(new Thread() {
    public void run() {
    log.fatal("Shutting down operation.");
    This program is run from a korn shell script. When I do a ^c on the script, i dont see the 'fatal' message in the log. ???
    Can someone explain this.
    thanks.

    Instead of a well-handledSystem.exit(0)your ^C is (I believe) the equivalent ofRuntime.halt(), which deliberately doesn't give shutdown hooks the chance to run.
    What if your shutdown hook (I know it doesn't, but what if it did) got into a super gruesome wordy longsmith kind of loop and never exited? This is the reason for allowing the break-key to butt in, no matter what's executing.
    Could your app listen out for another key combination and leave ^C as an 'emergency exit' option? It's difficult for a console app I know but I think that's your best option.
    I'll watch closely for better advice than mine but, in the meantime, hope it helps.
    Chris.

  • Using launchd to send an email on startup and shutdown

    Hello All !
    I'd like to get an email whenever my Mac starts up and shuts down, since I have to leave it unattended for quite some long periods of time (and even with the help of a UPS, power goes out anyway...). My Mac runs under Mac OS X Lion.
    I found some help on the Internet, mainly from this page : http://www.syntaxtechnology.com/2009/06/email-on-shutdown-and-restart/ , which applies to Linux, and hoped it could work on Mac OS X (I thought at first I could just drop a script in something like /etc/init.d/ or /etc/rc.d/rc5.d but well... we have launchd instead...).
    The first method listed in the page above worked well, but sends an email only on startup (for a reminder: you add a line that starts with @reboot in your crontab, and a command that sends directly an email).
    I then tried to adapt the second method to Mac OS X, and succeeded partially: I wrote a small script based on what was shown on that page (a start and stop function, start gets called when the script is started, and stop gets called based on a trap on various kill signals, with an infinite wait loop: see below). I also wrote the plist file, loaded it in launchd and rebooted my Mac several times to test everything.
    I get an email on each startup (yeah!), but the shutdown mail gets sent only at the next startup. So I guess that postfix gets killed by the shutdown process *before* being able to send my shutdown email :-(
    So here are my main questions, if someone can help me:
    1. is there a way to precisely call a script during the shutdown process, meaning giving it a priority so it gets called before postfix dies ? (like the rc directories and the naming conventions (KnnScriptName and SnnScriptName) found on some Linux/Unix).
    2. is it possible to do that with launchd ? if not, what would be the Mac OS X sanctionned way of doing this ?
    Other things:
    3. my shell script writing ability is kind of rusty, so maybe I made some "very bad shell writingTM": l'm not sure putting an infinite while loop with a 15 second pause in it is the best way of telling a script to do nothing. There might other things in there that would make an Unix guru jump out of his chair: please tell me :-)
    This is my plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
    <plist version=“1.0”>
    <dict>
    <key>Disabled</key>
    <false/>
    <key>Label</key><string>org.amarante.startshutemail</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Library/Scripts/startshutemail-launchd.sh</string>
    <string>start</string>
    </array>
    <key>RunAtLoad</key><true/>
    </dict>
    </plist>
    And this is the script that does the job:
    #!/bin/bash
    # PHL 20120604 startshutemail-launchd.sh
    # Send an email on startup and shutdown (version for launchd)
    # Based on script and explanations found here:
    # http://www.syntaxtechnology.com/2009/06/email-on-shutdown-and-restart/
    # Modification history
    # PHL 20120604 v01 First version
    # Environment variables #################################################
    DEST_EMAIL="[email protected]"
    SRV_NAME=Amarante
    EVENT_TIME=$(date +%Y/%m/%d-%H:%M:%S)
    RESTART_SUBJECT="[$SRV_NAME] $EVENT_TIME : System Startup"
    RESTART_BODY="This is an automated message to notify you that $SRV_NAME started successfully at $EVENT_TIME."
    SHUTDOWN_SUBJECT="[$SRV_NAME] $EVENT_TIME : System Shutdown"
    SHUTDOWN_BODY="This is an automated message to notify you that $SRV_NAME is shutting down now ($EVENT_TIME)."
    # Functions ##########
    stop()
    echo "$SHUTDOWN_BODY" | mail -s "$SHUTDOWN_SUBJECT" $DEST_EMAIL
    return 0
    start()
    echo "$RESTART_BODY" | mail -s "$RESTART_SUBJECT" $DEST_EMAIL
    return 0
    # Main part #########
    case $1 in
    stop)
    stop
    start)
    start
    esac
    # trap kill signals to send an email
    trap stop HUP INT QUIT ABRT KILL ALRM TERM TSTP
    # sleep until killed
    while :
      do
        sleep 15
      done
    Thanks for your help, and any comment :-)
    Paul-Henri

    Thanks a lot for your answer, Camelot, even if it sorts of confirm what I suspected. Pinging a machine from an external observer is a solution, but it will also report broken links problems and not only a computer shutting down, and it raises the next tier of problems, general network reliability after individual system reliability. It's something I'll have to look at for sure.
    It's weird there isn't any way to access the way the shutdown process works.
    One of the commenters (#14) on the page from Syntaxtechnology had a similar problem: he added a "sendmail -q" in his script to force sendmail to go to work and service the queue before shutting down, which I can try, but he also added a delay to the stop process of sendmail, which is something I'm not sure I can do on Mac OS X (and that might disappear one day with one of the OS updates).
    Unless there is a way to change the launchd.plist file for postfix and add an ExitTimeOut option in it (I found this idea here : https://discussions.apple.com/message/17229690#17229690 )
    Cheers,
    Paul-Henri

  • Shell Script  for Startup and Shutdown the database

    Hi,
    i want Shell Script for Startup and Shutdown the database in Solaries.
    could any one can hep me where i can get this script. or send to me to [email protected]
    Thanks & Regards,
    Gangi reddy

    SHUTDOWN
    SHUTDOWN ABORT]
    Shuts down a currently running Oracle instance, optionally closing and dismounting a database.
    Terms
    Refer to the following list for a description of each term or clause:
    ABORT
    Proceeds with the fastest possible shutdown of the database without waiting for calls to complete or users to disconnect.
    Uncommitted transactions are not rolled back. Client SQL statements currently being processed are terminated. All users currently connected to the database are implicitly disconnected and the next database startup will require instance recovery.
    You must use this option if a background process terminates abnormally.
    IMMEDIATE
    Does not wait for current calls to complete or users to disconnect from the database.
    Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
    NORMAL
    NORMAL is the default option which waits for users to disconnect from the database.
    Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
    TRANSACTIONAL [LOCAL]
    Performs a planned shutdown of an instance while allowing active transactions to complete first. It prevents clients from losing work without requiring all users to log off.
    No client can start a new transaction on this instance. Attempting to start a new transaction results in disconnection. After completion of all transactions, any client still connected to the instance is disconnected. Now the instance shuts down just as it would if a SHUTDOWN IMMEDIATE statement was submitted. The next startup of the database will not require any instance recovery procedures.
    The LOCAL mode specifies a transactional shutdown on the local instance only, so that it only waits on local transactions to complete, not all transactions. This is useful, for example, for scheduled outage maintenance.
    Usage
    SHUTDOWN with no arguments is equivalent to SHUTDOWN NORMAL.
    You must be connected to a database as SYSOPER, or SYSDBA. You cannot connect via a multi-threaded server. For more information about connecting to a database, see the CONNECT command earlier in this chapter.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013607
    Joel Pérez

  • Stock kernel isn't compatible with nvidia-dkms and nvidia-hook?

    Hello pals
    I'm using linux-ice, linux-lqx and linux-ck kernels with nvidia-dkms and nvidia-hook. Everything is ok, with kde upping.
    I've started from stock kernel. During the dkms (or hook, I don't remember) pacman says that nvidia and nvidia(dkms or hook) were incompatible... remove nvidia? I've selected yes
    After it, stock kernel don't upps the kde... stays on black screen. Login on tty1, 2 or 3 is possible, with ctrl+alt+F1...F3, but, kde with kernel don't works
    no errors appears.
    to force stock kernel been compiled by hook, I wait a while, when using the other kernels, and yesterday I did a "Syyu"
    new kernel, new linux-headers too... but still blank screen
    I only can use stock kernel and Nvidia driver, not dkms/hook installed one?

    Ok, i know little about dkms / mkinitcpio hooks , but best option seems to try and build the nividia module manually to get more info.
    nvidia-hook gets sources from here : https://github.com/alucryd/mkinitcpio-hooks/ ,
    build ()
    _version=$(pacman -Qs '^nvidia$'|sed 's/^[^ ]* \|-[0-9]*$//g;2d')
    echo "Building nvidia modules for ${KERNELVERSION} kernel..."
    dkms install nvidia/${_version} -k ${KERNELVERSION}/_arch
    echo "Ok."
    help ()
    cat<<HELPEOF
    This hook rebuilds nvidia modules. It does nothing to the initrd image.
    HELPEOF
    looks like all the hook does is run dkms install, try running that command manually to get more info.

  • Spontaneous startups and shutdowns

    Ever since I got my G5 in 2004, I've had spontaneous startup/shutdown problems. I will wake up in the morning or come home from work and find the computer on and at the login prompt (I have set no such predetermined startup time.) Or, I'll be working and all of a sudden it powers down and then powers back up (it will bring me back to the same screen and what I was doing), but after repeated occurrences of shutdown/startup, usually in short succession, it will permanently shut down, requiring me to shut off the battery backup into which it is plugged to reset the whole system. Then things settle down for a while. Then a month or two later, it will go through another bad spate of spontaneous startups and shutdowns, almost like it just got over a cold only to contract a new one.
    At first, Apple said it was a motherboard problem which they replaced; that didn't solve my problem. Then they said it was a bad video cable to the monitor and repaired that; that didn't solve my problem, either. They asked if I had any peripherals (printer, scanner, external HD) hooked up and said such items can cause erratic behavior (to which I felt like asking "then why do you manufacture your computers with ports in them so users CAN plug in other devices?") I've given up taking it to them because I can't make it replicate its erratic behavior and unless they see what it's doing, they can't do anything about it (and I don't think they really believe me, anyway...)
    I've reset my PRAM. I've reset my SMU (actually that happens every time I shut down the computer because I shut down the battery backup every time to prevent unsupervised morning startup.) I've run Disk Warrior. I've checked and confirmed my power source. I've literally unplugged everything (and I mean EVERYTHING) and re-connected all components. All to no avail. I even have video of it happening because Apple doesn't believe what I'm describing. Is it possible that my computer has been infected and is one of those "slave computers" that hackers use to do their bidding? I've wondered about that...
    Has anyone else experienced this?

    It almost sounds like a bad UPS.
    Have you tried bypassing the UPS? What is the rating of the thing?

  • How to automate the Oracle database start and shutdown process

    How we can automate and oracle database start and stop procees with Linux start/shutdown process.
    I want to automatically start the oracle database at the time linux server and shutdown the database on shutdown linux server.

    Hi,
    I can share my scripts:
    1) /home/oracle/start_oracle.sh
    #Script should be ran as Oracle user
    cd /tmp
    export ORACLE_SID=orcl
    export ORACLE_HOME=/oracle/ora9i
    lsnrctl start
    sqlplus -S /nolog <<ENDSQL
    connect / as sysdba
    startup
    exit
    ENDSQL
    emctl start dbconsole
    isqlplusctl start
    NOTE: emctl and isqlplus are optional
    2) /home/oracle/stop_oracle.sh
    #Script should be ran as Oracle user
    cd /tmp
    export ORACLE_SID=orcl
    export ORACLE_HOME=/oracle/ora9i
    isqlplusctl stop
    emctl stop dbconsole
    sqlplus -S /nolog <<ENDSQL
    connect / as sysdba
    shutdown immediate
    exit
    ENDSQL
    lsnrctl stop
    NOTE: emctl and isqlplus are optional
    Then what you need:
    1) K91oracle_stop (put it in the desired run level)
    #!/bin/bash
    # description: Stop Oracle before reboots
    su - oracle -c "/home/oracle/stop_oracle.sh" >> /home/oracle/stoporacle.log
    2) S91oracle_start (put it in the desired run level)
    #!/bin/bash
    # description: Start Oracle after reboots
    su - oracle -c "/home/oracle/start_oracle.sh" >> /home/oracle/startoracle.log
    Bye.

  • How to enable password request for restart and shutdown?

    Hi,
    I'm neither a Linux nor an Arch Linux newbie, but inexperienced regarding this particular issue.
    I want to enable password request for restart and shutdown and want to know if I'm mistaken, because trial and error might become to time-consuming while working on a project.
    I read https://wiki.archlinux.org/index.php/Al … o_shutdown.
    $ ls -hAl /usr/bin/shutdown
    lrwxrwxrwx 1 root root 9 Apr 22 03:02 /usr/bin/shutdown -> systemctl
    If I try to run $ shutdown -hP 28 or $ shutdown -c nothings happens, I need to run $ sudo shutdown -hP 28 and $ sudo shutdown -c and type a password. That's the way I want it.
    If I e.g. run $ shutdown -r now no password is needed. I want to disable this. It should behave the same way as shutdown -hP/-c behave. I want to type
    $ sudo shutdown -r now or $ sudo systemctl reboot etc. and then the password should be required.
    $ sudo grep -vn "#" /etc/sudoers | grep [[:blank:]]
    72:root ALL=(ALL) ALL
    73:rocketmouse ALL=(ALL) ALL
    The user "rocketmouse" should have all permissions after typing a password, but not without typing the password.
    IIUC what's written at https://wiki.archlinux.org/index.php/Polkit, I need to edit
    $ pkaction | grep login
    org.freedesktop.accounts.set-login-option
    org.freedesktop.login1.attach-device
    org.freedesktop.login1.flush-devices
    org.freedesktop.login1.hibernate
    org.freedesktop.login1.hibernate-ignore-inhibit
    org.freedesktop.login1.hibernate-multiple-sessions
    org.freedesktop.login1.inhibit-block-idle
    org.freedesktop.login1.inhibit-block-shutdown
    org.freedesktop.login1.inhibit-block-sleep
    org.freedesktop.login1.inhibit-delay-shutdown
    org.freedesktop.login1.inhibit-delay-sleep
    org.freedesktop.login1.inhibit-handle-hibernate-key
    org.freedesktop.login1.inhibit-handle-lid-switch
    org.freedesktop.login1.inhibit-handle-power-key
    org.freedesktop.login1.inhibit-handle-suspend-key
    org.freedesktop.login1.power-off
    org.freedesktop.login1.power-off-ignore-inhibit
    org.freedesktop.login1.power-off-multiple-sessions
    org.freedesktop.login1.reboot
    org.freedesktop.login1.reboot-ignore-inhibit
    org.freedesktop.login1.reboot-multiple-sessions
    org.freedesktop.login1.set-user-linger
    org.freedesktop.login1.suspend
    org.freedesktop.login1.suspend-ignore-inhibit
    org.freedesktop.login1.suspend-multiple-sessions
    org.freedesktop.machine1.login
    IOW I need to replace every yes and no etc. with auth_admin in $ grep -v lang /usr/share/polkit-1/actions/org.freedesktop.login1.policy.
    Am I mistaken?
    Regards,
    Ralf

    You'll need to create a rules file which uses javascript.
    https://wiki.archlinux.org/index.php/Po … tion_rules
    // /etc/polkit-1/rules.d/10-admin-shutdown-reboot.rules
    polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.power-off" ||
    action.id == "org.freedesktop.login1.power-off-ignore-inhibit" ||
    /*...SOME_MORE_IDS_HERE...*/
    // return polkit.Result.AUTH_ADMIN_KEEP;
    return polkit.Result.AUTH_SELF_KEEP;
    Last edited by progandy (2015-06-21 17:42:35)

  • WebLogic AdminServer not starting: JVM Called WLS Shutdown hook

    Hi All,
    I am getting below error while starting the WLS Admin Server:
    <Nov 9, 2012 11:36:42 AM PST> <Notice> <WebLogicServer> <BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now>
    <Nov 9, 2012 11:36:42 AM PST> <Alert> <WebLogicServer> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
    <Nov 9, 2012 11:36:42 AM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    Any pointers for resolving this issue?
    Regards,
    Sunny

    What other errors can you see in your console ?
    When are you getting this error ?
    Does you coming in Running mode any time or are you getting this error while starting server ?
    Have you killed all the other processes ?
    You can try with :
    JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.awt.headless=true -Xrs"

  • Hibernate option in Shutdown menu?

    I am using the MBP (last release prior to unishell design), with an external monitor and bluetooth keyboard an mouse. I often work on multiple files at the same time (up to ~10) and each one is ususally arranged on my screen or in spaces according to what I am doing. I often need to refer to multiple documents at the same time, and my problem arises when I am done working on the documents for the night and need to save the workspace exactly as it was. I cannot find a way to do that. I would love a hiberantion option on my shutdown screen, is there such an option and how can it be enabled?

    BobHarris wrote:
    ...in that the state is not written to disk. If the power cuts out, from the battery dying etc, then it'll hard-shutdown.
    Actually, when you put your Mac to sleep the current state memory is written to /var/vm/sleepimage so that if power goes too low you can still get back to where you were when you went to sleep.
    This is the reason that it takes a long time for a Mac to go to sleep, as it is writting memory to /var/vm/sleepimage.
    To further clarify things there are several kinds of sleep possible on new macs. all new portable macs come preset for new kind of sleep that does use sleepimage. but new desktops don't.
    You can run
    pmset -g | grep hibernatemode
    and see what kind of sleep mode is set. 0 means old style instantaneous sleep without sleep image (that's what I got on my mac pro). 3 means the new sleep. that's the default for new laptops.
    you can set the mode to what you want using
    sudo pmset -a hibernatemode number
    see this link for more details on this:
    http://www.macworld.com/article/53471/2006/10/sleepmode.html
    Message was edited by: V.K.

Maybe you are looking for

  • About the iphone

    i have iphone4 4.3.3 when iam going to connect my mobile with  pc or laptop it does not conect or not charging with the computer  but when i am using the same cable with the charger charging start i did not  connect with the itunes for this problem p

  • JAI speed problem

    Hi everybody, I met a very tricky problem in using JAI to process tiff files. When I use JAI to process a small tiff stream of about 30k, it takes a hour and show the image successfully. The code I was using is as follows: SeekableStream s=new Memory

  • What is a formula variable in bex

    hi friends,   can anybody tell me about what is a formula variable. how can we use formula variable. give me one simple example. thankk u. thanks, sree

  • .chm on Windows Server 2008 hangs on a hyperlink to an embedded .xls file

    This link has not caused problems on Windows XP, Windows 7, and Windows Server 2003. On Windows Server 2008, if a user attempts to go to the link he gets the option to open or save the file. Either option causes an "application crash". The .xls is ac

  • Ganntt Chart view

    Although I have set a project start date for say 01/02/14 which then ends say 90 days time, and I add tasks, when I then save and reopen the project the gantt chart view always opens at August 2013 and I then need to scroll to my current date. How ca