I concur. I proposed a fix for it.
I have the Chromium beta channel snap installed. Am I safe to install the chromium-browser apt package to get the fix for missing x-www-browser and gnome-www-browser?
It is impossible create shortcuts for webapps with Chromium Snap, one of the best features of this Chormeâs web browsers.
there is a workaround described in:
⊠also ⊠better file a launchpad bug (if there isnt one already)
Yes, the chromium-browser apt package wonât alter the chromium snap installation if itâs already installed.
There is one: bug #1732482.
Thanks! i find the bug report as @oSoMoN post. But the bug refer only to desktop icon, it does not create the menu icon too. The normal beheavior is create a menu icon in show apps too. I donât know if the two problems are related.
New fun discovery: jupyter-notebook doesnât work with snapified chromium.
$ sudo apt install jupyter-notebook
$ jupyter-notebook
[I 14:59:35.624 NotebookApp] Serving notebooks from local directory: /home/mg
[I 14:59:35.624 NotebookApp] The Jupyter Notebook is running at:
[I 14:59:35.624 NotebookApp] http://localhost:8888/?token=a4a2d5dfeaf5a426507e887f3909cf787b3426e51a7d2954
[I 14:59:35.624 NotebookApp] or http://127.0.0.1:8888/?token=a4a2d5dfeaf5a426507e887f3909cf787b3426e51a7d2954
[I 14:59:35.624 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:59:35.643 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/mg/.local/share/jupyter/runtime/nbserver-780941-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=a4a2d5dfeaf5a426507e887f3909cf787b3426e51a7d2954
or http://127.0.0.1:8888/?token=a4a2d5dfeaf5a426507e887f3909cf787b3426e51a7d2954
Gtk-Message: 14:59:36.204: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:59:36.205: Failed to load module "canberra-gtk-module"
[780975:780975:0525/145936.220624:ERROR:edid_parser.cc(102)] Too short EDID data: manufacturer id
Atidaroma esamoje narĆĄyklÄs sesijoje.
and then a Chromium window opens with
This is not a show-stopper because you can click on one of those localhost:8888 URLs and get it open, but it is a papercut.
(I wonder why they use a file in ~/.local/share instead of always opening the localhost URL?)
Found out why:
This avoids putting the authentication token into a command-line
argument to launch the browser, where itâs visible to other users.
This would work if jupyter didnât serve files from a âhiddenâ folder, e.g. ($HOME/jupyter
), using the home
interface.
I just switched from apt sources to the snap version of chromium. Bookmarks and profiles and some other previous data are there. However, history and saved passwords are not.
How do I get all my data to be used by the snap instance of chromium? I read in several places that the original profile will be âimportedâ from $HOME/.config/chromium
. But where to should this import go, where does the snap version have its profile folder(s)?
I already tried snap disconnect chromium:password-manager-service
mentioned above, with the result: No connections to disconnect
The chromium snap stores its profile in ~/snap/chromium/current/.config/chromium/
.
Try moving that directory out of the way, or deleting it entirely (with the not running), and run chromium again. Does this import your full profile?
Iâm not sure about history, but passwords are usually kept in the system keyring (gnome-keyring-daemon), so you should be able to access them if you re-connect chromium to password-manager-service.
Yes, thatâs the problems: itâs disconnected, and therefore canât see your saved passwords. The fix is to connect, not disconnect.
Thank you both, @oSoMoN and @mgedmin! A combination of both of your hints helped resolve the issue for me:
- I connected chromium to the password-manager-service
- I removed snapâs chromiumâs profile folder in
~/snap/chromium/current/.config/chromium/
- I copied my original chromium profile folder from
$HOME/.config/chromium
to~/snap/chromium/current/.config/chromium/
, essentially replacing it - Additionally, I had to remove the extra
Exec
parameter--password-store=basic
from my chromium.desktop file. I put that there yesterday as per another hint from this thread.
All of that together seemed to have done the trick, finally. I hope the old profile folder doesnât mess up chromium in the long-run.
Merely removing snapâs chromiumâs profile folder (instead of replacing/overwriting it as described above; otherwise having done all of the above) did not work for me, however. In this case, snapâs chromium would not import anything from the previously installed chromium version for me, not even profiles or bookmarks.
@oSoMoN: Thank you especially for mentioning the path ~/snap/chromium/current/.config/chromium/
! I had searched in ~/snap/chromium/current/
before, but it didnât occur to me to look for a hidden folder in there . I couldnât find this documented anywhere â and due to this forumâs weird lazy-loading, I didnât see yesterday that you had posted this in February already.
It took me some time to grok this too. Basically, each snapâs ~/snap/NAME/{revision, current} directory is your home directory for that snap version, with the file layout exactly the same as the ârealâ home directory.
Yes, that way you can call
sudo snap disconnect <snapname>:home
for any application that you do not trust and want to prevent to access your personal data. the app still has a home dir to use but can not access anything in the actual $HOME to steal documents
@oSoMoN In this weekâs Desktop Team Updates - Monday 6th July 2020 - #3 by oSoMoN, you noted
When that rolls out, will it get connected for existing chromium installs?
I am trying to run chromium (snap version - it is all that is available) on an LXD container in Ubuntu 18.04, but not using X display :0. However it always fails.
$ DISPLAY=:10 openbox --startup chromium
mkdir: cannot create directory '/run/user/1000': Permission denied
X11 connection rejected because of wrong authentication.
[22215:22215:0706/113629.960979:ERROR:browser_main_loop.cc(1473)] Unable to open X display.
The directory /run/user/1000
already exists and contains snapd-session-agent.socket
so I think that is not a problem.
All of these fail with the same error message:
$ DISPLAY=:10 chromium
$ chromium --display :10
$ chromium --display ':10'
$ chromium --display 10
These work fine:
DISPLAY=:10 openbox --startup xeyes
DISPLAY=:10 xeyes
and are displayed in a Xephyr
instance as intended.
Firefox also succeeds.
This ALSO succeeds in displaying a window in the Xephyr
instance:
$ DISPLAY=:10 openbox --startup chromium-browser
but it is just a dummy window, not a browser. I guess that is intentional.
it definitely is ⊠no snap can write directly to /run/user/$uid typically XDG_RUNTIME_DIR points to a confined snap specific dir for security reasons:
$ snap run --shell chromium -c /usr/bin/env|grep XDG_RUNTIME_DIR
XDG_RUNTIME_DIR=/run/user/1000/snap.chromium
EDIT: here are some wrappers i used quite a while ago to build a kiosk based Ubuntu Core system using chromium:
https://github.com/ogra1/dashkiosk-client-browser/blob/master/xwayland-dashkiosk-launch
perhaps that gets you some ideas to work around the issue âŠ
Thatâs a good question. According to the documentation, « Auto-connect indicates that the interface will be connected by default when the snap is first installed ». That seems to imply that the auto-connection wonât happen on update/refresh, only on first install.