Page 1 of 1

How can I open local files in my Chrome?

Posted: Thu Nov 21, 2024 2:17 am
by sosaezi

Hello. Happy puppying

I have set the Chrome as a start-up and my first page on Chrome was a local folder which is my tasks.
Last month, Chrome told me a update so I removed Chrome and installed a new one.

I am not sure that is a reason.

However, the local directory is not shown and it says "ERR_FILE_NOT_FOUND."
Not only directory but also local PDF, HTML and video clips is not working so far.
I moved files to SPOT directory but it did not work.

How do I open local files in the Chrome?


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 5:47 am
by bigpup

You are asking about Chrome browser?

What specific Puppy version you using?


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:10 am
by williwaw

try ctrl-o
hold down the control key and press the the letter o


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:17 am
by sosaezi
bigpup wrote: Thu Nov 21, 2024 5:47 am

You are asking about Chrome browser?

I want to open local files(PDF, HTML, Video Clips,etc)in Chrome.

What specific Puppy version you using?

bookworm64 is in use.


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:21 am
by sosaezi
williwaw wrote: Thu Nov 21, 2024 6:10 am

try ctrl-o
hold down the control key and press the the letter o

there is no reaction by CTRL+O :shock:


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:28 am
by williwaw

can you drag and drop from rox to an open tab?


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:34 am
by pp4mnklinux
sosaezi wrote: Thu Nov 21, 2024 2:17 am

Hello. Happy puppying

I have set the Chrome as a start-up and my first page on Chrome was a local folder which is my tasks.
Last month, Chrome told me a update so I removed Chrome and installed a new one.

I am not sure that is a reason.

However, the local directory is not shown and it says "ERR_FILE_NOT_FOUND."
Not only directory but also local PDF, HTML and video clips is not working so far.
I moved files to SPOT directory but it did not work.

How do I open local files in the Chrome?

Hello:

I am using 5 portable browsers (FireFox, Opera, Chome, Midori and Slimjet) and none of them gave me problems.

*** I don't know if this is correct but I think this issue you're experiencing is likely related to Chrome's sandboxing and file access restrictions when used on Linux systems like Puppy Linux or EasyOS so.... Why I never experienced this problem?

I think that is related with the way I started this programs, that is... THE "NO--SANDBOX" option, so it is possible the problem dissapears if you run your browser this way (although you can reduce security).

If you think this happens after updating Chrome, it could be due to the fact that modern chrome versions restrict access to local files for security reasons, particularly when running under a restricted user like spot in Puppy Linux so if you've reinstalled Chrome, it might have stricter default settings.

As I said, it is only my oppinion, so consider it this way :)

...


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 8:53 am
by amethyst

As someone already said: Ctrl+o. Hold down Ctrl and then o (the letter o not zero). BTW - if you are running in spot, local files in /mnt/home will not be accessible.


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 8:54 am
by greengeek

What happens if you enter the following into the url address bar and then press enter...?

file:///


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 10:48 am
by mikewalsh

@sosaezi :-

OK. You've already told us which version of Puppy (Bookwormpup64). Can you tell us the exact build? Is it 10.0.5? 10.0.6? 10.0.7? 10.0.8? They're all slightly different to each other, y'see.

Also, are you running a Chrome package built FOR Puppy.....or did you download the .deb package direct from the Chrome website, and install that? If you did the latter, you've messed things up already, since Chrome expects to find itself in a multi-user mainstream distro.....NOT a single-user 'hobbyist' distro. The permissions are all wrong.....which is why it's better for us to unzip/re-build packages to work with the unique way in which Puppy handles many things.

Chrome always expects to find itself running as a "restricted" user, so immediately, "running as root" in Puppy is a big NO-NO as far as Chrome is concerned. We usually run it as the restricted user "spot", although it is possible to run it AS root via a few tweaks in the wrapper script (at the cost of somewhat lower security, since this disables the sandboxing).

When you run Chrome, where are you accessing these 'local' files FROM? Where ARE these local files, exactly.....what's their location in the file system? What directory are your local files IN?

@greengeek is on the right track - file:/// is what I always use, because this way of doing it is foolproof, and not dependent on specific browser commands or shortcuts.....and can, moreover, be used in ANY browser.

Mike. ;)


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 2:09 pm
by fredx181

I think (from what I tested) a similar fix as here: viewtopic.php?p=136154#p136154 can be done to make file:///.... address work for chromium based browsers running as spot (on BookWormPup)
Open /usr/sbin/run-as-spot with text-editor and change on line 120 exec '"$SANDBOX"' '"$CMD"' to: dbus-launch '"$CMD"'
As this is without the $SANDBOX, it may be less secure then. not sure though (as chromium based browsers are already running with sandbox when running as spot).
edit: will also fix that the filechooser doesn't show e.g. when pressing ctrl+o on keyboard or for files to download.

edit2: posted also a link to this post in Proposal for run-as-spot change


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:51 pm
by sosaezi
williwaw wrote: Thu Nov 21, 2024 6:28 am

can you drag and drop from rox to an open tab?

It is also same as well


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:55 pm
by sosaezi
amethyst wrote: Thu Nov 21, 2024 8:53 am

As someone already said: Ctrl+o. Hold down Ctrl and then o (the letter o not zero). BTW - if you are running in spot, local files in /mnt/home will not be accessible.

CTRL+O does not have any reaction. Additionally, when I try to attach a file in website such as gmail.com, there is no reaction of button of upload.


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:56 pm
by sosaezi
greengeek wrote: Thu Nov 21, 2024 8:54 am

What happens if you enter the following into the url address bar and then press enter...?

file:///

It was in the address but not working


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 6:59 pm
by sosaezi
fredx181 wrote: Thu Nov 21, 2024 2:09 pm

I think (from what I tested) a similar fix as here: viewtopic.php?p=136154#p136154 can be done to make file:///.... address work for chromium based browsers running as spot (on BookWormPup)
Open /usr/sbin/run-as-spot with text-editor and change on line 120 exec '"$SANDBOX"' '"$CMD"' to: dbus-launch '"$CMD"'
As this is without the $SANDBOX, it may be less secure then. not sure though (as chromium based browsers are already running with sandbox when running as spot).
edit: will also fix that the filechooser doesn't show e.g. when pressing ctrl+o on keyboard or for files to download.

edit2: posted also a link to this post in Proposal for run-as-spot change

I opened the Chrome with "run-as-spot google -chrome" but there was no difference.


Re: How can Iopen local files in my Chrome?

Posted: Thu Nov 21, 2024 7:06 pm
by sosaezi
mikewalsh wrote: Thu Nov 21, 2024 10:48 am

@sosaezi :-

OK. You've already told us which version of Puppy (Bookwormpup64). Can you tell us the exact build? Is it 10.0.5? 10.0.6? 10.0.7? 10.0.8? They're all slightly different to each other, y'see.

Also, are you running a Chrome package built FOR Puppy.....or did you download the .deb package direct from the Chrome website, and install that? If you did the latter, you've messed things up already, since Chrome expects to find itself in a multi-user mainstream distro.....NOT a single-user 'hobbyist' distro. The permissions are all wrong.....which is why it's better for us to unzip/re-build packages to work with the unique way in which Puppy handles many things.

Chrome always expects to find itself running as a "restricted" user, so immediately, "running as root" in Puppy is a big NO-NO as far as Chrome is concerned. We usually run it as the restricted user "spot", although it is possible to run it AS root via a few tweaks in the wrapper script (at the cost of somewhat lower security, since this disables the sandboxing).

When you run Chrome, where are you accessing these 'local' files FROM? Where ARE these local files, exactly.....what's their location in the file system? What directory are your local files IN?

@greengeek is on the right track - file:/// is what I always use, because this way of doing it is foolproof, and not dependent on specific browser commands or shortcuts.....and can, moreover, be used in ANY browser.

Mike. ;)

My puppy setup said it is 10.0.7
I downloaded Debian file from Chrome website.

The local files were stored /root/my-document and /home/spot/download.
I don't think the location of the files make this problem because when I attach a file in Chrome the upload button is not working either.


Re: How can I open local files in my Chrome?

Posted: Thu Nov 21, 2024 8:21 pm
by williwaw
sosaezi wrote: Thu Nov 21, 2024 7:06 pm

My puppy setup said it is 10.0.7
I downloaded Debian file from Chrome website.

I have set the Chrome as a start-up and my first page on Chrome was a local folder which is my tasks.
Last month, Chrome told me a update so I removed Chrome and installed a new one.

I am not sure that is a reason.

if the original install worked well, and your reinstall of a later version does not, then to find out if thats the reason, you should try to duplicate your install of the first version and establish an install process to follow with the desired updated version.
Perhaps something changed with chrome where your install method worked the first time but not the second.

If chrome came preinstalled with bookworm, and you updated by reinstalling a download from the chrome website, then perhaps you should find a better way to do the updating. A topic asking how to update chrome in the bookworm section could be helpful to all bookworm users.
Try booting in ram (without the save file or folder) to see if the original chrome install still works.


Re: How can I open local files in my Chrome?

Posted: Fri Nov 22, 2024 3:23 am
by Clarity

Hello @sosaezi

The TITLE to this problem is misleading. Hope it gets corrected.

The Problem: An un-install of Chrome and a re-install of Chrome has led to a use problem.

I will NOT attempt to 'fix' your problem. YET I will give you a solution that if you follow it, you will never have a Chrome upgrade problem again.

There are 2 steps

  1. First from the prior post

  2. Last ... the Chrome management setup

  • First, I want to offer this so that you get to understand how this works by 1st drawing your attention to what forum member @williwaw suggest in the above post.

    Try booting in ram (without the save file or folder) to see if the original chrome install still works.

    Reboot a pristine environment: I show how I do a pristine boot of the BLWP64 ISO file to a BKWP64 desktop:

    BKWP64 Chrome.jpg
    BKWP64 Chrome.jpg (25.81 KiB) Viewed 1414 times
    BKWP64 Chrome(2).jpg
    BKWP64 Chrome(2).jpg (35.49 KiB) Viewed 1414 times
  • LAST, follow this forum page for adding Chrome to your BKWP64 desktop. ... for a trouble-free Chrome future.


Re: How can I open local files in my Chrome?

Posted: Fri Nov 22, 2024 4:57 am
by bigpup

when I attach a file in Chrome the upload button is not working either.

I would delete the install of Chrome and do a fresh new download and install.

If it has other features that are not working, that indicates it is not a good install.

But in Puppy Linux, you really need to use the browser software offered in this forum's Additional Software->Browsers and Internet section


Re: How can I open local files in my Chrome?

Posted: Fri Nov 22, 2024 5:26 am
by bigpup

In BookwormPup64 10.0.8

I used this program pet to install latest Chrome browser
viewtopic.php?t=6412
I used the one that is only if you prefer to run Chrome as root & do not sync
Download the pet.
Click on it to install.
Run from entry in the menu ->Internet ->Get latest Chrome version

When you run the program, it may seem to not be working, not much info on what it is doing.
When it is done downloading, it pops up a info window.

Running the Chrome browser it installed. Version 131.0.6778.85 (Official Build) (64-bit)
I have no problem accessing the file system locations in the browser.
.

Screenshot(7).jpg
Screenshot(7).jpg (47.45 KiB) Viewed 1386 times

Re: How can I open local files in my Chrome?

Posted: Fri Nov 22, 2024 8:03 am
by fredx181
bigpup wrote: Fri Nov 22, 2024 5:26 am

In BookwormPup64 10.0.8

I used this program pet to install latest Chrome browser
viewtopic.php?t=6412
I used the one that is only if you prefer to run Chrome as root & do not sync
....

So you run Chrome as root ? The file:/// problem may appear only when running Chrome as spot.
EDIT: nevermind, I see now it's running as root that way.

@sosaezi

My puppy setup said it is 10.0.7
I downloaded Debian file from Chrome website.

And what did you do exactly to make Chrome run after installing the .deb ? i.e. running as root (with --no-sandbox) or running as spot ?