We have discontinued this forum and moved support tickets to the GitHub issue tracker. More info

Suppress opening of MFC window on launch?

Control fans on Apple hardware: iMacs, Macbooks, etc

Moderator: Steven

Locked
Schmye Bubbula
Posts: 16
Joined: 26 Mar 2014, 03:28

Suppress opening of MFC window on launch?

Post by Schmye Bubbula »

In MFC prefs, there is a checkbox to, "Autostart minimized with system (recommended)." It adds MFC to one's Login Items in the Accounts System Preference. That means that when launched that way, it runs without the MFC window opening, right? But it does open upon launch when double-clicking the app. I have reason not to put my login items in the Accounts System Preference, but instead in an AppleScript applet. Both ways of running MFC from AppleScript result in the MFC window opening:

Code: Select all

tell application "Macs Fan Control" to activate

Code: Select all

tell application "Macs Fan Control" to launch
My question is, is there a "defaults write..." command in Terminal or with a plist editor to modify MFC's plist to not open the MFC window upon manual launch?
~/Library/Preferences/com.crystalidea.macsfancontrol.plist
I looked around in there and didn't see a key that obviously toggles that attribute, but I was wondering if there is an undocumented key I could add that would keep the MFC window from opening automatically.
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Suppress opening of MFC window on launch?

Post by Steven »

But it does open upon launch when double-clicking the app.
Yes this is done by intention

Your issue is clear but this it's not a common use case. We could consider putting a command line parameter '/minimized' for example?
Schmye Bubbula
Posts: 16
Joined: 26 Mar 2014, 03:28

Re: Suppress opening of MFC window on launch?

Post by Schmye Bubbula »

^ Yes, please do in some manner. (With a Preferences checkbox whether to open maximized, or at least a plist key that can be modified with a Terminal "defaults write..." command, or in a plist editor, or, as you say, a command line parameter '/minimized'.) How would the command line parameter work? Something like this?:

Code: Select all

do shell script "open -a /Applications/Macs\ Fan\ Control.app/minimized"
...Hmmm, no, that syntax is wrong. How would the command line parameter look?

In any event, I don't think that my issue is all that uncommon: Some people may want to only use MFC when they're getting ready to run a CPU-intensive app, such as video transcoding, and just want to launch MFC without the Control window opening.
Last edited by Schmye Bubbula on 26 Mar 2014, 21:13, edited 2 times in total.
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Suppress opening of MFC window on launch?

Post by Steven »

The will be a command line parameter /minimized in version 1.1.10

Example
Schmye Bubbula
Posts: 16
Joined: 26 Mar 2014, 03:28

Re: Suppress opening of MFC window on launch?

Post by Schmye Bubbula »

Oh, thank you so much, Steven! Can you tell us now what the Terminal command syntax will be? The one two posts above can't be right — perhaps you'll have a second, alternative executable in the package accessible only in the shell?, e.g.,

Code: Select all

open -a /Applications/Macs\ Fan\ Control.app/Contents/Resources/MacsFanControlMinimized
Also, while you're at it updating to v1.1.10, could you add these three command keys to close the MFC window?:
• esc
• ⌘-W
• ⌘-. [period]

And after the MFC window closes, would it be possible to restore focus to the frontmost app's window from which it was called?

Thank you!
Schmye Bubbula
Posts: 16
Joined: 26 Mar 2014, 03:28

Re: Suppress opening of MFC window on launch?

Post by Schmye Bubbula »

Thanks for the update, Steven!

• What exactly is the syntax for the "/minimized" command line parameter in the Mac Terminal to start the app without opening window? I tried this but it didn't work:
My Terminal session wrote:Schmye-Bubbulas-Computer:~ schmye$ open -a /Applications/Macs\ Fan\ Control.app/Contents/Resources/MacsFanControl/minimized
FSPathMakeRef(/Applications/Macs Fan Control.app/Contents/Resources/MacsFanControl/minimized) failed with error -43.
• When I replaced 1.1.9 with 1.1.10, it did prompt for admin password when running MFC for the first time.

• The ⌘-W hotkey to close the main window is a godsend! Thank you!

- -
What's New wrote:Version 1.1.10:

– "/minimized" command line parameter to start the app without opening window
– Hotkeys - "Cmd+W" to close main window, "Cmd+," to open preferences
– Do not prompt for admin password when running MFC for the first time
– PSU (Power Supply Unit) sensor icon, minor optimizations and improvements
– Fixed smc-write crashes on Mac OS 10.6 under certain conditions
– Fixed self-update problem under certain conditions
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Suppress opening of MFC window on launch?

Post by Steven »

Code: Select all

/Applications/Macs\ Fan\ Control.app/Contents/MacOS/MacsFanControl /minimized
When I replaced 1.1.9 with 1.1.10, it did prompt for admin password when running MFC for the first time.
Because you're running MFC not the first on this machine.
Schmye Bubbula
Posts: 16
Joined: 26 Mar 2014, 03:28

Re: Suppress opening of MFC window on launch?

Post by Schmye Bubbula »

Is this normal?

Code: Select all

Schmye-Bubbulas-Computer:~ schmye$ /Applications/Macs\ Fan\ Control.app/Contents/MacOS/MacsFanControl /minimized
2014-04-04 14:45:15.980 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1503c10 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.983 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1594e50 of class NSCFDictionary autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.984 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x152ac40 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.985 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x159af60 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.986 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x156fa10 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.986 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1516690 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.987 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x15166d0 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.987 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1580790 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.988 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x156c490 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:15.998 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0xa0164828 of class NSCFString autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.005 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1153a60 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.006 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x118f040 of class NSMutableParagraphStyle autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.006 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x118f9f0 of class NSCFDictionary autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.007 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1156bc0 of class NSPathStore2 autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.007 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1156bf0 of class NSCFData autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.007 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0xa0169ae8 of class NSCFString autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.009 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x110df10 of class __NSArray0 autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.009 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x118cb00 of class NSView autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.010 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x112e6e0 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.011 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1576980 of class NSStatusBarWindow autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.012 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x114ba40 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.013 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0xa09ec4c4 of class NSCFString autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.014 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x152fdf0 of class NSStatusItem autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.015 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1180960 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.015 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1182b70 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.018 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x117dff0 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.019 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x118cb00 of class NSView autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.040 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1577770 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.040 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1544750 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.041 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x150e360 of class NSCFArray autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.042 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x151f520 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.043 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x15496d0 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.044 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x110fac0 of class __NSCFType autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.044 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x110df10 of class __NSArray0 autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.054 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x117f6c0 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.055 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1134fe0 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.056 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x110fac0 of class __NSCFType autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.057 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x110df10 of class __NSArray0 autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.064 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0xa015fcc8 of class NSCFString autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.064 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x117d8a0 of class NSConcreteMapTable autoreleased with no pool in place - just leaking
2014-04-04 14:45:16.065 MacsFanControl[43983:903] *** __NSAutoreleaseNoPool(): Object 0x1191480 of class NSTrackingArea autoreleased with no pool in place - just leaking
MacsFanControl[43983]: [FC] Operation took 772096ns
MacsFanControl[43983]: [FC] Operation took 1ms
MacsFanControl[43983]: [FC] Operation took 582358ns
MacsFanControl[43983]: [FC] Operation took 576998ns
MacsFanControl[43983]: [FC] Operation took 584355ns
MacsFanControl[43983]: [FC] Operation took 606863ns
MacsFanControl[43983]: [FC] Operation took 549041ns
MacsFanControl[43983]: [FC] Operation took 564810ns
MacsFanControl[43983]: [FC] Operation took 602204ns
MacsFanControl[43983]: [FC] Operation took 554962ns
MacsFanControl[43983]: [FC] Operation took 622891ns
MacsFanControl[43983]: [FC] Operation took 555723ns
MacsFanControl[43983]: [FC] Operation took 759550ns
MacsFanControl[43983]: [FM] Adding System Pref Items
MacsFanControl[43983]: hwTest (/System/Library/PreferencePanes/Ink.prefPane/Contents/Resources/TabletFinder) waiting on #43991...
MacsFanControl[43983]: Running /System/Library/PreferencePanes/Ink.prefPane/Contents/Resources/TabletFinder
MacsFanControl[43983]: [FM] Path for recent folder is invalid.
MacsFanControl[43983]: [FM] Path for recent folder is invalid.
MacsFanControl[43983]: [FM] Path for recent folder is invalid.
MacsFanControl[43983]: [FM] Path for recent folder is invalid.
MacsFanControl[43983]: [FM] Path for recent folder is invalid.
MacsFanControl[43983]: [FM] Path for recent folder is invalid.
Then when I quit Terminal, I got this:

Image

...and Macs Fan Control quit.

I read a Unix trick somewhere about something like sending things to the background by appending to a command:

Code: Select all

&> /dev/null &
...but I don't know if it's appropriate here, so I'm afraid to try it.

How hard would it be to put a checkbox in Preferences: "Don't open main window on launch"?
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Suppress opening of MFC window on launch?

Post by Steven »

Ignore it. Are you using Mac OS 10.6 ?
Schmye Bubbula
Posts: 16
Joined: 26 Mar 2014, 03:28

Re: Suppress opening of MFC window on launch?

Post by Schmye Bubbula »

Yes, 10.6.8.

But how can I ignore it if I have to keep my Mac Terminal constantly open and running that session, if I want Macs Fan Control to stay open?
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Suppress opening of MFC window on launch?

Post by Steven »

It's out of the question of Macs Fan Control support, I'm sorry
Schmye Bubbula
Posts: 16
Joined: 26 Mar 2014, 03:28

Re: Suppress opening of MFC window on launch?

Post by Schmye Bubbula »

How about a checkbox in Preferences: "Don't open main window on launch"?
User avatar
Steven
CrystalIDEA Developer
Posts: 2294
Joined: 21 Dec 2009, 11:48
Location: CrystalIDEA headquarters
Contact:

Re: Suppress opening of MFC window on launch?

Post by Steven »

Schmye Bubbula
This checkbox does exist. It's called "Autostart minimized with system"
Locked