Peppermint OS

Support => Advanced Topics => Topic started by: zebedeeboss on December 21, 2017, 07:03:17 am

Title: Using Snap [Solved]
Post by: zebedeeboss on December 21, 2017, 07:03:17 am
OK
So I installed snapd
then I used
Code: [Select]
sudo snap install brave - no error's on output
Then...... nada.... nothing no Brave Browser
Rebooted - still nothing
So what did I do wrong ?
Regards Zeb
Title: Re: Snap
Post by: scifidude79 on December 21, 2017, 07:11:50 am
Did you try running "brave" in a terminal to see if it's at least installed?
Title: Re: Snap
Post by: zebedeeboss on December 21, 2017, 07:17:15 am
Hi scifidude79,

I did and nothing happened,

I just did it again and got
Code: [Select]
zebedee@i7-peppermint ~ $ brave
An uncaught exception occurred in the main process Uncaught Exception:
undefined: undefined
Waiting 60 seconds for process to load
[18944:18944:1221/151221.899501:ERROR:CONSOLE(52708)] "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", source: chrome://brave/snap/brave/12/usr/lib/brave/resources/app.asar/app/extensions/brave/gen/app.entry.js (52708)
[18944:18944:1221/151221.899533:ERROR:CONSOLE(52708)] "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", source: chrome://brave/snap/brave/12/usr/lib/brave/resources/app.asar/app/extensions/brave/gen/app.entry.js (52708)
Error retrieving promotion Error: HTTP response 404 for GET /v1/grants

but it started this time - how wierd

yet still nothing in the Menu

closed it down restarted it and you still get all that guff in a terminal window but the browser does start up and work.

Regards Zeb...
Title: Re: Snap [Solved - maybe]
Post by: PCNetSpec on December 21, 2017, 07:41:10 am
Try:
Code: [Select]
snap run braveand for some reason the snap isn't copying its .desktop launcher from
/snap/brave/current/usr/share/applications/brave.desktop
to
/usr/share/applications/brave.desktop
which would add it to the menu.



I'll need to look into whether this is a Peppermint issue or a snap issue.
Title: Re: Snap [Solved - maybe]
Post by: zebedeeboss on December 21, 2017, 07:46:06 am
Hi

OK so now we get

Code: [Select]
zebedee@i7-peppermint ~ $ snap run brave
An uncaught exception occurred in the main process Uncaught Exception:
undefined: undefined
Waiting 60 seconds for process to load
[4700:4700:1221/154249.143132:ERROR:CONSOLE(52708)] "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", source: chrome://brave/snap/brave/12/usr/lib/brave/resources/app.asar/app/extensions/brave/gen/app.entry.js (52708)
[4700:4700:1221/154249.143154:ERROR:CONSOLE(52708)] "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", source: chrome://brave/snap/brave/12/usr/lib/brave/resources/app.asar/app/extensions/brave/gen/app.entry.js (52708)
zebedee@i7-peppermint ~ $

and it still opens

This is just an experiment btw - I have no intention of keeping Brave browser or using snap as a method of installing software.  It just seems cumbersome and if (like the Brave snap) the snap is not built correctly it doesn't install in the menu correctly

Regards  Zeb...
Title: Re: Snap [Solved - maybe]
Post by: PCNetSpec on December 21, 2017, 07:52:12 am
I wouldn't worry about that output .. Brave installed as a .deb also gives that output when run in a terminal.
(that output is a brave issue not a Peppermint one .. you just don't 'see' it when run from a menu item)

I'd actually posted about it (and noticed it being mentioned by others) on their bug tracker when trying to get an answer why Brave doesn't respect the --app switch.
Title: Re: Using Snap [Solved]
Post by: anselm on March 12, 2018, 05:28:08 pm
Hi all,

Have the same problem, trying to install the new vlc and libreoffice with snap, installs fine can start from terminal but doesn't populate the menu.

Title: Re: Using Snap [Solved]
Post by: perknh on July 28, 2018, 07:33:41 am
The problem of Brave icons not showing in the menu through snaps still exists.  I had to install Brave manually through the terminal, using Brave's instructions (https://github.com/brave/browser-laptop/blob/master/docs/linuxInstall.md#debian-jessie-and-ubuntu-zesty-yakkety-xenial-and-trusty-amd64) for Ubuntu Trusty, in order to have Brave browser's icon in my menu.
Title: Re: Using Snap [Solved]
Post by: PCNetSpec on July 28, 2018, 07:42:01 am
Probably not a Peppermint problem then, as other snaps do .. so I can only assume it must be a brave snap packaging issue
Title: Re: Using Snap [Solved]
Post by: perknh on July 28, 2018, 07:55:05 am
Probably not a Peppermint problem then, as other snaps do .. so I can only assume it must be a brave snap packaging issue

I should note that snaps install for Brave does work in Ubuntu GNOME 18.04 -- meaning you can see the Brave icon there and that it works when you click upon it.  But that's GNOME.

PCNetSpec, I know very little about snaps.  My understanding is that snaps can take a Windows program and make it work in Linux.  All I know is that Brave suggests that Debian/Ubuntu users try installing through snaps.
Title: Re: Using Snap [Solved]
Post by: PCNetSpec on July 28, 2018, 09:48:24 am
My understanding is that snaps can take a Windows program and make it work in Linux.

Well that's not 'really' correct perknh .. it **can** be if they're pre-packaged and pre-configured with their own WINE, but they're not specifically for that.

All a snap (or flatpack) is, is a self contained package .. ie. one that comes with all its own dependencies operating out of a single container. So if you have 2 copies/versions of the same application, you'll likely have 2 sets of the same dependencies which is why they're considered wasteful (they'll also have their own themeing because they don't pick up the system theme).

Think of them as "EVERYTHING you need to run the application in a container" .. theoretically it means they should work on ANY distro, but it does lead to a LOT of duplication, and the inability to use system theming/dependencies/etc.

So if a Windows application can be made to run under WINE, the container could contain the app and a version of WINE preconfigured for the application .. all sounds good right ?, except if you have 4 Windows apps, you also have 4 copies of WINE, and if the author didn't do his job well it'll be a lot harder for you to tweak the configuration (say for your specific hardware).
Title: Re: Using Snap [Solved]
Post by: perknh on July 28, 2018, 10:26:25 am
So in the case of a snap install of Brave for Debian/Ubuntu, this is a program that is made to, theoretically at least, "snap" into any Debian/Ubuntu distribution.  It's created once, sorta speak, with the dependencies of all Debian/Ubuntu distributions in mind.  Same for Skype -- which is from where I originally got this Windows notion. The dupication aspect of snaps of which you are referring is that this process has be repeated time and time again for the peculiarities of all the various branches of Linux.   I hope I'm conceptualizing the reasoning behind this snap install feature correctly. :-\

PCNetSpec, thank you for your explanation of snap install.  Ubuntu claimed that using snap install is supposed to be a extremely safe way to install software -- that we are not to worry much about it. ;)

Title: Re: Using Snap [Solved]
Post by: PCNetSpec on July 28, 2018, 10:32:57 am
So in the case of a snap install of Brave for Debian/Ubuntu, this is a program that is made to, theoretically at least, "snap" into any Debian/Ubuntu distribution.  It's created once, sorta speak, with the dependencies of all Debian/Ubuntu distributions in mind.  Same for Skype -- which is from where I originally got this Windows notion. The dupication aspect of snaps of which you are referring is that this process has be repeated time and time again for the peculiarities of all the various branches of Linux.   I hope I'm conceptualizing this snap install feature correctly. :-\

PCNetSpec, thank you for your explanation of snap install.  Ubuntu claimed that using snap install is supposed to be a extremely safe way to install software -- that we are not to worry much about it. ;)

Yes perknh, except for this bit

with the dependencies of all Debian/Ubuntu distributions in mind

The dependencies would be the same for ANY distro .. the deps may have different names in say the Fedora repos, but a snap doesn't get them from the repos, they're INCLUDED in the snap .. so theoretically a snap/flatpak should work in ANY distro that has the snap/flatpak framework.

They're a bit like old DOS applications, which used to have EVERYTHING required to run the app included in the apps install directory .. it made them portable, but was VERY wasteful.
Title: Re: Using Snap [Solved]
Post by: perknh on July 28, 2018, 10:40:39 am
Yes perknh, except for this bit

with the dependencies of all Debian/Ubuntu distributions in mind

The dependencies would be the same for ANY distro .. the deps may have different names in say the Fedora repos, but a snap doesn't get them from the repos, they're INCLUDED in the snap .. so theoretically a snap/flatpak should work in ANY distro that has the snap/flatpak framework.

They're a bit like old DOS applications, which used to have EVERYTHING required to run the app included in the apps install directory .. it made them portable, but was VERY wasteful.

Wow -- that's expansive!  I would think the dependencies required for GNOME would be different than the dependencies required for KDE, or Xfce, or Solus.
Title: Re: Using Snap [Solved]
Post by: PCNetSpec on July 28, 2018, 11:28:29 am
Not really if the window manager is taken out of the equation by including it in the snap.

You'll likely notice most snap apps display with Gnome's client side window decorations .. even though we use xfwm4 ;)
(and is why the system default theming doesn't work with snaps)
Title: Re: Using Snap [Solved]
Post by: perknh on July 28, 2018, 01:34:14 pm
I wanted to take a look at a GNOME look in Peppermint by installing Skype by snap.

Then I got this message in the terminal:

Code: [Select]
perknh@peppermint ~ $ snap install skype
error: This revision of snap "skype" was published using classic confinement and thus
       may perform arbitrary system changes outside of the security sandbox that
       snaps are usually confined to, which may put your system at risk.

       If you understand and want to proceed repeat the command including --classic.

Hmm... :-\  This conflicts with:

Quote
Not only are snaps kept separate, their data is kept separate too. Snaps communicate with each other only in ways that you approve.

Source:  https://snapcraft.io/

To remain on the safe side of things, I've decided not to proceed. ;)
Title: Re: Using Snap [Solved]
Post by: PCNetSpec on July 28, 2018, 02:42:10 pm
https://docs.snapcraft.io/reference/confinement
Title: Re: Using Snap [Solved]
Post by: perknh on July 28, 2018, 03:08:48 pm
https://docs.snapcraft.io/reference/confinement

Got it! ;)

Quote
classic

A snap in classic confinement behaves as a traditionally packaged application, with full access to the system. As opposed to strict and devmode, what a classic snap sees as “/” is the host system’s “/” and not the core snap’s “/”. Snaps using this fully open security policy are manually reviewed in the Snap Store and are only allowed on systems where snapd is installed on top of a traditional Linux distribution, as opposed to system booting from an Ubuntu Core image. They can be released in all Snap Store channels.

I tried installing Skype by flagging it in jailmode, but the terminal didn't permit this.  And if you can't do that, I guess you shouldn't try double flagging a command with classic and jailmode at the same time either -- though I tried! ;D

Quote
The --jailmode flag can be passed to the snap install and snap try commands, to enforce strict confinement over any snap.

Thank you, PCNetSpec