16 September 2018

Adding waterfox browser to profile-sync-daemon ( PSD )


Adding waterfox browser to profile-sync-daemon

The process is simple:

1. Go to /usr/share/psd/browsers and copy the firefox file into waterfox
# cp /usr/share/psd/browsers/firefox /usr/share/psd/browsers/waterfox

2. Replace the content with the text indicated below or replace the ".mozilla/firefox" instances with ".waterfox"

3. Close all browsers (to be safe)

4. Edit the    $XDG_CONFIG_HOME/psd/psd.conf   file
If the option BROWSERS=  is not commented out, then add waterfox like
BROWSERS="chromium firefox waterfox"

5. Restart the service
# systemctl --user restart psd.service

6. Start waterfox

7. Verify with
# profile-sync-daemon preview

You should see something like

 browser/psname:  waterfox/waterfox
 owner/group id:  username/1001
 sync target:     /home/username/.waterfox/qofr.default
 tmpfs dir:       /run/user/1001/username-waterfox-qofr.default
 profile size:    76M
 overlayfs size:  0
 recovery dirs:   none



########### Text for /usr/share/psd/browsers/waterfox ########################################

if [[ -d $HOME/.waterfox ]]; then
    profileArr=( $(grep '[P,p]'ath= $HOME/.waterfox/profiles.ini |
    sed 's/[P,p]ath=//') )
    index=0
    PSNAME="$browser"
    for profileItem in ${profileArr[@]}; do
        if [[ $(echo $profileItem | cut -c1) = "/" ]]; then
            # path is not relative
            DIRArr[index]="$profileItem"
        else
            # we need to append the default path to give a
            # fully qualified path
            DIRArr[index]="$HOME/.waterfox/$profileItem"
        fi
        index=$index+1
    done
fi

check_suffix=1

Too Cool for Internet Explorer