Why do some appimages require "--no-sandbox" to run?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
koulaxizis
Posts: 4
Joined: Tue Mar 23, 2021 9:48 pm

Why do some appimages require "--no-sandbox" to run?

Post by koulaxizis »

Hello! Some Appimages on Puppy require a "--no-sandbox" attribution to run.

What does that mean for the app and how does it affect the user?

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

Re: Appimage no sandbox

Post by mikewalsh »

@koulaxizis :-

99 times out of 100, all it means - in real terms - is that they don't like Puppy's 'run-as-root' model.......and are expecting to run as a "normal" user in a mainstream, multi-user distro, complete with restricted privileges.

Usually, the AppImages that give this complaint are Electron-based - meaning built around a stripped-back Chromium browser - and the "--no-sandbox" switch is the way that the Chromium Project (a.k.a Big Brother Google) lets you run without the above-mentioned "user" restrictions.....naturally, it's all at your own risk, of course.

In real terms, it makes no noticeable difference, TBH.

Mike. ;)

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

Image

User avatar
Flash
Moderator
Posts: 932
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 48 times
Been thanked: 115 times

Re: Why do some appimages require "--no-sandbox" to run?

Post by Flash »

How does an app even know that it's running as root?

Chaos coordinator :?
User avatar
6502coder
Posts: 90
Joined: Mon Jul 13, 2020 6:21 pm
Location: Western US
Has thanked: 3 times
Been thanked: 22 times

Re: Why do some appimages require "--no-sandbox" to run?

Post by 6502coder »

It's easy for an app to check if the root user is running it. There are standard system calls in C like getuid() that will do this.

williams2
Posts: 1037
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 298 times

Re: Why do some appimages require "--no-sandbox" to run?

Post by williams2 »

And in a shell script:

Code: Select all

# echo $UID 
0
# su spot
$ echo $UID 
502
$ 
User avatar
mikeslr
Posts: 2859
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 174 times
Been thanked: 869 times

Re: Why do some appimages require "--no-sandbox" to run?

Post by mikeslr »

And from the foregoing you might have guessed that rather than including the argument "--no-sandbox", you can often/always? call the executable with the argument "run-as-spot"; although doing so may not always get you Spot's restriction of only being able to read-from/write to Spot's folder.

dancytron
Posts: 669
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 451 times
Been thanked: 194 times

Re: Why do some appimages require "--no-sandbox" to run?

Post by dancytron »

Electron apps run so well in Puppy/Dogs with those little adjustments.

We should have a sticky with the ways to run them.

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

Re: Why do some appimages require "--no-sandbox" to run?

Post by mikewalsh »

dancytron wrote: Sat Apr 03, 2021 10:31 pm

Electron apps run so well in Puppy/Dogs with those little adjustments.

We should have a sticky with the ways to run them.

^^^ Yeah; this I agree with. We should. Wouldn't be a bad idea at all..... :D

Mike. ;)

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

Image

User avatar
wiak
Posts: 3807
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 59 times
Been thanked: 1083 times
Contact:

Re: Why do some appimages require "--no-sandbox" to run?

Post by wiak »

mikeslr wrote: Sat Apr 03, 2021 9:58 pm

And from the foregoing you might have guessed that rather than including the argument "--no-sandbox", you can often/always? call the executable with the argument "run-as-spot";

although doing so may not always get you Spot's restriction of only being able to read-from/write to Spot's folder.

That last part is an important point. What I do in my own use on WDL_Arch64 (when not logging in as a normal user (which is now actually my usual practice for many reasons) is to modify the permissions on what is effectively my /mnt/home directory to be user: weedog; group: weedog. That's my major partition, so with that alteration, my normal user 'weedog' can read and write anything not only into /home/weedog (its home folder) but also into anything on /mnt/home. WDL_Arch64 is of course a full multiuser system so I can have as many different 'normal' users as I wish (and either give them similar rights or not, or put them into sudo group to simplify their use of root privileges anyway).

Nowadays, so many apps (and various daemons, such as pulseaudio) complain if you try to run them as root user, and who knows, 'maybe' one day Chromium-based distros (and other web-browsers) will no longer allow running under --no-sandbox option. Best to prepare for that since there may end up being no easy work-around anyway.

wiak

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

Post Reply

Return to “Beginners Help”