Merge pull request 'OGBrowser integration' (#9) from browser into main

Reviewed-on: #9
pull/11/head 3.3.0
Natalia Serrano 2025-05-14 14:52:50 +02:00
commit 782a85d515
8 changed files with 230 additions and 85 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.3.0] - 2025-05-14
### Changed
- Add changes required for the new browser
## [3.2.1] - 2025-03-31
### Changed

View File

@ -1,4 +1,6 @@
LC_TYPE=es_ES@euro
LC_ALL=es_ES@euro
LANG=es_ES@euro
LANGUAGE=es_ES@euro
LC_TYPE=es_ES.UTF-8@euro
LC_ALL=es_ES.UTF-8@euro
LANG=es_ES.UTF-8@euro
LANGUAGE=es_ES.UTF-8@euro
XDG_RUNTIME_DIR=/run/user/0
QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox

View File

@ -38,6 +38,9 @@ mkdir -p ${DESTDIR}/var/log
mkdir -p ${DESTDIR}/opt/opengnsys;
mkdir -p ${DESTDIR}/ogboot;
mkdir -p ${DESTDIR}/boot;
mkdir -p ${DESTDIR}/run/user/0
chmod 700 ${DESTDIR}/run/user/0
# Insert basic binaries
copy_exec /bin/bash-static /bin/bash

View File

@ -15,6 +15,9 @@
#fbcon
# Kernel 3.7+ video.
virtio_gpu
vmwgfx
uvesafb
# Generales

View File

@ -1 +1 @@
OpenGnsys Client 3.2.1
OpenGnsys Client 3.3.0

View File

@ -310,8 +310,20 @@ ogPostConfigureFS()
#Montamos un directorio temporal para permitir instalacion de softare desde el comando apt-get (parametor kernel "ogtmpfs=50" valor en megas
ogtmpfs="${ogtmpfs:-15}"
mount tmpfs /var/cache/apt/archives -t tmpfs -o size=${ogtmpfs}M
#mount tmpfs /var/cache/apt/archives -t tmpfs -o size=${ogtmpfs}M
mkdir -p /var/cache/apt/archives/partial
mkdir -p /run/user/0
chmod 700 /run/user/0
# esto completa la inicializacion de udev y permite el inicio del escritorio grafico
/bin/udevadm trigger
# Memoria compartida -- necesario para browser
mkdir -p /dev/shm
mount tmpfs -t tmpfs /dev/shm
chmod 1777 /dev/shm
}

View File

@ -0,0 +1,116 @@
#!/bin/bash
# Compatibilidad con los argumentos usados con el browser original:
# browser -qws http://google.com
#
while getopts ":qwsDWX" opt ; do
case $opt in
q)
echo "Ignoring option: -q"
;;
w)
echo "Ignoring option: -w"
;;
s)
echo "Ignoring option: -s"
;;
D)
BROWSER_DEBUG=1
;;
W)
DISABLE_WAYLAND=1
;;
X)
DISABLE_X11=1
;;
esac
done
shift $(expr $OPTIND - 1 )
browser_args="$@"
echo "Browser args: $browser_args"
[ -n "$DISABLE_WAYLAND" ] && echo "WAYLAND DISABLED"
[ -n "$DISABLE_X11" ] && echo "X11 DISABLED"
if [ -n "BROWSER_DEBUG" ] ; then
echo "DEBUG MODE ENABLED"
echo "* Terminal available via Win+Enter"
echo "* Session may be killed with Ctrl+Alt+Backspace"
echo ""
fi
[ -x "/usr/bin/kitty" ] && wl_terminal=/usr/bin/kitty
[ -x "/usr/bin/foot" ] && wl_terminal=/usr/bin/foot
[ -x "/usr/bin/xterm" ] && x11_terminal=/usr/bin/kitty
[ -x "/usr/bin/i3-sensible-terminal" ] && x11_terminal=/usr/bin/i3-sensible-terminal
# The admin page is hosted remotely but executes things on localhost
QTWEBENGINE_CHROMIUM_FLAGS="--disable-web-security"
[ "$UID" -eq "0" ] && QTWEBENGINE_CHROMIUM_FLAGS="${QTWEBENGINE_CHROMIUM_FLAGS} --no-sandbox"
export QTWEBENGINE_CHROMIUM_FLAGS
rm -rf "/run/sway.started" "/run/x11.started"
mkdir -p $HOME/.config/sway
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\" || /usr/bin/browser -qws \"$browser_args\"" > $HOME/.config/sway/config
if [ -n "BROWSER_DEBUG" ] ; then
echo "bindsym Mod4+Return exec $wl_terminal" >> $HOME/.config/sway/config
echo "bindsym Control+Alt+Backspace exit" >> $HOME/.config/sway/config
fi
echo "exec touch /run/sway.started" >> $HOME/.config/sway/config
mkdir -p $HOME/.config/i3
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\" || /usr/bin/browser -qws \"$browser_args\"" > $HOME/.config/i3/config
if [ -n "BROWSER_DEBUG" ] ; then
echo "bindsym Mod4+Return exec i3-sensible-terminal" >> $HOME/.config/i3/config
echo "bindsym Control+Mod1+BackSpace exit" >> $HOME/.config/i3/config
fi
echo "exec touch /run/x11.started" >> $HOME/.config/i3/config
echo "exec /usr/bin/i3" > $HOME/.xinitrc
echo "exec /usr/bin/xterm" >> $HOME/.xinitrc
# Make sure libinput works
/usr/bin/udevadm trigger
if [ -x "/usr/bin/sway" -a -z "$DISABLE_WAYLAND" ] ; then
echo "*** Trying to launch Sway ***"
/usr/bin/sway
else
echo Sway not installed in this image, skipping.
fi
if [ ! -f "/run/sway.started" -a -z "$DISABLE_X11" ] ; then
if [ -x "/usr/bin/startx" ] ; then
echo "*** Trying to launch X11 ***"
/usr/bin/startx
else
echo X11 not installed in this image, skipping.
fi
else
echo "Sway was run before, not starting X11".
fi
if [ ! -f "/run/sway.started" -a ! -f "/run/x11.started" ] ; then
echo "Everything failed, dropping into a shell."
exec /usr/bin/bash
else
echo "All done."
fi

View File

@ -92,7 +92,7 @@ filesystem_local =
dmraid dmsetup lvm2 e2fsprogs
jfsutils reiserfsprogs reiser4progs xfsprogs mhddfs hfsplus hfsprogs hfsutils nilfs-tools vmfs-tools
btrfs-progs # ogLive a partir de Ubuntu 20.04
zfsutils-linux # ogLive a partir de Ubuntu 16.04
#zfsutils-linux # ogLive a partir de Ubuntu 16.04 -- desactivado temporalmente
android-tools-adb # ogLive a partir de Ubuntu 16.04
android-tools-fastboot # ogLive a partir de Ubuntu 16.04
f2fs-tools
@ -108,7 +108,7 @@ filesystem_remote =
#nfs-common # Provoca error de instalación en Ubuntu 15.04
#bittornado # ogLive anterior a Ubuntu 20.04
monitoring = htop ncdu bwbar bmon iftop ifstat dstat hdparm sdparm blktool testdisk
monitoring = htop ncdu bwbar bmon iftop ifstat dstat hdparm sdparm blktool testdisk kitty-terminfo
networking = netpipes curl wget tftp-hpa dnsutils
#trickle # ubuntu noble: has no installation candidate
@ -126,9 +126,12 @@ testing =
xwindows =
v86d # VESA Kernel 3.7+
icewm xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-video-all xinit i3
#xorg-dev xorg lxde #+300M
#roxterm gparted #+80M
#openbox midori #xvesa en compilacion
oggit = python3 python3-git python3-xattr python3-libarchive-c python3-pylibacl python3-pip opengnsys-libarchive-c python3-termcolor bsdextrautils opengnsys-pyblkid ntfs-3g-system-compression python3-tqdm
ogbrowser = sway libinput-tools hwdata ogbrowser
oggit = python3 python3-git python3-pyxattr python3-libarchive-c python3-pylibacl python3-pip opengnsys-libarchive-c python3-termcolor bsdextrautils opengnsys-pyblkid ntfs-3g-system-compression python3-tqdm