Page tree
Skip to end of metadata
Go to start of metadata

Make sure that a Java Runtime environment is installed.

With the finder create a directory where PicApport should be installed. (the following description assumes the directory /Users/Username/Documents/picapport; please adapt to you directory setup in the following files and steps).

Open the Terminal and go to the directory

> cd ~/Documents/picapport

 

Download the PicApport JAR-File (or headless jar) from picapport.de and copy it to the directory

Create a Batch-File with the name picapport_run.sh and the following content (replace user name and path and name of JAR-FILE):

 

PicApport without Server GUI (headless):

#!/bin/bash
java -Xms512m -Xmx1024m -Duser.home=/Users/Username/Documents/picapport -jar picapport-headless.jar -configfile=/Users/Username/Documents/picapport/picapport.properties

 

PicApport with Server GUI:

#!/bin/bash
java -Xms512m -Xmx1024m -Duser.home=/Users/Username/Documents/picapport -jar picapport.jar -configfile=/Users/Username/Documents/picapport/picapport.properties

 

Explanation:

- with -Xms512m -Xmx1024m the memory configuration is set. For more details see: PicApport Installation Guide
- with -Duser.home we define, that the configuration and data directory is not the default .picapport directory  in the home directory of the current user.
- with -configfile we define a different (non standard) configuration file. We do this because under OS X directories starting with a .(dot) will not be visible in the Finder.

 

Make shell script executable with:

> chmod a+x picapport_run.sh

 

Create a  picapport.properties file in your picapport directory (see above user.home). Adapt content to your requirements.

server.port=8080
server.ssl=false
gui.enabled=false
gui.hideintray=true
server.demomode=false

You'll find a detailed explanation of all parameters under: PicApport-Server Guide

 

Now you can start the PicApport-Server with your Shell-Script:

> ./picapport_run.sh

Now you should be able to access PicApport with your Browser.

To terminate the PicApport Server just type exit+Enter in PicApport Server-Console.

Automatically start the server after the user logs in

If you want to start the PicApport-Server automatically after a user has logged in just do the following:

Create a file with the name de.contecon.picapport.plist and the following content (do not forget to replace the Username):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>KeepAlive</key>
		<true/>
		<key>Label</key>
		<string>de.contecon.picapport</string>
		<key>ProgramArguments</key>
		<array>
			<string>/Users/Username/Documents/picapport/picapport_run.sh</string>
		</array>
		<key>RunAtLoad</key>
		<true/>
		<key>WorkingDirectory</key>
		<string>/Users/Username/Documents/picapport</string>
		<key>StandardErrorPath</key>
		<string>/Users/Username/Documents/picapport/server.log</string>
		<key>StandardOutPath</key>
		<string>/dev/null</string>
	</dict>
</plist>

 

Create a shortcut to the created file in the list of programs to launch:

> ln -sfv /Users/Username/Documents/picapport/de.contecon.picapport.plist ~/Library/LaunchAgents/

 

Execute the following to check if your created service can be started:

> launchctl load ~/Library/LaunchAgents/de.contecon.picapport.plist

Now you should be able to access PicApport with your Browser.

 

You can terminate the daemon manually with:

> launchctl unload ~/Library/LaunchAgents/de.contecon.picapport.plist

After a reboot and a successful Login it should now be possible to access PicApport with your Browser.

Example Files

  File Modified
File picapport_run.sh Nov 09, 2016 by Eric Schreiner
File de.contecon.picapport.plist Nov 09, 2016 by Eric Schreiner
File picapport_run_with_gui.sh Nov 09, 2016 by Eric Schreiner
File picapport.properties Nov 09, 2016 by Eric Schreiner