StretchDog

A home for all kinds of Puppy related projects
Message
Author
enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#261 Post by enrique »

fredx181
Getting closer.
*Have fglrx working on JessieDog, but hope to upgrade to at least StretchDog.
*Learn to create my own gcc-5 from sources to be use in the future in BusterDog.
*DDUP is a wonderful source for BusterDog compatible OLD kernels. Nice
*At the moment I am able to compile fglrx drivers, but drivers are not functioning properly.

They rely on Debian deprecated XFree86: XFree86-Mesa-libGL & XFree86-libs

Hopping to interchange some how with:

Code: Select all

libgl1-mesa-dev libgl1-mesa-dri mesa-utils libgl1-mesa-glx
or

Code: Select all

 libxxf86vm-dev libxxf86vm1 x11proto-xf86vidmode-dev xserver-xorg-video-vesa
Fred
Can you tell me how to install xorgwizard on StretchDog? I need it to be able to recover from failing Xorg server will testing. As always Thanks ahead,

Will figure it out.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

about xorgwizard

#262 Post by mikeslr »

Hi enrique,

It goes without saying that Fred and many others may have more accurate advice. But before leaving this thread for some other on the forum, I thought that bringing to your attention mistfire's recent work might be helpful. http://www.murga-linux.com/puppy/viewto ... 39#1050639

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#263 Post by enrique »

mikeslr you are 100% correct. I am no neglecting any other good people advice. All help is very welcome.

It just happens that I new fredx181 and even my good friend rcrsn51 could have the answer I was looking for. And in fact I did found fredx181 answered long time ago:
Posted: Wed 11 Oct 2017, 05:56
http://murga-linux.com/puppy/viewtopic. ... 530#970530

That post have save me 1 or 2 week of continuously building old kernels for DebianDog stretch. Now instead I can reuse old kernels from Dpup-Stretch store in here

Code: Select all

https://archive.org/details/Puppy_Linux_Stretch
http://smokey01.com/radky/Woof/kernel-4.1.48-stretch/

mikeslr, that post you just gave me, I hope to save me a few days too. I need a way to recover after a failure from xorg. THANKS

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#264 Post by enrique »

fredx181
I do not regret going back to Stretch and also impress with your old Jessie. I did not new XFCE. But for my like, I just have to add PcManFm and Lxterminal and I am in business. And the threads have so much information. Wao. Good work.

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

Re: run Chromium as puppy

#265 Post by Ether »

dancytron wrote:
Ether wrote:.


Can anyone tell me how to run Chromium as puppy ?
puppy@live:~$ chromium
[10235:10235:0226/220615.555747:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/chromium/chrome-sandbox is owned by root and has mode 4755.


.
Below is the script for running Chrome with su and a commented out version for gsku (which probably needs to be installed).

You should be able to change the paths to point to your chromium and make it run.

I think part of the issue you are having is that you need to set the user profile and caches to be in a place owned by the right user.
#!/bin/sh

xhost +local:puppy

su puppy -c "/usr/bin/google-chrome-stable "$@" --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"

#gksu -u puppy "/usr/bin/google-chrome-stable --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"
I have Chromium, not Chrome. Does that make a difference?

I found the Chromium "launcher" in /usr/bin/chromium. I opened that up with Geany text editor and this is it:

Code: Select all

#!/bin/sh

# Chromium launcher

# Authors:
#  Fabien Tassin <fta@sofaraway.org>
# License: GPLv2 or later

APPNAME=chromium

GDB=/usr/bin/gdb
LIBDIR=/usr/lib/$APPNAME
BUILD_DIST="9.8"

usage () {
  echo "$APPNAME [-h|--help] [-g|--debug] [--temp-profile] [options] [URL]"
  echo
  echo "        -g or --debug              Start within $GDB"
  echo "        -h or --help               This help screen"
  echo "        --temp-profile             Start with a new and temporary profile"
  echo "        --enable-remote-extensions Allow extensions from remote sites"
  echo
  echo " Other supported options are:"
  MANWIDTH=80 man chromium | sed -e '1,/OPTIONS/d; /ENVIRONMENT/,$d'
  echo " See 'man chromium' for more details"
}

nosse2="\
The hardware on this system lacks support for the sse2 instruction set.
The upstream chromium project no longer supports this configuration.
For more information, please read and possibly provide input to their
bug tracking system at http://crbug.com/348761."

case `uname -m` in
    i386|i586|i686|x86_64)
        # Check whether this system supports sse2
        if ! grep -q sse2 /proc/cpuinfo; then
            xmessage "$nosse2"
            exit 1
        fi
        ;;
esac

# Source additional settings
for file in /etc/chromium.d/*; do
  test $file = /etc/chromium.d/README || expr $file : .*\.dpkg > /dev/null || . $file
done

# Use the /usr/bin helper script for generated launchers
if test -z "$CHROME_WRAPPER"; then
    export CHROME_WRAPPER="/usr/bin/$APPNAME"
fi

# Set the correct file name for the desktop file
export CHROME_DESKTOP="chromium.desktop"

# Set CHROME_VERSION_EXTRA text, which is displayed in the About dialog
DIST=`cat /etc/debian_version`
export CHROME_VERSION_EXTRA="built on Debian $BUILD_DIST, running on Debian $DIST"

want_debug=0
want_temp_profile=0
while [ $# -gt 0 ]; do
  case "$1" in
    -h | --help | -help )
      usage
      exit 0 ;;
    -g | --debug )
      want_debug=1
      shift ;;
    --temp-profile )
      want_temp_profile=1
      shift ;;
    --enable-remote-extensions )
      CHROMIUM_FLAGS="$CHROMIUM_FLAGS --enable-remote-extensions"
      shift ;;
    -- ) # Stop option prcessing
      shift
      break ;;
    * )
      break ;;
  esac
done

# Whitelist installed extensions that are specified via --load-extension
if [ -z "$(echo $CHROMIUM_FLAGS | grep \\-\\-enable-remote-extensions)" ]; then
  export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --disable-background-networking"
  export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --disable-extensions-except=$(echo $CHROMIUM_FLAGS | tr ' ' \\n | grep \\-\\-load-extension | cut -d= -f2 | tr \\n ,)"
fi

if [ $want_temp_profile -eq 1 ] ; then
  TEMP_PROFILE=`mktemp -d`
  CHROMIUM_FLAGS="$CHROMIUM_FLAGS --user-data-dir=$TEMP_PROFILE"
fi

if [ $want_debug -eq 1 ] ; then
  if [ ! -x $GDB ] ; then
    echo "Sorry, can't find usable $GDB. Please install it."
    exit 1
  fi
  tmpfile=`mktemp /tmp/chromiumargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; }
  trap " [ -f "$tmpfile" ] && /bin/rm -f -- "$tmpfile"" 0 1 2 3 13 15
  echo "set args $CHROMIUM_FLAGS --single-process ${1+"$@"}" > $tmpfile
  echo "# Env:"
  echo "#     LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
  echo "#                PATH=$PATH"
  echo "#            GTK_PATH=$GTK_PATH"
  echo "#      CHROMIUM_FLAGS=$CHROMIUM_FLAGS"
  echo "$GDB $LIBDIR/$APPNAME -x $tmpfile"
  $GDB "$LIBDIR/$APPNAME" -x $tmpfile
  if [ $want_temp_profile -eq 1 ] ; then
    rm -rf $TEMP_PROFILE
  fi
  exit $?
else
  if [ $want_temp_profile -eq 0 ] ; then
    exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@"
  else
    # we can't exec here as we need to clean-up the temporary profile
    $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@"
    rm -rf $TEMP_PROFILE
  fi
fi
Do I need to edit the above "Chromium launcher" ?

.

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#266 Post by Ether »

fredx181 wrote:
Ether wrote:I changed "root" to "puppy" in that line, rebooted, and got the attached error message, and things stopped at that point.
....
Can anyone tell me how to run Chromium as puppy ?

Quote:
puppy@live:~$ chromium
[10235:10235:0226/220615.555747:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/chromium/chrome-sandbox is owned by root and has mode 4755.
I've tried to reproduce both issues, but cannot, sorry, it looks like a permissions problem, is /home/puppy (and content) owned by puppy ?
(could be because of something you did (save backup or something else ?) if it's owned by root, change to puppy again (recursive), as root :
chown -R puppy:puppy /home/puppy
EDIT: and reinstalling chromium may help

Maybe best is to run chromium logged in as root like dancytron suggested, with su puppy

Fred
/home and /home/puppy see attachments

looks like they are owned by "root" ?. AFAIK, that's the way they were when I installed StretchDog32. or at least, I never made any conscious attempt to change it.

Will it suffice to change just /home/puppy ownership to puppy? Or would I need to also change /home ownership to Puppy ? If the latter, won't that potentially break other stuff in /home that I run as root?

Chromium won't run as root. Gives message that you have to use "--no-sandbox" to run as root, then tells you not to do that because it is unstable and not secure. That's why I'm trying to run it as puppy.


.
Attachments
home.png
(34.63 KiB) Downloaded 68 times
puppy.png
(34.25 KiB) Downloaded 68 times

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

Chromium root & puppy

#267 Post by Ether »

.

To summarize.

If I try to run Chromium as root, it refuses to load, and gives error message that the switch " --no-sandbox " must be used to run as root.

But if I run Chromium as root with " --no-sandbox " switch, Chromium gives warning that it is unstable and insecure.

So I go to a terminal and login as puppy. Then try to run Chromium, and get error message posted previously.



If I use "su puppy" I get the following error mss:
root@live:~# su puppy
puppy@live:/root$ chromium
[7625:7625:0301/153233.578854:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/chromium/chrome-sandbox is owned by root and has mode 4755.
.

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#268 Post by dancytron »

Have you tried adapting the 2 scripts I gave you. Each will work.

#!/bin/sh

xhost +local:puppy

su puppy -c "/usr/bin/google-chrome-stable "$@" --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"

#gksu -u puppy "/usr/bin/google-chrome-stable --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#269 Post by Ether »

dancytron wrote:Have you tried adapting the 2 scripts I gave you. Each will work.
Not yet. But I will. Thanks.

.

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#270 Post by Ether »

dancytron wrote:Have you tried adapting the 2 scripts I gave you. Each will work.
I've never created a Linux script.

I know how to cut&paste your script into a text editor, but is there a special way and recommended place (ie folder) to save it so it can be executed?


PS I used to be a highly proficient command line script guru back in the 70's writing DCL scripts for the department's DEC VAX/VMS computer. And I could do amazing things with DOS BAT files in the 80's. But I've never had the time or need to learn bash scripts. I guess the time has now come.

.

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#271 Post by Ether »

dancytron wrote:Have you tried adapting the 2 scripts I gave you. Each will work.

#!/bin/sh

xhost +local:puppy

su puppy -c "/usr/bin/google-chrome-stable "$@" --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"

#gksu -u puppy "/usr/bin/google-chrome-stable --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"
I created the following folders:
/home/puppy/chrome
/home/puppy/chrome/user
/home/puppy/chrome/cache

Then I edited the script in Geany as follows:

Code: Select all

xhost +local:puppy

su puppy -c "/usr/bin/chromium "$@" --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"
...then copy/pasted the edited text into a terminal.

Here's the result :

root@live:~# xhost +local:puppy
non-network local connections being added to access control list
root@live:~#
root@live:~# su puppy -c "/usr/bin/chromium "$@" --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"
[31748:31748:0301/173746.512499:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/chromium/chrome-sandbox is owned by root and has mode 4755.

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#272 Post by dancytron »

Delete the folders and let chromium create them when you run it.


Just a guess, but I think the issue is that the folders do not have the correct ownership if you create them from the root user.

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#273 Post by Ether »

dancytron wrote:Delete the folders and let chromium create them when you run it.


Just a guess, but I think the issue is that the folders do not have the correct ownership if you create them from the root user.
Deleted the 3 folders I manually created:

/home/puppy/chrome
/home/puppy/chrome/user
/home/puppy/chrome/cache

Copy/pasted this code into terminal:

Code: Select all

xhost +local:puppy

su puppy -c "/usr/bin/chromium "$@" --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"
Here is the result:
root@live:~# xhost +local:puppy
non-network local connections being added to access control list
root@live:~#
root@live:~# su puppy -c "/usr/bin/chromium "$@" --user-data-dir=/home/puppy/chrome/user --disk-cache-dir=/home/puppy/chrome/cache --disk-cache-size=10000000 --media-cache-size=10000000"
[18755:18755:0301/182042.568044:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/chromium/chrome-sandbox is owned by root and has mode 4755.

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#274 Post by dancytron »

I just installed chromium and it worked for me.

Sorry, I'm stumped.

It is something particular to your install.
Attachments
2020-03-01-175056_1280x1024_scrot.png
(176.23 KiB) Downloaded 215 times

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#275 Post by Ether »

.
The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/chromium/chrome-sandbox is owned by root and has mode 4755.
What is "mode 4755" and how do I check it ?

.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#276 Post by fredx181 »

Hi Ether,
Ether wrote:looks like they are owned by "root" ?. AFAIK, that's the way they were when I installed StretchDog32. or at least, I never made any conscious attempt to change it.

Permissions are totally wrong (from what I see on your screenshot), /home/puppy should be owned by puppy and read-only for group and others
So do in terminal (as root):

Code: Select all

chown -R puppy:puppy /home/puppy
(should only change /home/puppy, not /home)
And :

Code: Select all

chmod -R 755 /home/puppy
(will make read-write permission only puppy)
Quote:
The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/chromium/chrome-sandbox is owned by root and has mode 4755.


What is "mode 4755" and how do I check it ?
Open terminal in /usr/lib/chromium and type ls -l
root@live:/usr/lib/chromium# ls -l
totaal 195944
-rw-r--r-- 1 root root 885992 mrt 27 2019 chrome_100_percent.pak
-rw-r--r-- 1 root root 1216001 mrt 27 2019 chrome_200_percent.pak
-rwsr-xr-x 1 root root 13928 mrt 27 2019 chrome-sandbox
-rwxr-xr-x 1 root root 168104464 mrt 27 2019 chromium
Notice the difference between chrome-sandbox and chromium.
chrome-sandbox should have an "s" (-rwsr-xr-x)
If it doesn't, fix it by doing:

Code: Select all

chmod 4755 /usr/lib/chromium/chrome-sandbox
Now, the big question is: why did the permissions messed up???
Was it maybe because of a restored backup of savefolder or something else you did?

Anyway, even when the fixes above work, I strongly recommend to start fresh with save folder.
(you may run into other problems because of some other messed up permissions)
EDIT: You may want to check e.g. /root
If it has also write permissions for group and others, then definitely something has gone very wrong and you should start with fresh save.

Fred

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#277 Post by Ether »

.
fredx181 wrote:Hi Ether,... I strongly recommend to start fresh with save folder.
I will try that.

.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#278 Post by fredx181 »

Ether wrote:.
fredx181 wrote:Hi Ether,... I strongly recommend to start fresh with save folder.
I will try that.

.
Yeah, that's the best, please let us know how it goes and what may have caused the wrong permissions, so that others can learn from it.

Fred

Ether
Posts: 261
Joined: Wed 21 Aug 2013, 17:56

#279 Post by Ether »

fredx181 wrote:please let us know how it goes and what may have caused the wrong permissions, so that others can learn from it.
Fred
Here's what I've done so far.

- checked the hash of 01-filesystem.squashfs to make sure it hasn't been modified. It hasn't

- renamed the "changes" folder (while booted to a different distro) so it can't load

- booted Stretch32. Now the following works properly:
  • exit X
    terminal prompt is root@live:~#
    if I type "exit" it goes back to the root GUI (as I suppose it should; it wasn't doing that before)
    if I type "login puppy" and the puppy password, it goes to the puppy GUI (that wasn't working before either)
Now I'm ready to download and install Chromium. But a thought occurred to me: am I supposed to do this when I'm logged in as root, or as puppy?? Last time I did as as root. Could that be the problem ?


.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#280 Post by rockedge »

yes that might be the problem with Chromium. might start better not as root

Post Reply