How to trigger lid close programatically?

Is there a way to trigger the lid close action programmatically with a script or through terminal? I can achieve this by placing a small magnet near the SD slot on my macbook pro, but obviously magnets and hard drives don't mix.
Thanks guys.

I see, in that case you don't want to sleep your Mac. Can you not simply turn down the brightness on the internal display?
If you use an external keyboard you can use your MacBook Pro in "Clamshell mode": Mac notebooks: How to use your computer in closed clamshell (display closed) mode with an external display. The requirement is to have an external keyboard, and its power adapter must be connected.

Similar Messages

  • HOW TO TRIGGER A E-MAIL ALERT IN ICWEB

    Hi,
    I have different scenarios for different e-mail alert messages.  Can anybody tell me how to trigger different alerts for different scenarios and where?
    Thanks,
    Shrik.

    Please,
      Close one of the thread with the same question.
    Regards.
    Manuel

  • Gnome3: Cannot set laptop lid close action

    I've checked the lid closing sensor with watch /proc/acpi/button/lid/LID/state and the status changes without problems, but i can't set the lid closing action in gnome-tweak-tool or under power options. The laptop suspends only when an external monitor is not connected, i want to change it so it always suspends when the lid is closed.
    How can I fix this?
    Screenshots
    power options
    gnome-tweak-tool
    Last edited by klingt.net (2014-03-19 20:28:05)

    Seems to be a bug in gnome, gnome-tweak-tool outputs the following messages:
    INFO : GSettings missing key org.gnome.settings-daemon.plugins.power (key lid-close-battery-action)
    INFO : GSettings missing key org.gnome.settings-daemon.plugins.power (key lid-close-ac-action)
    INFO : GSettings missing key org.gnome.settings-daemon.plugins.power (key lid-close-suspend-with-external-monitor)
    I added the keys manually to the schema but gnome-tweak-tool show this error when i try to start it with the new keys:
    GLib-GIO-ERROR **: Settings schema 'org.gnome.settings-daemon.plugins.power' does not contain a key named 'lid-close-battery-action'
    There are more people having a similar problem.
    Last edited by klingt.net (2014-03-23 10:12:03)

  • How to change lid closing setting for Satellite A660

    How do I "dock" my laptop? I.e. I wish to use a monitor via HDMI and I need to close the lid to laptop.
    How do I do that without automatically turning it off ?
    Thank you.

    Hi
    This is simple
    In Win 7 power option you can change this setting.
    Go to control panel -> power options
    Here choose Change plan settings
    Select Change advanced power settings
    Choose Change settings that are currently unavailable
    Choose Lid close which is placed in Power buttons and lid and choose Do nothing then save changes.
    Thats all

  • [systemd] Toggle whether lid close makes laptop sleep

    Before migrating to systemd, I had a nice setup using laptop-mode where I would use the laptop "Sleep key" as a toggle for whether closing the lid put the laptop into sleep mode or not. This was just a few lines reading/writing to a file ~/.lidsleep, which I hacked into the laptop-mode shell scripts. Having switched to systemd, and wanting to do the same the "systemd way", I've come up short.
    What I have managed to do is temporarily disable the "lid -> sleep" action, with this command:
       # systemd-inhibit --what=handle-lid-switch cat
    where the function of the final `cat` is to be a program that does not return until I type ^C.
    I basically have two questions:
    1) How can I make systemd perform an arbitrary command when I press the "Sleep key"?
    2) Short of something like running `pgrep systemd-inhibit && pkill systemd-inhibit || systemd-inhibit --what=handle-lid-switch cat`, what is the best way to setup a toggle like this?
    Final bonus question, if these two are answered:
    My previous setup also included restoring the toggle to its default state (lid -> sleep : yes) when resuming from hibernate (not suspend). How would I do this using systemd?

    As WonderWoofy suggests, why not just tell systemd to not handle lid close or the sleep key (not sure it does that but if it does) and continue to use your existing solution with laptop mode tools?
    systemd is not, that I know of, supposed to handle stuff like key presses and it is deliberately designed so that you can have a more sophisticated system hand events such as lid closing and so on. Moreover, it doesn't replace the remaining functionality of laptop-mode tools so assuming you used that for other things too, you'll need it anyway. That is, I can't even see how this would let you uninstall laptop-mode tools if you've been using it without giving up a bunch of other stuff. Could you explain why you want to do it without laptop-mode tools etc.?

  • ProBook 4710s - sound disabled after lid close

    Hello, I have a problem: When I connect headphones to the laptop, it works fine, until I close the lid. Then the sound stops working. I have tried to find it in Windows Control Panel (I have Windows 7), but there wasn't such an option. The sound is disabled only when it runs from battery; when I connect it to the electricity, I can use it with an external monitor and speakers and it works fine (even if the lid is closed). I have set "No action" after lid close, so the laptop doesn't go to sleep mode. It just stops playing sound.

    Hi,
    Download audio driver from here.
    Intructions how to install it in XP.
    Extract this driver with Winrar.
    Open Device manager and expand the Sound, video and game controllers section.
    Right click on Either the High Definition Audio Device if you have the generic Microsoft drivers, or the Conexant High Definition SmartAudio 221 if you have older Conexant drivers and choose "Update Driver Software..."
    Click Browse my computer for driver software, then click "Let me pick from a list of device drivers on my computer"
    Click "Have Disk..." then Browse to the folder where the drivers were extracted  .......\XP32 for 32-bit XP. Click OK.
    Select one of the "Conexant High Definition SmartAudio 221" models in the list, there will be multiple identical entries.
    Click Next, and you're done.
    I'm not sure which one from the list will work for You. On CQ60 few users confirmed then first one worked for them.
    ** Say thanks by clicking the "Thumb up" icon which is on the left. **
    ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **

  • [SOLVED] Power button and laptop lid close rules not followed (KDE)

    I'm using KDE 4.9.1, and the rules I set for the power button and lid close events in the KDE power management settings are not followed.
    Currently, I have the power button press event set to trigger hibernation, and the lid close event set to turn off the display. Instead, the power button causes the laptop to power down immediately, as if the 'poweroff' command was issued. Closing the lid causes the system to suspend to ram.
    This problem seemed to have started when I installed 'laptop-mode-tools' and 'acpid'. The problem persisted even when I uninstalled the said packages from the system. Most solutions on the internet involve adjusting the contents of files in /etc/acpi/, but that directory does not exist on my system. I also tried deleting the power management configuration files in the ~/.kde4/share/config directory, but that didn't fix the problem either.
    Hibernation works if I choose 'hibernate' from the KDE menu.
    Thanks for any help.
    Last edited by rb3 (2012-09-28 05:46:56)

    That's not a good solution.
    Changes in systemd default behaviour are reasonable. It guarantees that if your graphical enviroment has no suspend support, it will still suspend when the lid is closed.
    For example, closing the laptop lid at KDM login screen will now suspend the laptop. I remember a topic when someone nearly killed his notebook battery with overheat in that situation (the laptop did not suspend when the lid was closed at kdm screen).
    This change also brings native (non-acpid) suspend support to lighweight desktop enviroments.
    The source of the «double suspend» problem is in acynchronized update of systemd and KDE.
    Updating KDE to 4.9.2 (which will be released in several days) will fix this without editing the config file.
    Make sure you restore the original logind.conf after updating to KDE 4.9.2.
    See:
    http://lists.freedesktop.org/archives/s … 06604.html
    https://bugs.kde.org/show_bug.cgi?id=307412
    https://git.reviewboard.kde.org/r/106533/

  • How can I automatically close a dialog box using Javascript after I click the OK button to submit it?

    How can I automatically close a dialog box using Javascript after I click the OK button to submit it? I don't want to have to X out of the dialog box after I am done.
    Thanks
    Linda

    JS can not interact with open dialogs in any way, unless it's a dialog
    created in JS using the Dialog object.
    On Thu, Jul 24, 2014 at 11:13 PM, lindaeliseruble <[email protected]>

  • BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?

    Hi All.
    I have this request.
    BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?
    We have jobs scheduled on BODS running smoothly and absolutely fine.
    But to check, i am logging into the admin console and check for the jobs status.
    I would like to have an email to be received from BODS after each job is finished.
    It could succuessful. Or it could fail.
    Whatsoever, i wish to receive an email alert as soon as a job is finished.
    Can anyone advise me as to whether this could be made possible.
    And if yes, how this could be done.
    Thanks for your help in advance.
    In BOE CMC / for webi / schedule / we find an option to send email for a job success or a job failure.
    Is there any option similar to that in BODS ?
    Also would like to know :
    how to use the smtp_to or mail_to functions ?
    how to set up the smtp server for this ?
    thanks
    REgards
    indu
    Edited by: Indumathy Narayanan on May 31, 2011 3:47 PM

    Hi.
    Since am new to this BODS. I need some help.
    I already have many jobs which are running absolutely fine.
    And when a job runs, and finishes, am able to see the trace saying
    e.g. :
    Job_abc is completed successfully.
    We got the smtp service activated for our test server.
    and we hae a group email id.
    I have put the details of the smtp server / ip address / and said apply restarted.
    The i created a simple test script as below :
    print (' Before email ' );
    smtp_to('abc@company_name.com', 'Job ' || job_name() ||' on ' || host_name() || ' has FAILED',
    ' the job has failed', 0, 0);
    print('After Email ');
    It does send a email to as per smtp_to whatever email is specified.
    But how to differentiate between a job success
    And a job which has failed.
    I wish to have a mail which says on the subject :
    'Job ' || job_name() ||' on ' || host_name() || ' has completed successfully'
    ==> IF it is a success
    OR
    'Job ' || job_name() ||' on ' || host_name() || ' has failed'
    ==> if it has failed
    How to make the system identify, whether
    to send a success message or a error message whatever
    Could anyone advise.
    thanks
    indu

  • How to trigger New page while using ALV with classes/oops?

    Hi All
    I am trying to print a report which has to show the data in two pages.
    I am using ALV with classes/oops.
    Though I am able to print the report but a new page is not coming. Whole of the data is coming in one single page.
    Please tell me as to how to trigger a NEW PAGE while using ALV with classes/oops.
    Please send some code samples also if available.
    Thanks in advance.
    Jerry

    using sort option you can do it. in case of grid/oo alv class ALV you can view that only in print mode/preview mode.
    in case of list you can view that directly.
    sort-fieldname = 'FIELDNAME'.
    sort-group = '*'  "triggers new page
    sort-up = 'X'.
    append sort to it_sort.

  • How to open and close posting period for both material  , n invoicing

    HI
    how to open and close posting period for both material  , n invoicing , AM NEW TO SD , SO ALL DOUBTS I DO POST IN HERE PLEASE DONT MIND

    Hi Sunaina
    Period Open T.code: MMP1
    Period Close T-Code: MMPV
    Automate the opening of MM periods 
    How can you automate the monthly opening of MM periods (transaction MMPV - program RMMMPERI) with 
    SM36?
    RMMMPERI accepts a period/year or a date.
    If you enter a date the period is derived by it.
    1. create a variant and check the attribute 'selection variable' for the parameter date. Then click the button 'Selection variables' and set the current date. Every time this variant is used the parameter DATE is filled with the current date.
    2. create a job for RMMMPERI with the variant created in the preceding step. Set it as periodic.
    If you're not using a fiscal year variant simply schedule it as monthly (to be executed the first day of the month).
    If you are using a fiscal year variant you'd have to define a calendar with only the first day of each period defined as working 
    day and use it in the periodicity restrictions.
    Another possibility:
    Write a very simple ABAP which run daily to check if the period has changed and submit RMMMPERI.
    Reward if useful to u

  • How to desable default close icon in jtree

    how to desable default close and open icon in jtree.

    Hi,
    On Windows it is Edit>Keyboard Shortcuts...
    Create a duplicate set and disable/modify the keyboard shortcuts that you want
    Thanks!
    ps: please mark this post as Answered if this is of help to you

  • How to trigger crystal report from SAP ECC

    Hi All,
    I hope i m right forum to ask this question.
    we want to do label printing from Crystal reports. data will be present in SAP ECC .
    So I below issues
    1 ) how to connect SAP ECC database with Crystal Reports.
    2 ) how to trigger print output in Crystal reports from ECC , lets say I create a Delivery In ECC , the print output will be issued to Crystal report and I should get a print out Immediately ( for printing - printer will be connected to local system and SAP network printer ) .
    I have worked  with this type of scenario in smarforms , adobeforms. but not with Crystal Reports ...
    Regards
    Yashpal Gupta.

    Hi Yashpal,
    First thing you need to do is install the Connector on both your work station where you run Crystal Reports as well as the SAP Server where the data is.
    So I moved your post to the SAP Integration Kit forum.
    Need to know what version of Crystal Reports you are using?
    Search of browse here, lots of info on how to...
    Thanks
    Don

  • HT4864 How can I delete / close my iCloud email but not my iCloud account

    How can I delete / close my iCloud email but not my iCloud account

    On your iOS device, go to Settings>iCloud and turn Mail off.  On a Mac, go to System Preferences>iCloud and uncheck Mail.

  • How to Trigger an IDOC from SAP R/3 to two systems at a time

    Hi experts,
    Can any one please tell me How to Trigger an IDOC from SAP R/3 to two XI systems at a time.
    My current production R/3 system sends a DELVRY03 IDOC to Production XI system ( Name : XIP) .
    I would like to route the same IDOC from production R/3 system to my Quality XI System ( Name XIQ) .
    Problem is production R/3 system triggers an IDOC once. We need to write a logic to route the same to two different systems
    Can any one tell me how can we do that ?
    Regards
    Ram.

    Hello Ram,
    Do you have connectivity between your production & XIQ?
    What does "connectivity" mean?
    1. RFC destination is maintained.
    2. Port defined for the RFC destination.
    If no, create these. (Search in SDN for details).
    If yes, proceed:
    1. Define the logical system for XIQ.(BD54)
    2. Define the same as your partner profile. (WE20). Add the message type SYNCH with the port for XIQ.(This is imp)
    3. Create a distribution model view with sender as "your production" & receiver as XIQ.
    3.1. Add the messages which you want to distribute.
    3.2 Generate Partner profiles.
    No coding is reqd. for this.
    BR,
    Suhas

Maybe you are looking for