You are not logged in.

#101 2012-04-02 16:36:44

FarStar07
Member
Registered: 2012-04-02
Posts: 51

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I realized that my opera-next profile had not moved in tmpfs. So, I had a quick question... In /usr/bin/profile-sync-daemon file, it's written:

        opera-next)
            [[ "$i" = "opera" ]] && STATIC="$homedir/.$i-backup" && LINK="$homedir/.$i"

It is not rather:
        opera-next)
            [[ "$i" = "opera-next" ]] && STATIC="$homedir/.$i-backup" && LINK="$homedir/.$i"

?

Edit: With this change, everything seems to work.

Last edited by FarStar07 (2012-04-02 17:05:16)

Offline

#102 2012-04-02 18:12:23

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

<<HEAD SMACK>>
My bad.  Sorry.  Corrected now in 3.2.  Thank you for the interest in making psd more robust and featureful.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#103 2012-04-02 18:14:15

FarStar07
Member
Registered: 2012-04-02
Posts: 51

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Thanks!

Offline

#104 2012-04-06 17:05:40

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@gravsky nice work, with chromium and following the wiki for the chromium cache in /tmp, it is working perfectly.
Can i ask you something that is not really involved with psd?
I would suggest you to do a similar work but for log files, because i'd like to keep them in tmpfs and saving other writings on my hd, but i'd like that when i switch off my netbook, they were syinchronized on it, just like your psd does with browser profiles.
Sadly i'm not good at scripting, and surely not as good as you, so, if you think it is a good idea, well, i'd like to see a similar package on aur! big_smile

Offline

#105 2012-04-06 20:04:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@nierro - I actually wrote and use a variant of psd called asd (anything sync daemon).  Let me spiff it up a bit and post a release to the AUR.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#106 2012-04-06 21:37:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#107 2012-04-07 08:42:27

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Love you big_smile
Thanks!

Offline

#108 2012-04-11 16:15:37

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Hello.

Seems systemd.service terminate incorrect when I reboot or poweroff a system. When OS starts I see my old session (not that was before shutdown).
Please somebody test this.

Thanks.

Offline

#109 2012-04-11 16:20:37

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I don't use systemd myself.  The included psd.service file was generated by a user and sent to me.  If you have a patch, please send it to me, just know that I cannot test it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#110 2012-04-11 17:33:27

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I don't yet solved this. I will test this.
Would you like to try a systemd? smile

Offline

#111 2012-04-12 22:50:45

pezzacolori
Member
Registered: 2011-07-22
Posts: 13

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Hi, I get a bunch of errors when I call rc.d start|sync|stop psd.
It seems they are related to permissions, by rsync or delete:

[pezzatti@bx ~]$ sudo rc.d start psd
:: Starting Profile-Sync-Daemon                                                                                                                                     [BUSY] 
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/0/F7" failed: Permission denied (13)
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/1/0D" failed: Permission denied (13)
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/1/29" failed: Permission denied (13)
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/1/62" failed: Permission denied (13)
.....
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/F/75" failed: Permission denied (13)
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/F/82" failed: Permission denied (13)
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/F/93" failed: Permission denied (13)
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/F/BB" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
                                                                                                                                                                    [DONE] 
[pezzatti@bx ~]$ sudo rc.d sync psd
Password: 
:: Syncing browser profiles in tmpfs to physical disc                                                                                                               [BUSY] 
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/F/BB" failed: Permission denied (13)
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/F/BB
................
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/1/29" failed: Permission denied (13)
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/1/29
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/1/0D" failed: Permission denied (13)
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/1/0D
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/1
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/1
rsync: opendir "/home/pezzatti/.mozilla-backup/firefox/t8d4kvnb.default/Cache.Trash1002452821/0/F7" failed: Permission denied (13)
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/0/F7
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/0
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821/0
cannot delete non-empty directory: firefox/t8d4kvnb.default/Cache.Trash1002452821
IO error encountered -- skipping file deletion
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
 

and   /tmp properties  are
drwxrwxrwt  15 root root   360 Apr 13 00:30 tmp

Am I doing something wrong?

Offline

#112 2012-04-13 00:14:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Can you post your /etc/rc.conf


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#113 2012-04-13 19:00:16

pezzacolori
Member
Registered: 2011-07-22
Posts: 13

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

here it is:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# See 'man 5 rc.conf' for more details
#

# LOCALIZATION
# ------------
HARDWARECLOCK="UTC"
TIMEZONE="Europe/Zurich"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
LOCALE=en_US.UTF-8
DAEMON_LOCALE="yes"
USECOLOR="yes"

# HARDWARE
# --------
MODULES=(fuse vboxdrv)
USEDMRAID="no"
USEBTRFS="no"
USELVM="no"

# NETWORKING
# ----------
HOSTNAME="bx"

interface=(eth0 wlan0)
address=
netmask=
broadcast=
gateway=

NETWORK_PERSIST="no"

# DAEMONS
# -------
#
DAEMONS=(hwclock syslog-ng dbus bluetooth networkmanager crond netfs samba smbnetfs cupsd webmin slim postgresql @bumblebeed @psd)  #network removed

Offline

#114 2012-04-13 19:08:24

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@pezza -sorry, I meant to ask for your /etc/psd.conf


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#115 2012-04-13 19:23:40

pezzacolori
Member
Registered: 2011-07-22
Posts: 13

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

here it is:

#
# /etc/psd.conf
#
# For documentation, see: https://wiki.archlinux.org/index.php/Profile-sync-daemon

# 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="pezzatti"

# 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
#   google-chrome
#   mozilla
#   midori
#   opera
#   opera-next
#
# Note that mozilla is the correct value for the firefox browser!
#
# If the following is commented out (default), then all available/supported 
# browsers will be sync'ed.
#BROWSERS=""

# Define where browser profiles will reside in tmpfs 
# This location must be mounted to tmpfs and MUST have permissions of 777
# Use NO trailing backslash!
# If running a standard ARCH install the following default is fine
VOLATILE="/tmp"

and I also add the forst part of my /etc/fstab

# 
# /etc/fstab: static file system information
#
# <file system>	                               <dir>	<type>	<options>	          <dump>   <pass>
tmpfs		                                   /tmp	    tmpfs	nodev,nosuid,size=8G        0 0
UUID=11f89f93-e706-4b26-8749-a506f5b1b0d4      /home    ext4    defaults,noatime,discard    0 2
UUID=5ab1a287-da47-4a9e-b5f1-c0e27759c0ed      /boot    ext2    defaults,noatime,discard    0 2
UUID=c5e1d56b-35bf-44d7-a3ee-63324cd9037e      /var     ext4    defaults,noatime,discard    0 2
UUID=ef637604-c40e-46be-a863-c87f579f3791      /        ext4    defaults,noatime,discard    0 1
UUID=2dead31e-637a-473f-8b29-a15697d515e0      /home/pezzatti/.VirtualBox   ext4  defaults,noatime,discard    0 2

Offline

#116 2012-04-13 19:32:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Post the output of:

ls -l /tmp

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#117 2012-04-13 19:36:47

pezzacolori
Member
Registered: 2011-07-22
Posts: 13

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

[pezzatti@bx ~]$ ls -l /tmp
total 0
drwx------ 2 pezzatti users 120 Apr 13 20:36 keyring-CdjXuh
drwx------ 2 pezzatti users  40 Jan  1  1970 orbit-pezzatti
drwxr-xr-x 2 pezzatti users  40 Apr 13 21:01 pacaurtmp-pezzatti
drwx------ 5 pezzatti users 120 Apr 13 21:25 pezzatti-mozilla
drwx------ 2 pezzatti users 100 Apr 13 20:36 pulse-vFvneWZz1Xdh
drwxr-xr-x 2 pezzatti users  40 Apr 13 20:36 tracker-pezzatti
drwx------ 2 pezzatti users  40 Apr 13 20:36 virtual-pezzatti.jxN2Tp

Offline

#118 2012-04-14 18:01:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@pezzacolori - Permissions problem within your profile?  Try this:

# rc.d stop psd
# chown -R pezzatti:users /home/pezzatti/.mozilla
# rc.d start psd

@unikum - how are you shutting down your system and which systemd related packages do you have installed?  I setup my system with systemd systemd-arch-units and when restarting/halting from xfce4's GUI, have experienced no issues like you describe.  I think if you use /sbin/{reboot,shutdown,halt} you might now get your daemons to stop via systemd but I could be mistaken.

Last edited by graysky (2012-04-14 18:04:31)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#119 2012-04-14 18:41:24

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@graysky: I use kde4 where used following commands for reboot and shutdown:

/sbin/shutdown -h -P now
/sbin/shutdown -r now

And also I use extra/systemd-sysvcompat

$ ls -l /sbin/shutdown
lrwxrwxrwx 1 root root 18 апр.   1 07:12 /sbin/shutdown -> /usr/bin/systemctl

Should I change kde4 commands?

Last edited by unikum (2012-04-14 18:42:31)

Offline

#120 2012-04-14 19:29:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

unikum wrote:

Should I change kde4 commands?

I am not familiar with kde or how the briding package works.  I suggest that you try changing them and see if that helps (I think it will).

reboot = sudo systemctl reboot
shutdown = sudo systemctl poweroff


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#121 2012-04-18 22:57:36

pezzacolori
Member
Registered: 2011-07-22
Posts: 13

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

graysky wrote:
# rc.d stop psd
# chown -R pezzatti:users /home/pezzatti/.mozilla
# rc.d start psd


@graysky:  thanks a lot, that did the trick.

Thanks!

Last edited by pezzacolori (2012-04-18 22:59:51)

Offline

#122 2012-05-11 18:14:16

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@gravsky, only a little question: i have my browser profile and cache mounted in tmpfs.
What will happen if i watch a movie on "megavideo" (yeah it is no more over there!) and during the movie, my netbook reaches 5% of battery and then go into hibernation? Will hibernation copy all of my cache on swap?
Thanks! It is only a theoretical question smile

Offline

#123 2012-05-11 20:03:43

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@nierro - Never tested with hibernation/no idea what actually happens there.  You wanna test and report back?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#124 2012-05-11 23:12:07

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

nierro wrote:

@gravsky, only a little question: i have my browser profile and cache mounted in tmpfs.
What will happen if i watch a movie on "megavideo" (yeah it is no more over there!) and during the movie, my netbook reaches 5% of battery and then go into hibernation? Will hibernation copy all of my cache on swap?
Thanks! It is only a theoretical question smile

Yes, hibernation will copy all of the contents of your tmpfs filesystems into the hibernation image that gets written into swap space. It would still be a good idea to sync your profile just before hibernation, though (i.e. add a line in your acpi handler.sh or wherever), because if for some reason you can't resume properly (e.g. your netbook misjudged how much battery it had left and wasn't able to finish hibernating), any changes since the last sync would be lost.

Assuming you resume from hibernate normally, though, everything should be just as it was.

(Incidentally, if your browser's profile is large, it will make hibernating take longer.)

~Felix.

Offline

#125 2012-05-12 07:59:47

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@gravsky, i think thetrivialstuff is right, hibernation would be longer.
Yes, may be i can sync my profile before hibernation with a pm script too, that's easy.
Thanks, may be if i try, i'll feed back to you my experience.

Offline

Board footer

Powered by FluxBB