I wonder if it's possible to open a program in Lion fullscreen mode via the Terminal. I want to write a short script which starts a bunch of programs in fullscreen mode, so that I only have to click once to start my working environment.
Here it is:
Here it is in a clearer form (but you can't run it this way):
And this is it as formatted AppleScript:
It works by first opening a Safari window if one is not currently open. Then it simulates the Control ⌃-Command ⌘-F keystroke which tells the Safari window to become full screen.
If you want to make the window the max-size it can be without becoming full screen (i.e. taking up all the space below the menu bar at the top):
Which would become this in Terminal:
For Chrome, do this:
So it would be this in Terminal:
Hope this helps!
This won't work with applications that don't use native full screen windows, but should work with some that don't use the standard shortcut for entering full screen. A few applications have different process names and application names.
Here's instructions for Google Chrome. (This will open an Incognito window to full-screen.)
Now, every time you launch Google Chrome it will launch full screen in Incognito mode. I use Incognito mode, but if you don't want that, just delete the
you can use browse to open arbitrary apps in full-screen mode.. It installs six convenience commands, four of which open the most common browsers in full-screen:
Launch Chrome Canary in Presentation Mode:
Launch Chrome in Presentation Mode:
Launch Firefox in full-screen Mode:
Launch Safari in full-screen Mode:
To launch anything in full-screen, run the command
Should an app have an additional full-screen mode shortcutted by CMD+Shift+f (as Chrome does), use:
Tip. If an app is slow to load, give it chance to load fully by inserting a pause before running the keyboard shortcut:
Here's a addition to @pasawaya's excellent answer. If you want to execute your applescript from the command line, you don't need to enter every line separately with the