To create an account in the Users folder
dscl / -create /Users/addfromcli
Create and set the shell property to bash.
dscl / -create /Users/addfromcli UserShell /bin/bash
Create and set the user’s full name. (Displayed in some of the panels/login screen)
dscl / -create /Users/addfromcli RealName "Added From Cli"
Create and set the user’s ID. (this is the unique id, you need to find out what id your last user create was and add one)
dscl / -create /Users/addfromcli UniqueID 503
Create and set the user’s group ID property. (This can be your default group)
dscl / -create /Users/addfromcli PrimaryGroupID 1000
Create and set the user home directory.
dscl / -create /Users/addfromcli NFSHomeDirectory /Local/Users/addfromcli
Set the password. (dont use password as a password)
dscl / -passwd /Users/addfromcli PASSWORD
Some more details can be found on OS X Daily
There's no real reason that I can think of not to leave it on all of the time, but you can easily turn it on and off by loading or unloading the launchd plist:
This will turn it on:
launchctl load ~/Library/LaunchAgents/com.ecamm.printopia.plist
This will turn it off:
launchctl unload ~/Library/LaunchAgents/com.ecamm.printopia.plist
Or you could just run the server directly:
/Library/PreferencePanes/Printopia.prefPane/Contents/MacOS/Printopia Server.app/Contents/MacOS/Printopia Server
(that's all one line)
Best Answer
duti is a shell utility that enables using a text file to configure the default applications for file types and URL schemes.
For example save a file like this as
~/.duti
:Then run
duti ~/.duti
.You can install duti with
brew install duti
or by runningwget https://github.com/fitterhappier/duti/archive/duti-1.5.2.tar.gz;tar -xf duti-1.5.2.tar.gz;cd duti-duti-1.5.2;./configure;make;sudo make install
.