Profile-sync-daemon - keep browser profiles in tmpfs

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
graysky

Profile-sync-daemon - keep browser profiles in tmpfs

Post by graysky »

Wrote my own daemonized version of a script that will symlink your browser's profile directories to tmpfs and keep them sync'ed using rsync. My stuff is based on this script which I've been using for years except my version is both daemonized and has recovery protection, and also handles the following browsers automatically:

*Chromium
*Conkeror
*Firefox
*Firefox-trunk
*Google-chrome
*Heftig's Aurora
*Midori
*Opera
*Opera-next
*QupZilla

Try running psd in 'parse' mode which will show you exactly what it plans to sync and manage for you based on your /etc/psd.conf
Image

Source: https://github.com/graysky2/profile-sync-daemon
Wiki: https://wiki.archlinux.org/index.php...le-sync-daemon

To add the PPA (personal package archive) to your Mint Linux system (packages available and tested on v14+), and to install psd:

Code: Select all

$ sudo add-apt-repository ppa:graysky/utils
$ sudo apt-get update
$ sudo apt-get install profile-sync-daemon
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
bu99zy

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by bu99zy »

Thanks for this program works a treat, browsing is really snappy now.

Any chance you could included Rekonq?
graysky

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by graysky »

Glad you find it of value. Patches are welcome. Fork me on github.

EDIT: I can't get this browser to even function on my workstation, no less identify where it stores its profiles.
bu99zy

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by bu99zy »

graysky wrote:I can't get this browser to even function on my workstation, no less identify where it stores its profiles.
It is the default KDE browser and is usually already installed on KDE distros.

Location on KDE 4.9.5 I think is /home/USERNAME/.kde/share/apps/rekonq/
graysky

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by graysky »

bu99zy wrote:It is the default KDE browser and is usually already installed on KDE distros.

Location on KDE 4.9.5 I think is /home/USERNAME/.kde/share/apps/rekonq/
For me the path is: $HOME/.kde4/share/apps
The directory therein is tiny... is that right?

Code: Select all

% du -hx  $HOME/.kde4/share/apps
4.0K	/home/graysky/.kde4/share/apps/kssl/userCaCertificates
8.0K	/home/graysky/.kde4/share/apps/kssl
4.0K	/home/graysky/.kde4/share/apps/kcookiejar
20K	/home/graysky/.kde4/share/apps/rekonq
8.0K	/home/graysky/.kde4/share/apps/kconf_update/log
12K	/home/graysky/.kde4/share/apps/kconf_update
8.0K	/home/graysky/.kde4/share/apps/konqueror
56K	/home/graysky/.kde4/share/apps
Only 20k... how large is yours?
bu99zy

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by bu99zy »

My apps directory is larger .

Code: Select all

288M    /home/dr/.kde/share/apps/
Though the Rekonq folder is tiny

Code: Select all

684K    /home/dr/.kde/share/apps/rekonq
graysky

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by graysky »

bu99zy wrote:My apps directory is larger .

Code: Select all

288M    /home/dr/.kde/share/apps/
Though the Rekonq folder is tiny

Code: Select all

684K    /home/dr/.kde/share/apps/rekonq
OK... the sync target is the rekonq directory, no? Also, your system does not prefix $HOME/.kde4/... it prefixes $HOME/.kde/...

What percentage of users have setups like your setup? I have have psd look for ~/.kde4 and if it doesn't find it, ~/.kde which is easy... do you have both?

You can pull down the latest git and test it out. Works fine for me. Actually, you don't even need to pull down the latest git. The only file that changes is the main script. Once you guys tell me it's working, I will update the config file and docs.

Just do this:
1) Download this file
2) Name it profile-sync-daemon and make it executable
3) Move it to /usr/bin
4) If you have the BROWSERS array in /etc/psd.conf uncommented, please manually add rekonq to the array: i.e.

BROWSERS="... rekonq ..."

5) Restart the psd and verify it picked up the new browser via `psd p`

Should look something like:

Code: Select all

% psd p
Profile-sync-daemon v@VERSION@ on Arch Linux.

Daemon file /run/psd is present.
Service is currently active.

Psd will manage the following per /etc/psd.conf settings:

 browser/psname:  chromium/chromium
 owner/group:     graysky/users
 sync target:     /home/graysky/.config/chromium
 tmpfs dir:       /tmp/graysky-chromium
 profile size:    46M

 browser/psname:  rekonq/rekonq
 owner/group:     graysky/users
 sync target:     /home/graysky/.kde4/share/apps/rekonq
 tmpfs dir:       /tmp/graysky-rekonq
 profile size:    20K
liquidm

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by liquidm »

I did this

Code: Select all

CODE: SELECT ALL
$ sudo add-apt-repository ppa:graysky/utils
$ sudo apt-get update
$ sudo apt-get install profile-sync-daemon
can somebody explain how to do further steps?
3) Move it to /usr/bin
4) If you have the BROWSERS array in /etc/psd.conf uncommented, please manually add rekonq to the array: i.e.

BROWSERS="... rekonq ..."

5) Restart the psd and verify it picked up the new browser via `psd p`
I installed daemon and in the beginning it looked like browser started working faster.. now it is slow and shockwave plugin sometime freezes on youtube (it is enabled, I checked)

thanks for help!
graysky

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by graysky »

You installed via the repo. Post the output of:

Code: Select all

$ psd p
liquidm

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by liquidm »

please

Code: Select all

olezha@olezha ~ $ $ psd p
$: command not found
olezha@olezha ~ $ psd p
 Must define at least one user in /etc/psd.conf
olezha@olezha ~ $ profile-sync-daemon parse
 Must define at least one user in /etc/psd.conf
olezha@olezha ~ $ 
so whats next?

btw found good article http://rpm.pbone.net/index.php3/stat/45 ... /nazwa/psd

how to make output working - should I stop daemon first?
graysky

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by graysky »

liquidm wrote:

Code: Select all

olezha@olezha ~ $ $ psd p
$: command not found
olezha@olezha ~ $ psd p
 Must define at least one user in /etc/psd.conf
olezha@olezha ~ $ profile-sync-daemon parse
 Must define at least one user in /etc/psd.conf
olezha@olezha ~ $ 
The $ was meant to should you to execute that as your user... you see that you need to setup /etc/psd.conf defining the user(s) whose profile(s) will be managed.
liquidm wrote: btw found good article http://rpm.pbone.net/index.php3/stat/45 ... /nazwa/psd

how to make output working - should I stop daemon first?
Right, that's the man page I wrote... you should probably read it, everything you need to know to make psd work is there.
kyrios

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by kyrios »

Hello,

For Ubuntu 14.04/Mint 17, should the variable DAEMON_FILE still be set to /var/run/psd ??
I ask because I think recent versions of Ubuntu/Mint are based on Debian 7+

Code: Select all

# Define where the pid file for psd will reside
#   Arch Linux/Chakra, Debian 7+, Fedora, and Gentoo leave this commented out
#   Debian 6 and below/Mint/Ubuntu use a setting of "/var/run/psd"
DAEMON_FILE="/var/run/psd"
Thanks ! :)
graysky

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by graysky »

It doesn't matter since on ubuntu 14.04 anyway, /var/run is symlinked to /run - I do not have a Mint vbox. Can you confirm?
kyrios

Re: Profile-sync-daemon - keep browser profiles in tmpfs

Post by kyrios »

Hi,

Actually I noticed problem since I upgraded to Mint 17 but it was all my fault : during the upgrade, I did encrypt the home folders so of course I cannot use the psd anymore.
Duh, stupid me ! :oops:
Locked

Return to “Software & Applications”