Profile-sync-daemon - keep browser profiles in tmpfs

Questions about applications and software
Forum rules
Before you post please read this

Profile-sync-daemon - keep browser profiles in tmpfs

Postby graysky on Thu Feb 21, 2013 8:28 pm

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
graysky
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 21, 2013 8:24 pm

Linux Mint is funded by ads and donations.
 

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

Postby bu99zy on Fri Feb 22, 2013 10:47 pm

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

Any chance you could included Rekonq?
User avatar
bu99zy
Level 3
Level 3
 
Posts: 135
Joined: Wed Jan 18, 2012 12:59 am

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

Postby graysky on Fri Feb 22, 2013 10:53 pm

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.
graysky
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 21, 2013 8:24 pm

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

Postby bu99zy on Sat Feb 23, 2013 6:02 pm

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/
User avatar
bu99zy
Level 3
Level 3
 
Posts: 135
Joined: Wed Jan 18, 2012 12:59 am

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

Postby graysky on Sat Feb 23, 2013 6:29 pm

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?
graysky
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 21, 2013 8:24 pm

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

Postby bu99zy on Sat Feb 23, 2013 7:18 pm

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
User avatar
bu99zy
Level 3
Level 3
 
Posts: 135
Joined: Wed Jan 18, 2012 12:59 am

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

Postby graysky on Sat Feb 23, 2013 9:16 pm

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
graysky
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 21, 2013 8:24 pm

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

Postby liquidm on Sat Apr 12, 2014 4:36 am

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!
liquidm
Level 1
Level 1
 
Posts: 35
Joined: Sat Mar 22, 2014 3:32 pm

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

Postby graysky on Sat Apr 12, 2014 6:03 am

You installed via the repo. Post the output of:

Code: Select all
$ psd p
graysky
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 21, 2013 8:24 pm

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

Postby liquidm on Sat Apr 12, 2014 4:26 pm

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?
liquidm
Level 1
Level 1
 
Posts: 35
Joined: Sat Mar 22, 2014 3:32 pm

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

Postby graysky on Sat Apr 12, 2014 4:53 pm

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.
graysky
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 21, 2013 8:24 pm

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

Postby kyrios on Fri May 30, 2014 1:47 pm

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 ! :)
kyrios
Level 1
Level 1
 
Posts: 39
Joined: Sat Aug 24, 2013 6:46 am

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

Postby graysky on Fri May 30, 2014 2:37 pm

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?
graysky
Level 1
Level 1
 
Posts: 7
Joined: Thu Feb 21, 2013 8:24 pm

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

Postby kyrios on Sat May 31, 2014 3:48 pm

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:
kyrios
Level 1
Level 1
 
Posts: 39
Joined: Sat Aug 24, 2013 6:46 am

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 27 guests