Categories
OSX

Silent Install of OSX Applications

Applications that are provided in an .pkg or .mpkg application bundle format can be installed silently in the background even while a user is currently logged into the system without him noticing. (.mpkg bundles are more customizable compared to their pkg. counterpart)

To Run the package installer in silent mode without showing the GUI-user-dialog the installer needs to be run from command line:

[bash]sudo -S installer -verbose -pkg your_installer_file.pkg -target /[/bash]

Target indicates the destination volume the package is going to be installed. The installer will run without showing the installer in the ui. You will have to enter your systems – administrator password in case the installer needs root permissions to copy various configuration files.
It’s possible (but not recommended) to fully automate the process with the command line by echoing the password

[bash]echo password | sudo -S installer -verbose -pkg your_installer_file.pkg -target /[/bash]

Attention: Your password will be stored in the bash_history in cleartext, therefore I DON’T  recommend it.

Categories
OSX

Show Library Folder on Mac OSX 10.9 Mavericks

Since Mac OSX 10.7 Apple hid the Library folder in Finder which contains all the settings and personal app-specific data. This usually works fine with everybody that doesn’t constantly install applications or fidel with the settings in various p-list files. However it has always been a pain to enable / gain access to the folder if you liked having it easily accessible.

Fortunately, in Mac OSX 10.9 Mavericks there is now an easy option to permanently show the Library folder such as it was back in the 10.6 days.

  1. First navigate to your home folder in finder (you can click on your username in the sidebar)
  2. Press ⌘ + J to open up the “View Options” window
  3. Check the box next to: Show Library Folder

    OSX Library Folder
    Enable Mac OSX Library Folder
Categories
OSX

“Fixing” Slow Wake Up of MacBook Pro with Retina Display

My main machine I use throughout the day is a Macbook Pro (soon to be one with a Retina Display). I really love almost anything about this laptop except that sometimes it’s a little bit slow to wake up from sleep when I open up the lid.

After opening the lid, it instantly shows the password dialog box, but the shown ui is not real. What is shown immediately is a screenshot of what the screen looked like when it went to sleep. 
The ui, although visible, is not functional for almost 10 seconds. You can most likely tell that this is happening by watching the clock display in the upper right of the display. Right after opening the lid, it will show the incorrect time (the time when the laptop went to sleep). After 8-10 seconds, the time will become accurate and this is the signal that you can actually start typing your password to unlock the laptop.
What is actually happening is that these new MacBook Pro’s (and recent MacBook Air’s) have a new powersaving mode which Apple calls standby. Standby mode kicks in after the laptop has been in normal sleep mode for about an hour. When that happens, the content of the ram is written to the hard drive and the ram is powered down to further extend battery life. 
In theory, the laptop will last up to 30 days in standby mode. The trade off is that, when waking up, it takes a long time to reload 16 GB of RAM from the hard drive (even with an SSD).
Note that if the laptop sleeps for less than an hour, then it will wake up nearly instantly. I’ve seen this myself in cases where I close the lid briefly while walking between meetings. It turns out that this 1 hour delay is configurable.

I changed the standby delay for my machine from 1 hour to be 24 hours by running this command from a terminal window (86400 seconds = 24 hours):
sudo pmset -a standbydelay 86400
Given that I plug my laptop every night to charge up the battery, I don’t care as much about the standby feature keeping my battery alive for 30 days. 
In theory, I may go on a trip or something and standby mode may be more useful, so I didn’t disable it completely (which can be done by setting the delay to 0). By setting it to 24 hours, standby will almost never happen with my normal day to day usage patterns and I’ll almost always have instant wake times. 
It may be that 24 hours is unnecessarily long and 12 or 18 hours would have worked just as well while providing a little better balance between battery life and day to day convenience. Time will tell.
P.S. If you want to see what your current settings are, you can run this command from the terminal:
pmset -g
Categories
Linux

LibreOffice 4.0.3 on Debian 7 Wheezy

Debian Wheezy ships with Libreoffice 3.5.4 out of the box. However the newest version 4.0.3 offers numerous improvements over the previous version such as improved start up time etc.
Fortunately wheezy backports offer a way to install version 4.0.3 without “upgrading” your installation from stable to testing or even unstable.

Add the backports repository on Debian Wheezy:

$ sudo su  

# echo 'deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free' >> /etc/apt/sources.list

# echo 'deb-src http://ftp.debian.org/debian/ wheezy-backports main contrib non-free' >> /etc/apt/sources.list

Update package information:


# apt-get update

Install LibreOffice from backports repository


# apt-get -t wheezy-backports install libreoffice