loading...

Installing Snap On Chrome OS

eduardfaus profile image Eduard Faus ・1 min read

Prerequisites:

Chromebook with Linux(Beta) Installed

Before we start:

Snap in Chrome OS isn't perfect and some apps might not work well. Important in bonus it shows how to run apps with gui

Installation: (first open the terminal)

1. Making sure everything is up to date

sudo apt update && sudo apt upgrade

2. Install Snap And Neccesary Files

sudo apt install -y libsquashfuse0 squashfuse fuse snapd

3. Restart

Sometimes you need to restart your computer for everything
to work

4. Enjoy

You can now install snap apps such as vscode and atom.

Bonus:

How to install snap apps:

sudo snap install [name of app]

How to search snap apps:

snap search [name of app]

How to find list of commands :

snap

or

snap help

or

snap help all

Run App:

sudo snap run [name of app]

or

[name of app]

Enable Gui For Apps(redo everytime you restart your chromebook):

xhost +

Discussion

pic
Editor guide
Collapse
bradtaniguchi profile image
Brad

I'm not sure if developer mode is required for this.

On my Pixelbook I've been in the beta channel for about a year now without developer mode (to paranoid about the security implications) and have the Linux (Beta) feature available and was able to install/use snap apps.

Also, what does the xhost + command do exactly?

Collapse
eduardfaus profile image
Eduard Faus Author

Yea I got confused you don't need developer mode. Xhost+ gives the terminal access to the terminal because if not sometimes you would get the error Can't connect to display I researched and apparently xhost +si:localuser:root might be safer to use but I don't know. Also, I am now having issues with a lot of apps in snap sorry if the tutorial wasn't good its my first.

Collapse
bradtaniguchi profile image
Brad

No worries ^.^ I was reading your tutorial mainly because my experience running snap apps wasn't very good.

So far anything snap+GUI related ran really slow on my Pixelbook to the point I kinda gave up on the approach XD. Been looking for answers or advice on improving performance, or if its just something one has to live with due to all the extra virtualization layers.

Thread Thread
eduardfaus profile image
Eduard Faus Author

Have you enabled gpu acceleration

Thread Thread
bradtaniguchi profile image
Brad

I was keeping track of GPU acceleration support from the ChromeOS, and was using a flag for the longest time. Last I checked (several months ago?) The Pixelbook got GPU acceleration out of the box, at least for normal Linux apps. Since then VSCode runs pretty smooth, at least visually.

Is there another GPU flag/help for snap based apps? Or is there another GPU flag I could use to further improve the performance of the Linux/Snap apps?

(edited previous post to clarify only snap installed apps ran really poorly)

Thread Thread
eduardfaus profile image
Eduard Faus Author

I'm kind of new to the chrome os environment so I couldn't tell you. I do know about regular Linux and can tell you that snap app aren't the most efficient. That's why most people rather flatpack or other options. Also, why is your vscode installed with snap. I recommend installing it with the deb file. If you need help with that look at my other tut it's so simple.

Thread Thread
bradtaniguchi profile image
Brad

I have had VSCode installed via the .deb file and it fine :D. I have been playing around with snap installations for other applications, and have been seeing some issues when it comes to performance there tho

Thread Thread
eduardfaus profile image
Eduard Faus Author

Yea Snap in general isn't good for performance plus the virtualization and low specs. Try flatpack I think you might get better results if you want ill make a tutorial (I know you can search it up I'm just really bored).

Thread Thread
bradtaniguchi profile image
Brad

Thanks for the recommendation, I'll have to checkout that route and see where it goes :D

Thanks again!

Collapse
eduardfaus profile image
Eduard Faus Author

I just updated the tutorial so it doesn't say it requires developer mode.