You are not logged in.

#651 2015-10-17 07:35:07

k44
Member
Registered: 2013-03-30
Posts: 22

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

Here it is

[dalexandre@Ohara ~]$ find $HOME/.config/systemd/user -mindepth 1 -type d | xargs ls -gG --color
total 4
lrwxrwxrwx 1 33 13 oct.  12:46 psd.service -> /usr/lib/systemd/user/psd.service

Offline

#652 2015-10-17 11:15:44

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 understand why systemd isn't starting your user service...?


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

Offline

#653 2015-10-18 17:14:34

Lenny87
Member
Registered: 2015-10-18
Posts: 3

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

Hi,

I have strange problem when psd can't find (or use) my firefox profile

lenny@crapbox ~ $ grep -v \# ~/.config/psd/psd.conf

USE_OVERLAYFS="yes"
BROWSERS="google-chrome palemoon firefox"

and when I run 'psd p' command, I see only chrome and palemoon there.

bash -x -v output from psd p

+ for browser in '$BROWSERS'
+ load_env_for firefox
+ browser=firefox
+ homedir=/home/lenny
id -g $user
++ id -g lenny
+ group=100
+ unset profileArr
+ unset DIRArr
+ unset PSNAME
+ . /usr/share/psd/browsers/firefox
if [[ -d $homedir/.mozilla/firefox ]]; then
    profileArr=( $(grep '[P,p]'ath= $homedir/.mozilla/firefox/profiles.ini |
    sed 's/[P,p]ath=//') )
    index=0
    PSNAME="$browser"
    for profileItem in ${profileArr[@]}; do
        if [[ $(echo $profileItem | cut -c1) = "/" ]]; then
            # path is not relative
            DIRArr[index]="$profileItem"
        else
            # we need to append the default path to give a
            # fully qualified path
            DIRArr[index]="$homedir/.mozilla/firefox/$profileItem"
        fi
        index=$index+1
    done
fi
++ [[ -d /home/lenny/.mozilla/firefox ]]
++ profileArr=($(grep '[P,p]'ath= $homedir/.mozilla/firefox/profiles.ini |
    sed 's/[P,p]ath=//'))
grep '[P,p]'ath= $homedir/.mozilla/firefox/profiles.ini |
    sed 's/[P,p]ath=//'
+++ grep '[P,p]ath=' /home/lenny/.mozilla/firefox/profiles.ini
+++ sed 's/[P,p]ath=//'
++ index=0
++ PSNAME=firefox
++ for profileItem in '${profileArr[@]}'
echo $profileItem | cut -c1
+++ echo $'Profiles/8p0y5880.default\r'
+++ cut -c1
++ [[ P = \/ ]]
++ DIRArr[index]=$'/home/lenny/.mozilla/firefox/Profiles/8p0y5880.default\r'
++ index=0+1

check_suffix=1
++ check_suffix=1
+ for item in '"${DIRArr[@]}"'
+ DIR=$'/home/lenny/.mozilla/firefox/Profiles/8p0y5880.default\r'
+ BACKUP=$'/home/lenny/.mozilla/firefox/Profiles/8p0y5880.default\r-backup'
+ suffix=
+ suffix_needed firefox
+ browser=firefox
+ unset check_suffix
+ . /usr/share/psd/browsers/firefox
if [[ -d $homedir/.mozilla/firefox ]]; then
    profileArr=( $(grep '[P,p]'ath= $homedir/.mozilla/firefox/profiles.ini |
    sed 's/[P,p]ath=//') )
    index=0
    PSNAME="$browser"
    for profileItem in ${profileArr[@]}; do
        if [[ $(echo $profileItem | cut -c1) = "/" ]]; then
            # path is not relative
            DIRArr[index]="$profileItem"
        else
            # we need to append the default path to give a
            # fully qualified path
            DIRArr[index]="$homedir/.mozilla/firefox/$profileItem"
        fi
        index=$index+1
    done
fi
++ [[ -d /home/lenny/.mozilla/firefox ]]
++ profileArr=($(grep '[P,p]'ath= $homedir/.mozilla/firefox/profiles.ini |
    sed 's/[P,p]ath=//'))
grep '[P,p]'ath= $homedir/.mozilla/firefox/profiles.ini |
    sed 's/[P,p]ath=//'
+++ grep '[P,p]ath=' /home/lenny/.mozilla/firefox/profiles.ini
+++ sed 's/[P,p]ath=//'
++ index=0
++ PSNAME=firefox
++ for profileItem in '${profileArr[@]}'
echo $profileItem | cut -c1
+++ echo $'Profiles/8p0y5880.default\r'
+++ cut -c1
++ [[ P = \/ ]]
++ DIRArr[index]=$'/home/lenny/.mozilla/firefox/Profiles/8p0y5880.default\r'
++ index=0+1

check_suffix=1
++ check_suffix=1
+ [[ -n 1 ]]
+ suffix=$'-8p0y5880.default\r'
+ TMPRW=$'/run/user/1000/lenny-firefox-8p0y5880.default\r-rw'
 ]][ -d /home/lenny/.mozilla/firefox/Profiles/8p0y5880.default
exit 0
+ exit 0

Can someone help me to debug what is the problem here?

Thanks

Offline

#654 2015-10-18 20:13:29

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

Hmm... it seems to be parsing your profiles.ini ok.  Can you define only firefox in the browsers array and post the output of `psd p` and of profiles.ini


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

Offline

#655 2015-10-18 20:53:09

Lenny87
Member
Registered: 2015-10-18
Posts: 3

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

graysky wrote:

Hmm... it seems to be parsing your profiles.ini ok.  Can you define only firefox in the browsers array and post the output of `psd p` and of profiles.ini

lenny@crapbox ~ $ cat ~/.mozilla/firefox/profiles.ini

[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=Profiles/8p0y5880.default

"psd p" output

http://pastebin.ca/3205136

Offline

#656 2015-10-18 20:57:06

Lenny87
Member
Registered: 2015-10-18
Posts: 3

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

Just found it.

profiles.ini had windows line endings. Converting it to unix fixed the problem.

Offline

#657 2015-10-18 22:27:25

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

Glad you got it working.


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

Offline

#658 2015-10-23 08:56:52

k44
Member
Registered: 2013-03-30
Posts: 22

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

graysky wrote:

I don't understand why systemd isn't starting your user service...?

Maybe there is something to do with my encrypted /home which is only uncrypted at GDM login (pam_mount)

Offline

#659 2015-10-23 14:08:16

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

@k44- that would be.... My understanding is moving psd to a user service should account for the encryption state and in my testing with luks /home in a vbox, this was true.  I am not an encryption expert and just followed the wiki to build a test environment.  Your setup could be different from mine.


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

Offline

#660 2015-10-30 15:23:07

gim
Member
Registered: 2013-07-27
Posts: 35

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

I can't get rid of this error when I'm trying to use overlay:

% psd p                      
 ERROR!
 User gim needs sudo access to /usr/bin/mount and to /usr/bin/umount
 in order to use psd in overlayfs mode.

 Fix this by adding the following line to /etc/sudoers to enable this functionality:
   gim ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper

I have added this line to sudoers file and even rebooted, it's still not working. I can't run "sudo psd-overlay-helper" without a password. Why is that? Is the syntax of this line correct?
This is my sudoers file:

root ALL=(ALL) ALL
gim ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper
%sudo   ALL=(ALL) ALL

User 'gim' is in the 'sudo' group.

Offline

#661 2015-10-30 16:21:57

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

@gim - I wonder if your %sudo line is trumping the user line... can you reorder the 3 so that the last line is the one for your gim user?

root ALL=(ALL) ALL
%sudo   ALL=(ALL) ALL
gim ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper

Last edited by graysky (2015-10-30 16:24:16)


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

Offline

#662 2015-11-01 11:25:13

gim
Member
Registered: 2013-07-27
Posts: 35

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

graysky wrote:

@gim - I wonder if your %sudo line is trumping the user line... can you reorder the 3 so that the last line is the one for your gim user?

root ALL=(ALL) ALL
%sudo   ALL=(ALL) ALL
gim ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper

Looks like you're right, reordering these lines fixed this. Thanks! It might be worth adding to the "Troubleshooting" section in the ArchWiki page.

Offline

#663 2015-11-03 21:28:11

inflextau
Member
Registered: 2014-06-28
Posts: 15

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

Has anyone here had got psd to work with Chrome/Chromium under Apparmor. I've been getting errors like these

 apparmor="DENIED" operation="getattr" info="Failed name lookup - disconnected path" error=-13 profile="/opt/google/chrome/chrome" name="home/user/.config/google-chrome-backup/Default" pid=5191 comm="Chrome_FileThre" requested_mask="r" denied_mask="r" fsuid=1000 ouid=100 

It's obviously caused by psd's symlinking but I don't seem to be able to find any way to get over it. I was wonder if anyone here had any ideas.

Offline

#664 2015-11-03 23:30:19

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

inflextau wrote:

Has anyone here had got psd to work with Chrome/Chromium under Apparmor. I've been getting errors like these

 apparmor="DENIED" operation="getattr" info="Failed name lookup - disconnected path" error=-13 profile="/opt/google/chrome/chrome" name="home/user/.config/google-chrome-backup/Default" pid=5191 comm="Chrome_FileThre" requested_mask="r" denied_mask="r" fsuid=1000 ouid=100 

It's obviously caused by psd's symlinking but I don't seem to be able to find any way to get over it. I was wonder if anyone here had any ideas.

Never used AA but does it treat a mount differently?  Try using the overlayfs option.

Last edited by graysky (2015-11-05 09:42:50)


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

Offline

#665 2015-11-05 06:53:28

inflextau
Member
Registered: 2014-06-28
Posts: 15

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

Graysky, in fact turning overlayfs off got it working- apparently AA doesn't play nice with it enabled.

BTW, thanks greatly for all the work you've done on this and your other projects!

Offline

#666 2015-11-05 09:44:25

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

inflextau wrote:

Graysky, in fact turning overlayfs off got it working- apparently AA doesn't play nice with it enabled.

BTW, thanks greatly for all the work you've done on this and your other projects!

I thought you weren't using it initially?  Glad it's working in either case.  What I don't know is how general your solution is for other AA users.  Perhaps there is an AA rule that simple needs to be created to allow the overlayfs mount?


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

Offline

#667 2015-11-06 14:38:41

inflextau
Member
Registered: 2014-06-28
Posts: 15

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

graysky wrote:
inflextau wrote:

Graysky, in fact turning overlayfs off got it working- apparently AA doesn't play nice with it enabled.

BTW, thanks greatly for all the work you've done on this and your other projects!

I thought you weren't using it initially?  Glad it's working in either case.  What I don't know is how general your solution is for other AA users.  Perhaps there is an AA rule that simple needs to be created to allow the overlayfs mount?



I thought it would be a matter of adding an alias but apparently AA has a problem with mounts being disconnected from the namespace. To get around this, adding the  attach_disconnected flag to the profile will allow psd to run with overlayfs.

For example, in the case of chromium:

/usr/lib/chromium/chromium flags=(attach_disconnected) {

This isn't advised in AA's Core Policy document but one will have to wait for better support for overlayfs by AA.

Last edited by inflextau (2015-11-06 14:40:55)

Offline

#668 2015-11-06 17:23:42

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

Cool. Do you mind adding this to a section on the psd wiki page?  Dunno how many others use AA but that is probably the best lace for it to go.


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

Offline

#669 2015-11-08 01:33:13

hamhock
Member
Registered: 2015-04-16
Posts: 94

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

everything is working fine after upgrading from 5.75 (on 6.18-1 presently) except for one issue:  every 61 minutes, a new firefox window opens.

I assume the psd-resync.timer is triggering this, but how can I prevent a new window from opening when it fires?

Offline

#670 2015-11-08 02:26: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

@ham - Never saw that before... as a test, once psd is active, you can simply run `psd resync` which is all the resync timer does.  Does this trigger a new window?


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

Offline

#671 2015-11-08 02:39:44

hamhock
Member
Registered: 2015-04-16
Posts: 94

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

yes 'psd resync' triggers a new window.

% psd resync
No status data could be sent: $NOTIFY_SOCKET was not set
google-chrome resync successful
firefox resync successful

Last edited by hamhock (2015-11-08 02:43:35)

Offline

#672 2015-11-08 03:06:29

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

That is unexpected.  I haven't see it before nor do I have an idea why it dors it.  Can you verify that calling resync does this in a freshly created profile?

Last edited by graysky (2015-11-08 03:07:09)


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

Offline

#673 2015-11-08 03:28:55

hamhock
Member
Registered: 2015-04-16
Posts: 94

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

created new firefox profile, but same result - new window. 
If I run google-chrome,  'psd resync' also creates a new window.

% psd resync
No status data could be sent: $NOTIFY_SOCKET was not set
google-chrome resync successful
firefox resync successful
firefox sync successful

Last edited by hamhock (2015-11-08 03:39:05)

Offline

#674 2015-11-08 12:42:28

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

@hamhock - That is crazy!  For me no such behavior for either chromium or firefox.

% psd resync
No status data could be sent: $NOTIFY_SOCKET was not set
chromium resync successful

Using version 6.18 (see psd p)?

EDIT: Also, if you start the browser from a shell so you can see more verbose info about them, does running the resync command from another shell trigger any output?

Last edited by graysky (2015-11-08 14:50:52)


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

Offline

#675 2015-11-08 18:40:38

hamhock
Member
Registered: 2015-04-16
Posts: 94

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

graysky wrote:

start the browser from a shell so you can see more verbose info about them, does running the resync command from another shell trigger any output?

no additional output in shell where firefox was launched when run 'psd resync' in another shell.

Here is output from 'psd p'

 % psd p
Profile-sync-daemon v6.18 on Arch Linux

 Systemd service is currently active.
 Systemd resync-timer is currently active.
 Overlayfs v23 is currently active.

Psd will manage the following per /home/richard/.config/psd/.psd.conf:

 browser/psname:  firefox/firefox
 owner/group id:  richard/100
 sync target:     /home/richard/.mozilla/firefox/yupon72q.default
 tmpfs dir:       /run/user/1000/richard-firefox-yupon72q.default
 profile size:    47M
 overlayfs size:  30M
 recovery dirs:   none

 browser/psname:  firefox/firefox
 owner/group id:  richard/100
 sync target:     /home/richard/.mozilla/firefox/6zn5ms5w.profile-02
 tmpfs dir:       /run/user/1000/richard-firefox-6zn5ms5w.profile-02
 profile size:    14M
 overlayfs size:  14M
 recovery dirs:   none

 browser/psname:  google-chrome/chrome
 owner/group id:  richard/100
 sync target:     /home/richard/.config/google-chrome
 tmpfs dir:       /run/user/1000/richard-google-chrome
 profile size:    89M
 overlayfs size:  0
 recovery dirs:   none

Offline

Board footer

Powered by FluxBB