This is an old revision of the document!
Theme - Guide
Among on the forums are several confusions about customizing PirateBox. Let's sum up the possibilities and make clear howto get to you custom Theme. Please provide feedback or help with unclear points in the Piratebox forum.
Folders & Files
/opt/piratebox/www
This is the original webroot folder. You land on this folder when you enter http://piratebox.lan
or any url without a path suffix. index.html
is containing the absolute URL to the box' name and is changed with the /opt/piratebox/bin/install_piratebox.sh
script. It 'always' refers to http://piratebox.lan/content
. This also used to forward in case of an unknown (404). PirateBox 1.1.3 still contains redirect.html
which will be removed in the future.
/opt/piratebox/www_content
/opt/piratebox/share/content
/opt/piratebox/share/content/js
/opt/piratebox/share/content/css
/opt/piratebox/share/content/locales
/opt/piratebox/share/content/img
/opt/piratebox/share/Shared
HEADER.txt & README.txt
/opt/piratebox/src/*.txt
HEADER.txt & README.txt
Permissions
On OpenWrt based PirateBox your are typically working as root and the USB Stick does not reflect a the Linux file permissions, you do not have to deal with it here. On RPi based or normal Linux based PirateBox it is a bit more difficult. The normal installation changes the permissions of the www folders (see above) to the owner/group nobody/nogroup
and the files are read-writable for user&group only, while the user login is alarm
. For a normal webserver setup, this is sufficient- but for customization it is difficult.
If you decided to use the USB stick as a storage option on RPi, you can easily edit the files on the USB stick.
The easiest way to make the needed folders writable for you is:
sudo chmod a+w <folder>
for example for the content folder:
sudo chmod a+w /opt/piratebox/share/content
After you are done with the customization, the recommendation is to perform the following commands:
sudo chmod a-w <folder> sudo chown nobody:nogroup -R <folder>
Note: nobody:nogroup may be different on custom installations.