It's a must to do all the steps if I want to have it activated on startup is it? If I do not want to have it activated on startup, I can simply just go System Preferences and activate it myself?

Click to expand...

Yes, InsomniaT installs under the "Other" section of System Preferences. You can log in, go to System Preferences, and activate it manually. By default it is not activated at log in, only by running a script at log in can you activate it automatically.

I only want to activate it so that it wouldn't sleep when I close the lid.

Click to expand...

That's all InsmoniaT does. If it is active then your laptop won't sleep when the lid closes, if it is not active then the laptop does the default behavior (which is currently to sleep on lid close). Even if InsomniaT is active you can still manually sleep using the apple menu or keyboard shortcut (command+option+eject).

In addition, how do I write a script with the command to automatically launch the program on startup?

Click to expand...

It's step 3 of that post I mentioned. Use TextEdit to create a new file with line "insomniat --disable", save the file as "insomniat_start.command", go to System Preferences->Accounts->(your account)->Login Items->(point to the location of your .command script). Reboot and you're good to go.

It's step 3 of that post I mentioned. Use TextEdit to create a new file with line "insomniat --disable", save the file as "insomniat_start.command", go to System Preferences->Accounts->(your account)->Login Items->(point to the location of your .command script). Reboot and you're good to go.

Click to expand...

where is a good place to save the file?

If let's say it automatically runs on login, can I still inactivate it by going to system preferences?

I keep mine in a "scripts" folder I made in Documents (although it is the only script there at the moment). It doesn't really matter where you keep it, just place it where you won't accidentally delete it (like don't keep it in Downloads).

I keep mine in a "scripts" folder I made in Documents (although it is the only script there at the moment). It doesn't really matter where you keep it, just place it where you won't accidentally delete it (like don't keep it in Downloads).

Based on the error message, you need to right-click on the file and click Get Info (or select the file and go File > Get Info).

At the bottom of the Info window, there should be a Sharing and Permissions category. Make sure that you can Read & Write (there should be several entries...pick the one that your account falls under, whether it's everyone or admin or whatnot).

Anyway, thanks for the find! Even SleepLess doesn't work on the newer MBP (for me at least).

Based on the error message, you need to right-click on the file and click Get Info (or select the file and go File > Get Info).

At the bottom of the Info window, there should be a Sharing and Permissions category. Make sure that you can Read & Write (there should be several entries...pick the one that your account falls under, whether it's everyone or admin or whatnot).

Anyway, thanks for the find! Even SleepLess doesn't work on the newer MBP (for me at least).

Read and write isn't important here. You need to set execute permission for the script. Open a terminal to the script file and run "chmod +x insomniat_start.command". Actually you may have to run "sudo chmod +x insomniat_start.command" instead, depends on your access permissions (if it doesn't work without sudo then try with sudo).

Read and write isn't important here. You need to set execute permission for the script. Open a terminal to the script file and run "chmod +x insomniat_start.command". Actually you may have to run "sudo chmod +x insomniat_start.command" instead, depends on your access permissions (if it doesn't work without sudo then try with sudo).

It is supposed to be opened with terminal.

Click to expand...

Don't quite get you but this is what I did. I click on the script, the error appear. After I click on a terminal appear. I key in the sudo.... then they prompt for password (which I assumed is the password which i need to input whenever i need to authorise certain stuff to be done) and somehow it's invisible but i just keyed it in anyway and hit enter. and this is what i see

That error occurred because the Terminal is not in the same working directory as your script. If your script is located at "/Users/john/Documents/scripts/insomniat_start.command", then open a terminal and run:

cd /Users/john/Documents/scripts
chmod +x insomniat_start.command

Or you can combine that into one command:
chmod +x /Users/john/Documents/scripts/insomniat_start.command

Again I don't remember if you need to use sudo or not for chmod, I doubt you do but if it doesn't work then try it with sudo.

That error occurred because the Terminal is not in the same working directory as your script. If your script is located at "/Users/john/Documents/scripts/insomniat_start.command", then open a terminal and run:

cd /Users/john/Documents/scripts
chmod +x insomniat_start.command

Or you can combine that into one command:
chmod +x /Users/john/Documents/scripts/insomniat_start.command

Again I don't remember if you need to use sudo or not for chmod, I doubt you do but if it doesn't work then try it with sudo.

Click to expand...

Oh it works. But is it possible to prevent this terminal window from popping up by itself whenever the computer starts saying that the process completed?

Oh it works. But is it possible to prevent this terminal window from popping up by itself whenever the computer starts saying that the process completed?

Click to expand...

Hmm, not sure. When I log in I see the terminal window appear and disappear in an instant. I don't get a popup or have the terminal stay open saying the process was completed. I think it leaves Terminal loaded in memory but it barely uses any space, I can manually terminate it if I want to (I don't care since I use Terminal a lot).

-Edit-
Maybe modify insomniat_start.command to look like this:

#!/bin/sh
insomniat --disable
exit

I tried a lot of things before getting insomniat to enable at launch, I don't remember if ^ works or not.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.