You are not logged in.
There's still note in post_install() function in readme.install file saying that you need to add entry to root crontab manually.
Below that is text saying that you do not need to do it. :]
Offline
Corrected, thanks!
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
possible bug:
On one machine I have user named X but home directory actually is /home/Y (user setup via adduser, X and Y are just for simplification)
with USERS set to X in /etc/psd.conf I get this:
# /etc/rc.d/psd start
:: Starting Profile-Sync-Daemon [BUSY]
Error: Invalid user defined in /etc/psd.conf [FAIL]
but restart gives:
# /etc/rc.d/psd restart
:: Syncing browser profiles in tmpfs to physical disc [DONE]
with USERS set to Y, I get this:
# /etc/rc.d/psd start
:: Starting Profile-Sync-Daemon [BUSY]
su: user Y doesn't exist
su: user Y doesn't exist
su: user Y doesn't exist
after this /home/Y/.mozilla is symlinked to /tmp/.Y-mozilla but in /tmp ther is no such directory
which leads to Firefox error:
Your Firefox profile cannot be loaded. It may be missing or inaccessible.
permisions checked:
# ls -ld /tmp
drwxrwxrwt 13 root root 320 01-12 16:21 /tmp
Last edited by masteryod (2012-01-12 22:00:17)
Offline
Psd expects the user you defined in /etc/psd.conf to have a matching home directory. In your case, make a minor tweak to your users array which I think will work for you, just insert the name of user X's homedir which in your case is Y.
users="foo bar Y"
Have a look at /usr/bin/profile-sync-daemon to see how it works. Psd doesn't really care about your users, it just cares about their respective home directories.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Psd expects the user you defined in /etc/psd.conf to have a matching home directory. In your case, make a minor tweak to your users array which I think will work for you, just insert the name of user X's homedir which in your case is Y.
This is exactly what I did second time, and it brings error as described above in my post (I'm not sure if it's bug or something with my configuration but it's reproducible)
Offline
My bad. You are correct. For psd to work properly, the username must match the user's homedir. Let me see if I can modify it to work with a mis-matched setup and get back to you. Thank you for the feedback!
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
OK... I believe it's fixed now to work with asymmetrical user/homedirs. Please try version 2.7 and let me know (worked on my test setup).
Last edited by graysky (2012-01-12 23:01:13)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
thanks for supporting midori. i can't figure it out, but it still read/writes on the HD when i start it, is it normal?
.config/midori is outsourced by psd and .cache/midori is also bound to /dev/shm/tmp.
edit: SOLVED ... automatically removal of cookies/cache/... was enabled.
Last edited by broken pipe (2012-01-14 10:22:53)
Offline
I hve added google-chrome support and a systemd .service file. Would be glad if they could be added to the default package
crabman
psd.service
[Unit]
Description=Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
Wants=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/rc.d/psd start
ExecStop=/etc/rc.d/psd stop
[Install]
WantedBy=multi-user.target
google-chrome patch
*** profile-sync-daemon 2012-01-14 00:45:31.000000000 +0100
--- profile-sync-daemon.new 2012-01-14 19:59:45.698831292 +0100
***************
*** 18,23 ****
--- 18,26 ----
chromium)
[[ "$i" = "chromium" ]] && STATIC="$homedir/.config/$i-backup" && LINK="$homedir/.config/$i"
;;
+ google-chrome)
+ [[ "$i" = "google-chrome" ]] && STATIC="$homedir/.config/$i-backup" && LINK="$homedir/.config/$i"
+ ;;
midori)
[[ "$i" = "midori" ]] && STATIC="$homedir/.config/$i-backup" && LINK="$homedir/.config/$i"
;;
***************
*** 30,36 ****
sync() {
# sync profiles to tmpfs and back again
for user in $USERS; do
! for i in mozilla chromium opera midori; do
set_which
# check if user has browser profile
if [[ -d $LINK ]]; then
--- 33,39 ----
sync() {
# sync profiles to tmpfs and back again
for user in $USERS; do
! for i in mozilla chromium google-chrome opera midori; do
set_which
# check if user has browser profile
if [[ -d $LINK ]]; then
***************
*** 59,65 ****
debug() {
# sync profiles to tmpfs and back again
for user in $USERS; do
! for i in mozilla chromium opera midori; do
set_which
echo $user:$homedir:$i
done
--- 62,68 ----
debug() {
# sync profiles to tmpfs and back again
for user in $USERS; do
! for i in mozilla chromium google-chrome opera midori; do
set_which
echo $user:$homedir:$i
done
***************
*** 70,76 ****
check() {
# crash recovery
for user in $USERS; do
! for i in mozilla chromium opera; do
set_which
[[ -h $LINK ]] && rm -f $LINK
[[ -d $STATIC ]] && mv $STATIC $LINK
--- 73,79 ----
check() {
# crash recovery
for user in $USERS; do
! for i in mozilla chromium google-chrome opera; do
set_which
[[ -h $LINK ]] && rm -f $LINK
[[ -d $STATIC ]] && mv $STATIC $LINK
***************
*** 81,87 ****
unsync() {
# restore virgin state of profiles on physical discs
for user in $USERS; do
! for i in mozilla chromium opera midori; do
set_which
# check if user has browser profile
if [[ -h $LINK ]]; then
--- 84,90 ----
unsync() {
# restore virgin state of profiles on physical discs
for user in $USERS; do
! for i in mozilla chromium google-chrome opera midori; do
set_which
# check if user has browser profile
if [[ -h $LINK ]]; then
Offline
@crabman - glad to add support for google-chrome, thanks for the patch. I haven't used systemd before. Please direct me where "psd.service" should get installed, who should own it, and what should it's permissions be?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
@ graysky: the file should go to /lib/systemd/system/, be owned by root:root and have 644 permissions. This way systemd-users can enable it with a simple systemctl enable psd.service.
crabman
Offline
Cool, done (v2.9) - please test it out.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
psd.service seems to work here on regular stop and start; we'll have to see if it works on reboot.
==> sudo systemctl status psd.service
psd.service - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
Loaded: loaded (/lib/systemd/system/psd.service; enabled)
Active: active (exited) since Sat, 14 Jan 2012 20:57:46 -0500; 7s ago
Process: 591 ExecStart=/etc/rc.d/psd start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/psd.service
Offline
OK... I believe it's fixed now to work with asymmetrical user/homedirs.
Yep, seems that everything is working properly, big thanks for your work!
Offline
Yep, seems that everything is working properly, big thanks for your work!
Always glad to give back the community. Thanks for bug report
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Always glad to give back the community. Thanks for bug report
At least I can do a bug reporting
Offline
On deletion of the package it does not stop daemon, therefore leaving profile in /tmp (!), with no possibility to stop it manually (since psd script is deleted).
It also says "Be sure to remove the entry in the root crontab!" while this doesn't seem necessary.
Therefore I installed it again, then decided to leave it running so far. That new BROWSERS variable is awesome!
Offline
On deletion of the package it does not stop daemon, therefore leaving profile in /tmp (!), with no possibility to stop it manually (since psd script is deleted).
It also says "Be sure to remove the entry in the root crontab!" while this doesn't seem necessary.
Therefore I installed it again, then decided to leave it running so far. That new BROWSERS variable is awesome!
Well, there is nothing to be done if the user removes a running daemon without stopping it....
I suspect you were running an older version of psd because I made the edit that removes that message a while ago. Thanks for pointing it out though. Enjoy the daemon.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Well, there is nothing to be done if the user removes a running daemon without stopping it....
I suspect you were running an older version of psd because I made the edit that removes that message a while ago. Thanks for pointing it out though. Enjoy the daemon.
Why not stop the daemon in the script that wrote the above message? I don't remember, but I think I saw a package that behave this way.
My fault regarding the message, I just reported same bug twice.
Offline
Stopping the daemon on removal is a brilliant idea. I will make the change and update later today. Thanks.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Damn, fell off my radar screen. Done now in profile-sync-daemon 3.0-2 - thanks again for the suggestion!
http://pkgbuild.com/git/aur.git/commit/ … de96f8bdd2
Last edited by graysky (2012-01-25 10:00:17)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Google Chrome also uses the directory ~/.cache/google-chrome. Is it possible/desirable to include it into psd?
Offline
Maybe adding
cache)
[[ "$i" = "cache" ]] && STATIC="$homedir/.$i-backup" && LINK="$homedir/.$i"
;;
is a good idea.
Offline
I found two more offending directories: .adobe and .macromedia. They are used by flashplugin.
Offline
you can also swap those dirs into tmpfs --> fstab:
tmpfs /home/user/.thumbnails tmpfs defaults,noatime 0 0
tmpfs /home/user/.cache tmpfs defaults,noatime 0 0
Offline