Page 1 of 1

Static profile directories producing browser run errors [SOLVED]

Posted: Thu Jun 15, 2023 10:21 pm
by houndstooth

Greetings Puppyland!

I like to use static browser profile directories fresh each boot. In Xenial I might get a warning that the config needs to be "unlocked" before a re-run (automatic after a dialog click). Otherwise browsers run.

In Fossa, they simply won't unless...

Code: Select all

root# run-as-spot ./chrome --incognito &
[1] 28270

root# [28270:28286:0616/060346.970939:ERROR:disk_cache.cc(184)] Unable to create cache
[28270:28286:0616/060346.971037:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
[28270:28270:0616/060347.001588:ERROR:process_singleton_posix.cc(405)] readlink failed: Permission denied (13)
[28270:28270:0616/060347.001767:ERROR:process_singleton_lock_posix.cc(20)] readlink(/home/spot/.config/chromium/SingletonLock) failed: Permission denied (13)
[28270:28270:0616/060347.001858:ERROR:process_singleton_posix.cc(257)] readlink(/home/spot/.config/chromium/SingletonLock) failed: Permission denied (13)
[28270:28270:0616/060347.001886:ERROR:process_singleton_posix.cc(281)] Failed to create /home/spot/.config/chromium/SingletonLock: Permission denied (13)
[28270:28270:0616/060347.001936:ERROR:process_singleton_posix.cc(405)] readlink failed: Permission denied (13)
[28270:28270:0616/060347.001970:ERROR:process_singleton_lock_posix.cc(20)] readlink(/home/spot/.config/chromium/SingletonLock) failed: Permission denied (13)
[28270:28270:0616/060347.002083:ERROR:chrome_browser_main.cc(1265)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.

The hack fix is to delete the profile directory & manually remake browser settings.

Is there a successful method for using static browser config directories in newer pups?


Re: Static profile directories producing browser run errors

Posted: Thu Jun 15, 2023 11:01 pm
by mikewalsh

@houndstooth :-

Um; 'kayyy....

I gotta confess, I don't understand your use of the expression "static browser config directory". Can you elaborate, please?

Do you mean a config (profile?) directory that is "locked", and never changes?

Mike. ;)


Re: Static profile directories producing browser run errors

Posted: Sun Jun 18, 2023 1:50 pm
by houndstooth

@mikewalsh certainly

Each boot has no browser config in place. Before a browser is run, a compressed archive is extracted into place.

Newer pups appear to have some builtin safeguard preventing these static configs from allowing browsers to run, though it isn't obvious how that works.


Re: Static profile directories producing browser run errors

Posted: Sun Jun 18, 2023 4:41 pm
by mikeslr

I'm not sure I understand what you want, either, even after your explanation. But perhaps this will accomplish what you want.
You didn't tell us which Puppy. But every Puppy can employ an adrv.sfs and/or ydrv.sfs. These are READ-ONLY file-systems that are copied into RAM on boot-up as long as you locate them adjacent to your other Puppy-System files. See, https://www.forum.puppylinux.com/viewtopic.php?t=5818. If not builtin, you can install nicOS-Utilities-Suite from here, https://www.forum.puppylinux.com/viewto ... 983#p12983. One of the modules the Suite provides is Save2SFS. It can be used to create and/or update either or both an adrv or a ydrv.
If you include a web-browser in either an adrv or a ydrv BEFORE creating a profile, AND DON'T* CREATE A SaveFile or SaveFolder on each boot-up you'll have a web-browser which does not yet have a profile.

Using either the Suite's remaster or Save2SFS options, you can fashion any Puppy to operate without employing a SaveFile/Folder: all your applications will be copied into RAM on boot-up from READ-ONLY files and only have such settings and customizations are you chosen to preserve.

-=-=-=-=-
* When you create a SaveFile or SaveFolder whatever changes you've made are preserved in it, see https://www.forum.puppylinux.com/viewto ... 818#p63818. Even if you have a SavFile/Folder, you can avoid using it by booting 'pfix=ram'. Your boot-loader may already created that option. Look at its menu.lst or grub.cfg for a listing with a title such as RAM-Mode or No-Save. If it isn't there, you can simply copy a listing, change the title of the copy to something reflecting that a Save is not to be used, and edit the linux/kernel line to provide either pfix=ram or pfix=fsck,ram.


Re: Static profile directories producing browser run errors

Posted: Sun Jun 18, 2023 5:08 pm
by rcrsn51
houndstooth wrote: Sun Jun 18, 2023 1:50 pm

Before a browser is run, a compressed archive is extracted into place.

Does the archive contain the profile directory? If so, it is probably getting root ownership when you extract it.

But you are using run-as-spot, so there will be permission problems.


Re: Static profile directories producing browser run errors

Posted: Mon Jun 19, 2023 5:06 am
by houndstooth
rcrsn51 wrote: Sun Jun 18, 2023 5:08 pm

Does the archive contain the profile directory? If so, it is probably getting root ownership when you extract it.

But you are using run-as-spot, so there will be permission problems.

The problem: the result is different with the same browser/profile directory combo in different pups.

The only thing obvious in Fossa vs Xenial is use of the /home directory. mirroring? symlinks? Anything you put in /root seems to appear in the other.

I can put up more examples as they arise, but if a profile directory is archived with permissions seems like they would restore the same.

My goal again is just to be able to 'freeze' a browser profile to maintain settings & start fresh sans all the new junk added each browsing session.

Works in Xenial. Fossa forces me to manually set everything.

If it's simple file/folder permissions I'll need to try it.


Re: Static profile directories producing browser run errors

Posted: Tue Jun 20, 2023 7:26 am
by houndstooth

Opera (again in Fossa):

opera.png
opera.png (30.5 KiB) Viewed 222 times

Code: Select all

root# [15624:15764:0620/151541.550501:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[15624:15764:0620/151541.550929:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[15624:15764:0620/151541.551262:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[15624:15730:0620/151541.603004:ERROR:disk_cache.cc(184)] Unable to create cache
[15624:15730:0620/151541.603098:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
[15624:15624:0620/151541.785714:ERROR:process_singleton_posix.cc(403)] readlink failed: Permission denied (13)
[15624:15624:0620/151541.785804:ERROR:process_singleton_lock_posix.cc(20)] readlink(/home/spot/.config/opera/SingletonLock) failed: Permission denied (13)
[15624:15624:0620/151541.785883:ERROR:process_singleton_posix.cc(255)] readlink(/home/spot/.config/opera/SingletonLock) failed: Permission denied (13)
[15624:15624:0620/151541.785910:ERROR:process_singleton_posix.cc(279)] Failed to create /home/spot/.config/opera/SingletonLock: Permission denied (13)
[15624:15624:0620/151541.785962:ERROR:process_singleton_posix.cc(403)] readlink failed: Permission denied (13)
[15624:15624:0620/151541.786000:ERROR:process_singleton_lock_posix.cc(20)] readlink(/home/spot/.config/opera/SingletonLock) failed: Permission denied (13)
[15624:15624:0620/151541.786089:ERROR:chrome_browser_main.cc(1996)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.
[15777:15777:0620/151542.342042:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[15624:15730:0620/151542.382951:ERROR:disk_cache.cc(184)] Unable to create cache
[15624:15730:0620/151542.383189:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
root# Discarded=1
Discarded=1
root# 

Re: Static profile directories producing browser run errors [SOLVED]

Posted: Thu Jun 22, 2023 6:52 am
by houndstooth

Solved via experimentation & the permissions hint:

Extracted static profiles allow browsers to run-as-spot in Fossa when:

a) the profile is extracted as user spot
b) the browser is run-as-spot from user root (browser won't run from spot)

This will be the 1st time I've attempted user switching in a script.

Wish me luck!