Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Moderator: Forum moderators

User avatar
fredx181
Posts: 2597
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 283 times
Been thanked: 1012 times
Contact:

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by fredx181 »

Governor wrote:

The installation that has problems (and maintains previous bookmarks and settings) is here:
/mnt/nvme0n1p4/Brave browser/Brave-portable64

Just to mention, don't know if it's a typo, the path to Brave-portable64 cannot contain space(s) (Brave<space>browser)
Better remove the space, so becomes e.g. /mnt/nvme0n1p4/Bravebrowser/Brave-portable64 .

edit: Try what williwaw said, perhaps the profile folder that you copied is the profile folder from the older setup on FAT32 ? (I'd really advice to forget about the settings you earlier made and start "fresh")

Governor
Posts: 472
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 11 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by Governor »

@fredx181

williwaw wrote: Sat May 04, 2024 3:47 pm
Governor wrote: Sat May 04, 2024 10:59 am

I downloaded a "fresh" copy of Brave and installed it on an ext4 partition. It ran fine.
I copied the fresh Brave installation to another folder on the same ext4 drive and the peculiar message is back............

Not only that, but my settings and bookmarks from the previous installation are present. How is this possible?

you broke something in your profile when you moved the app?
rename the profile folder and see if the app will create a new one.

I deleted this folder: /mnt/nvme0n1p4/Brave browser/Brave-portable64

And I copied this folder: /mnt/nvme0n1p4/Downloads/Browsers/Brave-portable64
to: /mnt/nvme0n1p4/Brave browser/ (to take its place).

The installation that has problems (and maintains previous bookmarks and settings) is here:
/mnt/nvme0n1p4/Brave browser/Brave-portable64

I deleted the profile folder:
/mnt/nvme0n1p4/Brave browser/Brave-portable64/PROFILE/spot/Brave-Browser

I then ran the launch script here:
/mnt/nvme0n1p4/Brave browser/Brave-portable64/LAUNCH

Although a new profile was created (which is empy), there is no change.

I get the same result as before

Meanwhile the installation I copied from runs without error.
/mnt/nvme0n1p4/Downloads/Browsers/Brave-portable64/LAUNCH

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

User avatar
fredx181
Posts: 2597
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 283 times
Been thanked: 1012 times
Contact:

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by fredx181 »

@Governor

earlier, fredx181 wrote:

Just to mention, don't know if it's a typo, the path to Brave-portable64 cannot contain space(s) (Brave<space>browser)
Better remove the space, so becomes e.g. /mnt/nvme0n1p4/Bravebrowser/Brave-portable64 .

Again, remove the space in the folder name, change (rename) "Brave browser" to "Bravebrowser" (or whatever, but should be without space(s) ).
The problem will probably be solved then.. (edit: better late than never :D )
(it's a limitation, I know, the LAUNCH script would need a change to support path with spaces, in the meantime it should work fine without the space(s) in the path).

edit:

Meanwhile the installation I copied from runs without error.
/mnt/nvme0n1p4/Downloads/Browsers/Brave-portable64/LAUNCH

Exactly, because that path is without spaces.

Governor
Posts: 472
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 11 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by Governor »

fredx181 wrote: Thu May 09, 2024 2:19 pm

@Governor

earlier, fredx181 wrote:

Just to mention, don't know if it's a typo, the path to Brave-portable64 cannot contain space(s) (Brave<space>browser)
Better remove the space, so becomes e.g. /mnt/nvme0n1p4/Bravebrowser/Brave-portable64 .

Again, remove the space in the folder name, change (rename) "Brave browser" to "Bravebrowser" (or whatever, but should be without space(s) ).
The problem will probably be solved then.. (edit: better late than never :D )
(it's a limitation, I know, the LAUNCH script would need a change to support path with spaces, in the meantime it should work fine without the space(s) in the path).

edit:

Meanwhile the installation I copied from runs without error.
/mnt/nvme0n1p4/Downloads/Browsers/Brave-portable64/LAUNCH

Exactly, because that path is without spaces.

Wow. That worked.
Thanks!

I am not even going to ask about why spaces are sometimes allowed and sometimes not allowed. :?

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

User avatar
fredx181
Posts: 2597
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 283 times
Been thanked: 1012 times
Contact:

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by fredx181 »

@Governor
Ok, nice, finally solved !

I am not even going to ask about why spaces are sometimes allowed and sometimes not allowed.

Will try to explain anyway (no rocket science :) )
The trick to support path with spaces is to add double quotes around all instances of $HERE (in this case $HERE is where the LAUNCH script is located)
If the last block of the LAUNCH script would be as below code, then a path with spaces will be supported.
(changed e.g. --user-data-dir=$HERE/PROFILE/spot/Brave-Browser (originally without quotes around $HERE) to --user-data-dir="$HERE"/PROFILE/spot/Brave-Browser)

Code: Select all

### fredx181, 2024-05-10 Add double quotes around all instances of $HERE
### so no problems when running from a path containing spaces
if  grep -q 'Quirky April64' /etc/DISTRO_SPECS
then
	LD_LIBRARY_PATH="$HERE"/:"$HERE"/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
	run-as-spot "$HERE/brave/brave" --user-data-dir="$HERE"/PROFILE/spot/Brave-Browser --disk-cache-size=5000000 --media-cache-size=5000000 --allow-outdated-plugins "$@"
else
	run-as-spot "$HERE/brave/brave" --user-data-dir="$HERE"/PROFILE/spot/Brave-Browser --disk-cache-size=5000000 --media-cache-size=5000000 --allow-outdated-plugins --test-type "$@"
fi
geo_c
Posts: 2507
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1802 times
Been thanked: 708 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by geo_c »

fredx181 wrote: Fri May 10, 2024 3:14 pm

The trick to support path with spaces is to add double quotes around all instances of $HERE (in this case $HERE is where the LAUNCH script is located)

This bit of information is HUGELY helpful to a big scripting project I'm currently working on!

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5730
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2004 times
Been thanked: 2103 times
Contact:

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by rockedge »

@fredx181 That's a really cool observation....very useful :ugeek: :thumbup2:

geo_c
Posts: 2507
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1802 times
Been thanked: 708 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by geo_c »

fredx181 wrote: Fri May 10, 2024 3:14 pm

The trick to support path with spaces is to add double quotes around all instances of $HERE (in this case $HERE is where the LAUNCH script is located)

And does this work for $variables in general? like one created by a read -p input?

EDIT: YES IT DOES!

geo_c
Old School Hipster, and Such

Governor
Posts: 472
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 11 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by Governor »

fredx181 wrote: Fri May 10, 2024 3:14 pm

@Governor
Ok, nice, finally solved !

I am not even going to ask about why spaces are sometimes allowed and sometimes not allowed.

Will try to explain anyway (no rocket science :) )
The trick to support path with spaces is to add double quotes around all instances of $HERE (in this case $HERE is where the LAUNCH script is located)
If the last block of the LAUNCH script would be as below code, then a path with spaces will be supported.
(changed e.g. --user-data-dir=$HERE/PROFILE/spot/Brave-Browser (originally without quotes around $HERE) to --user-data-dir="$HERE"/PROFILE/spot/Brave-Browser)

Code: Select all

### fredx181, 2024-05-10 Add double quotes around all instances of $HERE
### so no problems when running from a path containing spaces
if  grep -q 'Quirky April64' /etc/DISTRO_SPECS
then
	LD_LIBRARY_PATH="$HERE"/:"$HERE"/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
	run-as-spot "$HERE/brave/brave" --user-data-dir="$HERE"/PROFILE/spot/Brave-Browser --disk-cache-size=5000000 --media-cache-size=5000000 --allow-outdated-plugins "$@"
else
	run-as-spot "$HERE/brave/brave" --user-data-dir="$HERE"/PROFILE/spot/Brave-Browser --disk-cache-size=5000000 --media-cache-size=5000000 --allow-outdated-plugins --test-type "$@"
fi

Ok, I get that. It is very similar to Windows.
Thanks.

I still think it odd that with the broken folder name (unquoted with encapsulated space), my previous Brave browser settings and bookmarks showed up, even though the profile folder was empty.

Last edited by mikewalsh on Fri May 10, 2024 7:02 pm, edited 1 time in total.
Reason: Edited to remove extra "quote" tags. No need to "quote" yourself..!

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

User avatar
mikewalsh
Moderator
Posts: 5600
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 575 times
Been thanked: 1693 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by mikewalsh »

@geo_c :-

I think you can also use 'round' brackets - not 'square' or 'curly' - like the following example. It's part of a script from my CamRecord 'portable'.....where it sets up variables for the final 'exec' line, calling these from wee text files saved within the app itself:-

Code: Select all

HERE="$(dirname "$(readlink -f "$0")")"
AUDIO=$(cat $HERE/SOURCES/CONFIG/audio.txt)
VIDEO=$(cat $HERE/SOURCES/CONFIG/cam.txt)
FRAME=$(cat $HERE/SOURCES/CONFIG/frame.txt)
RESOLUTION=$(cat $HERE/SOURCES/CONFIG/res.txt)

I think that's right in THIS context....?

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
fredx181
Posts: 2597
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 283 times
Been thanked: 1012 times
Contact:

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by fredx181 »

mikewalsh wrote: Fri May 10, 2024 6:57 pm

Code: Select all

HERE="$(dirname "$(readlink -f "$0")")"
AUDIO=$(cat $HERE/SOURCES/CONFIG/audio.txt)
...

If there are one or more space(s) in the $HERE path, cat cannot find audio.txt, so should be with quotes around $HERE e.g. AUDIO=$(cat "$HERE"/SOURCES/CONFIG/audio.txt)

User avatar
fredx181
Posts: 2597
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 283 times
Been thanked: 1012 times
Contact:

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by fredx181 »

Governor wrote:

I still think it odd that with the broken folder name (unquoted with encapsulated space), my previous Brave browser settings and bookmarks showed up, even though the profile folder was empty

Could be in /root/.config/BraveSoftware/ (default) , as brave couldn't successfully use the PROFILE folder (because of the space in path) , it creates (and reads from) the default location.

Governor
Posts: 472
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 113 times
Been thanked: 11 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by Governor »

fredx181 wrote: Sun May 12, 2024 9:29 am
Governor wrote:

I still think it odd that with the broken folder name (unquoted with encapsulated space), my previous Brave browser settings and bookmarks showed up, even though the profile folder was empty

Could be in /root/.config/BraveSoftware/ (default) , as brave couldn't successfully use the PROFILE folder (because of the space in path) , it creates (and reads from) the default location.

Thanks. I figured it had to be somewhere.
I rebooted since then, and the space in path problem is fixed, and /root/.config/BraveSoftware/ is not there now.

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

User avatar
mikewalsh
Moderator
Posts: 5600
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 575 times
Been thanked: 1693 times

Re: Brave 'portable' - 64-bit only - now includes manual updater from Fred...

Post by mikewalsh »

fredx181 wrote: Sat May 11, 2024 12:19 pm
mikewalsh wrote: Fri May 10, 2024 6:57 pm

Code: Select all

HERE="$(dirname "$(readlink -f "$0")")"
AUDIO=$(cat $HERE/SOURCES/CONFIG/audio.txt)
...

If there are one or more space(s) in the $HERE path, cat cannot find audio.txt, so should be with quotes around $HERE e.g. AUDIO=$(cat "$HERE"/SOURCES/CONFIG/audio.txt)

Oh, I agree Fred....absolutely. I learnt that lesson years ago, and never put spaces into anything that I build myself. If I want to separate things, I always use an underscore these days ( _ ) or a dash ( - ).

About the only time I need to use quotes round anything is in the launcher scripts for my Windows apps running under WINE.....because it insists on mirroring the Windows layout - I guess it HAS to! - vis-a-vis, "Program Files" (with a space in between).

It's good advice, and worth learning. Even for the average Puppian who simply uses their system, and never does anything like compiling or packaging.....because there ARE the odd few Linux apps that pull the same stunt. (Master PDF Editor comes to mind; one of the config directories is named "Code Industry"...)

(*shrug...*)

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

Post Reply

Return to “Browsers and Internet”