Difference between revisions of "Profile-sync-daemon"
m (→Preview Mode (Parse))
(→PSD On Other Distros)
|Line 163:||Line 163:|
# apt-get update
# apt-get update
# apt-get install profile-sync-daemon
# apt-get install profile-sync-daemon
=== Gentoo ===
=== Gentoo ===
Revision as of 20:58, 19 February 2013
Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end
- 1 Benefits of Psd
- 2 Supported Browsers
- 3 Setup and Installation
- 4 Using PSD
- 5 Caveats for Firefox and Heftig's Aurora ONLY
- 6 Support
- 7 PSD On Other Distros
- 8 External Links Mentioning PSD
Benefits of Psd
Running this daemon is beneficial for two reasons:
- Reduced wear to physical discs
Since the profile(s), browser cache*, etc. are relocated into tmpfs (RAM disk), the corresponding onslaught of I/O associated with using the browser is also redirected from the physical disc to RAM, thus reducing wear to the physical disc and also greatly improving browser speed and responsiveness. For example, the access time of RAM is on the order of nanoseconds while the access time of physical discs is on the order of milliseconds. This is a difference of six orders of magnitude or 1,000,000 times faster.
Currently, the following browsers are auto-detected and managed:
- firefox (all flavors including stable, beta, and aurora)
- heftig's version of aurora
Setup and Installation
AUR. Build it and install like any other package.AUR is available for download from the
Edit the included
/etc/psd.conf defining which user(s) will have their profiles managed by psd.
# List users separated by spaces whose browser(s) profile(s) will get symlinked # and sync'ed to tmpfs. # Do NOT list a user twice! USERS="facade happy"
Optionally uncomment the BROWSERS array and populate it with whichever browser(s) are to be sync'ed to tmpfs. If the BROWSERS array stays commented (default) then all supported browser profiles will be sync'ed if they exist.
Example: Let's say that both Chromium and Midori are installed but only Chromium is to be sync'ed to tmpfs since the user keeps Midori as a backup browser and it is seldom used:
# List browsers separated by spaces to include in the sync. Useful if you do not # wish to have all possible browser profiles sync'ed. # # Possible values: # chromium # conkeror.mozdev.org # firefox # firefox-trunk # google-chrome # heftig-aurora # midori # opera # opera-next # qupzilla # # If the following is commented out (default), then all available/supported # browsers will be sync'ed BROWSERS="chromium"
Preview Mode (Parse)
The 'parse' option can be called to show users exactly what psd will do based on the /etc/psd.conf entered. Call it like so:
$ profile-sync-daemon parse Profile-sync-daemon v5.24 Psd will manage the following per /etc/psd.conf settings: browser/psname: chromium/chromium owner/group: facade/users sync target: /home/facade/.config/chromium tmpfs dir: /tmp/facade-chromium profile size: 81M browser/psname: firefox/firefox owner/group: facade/users sync target: /mnt/data/docs/facade/mozilla/firefox/1Zp9V43q.banking tmpfs dir: /tmp/facade-firefox-1Zp9V43q.banking profile size: 5.9M browser/psname: firefox/firefox owner/group: facade/users sync target: /mnt/data/docs/facade/mozilla/firefox/obg67zqQ.proxy tmpfs dir: /tmp/facade-firefox-obg67zqQ.proxy profile size: 17M
As shown in the output and as stated above, if no specific browser or subset of browsers are defined in the BROWSERS array, psd will sync ALL supported profiles that it finds for the given user(s).
Running PSD to Manage Profiles
Do not call
/usr/bin/profile-sync-daemon to sync or to unsync directly. Instead use the provided service file. The initial synchronization will occur when the pseudo-daemon starts. Additionally, cron (if running) will call it to sync or update once per hour. Finally, psd will sync back a final time when it is called to stop.
The provided daemon file should be used to interact with psd (
# systemctl [option] psd.service
start Turn on daemon; make symlinks and actively manage targets in tmpfs. stop Turn off daemon; remove symlinks and rotate tmpfs data back to disc. enable Autostart daemon when system comes up. disable Remove daemon from the list of autostart daemons.
Enable psd to start/stop at boot/shutdown (highly recommended) using:
# systemctl enable psd.service
Sync at More Frequent Intervals (Optional)
Users wishing to have syncs occur more frequently can simply add a line to the root crontab to call the sync function of psd like so:
# crontab -e
Example syncing all profiles being managed once every ten minutes:
*/10 * * * * /usr/bin/profile-sync-daemon sync &> /dev/null
Caveats for Firefox and Heftig's Aurora ONLY
The way psd keeps track of browser profiles and sync targets requires users to have a unique name as the last directory for all profiles in their respective $HOME/.mozilla/<browser>/profiles.ini files. Psd will check when it is called to run for this and refuse if this rule is not satisfied. The following is an example of a BAD profile that will fail the the test. Note that although each full path is unique, they both end in the same name! Again, the user must modify the profiles.ini and the corresponding directory on the filesystem to correct this in order to use Psd.
$ cat ~/.mozilla/firefox/profiles.ini [General] StartWithLastProfile=1 [Profile0 for user facade] Name=normal IsRelative=0 Path=/mnt/data/docs/facade/mozilla/firefox/myprofile.abc Default=1 [Profile1 for user happy] Name=proxy IsRelative=0 Path=/mnt/data/docs/happy/mozilla/firefox/myprofile.abc
Post in the discussion thread with comments or concerns.
PSD On Other Distros
Psd is a simple bash script and should therefore run on any Linux distro. Below is a list of distros known to package psd, and a link to download their respective packages. As noted above, these are unsupported by the author due to their own, unique init scripts:
To add the PPA (personal package archive) to your Debian (tested on squeeze) system, and to install psd:
# echo "deb http://ppa.launchpad.net/graysky/utils/ubuntu quantal main" > /etc/apt/sources.list.d/graysky.list # echo "deb-src http://ppa.launchpad.net/graysky/utils/ubuntu quantal main" >> /etc/apt/sources.list.d/graysky.list # apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FF7F9516 # apt-get update # apt-get install profile-sync-daemon
To add the PPA (personal package archive) to your Ubuntu (packages available for Lucid and newer) system, and to install psd:
$ sudo add-apt-repository ppa:graysky/utils $ sudo apt-get update $ sudo apt-get install profile-sync-daemon