How can I start google-chrome-stable without using the LAUNCH script?

Moderators: 666philb, Forum moderators

Post Reply
boof
Posts: 518
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 6 times

How can I start google-chrome-stable without using the LAUNCH script?

Post by boof »

it's not there. and i 've tried the scripts, but it won't start, not even from menu>googlechrome-stable it also has no update file. I used the RPM version.

edit 1 this is google-chrome, from the DEB file, which needs user spot replacing with user root.because i have another save file for finn, who must not access chrome at any time. if i could put chrome into the root-user save file only, that would fix some of it. can i run chrome without this file, if all it does is force user to be spot?

edit 2
i deleted google-chrome file [below], and re-installed the deb files. i changed the permissins on all files under/opt to 777. still nothing. i can't work out how the below deb file works, so editing it on speculaton seems dangerous. I'll rest now, and hope for some help overnight.

#!/bin/sh
APP=/opt/google/chrome/google-chrome.bin
#script to run $APP as spot...
ARGS=""
[ "$1" ] && while [ "$1" ]; do ARGS="$ARGS \"$1\""; shift; done
if [ $(id -u) -eq 0 ]; then
[ $XAUTHORITY ] && cp $XAUTHORITY /root/spot/.Xauthority 2>/dev/null
touch /root/spot/.Xauthority
#following line is mostly there to catch any root:root files that may have got copied in...
find /root/spot \( -not -user spot -or -not -group spot \) -exec chown -h spot:spot {} \; &
XAUTHORITY=/root/spot/.Xauthority
export XDG_CONFIG_HOME=/root/spot/.config
export XDG_CACHE_HOME=/root/spot/.cache
export XDG_DATA_HOME=/root/spot/.local/share
exec su spot -s /bin/sh -c "\"$APP\" $ARGS" #seems an error here, the <"\" seems troublesome?
else #precaution
exec "$APP" "$ARGS"
fi

running this file in terminal gives

root# /opt/google/chrome/google-chrome
[18211:18211:1019/063138.654982:ERROR:filesystem_posix.cc(63)] mkdir : No such file or directory (2)
chrome_crashpad_handler: --database is required
Try 'chrome_crashpad_handler --help' for more information.
[18211:18240:1019/063138.781422:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[18211:18240:1019/063138.781451:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[18211:18240:1019/063138.781462:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server
###############################################

pls gnore below, it's from the RPM file, which i'm not using.
#{
see code of google-chrome below, does it need an edit, pls?

#!/bin/bash #! /bin.sh change here.
#
# Copyright 2011 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Let the wrapped binary know that it has been run through the wrapper.
export CHROME_WRAPPER="`readlink -f "$0"`"

HERE="`dirname "$CHROME_WRAPPER"`"

# We include some xdg utilities next to the binary, and we want to prefer them
# over the system versions when we know the system versions are very old. We
# detect whether the system xdg utilities are sufficiently new to be likely to
# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
# so that the system xdg utilities (including any distro patches) will be used.
if ! command -v xdg-settings &> /dev/null; then
# Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
export PATH="$HERE:$PATH"
else
# Use system xdg utilities. But first create mimeapps.list if it doesn't
# exist; some systems have bugs in xdg-mime that make it fail without it.
xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
mkdir -p "$xdg_app_dir"
[ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
fi

# Always use our versions of ffmpeg libs.
# This also makes RPMs find the compatibly-named library symlinks.
if [[ -n "$LD_LIBRARY_PATH" ]]; then
LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
else
LD_LIBRARY_PATH="$HERE:$HERE/lib"
fi
export LD_LIBRARY_PATH

export CHROME_VERSION_EXTRA="stable"

# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME

# Sanitize std{in,out,err} because they'll be shared with untrusted child
# processes (http://crbug.com/376567).
exec < /dev/null
exec > >(exec cat)
exec 2> >(exec cat >&2)

# Note: exec -a below is a bashism.
exec -a "$0" "$HERE/chrome" "$@"}

Last edited by boof on Wed Oct 18, 2023 11:34 pm, edited 2 times in total.
boof
Posts: 518
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 6 times

Re: How can I start google-chrome-stable without using the LAUNCH script?

Post by boof »

HOWS THIS LOOK?

#!/bin/sh
APP=/opt/google/chrome/google-chrome.bin
#script to run $APP as root...
# ARGS=""
# [ "$1" ] && while [ "$1" ]; do ARGS="$ARGS \"$1\""; shift; done
# if [ $(id -u) -eq 0 ]; then
# [ $XAUTHORITY ] && cp $XAUTHORITY /root/spot/.Xauthority 2>/dev/null
# touch /root/spot/.Xauthority
# following line is mostly there to catch any root:root files that may have got copied in...
# find /root/spot \( -not -user spot -or -not -group spot \) -exec chown -h spot:spot {} \; &
export XAUTHORITY=/root/root/. [root pw]
export XDG_CONFIG_HOME=/root/root/.config
export XDG_CACHE_HOME=/root/root/.cache
export XDG_DATA_HOME=/root/root/.local/share
#exec -s /bin/sh -c "\"$APP\" $ARGS"
#else #precaution
exec "$APP" # "$ARGS
##fi

User avatar
Phoenix
Posts: 339
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: How can I start google-chrome-stable without using the LAUNCH script?

Post by Phoenix »

You can run chrome with root, but are you sure of the ramifications that this carry?

IRC: firepup | Time to hack Puppy!

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

Re: How can I start google-chrome-stable without using the LAUNCH script?

Post by mikewalsh »

@boof :-

Boof, Boof, Boof.....what ARE we going to do with you?

You can't just cut'n'paste & "splice" odd bits and pieces of different files together.....especially when you obviously don't know what you're doing.

What are you trying to do here? Can we have a simple 'blow-by-blow' account of just what it IS you're trying to achieve, and why it is that you're trying to do things in the way you are? And what's all this about

...finn, who must not access chrome at any time...

.....huh? 'Scuse me.....what?? Where did you dig THAT sage piece of advice up from (because you've doubtless taken it out of context)..?

From what I can understand, you want to run Chrome as user 'root'....yes? You ARE aware that by doing this, you're losing everything that makes Chrome secure? There IS a reason Chrome runs as 'spot', and it's not just because someone decided off the top of their head one day that this would be the way it's going to be. WE have to run it as user 'spot' because Google decided that running it as 'just a user' was safer.....and 'spot' is Puppy's equivalent of being 'just a user'.

As Phoenix has said, yes; you CAN hack it to run-as-root.....but in so doing you're 'switching off' everything that makes Chrome secure by design.

And could you please clarify what you mean by no 'LAUNCH' script? You ARE aware that the 'LAUNCH' script is something peculiar to the 'portable' versions, yes? The 'standard' .deb & .rpm packages - as used by mainstream distros - employ a 'wrapper script' which does the same job as the 'LAUNCH' script (except the 'LAUNCH' script does a few other things to tailor the browser for Puppy use).

You're not making it very clear, y'know? The forum isn't simply a glorified help-desk, either.......and it wouldn't hurt to say "Thank you" just occasionally for help received (which I never see you do).

Help US to help YOU. That's the way things work here, mate. We're not mind-readers, and we're not very good with the old "crystal ball" either..... Nobody MINDS helping you, but please.....give us something to work WITH, hm?

Mike. Image

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

Image

boof
Posts: 518
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 6 times

Re: How can I start google-chrome-stable without using the LAUNCH script?

Post by boof »

i fixed it by re-downloading the rpm file, and let it run as user spot [or finn]. the LAUNCH file is obsolete now, i've set chrome as a default browser and use the browser icon. thx, and apologies for being so ungrateful. i'll do better in future. no, i am a 'blind user', knowing almost nothing about programming or linux. my OS understanding ended with MS-DOS 3.3 and is now largely forgotten. when things go wrong, i don't know what has happened, nor why, nor how to fix it, other than re-install, or some other crude method. i still have frequent dropouts from X, apparently from cashe-overflows from my much streaming, for which i have made an auto clearing, repeating 'tsr' script for chrome, but not ff. i will eventually upgrade my RAM size, after i figure out how to open my mini-desktop box. there's no screws left, but the cover won't move. perhaps it needs more muscle, but i can't do that, i'm too weak and afraid. i'm grateful to those developed linux/puppy to have a gui and work so well out of the box that blind users are possible, without great learning backgrounds. without that, i would still be using Windows, with all its costs and problems. again, thanks.

Post Reply

Return to “Fossapup64”