Nombre del autor:admin

Google Chrome paquete deb/rpm

Lista de releases

https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable

FUENTE

https://unix.stackexchange.com/questions/233185/install-older-versions-of-google-chrome-stable-on-ubuntu-14-10

Link generico

https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-${CHROME_VERSION}.x86_64.rpm

Links oficiales de Google de ejemplo

https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_111.0.5563.146-1_amd64.deb
https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_103.0.5060.53-1_amd64.deb
https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_116.0.5845.140-1_amd64.deb
https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_117.0.5938.92-1_amd64.deb
https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-103.0.5060.134-1.x86_64.rpm
https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-106.0.5249.103-1.x86_64.rpm
https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-111.0.5563.146-1.x86_64.rpm
https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-116.0.5845.140-1.x86_64.rpm
https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-117.0.5938.92-1.x86_64.rpm

Silenciado actualización

Parametro para silenciado

--simulate-outdated-no-au="Tue, 31 Dec 2099 23:59:59 GMT"
  • Se puede agregar en los accesos directos .desktop de /usr/share/applications/google-chrome.desktop en las 3 lineas ^Exec
  • O más fácil editando /opt/google/chrome/google-chrome en la última linea
exec -a "$0" "$HERE/chrome" --disable-popup-blocking --simulate-outdated-no-au="Tue, 31 Dec 2099 23:59:59 GMT" "$@"

Preparación de paquete silenciado para distribuir

DESCARGAMOS Y DECOMPILAMOS EL PAQUETE (DEB)

TARGET=google-chrome-stable-$(date +%Y%m%d)_amd64
wget -qO ${TARGET}.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -x ${TARGET}.deb ${TARGET}
dpkg -e ${TARGET}.deb ${TARGET}/DEBIAN

ACA AGREGAMOS LOS PARÁMETROS QUE SE NECESITEN

vi ${TARGET}/opt/google/chrome/google-chrome

NOS ASEGURAMOS QUE NO EXISTA UN REPOSITORIO Y LO COMPILAMOS

echo "if [ -f /etc/apt/sources.list.d/google-chrome.list ] ;
      then rm /etc/apt/sources.list.d/google-chrome.list; fi" >> ${TARGET}/DEBIAN/postinst
dpkg -b ${TARGET} ${TARGET}_silenciado_amd64.deb

DESCARGAMOS Y DECOMPILAMOS EL PAQUETE (RPM)

TARGET=google-chrome-stable_$(date +%Y%m%d)_x86_64
wget -qO ${TARGET}.rpm https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

Policies / Policy / Políticas

Sugerencias y lineamientos

  • Los JSON no soportan oficialmente comentarios, no agregar // ni # dentro de ellos. (a pesar que ande mejor prevenirlo)
  • Se arma dentro de dos llaves { }
  • Cada variable se coloca entre comillas dobles y luego dos puntos “VARIABLE”:
  • Los valores si son números o booleanas tipo true y false van sin nada al rededor.
  • Los valores alfanuméricos, como urls van entre comillas dobles “https://*.google.com/*”
  • Si existen varios valores por variable se debe envolver todo entre corchetes [] y deparar los campos con una coma.
    [ “https://*.google.com/*” ,”https://*.vicentech.com.ar/*” ]
  • Para ver que politicas toma el chrome del JSON
    chrome://policy
  • Donde deberíamos poner el JSON, puede llamarse diferente en algunos casos
    /etc/opt/chrome/policies/managed/policy-bbva.json

Políticas con sus explicaciones

Google Chrome paquete deb/rpm Read More »

Links básicos de instalación limpia

Libreoffice

Spotify

KVM Virt Manager – QEMU

OBS Studio

KeePassXC

RClone + Client_ID

RedShift (flux)

Syncthing

sudo apt install rdesktop x2goclient ssvnc bluedevil bluez bluez-tools blueman -y

echo ---------Installing chrome 
APT_CONFIG="`command -v apt-config 2> /dev/null`"
eval $("$APT_CONFIG" shell APT_TRUSTEDDIR 'Dir::Etc::trustedparts/d')
wget -qO - https://dl.google.com/linux/linux_signing_key.pub \
        | awk '/-----BEGIN PGP PUBLIC KEY BLOCK-----/ {inBlock++} inBlock == 1 {print} /-----END PGP PUBLIC KEY BLOCK-----/ && inBlock == 1 {exit}' \
        | gpg --dearmor >          ${APT_TRUSTEDDIR}google-chrome.gpg
        echo deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main    >          /etc/apt/sources.list.d/google-chrome.list
apt update && apt install google-chrome-stable -y

Links básicos de instalación limpia Read More »

Instalado de debian 12 (bookworm) con Chrome, LibreOffice y X2go

Making script backup ----------------------------------------
Installing dependencies for this script ---------------------
Unmounting /dev/vdb ----------------------------------------
Setting partition table to GPT (UEFI) -----------------------
Creating EFI partition --------------------------------------
Creating OS partition ---------------------------------------
Formating partitions ----------------------------------------
Mounting OS partition ---------------------------------------
Downloading x2go and Google Chrome keyrings -----------------
---------Creating Directories in /tmp/installing-rootfs
---------Installing x2go keyring here
---------Installing x2go keyring in /tmp/installing-rootfs
---------Installing chrome keyring here
---------Installing chrome keyring in /tmp/installing-rootfs
Creating configuration file for multistrap ------------------
Running multistrap ------------------------------------------
Configurating the network -----------------------------------
Mounting EFI partition --------------------------------------
Generating fstab --------------------------------------------
Getting ready for chroot ------------------------------------
Downloading Libreoffice -------------------------------------
Setting Keyboard maps for non graphical console -------------
Copying skel, defaults and crontab --------------------------
Fixing XFCE on X2Go by disabling compositing ----------------
Generating rc.local for simple start up scripts -------------
Entering chroot ---------------------------------------------
Setting up additional packages ------------------------------
Installing grub ---------------------------------------------
Adding local user -------------------------------------------
What username do you want?: jgalvez
New password:
Retype new password:
passwd: password updated successfully
Installing LibreOffice and its language pack ----------------
LibreOffice 24.8.2 installation done.
Listing relevant packages -----------------------------------
||/ Name Version Architecture Description
+++-==================================================-=========================================-============-=======================================
ii google-chrome-stable 130.0.6723.69-1 amd64 The web browser from Google
ii libobasis24.8-base 24.8.2.1-1 amd64 Base module for LibreOffice 24.8.2.1
ii libobasis24.8-calc 24.8.2.1-1 amd64 Calc module for LibreOffice 24.8.2.1
ii libobasis24.8-core 24.8.2.1-1 amd64 Core module for LibreOffice 24.8.2.1
ii libobasis24.8-draw 24.8.2.1-1 amd64 Draw module for LibreOffice 24.8.2.1
ii libobasis24.8-en-us 24.8.2.1-1 amd64 Language module for LibreOffice 24.8, language en_US.2.1
ii libobasis24.8-es 24.8.2.1-1 amd64 Language module for LibreOffice 24.8, language es.2.1
ii libobasis24.8-extension-beanshell-script-provider 24.8.2.1-1 amd64 Script provider for BeanShell extension for LibreOffice 24.8.2.1
ii libobasis24.8-extension-javascript-script-provider 24.8.2.1-1 amd64 Script provider for JavaScript extension for LibreOffice 24.8.2.1
ii libobasis24.8-extension-mediawiki-publisher 24.8.2.1-1 amd64 MediaWiki publisher extension for LibreOffice 24.8.2.1
ii libobasis24.8-extension-nlpsolver 24.8.2.1-1 amd64 NLPSolver extension for LibreOffice 24.8.2.1
ii libobasis24.8-extension-pdf-import 24.8.2.1-1 amd64 PDF import extension for LibreOffice 24.8.2.1
ii libobasis24.8-extension-report-builder 24.8.2.1-1 amd64 Report Builder extension for LibreOffice 24.8.2.1
ii libobasis24.8-firebird 24.8.2.1-1 amd64 Firebird module for LibreOffice 24.8.2.1
ii libobasis24.8-gnome-integration 24.8.2.1-1 amd64 GNOME integration module for LibreOffice 24.8.2.1
ii libobasis24.8-graphicfilter 24.8.2.1-1 amd64 Graphic filter module for LibreOffice 24.8.2.1
ii libobasis24.8-images 24.8.2.1-1 amd64 Images module for LibreOffice 24.8.2.1
ii libobasis24.8-impress 24.8.2.1-1 amd64 Impress module for LibreOffice 24.8.2.1
ii libobasis24.8-kde-integration 24.8.2.1-1 amd64 KDE integration module for LibreOffice 24.8.2.1
ii libobasis24.8-librelogo 24.8.2.1-1 amd64 LibreLogo toolbar for LibreOffice 24.8 Writer.2.1
ii libobasis24.8-libreofficekit-data 24.8.2.1-1 amd64 Libreofficekit data files for LibreOffice 24.8.2.1
ii libobasis24.8-math 24.8.2.1-1 amd64 Math module for LibreOffice 24.8.2.1
ii libobasis24.8-ogltrans 24.8.2.1-1 amd64 OpenGL slide transitions module for LibreOffice 24.8.2.1
ii libobasis24.8-onlineupdate 24.8.2.1-1 amd64 Online update module for LibreOffice 24.8.2.1
ii libobasis24.8-ooofonts 24.8.2.1-1 amd64 3rd party free fonts for LibreOffice 24.8.2.1
ii libobasis24.8-ooolinguistic 24.8.2.1-1 amd64 Linguistic module for LibreOffice 24.8.2.1
ii libobasis24.8-postgresql-sdbc 24.8.2.1-1 amd64 PostgreSQL Connector driver for LibreOffice 24.8.2.1
ii libobasis24.8-python-script-provider 24.8.2.1-1 amd64 Script provider for Python for LibreOffice 24.8.2.1
ii libobasis24.8-pyuno 24.8.2.1-1 amd64 Pyuno module for LibreOffice 24.8.2.1
ii libobasis24.8-writer 24.8.2.1-1 amd64 Writer module for LibreOffice 24.8.2.1
ii libobasis24.8-xsltfilter 24.8.2.1-1 amd64 XSLT filter samples module for LibreOffice 24.8.2.1
ii libreoffice24.8 24.8.2.1-1 amd64 Brand module for LibreOffice 24.8.2.1
ii libreoffice24.8-base 24.8.2.1-1 amd64 Base brand module for LibreOffice 24.8.2.1
ii libreoffice24.8-calc 24.8.2.1-1 amd64 Calc brand module for LibreOffice 24.8.2.1
ii libreoffice24.8-debian-menus 24.8.2-1 all LibreOffice 24.8 desktop integration
ii libreoffice24.8-dict-en 24.8.2.1-1 amd64 English dictionary for LibreOffice 24.8.2.1
ii libreoffice24.8-dict-es 24.8.2.1-1 amd64 Spanish dictionary for LibreOffice 24.8.2.1
ii libreoffice24.8-dict-fr 24.8.2.1-1 amd64 French dictionary for LibreOffice 24.8.2.1
ii libreoffice24.8-draw 24.8.2.1-1 amd64 Draw brand module for LibreOffice 24.8.2.1
ii libreoffice24.8-en-us 24.8.2.1-1 amd64 Brand language module for LibreOffice 24.8.2.1
ii libreoffice24.8-es 24.8.2.1-1 amd64 Brand language module for LibreOffice 24.8.2.1
ii libreoffice24.8-impress 24.8.2.1-1 amd64 Impress brand module for LibreOffice 24.8.2.1
ii libreoffice24.8-math 24.8.2.1-1 amd64 Math brand module for LibreOffice 24.8.2.1
ii libreoffice24.8-ure 24.8.2.1-1 amd64 UNO Runtime Environment.2.1
ii libreoffice24.8-writer 24.8.2.1-1 amd64 Writer brand module for LibreOffice 24.8.2.1
ii libx2go-config-perl 4.1.0.6-0x2go1+git20230818.1994+12.main.1 all Perl X2Go::Config package
ii libx2go-log-perl 4.1.0.6-0x2go1+git20230818.1994+12.main.1 all Perl X2Go::Log package
ii libx2go-server-db-perl 4.1.0.6-0x2go1+git20230818.1994+12.main.1 amd64 Perl X2Go::Server::DB package
ii libx2go-server-perl 4.1.0.6-0x2go1+git20230818.1994+12.main.1 all Perl X2Go::Server package
ii libx2go-utils-perl 4.1.0.6-0x2go1+git20230818.1994+12.main.1 all Perl X2Go::Utils package
ii x2go-keyring 2019.08.20+git20230921.118+12.main.1 all GnuPG keys of all X2Go developers and the X2Go archive
ii x2goserver 4.1.0.6-0x2go1+git20230818.1994+12.main.1 amd64 X2Go server
ii x2goserver-common 4.1.0.6-0x2go1+git20230818.1994+12.main.1 amd64 X2Go Server (common files)
ii x2goserver-x2goagent 4.1.0.6-0x2go1+git20230818.1994+12.main.1 amd64 X2Go Server's X2Go Agent Xserver
ii x2goserver-x2gokdrive 4.1.0.6-0x2go1+git20230818.1994+12.main.1 amd64 X2Go Server's X2Go KDrive Xserver
ii x2goserver-xsession 4.1.0.6-0x2go1+git20230818.1994+12.main.1 all X2Go Server (Xsession runner)
ii xserver-x2gokdrive 0.0.0.3-0x2go1+git20240314.283+12.main.1 amd64 KDrive graphical server backend for X2Go Server
Setting languaje --------------------------------------------

Current default time zone: 'America/Argentina/Buenos_Aires'
Local time is now: Sat Oct 26 01:21:52 -03 2024.
Universal Time is now: Sat Oct 26 04:21:52 UTC 2024.

Generating locales (this might take a while)...
es_AR.UTF-8... done
Generation complete.
Generating locales (this might take a while)...
es_AR.UTF-8... done
Generation complete.
LANG=C
LANGUAGE=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
Disabling ldm -----------------------------------------------
Unmounting /dev/vdb -----------------------------------------
END of the road!! keep up the good work ---------------------

real 3m14,820s
user 0m0,004s
sys 0m0,006s

#!/bin/bash
#https://hamishcoleman.github.io/talk-containers1/example2/
#VARIABLES
if [ -z $1 ] ; then
echo Usage: "time sudo $0 /dev/vdb"
exit
fi

set -e # Exit on error
cd /tmp
DEVICE=$1
CACHE_FOLDER=/var/cache/apt/archives
LOG=${CACHE_FOLDER}/multistrap.log
ERR=${CACHE_FOLDER}/multistrap.err
ROOTFS=/tmp/installing-rootfs
APT_CONFIG="`command -v apt-config 2> /dev/null`"
eval $("$APT_CONFIG" shell APT_TRUSTEDDIR 'Dir::Etc::trustedparts/d')

INCLUDES_DEB="apt linux-image-amd64 initramfs-tools zstd gnupg systemd \
xfce4 xfce4-goodies task-xfce-desktop xorg dbus-x11 \
task-web-server task-ssh-server task-laptop \
sudo vim wget curl \
network-manager iputils-ping util-linux iproute2 bind9-host isc-dhcp-client \
grub2-common grub-efi grub-efi-amd64 \
fonts-liberation libasound2 libnspr4 libnss3 libvulkan1 \
console-data console-setup locales \
libxslt1.1"
#Kernel, initrd, basics
#xfce, x11
#tools
#network
#boot
#chrome deps
#idioma e idioma terminal tty
#libreoffice

INCLUDES_X2GO="x2goserver x2goserver-xsession x2go-keyring"
REPOSITORY_DEB="http://deb.debian.org/debian/"
REPOSITORY_X2GO="http://packages.x2go.org/debian/"
REPOSITORY_CHROME="https://dl.google.com/linux/chrome/deb/"

DEBIAN_VERSION=bookworm

echo "Making script backup ----------------------------------------"
cp $0 $0.$(date +'%Y%m%d-%H%M')
chown $SUDO_USER: $0.*
if [ $(ls $0.$(date +'%Y%m%d')* | wc -l) == "1" ] ; then
echo ----First run of today, cleaning ${CACHE_FOLDER}
rm -rf ${CACHE_FOLDER}/*
fi

echo "Installing dependencies for this script ---------------------"
apt update >/dev/null 2>&1
apt install dosfstools parted btrfs-progs vim multistrap wget curl gnupg2 -y >/dev/null 2>&1

echo "Unmounting ${DEVICE} ----------------------------------------"
umount ${DEVICE}* 2>/dev/null || true
umount ${ROOTFS}/dev/pts 2>/dev/null || true
umount ${ROOTFS}/dev 2>/dev/null || true
umount ${ROOTFS}/proc 2>/dev/null || true
umount ${ROOTFS}/run 2>/dev/null || true
umount ${ROOTFS}/sys 2>/dev/null || true
umount ${ROOTFS}/tmp 2>/dev/null || true
umount ${ROOTFS}/boot/efi 2>/dev/null || true
umount ${ROOTFS}${CACHE_FOLDER} 2>/dev/null || true
umount ${ROOTFS} 2>/dev/null || true

echo "Setting partition table to GPT (UEFI) -----------------------"
parted ${DEVICE} --script mktable gpt > /dev/null 2>&1

echo "Creating EFI partition --------------------------------------"
parted ${DEVICE} --script mkpart EFI fat16 1MiB 10MiB > /dev/null 2>&1
parted ${DEVICE} --script set 1 msftdata on > /dev/null 2>&1

echo "Creating OS partition ---------------------------------------"
parted ${DEVICE} --script mkpart LINUX btrfs 10MiB 100% > /dev/null 2>&1
sleep 2

echo "Formating partitions ----------------------------------------"
mkfs.vfat -n EFI ${DEVICE}1 > /dev/null 2>&1
mkfs.btrfs -f -L LINUX ${DEVICE}2 > /dev/null 2>&1

echo "Mounting OS partition ---------------------------------------"
mkdir -p ${ROOTFS} > /dev/null 2>&1
mount ${DEVICE}2 ${ROOTFS} > /dev/null 2>&1
mkdir -p ${ROOTFS}${CACHE_FOLDER} > /dev/null 2>&1
mount --bind ${CACHE_FOLDER} ${ROOTFS}${CACHE_FOLDER}

echo "Downloading x2go and Google Chrome keyrings -----------------"
echo ---------Creating Directories in ${ROOTFS}
#mkdir -p ${ROOTFS}/usr/share/keyrings/
mkdir -p ${ROOTFS}/etc/apt/sources.list.d/
mkdir -p ${ROOTFS}${APT_TRUSTEDDIR}

#X2GO
echo ---------Installing x2go keyring here
set +e
gpg --keyserver keyserver.ubuntu.com --recv-keys E1F958385BFE2B6E > /dev/null 2>&1
set -e
gpg --export E1F958385BFE2B6E | tee /usr/share/keyrings/x2go-keyring.gpg > /usr/share/keyrings/x2go-keyring.gpg
echo deb [trusted=yes] https://packages.x2go.org/debian bookworm extras main > /etc/apt/sources.list.d/x2go.list

echo ---------Installing x2go keyring in ${ROOTFS}
set +e
gpg --keyserver keyserver.ubuntu.com --recv-keys E1F958385BFE2B6E > /dev/null 2>&1
set -e
gpg --export E1F958385BFE2B6E | tee /usr/share/keyrings/x2go-keyring.gpg > ${ROOTFS}${APT_TRUSTEDDIR}x2go-keyring.gpg
echo deb [trusted=yes] https://packages.x2go.org/debian bookworm extras main > ${ROOTFS}/etc/apt/sources.list.d/multistrap-x2go.list

#CHROME
echo ---------Installing chrome keyring here
wget -qO - https://dl.google.com/linux/linux_signing_key.pub \
| awk '/-----BEGIN PGP PUBLIC KEY BLOCK-----/ {inBlock++} inBlock == 2 {print} /-----END PGP PUBLIC KEY BLOCK-----/ && inBlock == 2 {exit}' \
| gpg --dearmor > ${APT_TRUSTEDDIR}google-chrome.gpg
echo deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main > /etc/apt/sources.list.d/google-chrome.list

echo ---------Installing chrome keyring in ${ROOTFS}
wget -qO - https://dl.google.com/linux/linux_signing_key.pub \
| awk '/-----BEGIN PGP PUBLIC KEY BLOCK-----/ {inBlock++} inBlock == 2 {print} /-----END PGP PUBLIC KEY BLOCK-----/ && inBlock == 2 {exit}' \
| gpg --dearmor > ${ROOTFS}${APT_TRUSTEDDIR}google-chrome.gpg
echo deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main > ${ROOTFS}/etc/apt/sources.list.d/multistrap-googlechrome.list

echo "Creating configuration file for multistrap ------------------"
echo "[General]
arch=amd64
directory=${ROOTFS}
cleanup=false
unpack=true
omitdebsrc=true
bootstrap=Debian X2Go GoogleChrome
aptsources=Debian X2go

[Debian]
packages=${INCLUDES_DEB}
source=${REPOSITORY_DEB}
keyring=debian-archive-keyring
suite=${DEBIAN_VERSION}
components=main contrib non-free non-free-firmware

[GoogleChrome]
arch=amd64
packages=google-chrome-stable
source=${REPOSITORY_CHROME}
suite=stable
noauth=true

[X2Go]
packages=${INCLUDES_X2GO}
source=${REPOSITORY_X2GO}
suite=${DEBIAN_VERSION}
#noauth=true
components=main" > multistrap.conf

echo "Running multistrap ------------------------------------------"
SILENCE="Warning: unrecognised value 'no' for Multi-Arch field in|multistrap-googlechrome.list"
multistrap -f multistrap.conf >$LOG 2> >(grep -vE "$SILENCE" > $ERR)
#FIXES
if [ -f ${ROOTFS}/etc/apt/sources.list.d/multistrap-googlechrome.list ] ; then
rm ${ROOTFS}/etc/apt/sources.list.d/multistrap-googlechrome.list
fi

echo "Configurating the network -----------------------------------"
cp /etc/resolv.conf ${ROOTFS}/etc/resolv.conf
mkdir -p ${ROOTFS}/etc/network/interfaces.d/ > /dev/null 2>&1
echo "allow-hotplug enp1s0" > ${ROOTFS}/etc/network/interfaces.d/enp1s0
echo "iface enp1s0 inet dhcp" >> ${ROOTFS}/etc/network/interfaces.d/enp1s0
echo "debian-$(date +'%Y-%m-%d')" > ${ROOTFS}/etc/hostname
echo "127.0.0.1 localhost" > ${ROOTFS}/etc/hosts
echo "127.0.1.1 debian-$(date +'%Y-%m-%d')" >> ${ROOTFS}/etc/hosts
echo "::1 localhost ip6-localhost ip6-loopback" >> ${ROOTFS}/etc/hosts
echo "ff02::1 ip6-allnodes" >> ${ROOTFS}/etc/hosts
echo "ff02::2 ip6-allrouters" >> ${ROOTFS}/etc/hosts
touch ${ROOTFS}/ImageDate.$(date +'%Y-%m-%d')

echo "Mounting EFI partition --------------------------------------"
mkdir -p ${ROOTFS}/boot/efi
mount ${DEVICE}1 ${ROOTFS}/boot/efi

echo "Generating fstab --------------------------------------------"
root_uuid="$(blkid | grep ^$DEVICE | grep ' LABEL="LINUX" ' | grep -o ' UUID="[^"]\+"' | sed -e 's/^ //' )"
efi_uuid="$(blkid | grep ^$DEVICE | grep ' LABEL="EFI" ' | grep -o ' UUID="[^"]\+"' | sed -e 's/^ //' )"
FILE=${ROOTFS}/etc/fstab
echo "$root_uuid / btrfs defaults 0 1" > $FILE
echo "$efi_uuid /boot/efi vfat defaults 0 1" >> $FILE


echo "Getting ready for chroot ------------------------------------"
mount --bind /dev ${ROOTFS}/dev
mount -t devpts /dev/pts ${ROOTFS}/dev/pts
mount --bind /proc ${ROOTFS}/proc
mount --bind /run ${ROOTFS}/run
mount -t sysfs sysfs ${ROOTFS}/sys
mount -t tmpfs tmpfs ${ROOTFS}/tmp

echo "Downloading Libreoffice -------------------------------------"
# Variables
LO_LANG=es # Idioma para la instalación
DOWNLOAD_DIR=${CACHE_FOLDER}/Libreoffice
LIBREOFFICE_URL="https://download.documentfoundation.org/libreoffice/stable/"
VERSION=$(wget -qO- $LIBREOFFICE_URL | grep -oP '[0-9]+(\.[0-9]+)+' | sort -V | tail -1)

mkdir -p $DOWNLOAD_DIR >/dev/null 2>&1
wget -qN ${LIBREOFFICE_URL}${VERSION}/deb/x86_64/LibreOffice_${VERSION}_Linux_x86-64_deb.tar.gz -P $DOWNLOAD_DIR
wget -qN ${LIBREOFFICE_URL}${VERSION}/deb/x86_64/LibreOffice_${VERSION}_Linux_x86-64_deb_langpack_$LO_LANG.tar.gz -P $DOWNLOAD_DIR
tar -xzf $DOWNLOAD_DIR/LibreOffice_${VERSION}_Linux_x86-64_deb.tar.gz -C $DOWNLOAD_DIR
tar -xzf $DOWNLOAD_DIR/LibreOffice_${VERSION}_Linux_x86-64_deb_langpack_$LO_LANG.tar.gz -C $DOWNLOAD_DIR

echo "Setting Keyboard maps for non graphical console -------------"
# FIX DEBIAN BUG
keyboard_maps=$(curl -s https://mirrors.edge.kernel.org/pub/linux/utils/kbd/ | grep tar.gz | cut -d'"' -f2 | tail -n1)
where_am_i=$PWD
wget -O $keyboard_maps https://mirrors.edge.kernel.org/pub/linux/utils/kbd/$keyboard_maps >>$LOG 2>>$ERR
cd /tmp
tar xzvf $where_am_i/$keyboard_maps >>$LOG 2>>$ERR
cd kbd-*/data/keymaps/
mkdir -p ${ROOTFS}/usr/share/keymaps/
cp -r * ${ROOTFS}/usr/share/keymaps/ >>$LOG 2>>$ERR

echo "Copying skel, defaults and crontab --------------------------"
cp -pR /etc/crontab /etc/skel ${ROOTFS}/etc/
cp -p /etc/default/keyboard /etc/default/locale /etc/default/console-setup ${ROOTFS}/etc/default/

echo "Fixing XFCE on X2Go by disabling compositing ----------------"
FILE=${ROOTFS}/etc/xdg/autostart/xcompose_disable.desktop
mkdir -p ${ROOTFS}/etc/xdg/autostart/
echo "[Desktop Entry]" >$FILE
echo "Type=Application" >>$FILE
echo "Name=XCompose Disable" >>$FILE
echo "Icon=preferences-desktop-screensaver" >>$FILE
echo "Exec=/usr/bin/xfconf-query -c xfwm4 -p /general/use_compositing -s false" >>$FILE
echo "OnlyShowIn=XFCE;" >>$FILE

echo "Disabling annoying X2Go features ----------------------------"
echo ---BYEBYE CONTROL ALT T
sed -i '/close_session/d' ${ROOTFS}/etc/x2go/keystrokes.cfg
echo ---BYEBYE upper right corner clic to minimize x2go AKA magicpixel
sed -i '/X2GO_NXAGENT_DEFAULT_OPTIONS/ s/"$/ -nomagicpixel"/' ${ROOTFS}/etc/x2go/x2goagent.options

echo "Generating rc.local for simple start up scripts -------------"
FILE=${ROOTFS}/etc/systemd/system/rc-local.service
echo [Unit] >$FILE
echo Description=/etc/rc.local Compatibility >>$FILE
echo ConditionPathExists=/etc/rc.local >>$FILE
echo [Service] >>$FILE
echo Type=forking >>$FILE
echo ExecStart=/etc/rc.local >>$FILE
echo TimeoutSec=0 >>$FILE
echo StandardOutput=tty >>$FILE
echo RemainAfterExit=yes >>$FILE
echo SysVStartPriority=99 >>$FILE
echo [Install] >>$FILE
echo WantedBy=multi-user.target >>$FILE
printf '%s\n' '#!/bin/bash' \
'mount -a' \
'exit 0' > ${ROOTFS}/etc/rc.local
chmod +x ${ROOTFS}/etc/rc.local


echo "Entering chroot ---------------------------------------------"
echo "#!/bin/bash
export DOWNLOAD_DIR=${DOWNLOAD_DIR}
export VERSION=${VERSION}
export LO_LANG=es # Idioma para la instalación
export LC_ALL=C LANGUAGE=C LANG=C
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true

PROC_NEEDS_UMOUNT=0
if [ ! -e /proc/uptime ]; then
mount proc -t proc /proc
PROC_NEEDS_UMOUNT=1
fi

echo Setting up additional packages ------------------------------
tasksel install ssh-server laptop web-server --new-install >>$LOG 2>/dev/null

#Installing Libreoffice and Google Chrome in backgroupd
dpkg -i \$(find \$DOWNLOAD_DIR/ -type f -name \*.deb) >>$LOG 2>&1 &
pid_LO=$!

echo Installing grub ---------------------------------------------
update-initramfs -c -k all >/dev/null 2>&1
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --no-nvram --removable >/dev/null 2>&1
update-grub >/dev/null 2>&1

echo Adding local user -------------------------------------------
read -p \"What username do you want?: \" username
useradd -d /home/\$username -c local_admin_user -G sudo -m -s /bin/bash \$username

passwd \$username
if [ \"\$?\" != \"0\" ] ; then echo Please repeat the password....; passwd \$username ; fi

echo Installing LibreOffice and its language pack ----------------
wait $pid_LO
apt install --fix-broken -y >>$LOG 2>&1
echo LibreOffice \$VERSION installation done.


echo Listing relevant packages -----------------------------------
dpkg -l | grep -v ^ii | grep -vE '^Des|^\| |^\|/'
dpkg -l | grep -iE 'x2go|google|libreoffice' | grep -vE '^Des|^\| |^\|/'


if [ \$PROC_NEEDS_UMOUNT -eq 1 ]; then
umount /proc
fi

echo Setting languaje --------------------------------------------
debconf-set-selections <<< \"tzdata tzdata/Areas select America\"
debconf-set-selections <<< \"tzdata tzdata/Zones/America select Argentina/Buenos_Aires\"
debconf-set-selections <<< \"console-data console-data/keymap/policy select Select keymap from full list\"
debconf-set-selections <<< \"console-data console-data/keymap/full select la-latin1\"
debconf-set-selections <<< \"console-data console-data/bootmap-md5sum string 102c60ee2ad4688765db01cfa2d2da21\"
debconf-set-selections <<< \"console-setup console-setup/charmap47 select UTF-8\"
debconf-set-selections <<< \"console-setup console-setup/codeset47 select Guess optimal character set\"
debconf-set-selections <<< \"console-setup console-setup/fontface47 select Fixed\"
debconf-set-selections <<< \"console-setup console-setup/fontsize-fb47 select 8x16\"
debconf-set-selections <<< \"console-setup console-setup/fontsize string 8x16\"
debconf-set-selections <<< \"console-setup console-setup/fontsize-text47 select 8x16\"
debconf-set-selections <<< \"keyboard-configuration keyboard-configuration/model select PC genérico 105 teclas\"
debconf-set-selections <<< \"keyboard-configuration keyboard-configuration/layout select Spanish (Latin American)\"
debconf-set-selections <<< \"keyboard-configuration keyboard-configuration/layoutcode string latam\"
debconf-set-selections <<< \"keyboard-configuration keyboard-configuration/variant select Spanish (Latin American)\"
debconf-set-selections <<< \"keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout\"
debconf-set-selections <<< \"keyboard-configuration keyboard-configuration/compose select No compose key\"
debconf-set-selections <<< \"locales locales/locales_to_be_generated multiselect es_AR.UTF-8 UTF-8\"

rm -f /etc/localtime /etc/timezone
DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -f noninteractive tzdata
DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -f noninteractive console-data
DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -f noninteractive console-setup
DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -f noninteractive keyboard-configuration
sed -i '/# es_AR.UTF-8 UTF-8/s/^# //g' /etc/locale.gen
locale-gen
DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -f noninteractive locales
update-locale LANG=es_AR.UTF-8
locale

echo Disabling ldm -----------------------------------------------
if [ -f /etc/systemd/system/display-manager.service ] ; then
rm /etc/systemd/system/display-manager.service
fi

exit" > ${ROOTFS}/root/chroot.sh
chmod +x ${ROOTFS}/root/chroot.sh
chroot ${ROOTFS} /bin/bash /root/chroot.sh

echo "Unmounting ${DEVICE} -----------------------------------------"
umount ${DEVICE}* 2>/dev/null || true
umount ${ROOTFS}/dev/pts 2>/dev/null || true
umount ${ROOTFS}/dev 2>/dev/null || true
umount ${ROOTFS}/proc 2>/dev/null || true
umount ${ROOTFS}/run 2>/dev/null || true
umount ${ROOTFS}/sys 2>/dev/null || true
umount ${ROOTFS}/tmp 2>/dev/null || true
umount ${ROOTFS}/boot/efi 2>/dev/null || true
umount ${ROOTFS}${CACHE_FOLDER} 2>/dev/null || true
umount ${ROOTFS} 2>/dev/null || true

echo "END of the road!! keep up the good work ---------------------"

Instalado de debian 12 (bookworm) con Chrome, LibreOffice y X2go Read More »

Recompilador / Backup de paquetes ya instalados – Debian/Ubuntu

#!/bin/bash

# Compruebo si se han proporcionado uno o más nombres de paquetes
if [ $# -lt 1 ]; then
echo "Uso: $0 <nombre del paquete1> [<nombre del paquete2> ...]"
exit 1
fi

# Itero sobre cada nombre de paquete proporcionado
for PACKAGE_NAME in "$@"; do

# Busco el bloque correspondiente al paquete en el archivo de estado
BLOCK=$(awk -v pkg="$PACKAGE_NAME" '
BEGIN { RS=""; FS="\n" }
$1 ~ "Package: " pkg { print; found=1 }
found && $1 ~ /^Package:/ { exit }
' /var/lib/dpkg/status)

# Compruebo si se encontró el bloque
if [ -z "$BLOCK" ]; then
echo "No se encontró información para el paquete: $PACKAGE_NAME"
continue
fi

# Extraigo la versión del bloque
VERSION=$(echo "$BLOCK" | grep -m 1 '^Version: ' | cut -d ' ' -f 2)

# Defino el nombre del archivo .deb y el directorio de salida
OUTPUT_DIR="./${PACKAGE_NAME}.${VERSION}"
DEB_FILE="${PACKAGE_NAME}.${VERSION}.deb"
echo --------------- $DEB_FILE

# Elimino el directorio de salida y el archivo .deb si existen
rm -rf "$OUTPUT_DIR" "$DEB_FILE" 2>/dev/null

# Creo el directorio con el formato <nombre del paquete>.<versión>
mkdir -p "$OUTPUT_DIR/DEBIAN"

# Guardo la información en un archivo control, eliminando la línea "Status: " y comentadas
echo "$BLOCK" | grep -vE '^Status: |^#Depends:|^#Pre-Depends:' > "$OUTPUT_DIR/DEBIAN/control"

# Incluyo archivos relacionados en el directorio DEBIAN, sin el nombre del paquete
find /var/lib/dpkg/info/ -name "$PACKAGE_NAME.*" ! -name "$PACKAGE_NAME.list" -exec sh -c '
for file; do
base=$(basename "$file")
new_name=$(echo $base | sed 's/${PACKAGE_NAME}\.//g') # Elimino el prefijo del nombre del paquete
cp "$file" "'"$OUTPUT_DIR"'/DEBIAN/$new_name"
done
' sh {} +

# Leo el archivo .list y copio los archivos indicados a la carpeta de salida
LIST_FILE="/var/lib/dpkg/info/$PACKAGE_NAME.list"
if [ -f "$LIST_FILE" ]; then
while read -r line; do
# Verifica si la línea contiene .git
if [[ "$line" == *".git"* ]]; then
continue # Salta al siguiente ciclo si contiene .git
fi
# Creo el directorio si no existe
mkdir -p "$OUTPUT_DIR$(dirname "$line")"
# Copio los archivos listados
cp --preserve=mode,timestamps "$line" "$OUTPUT_DIR$line" 2>&1 |grep -v "omitting directory" | cut -d \' -f3
done < "$LIST_FILE"
else
echo "No se encontró el archivo de lista para el paquete: $PACKAGE_NAME"
fi

# Genero el paquete .deb
dpkg -b "$OUTPUT_DIR" "$DEB_FILE" >/dev/null

done

Si queremos comparar dos versiones

diff google-chrome-stable.131.0.6778.69-1 google-chrome-stable.131.0.6778.204-1 -r -q

Files google-chrome-stable.131.0.6778.69-1/DEBIAN/control and google-chrome-stable.131.0.6778.204-1/DEBIAN/control differ
Files google-chrome-stable.131.0.6778.69-1/DEBIAN/md5sums and google-chrome-stable.131.0.6778.204-1/DEBIAN/md5sums differ
Files google-chrome-stable.131.0.6778.69-1/DEBIAN/postinst and google-chrome-stable.131.0.6778.204-1/DEBIAN/postinst differ
Files google-chrome-stable.131.0.6778.69-1/DEBIAN/prerm and google-chrome-stable.131.0.6778.204-1/DEBIAN/prerm differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/chrome and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/chrome differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/chrome_crashpad_handler and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/chrome_crashpad_handler differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/chrome-management-service and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/chrome-management-service differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/chrome-sandbox and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/chrome-sandbox differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/icudtl.dat and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/icudtl.dat differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/libEGL.so and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/libEGL.so differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/libGLESv2.so and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/libGLESv2.so differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/liboptimization_guide_internal.so and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/liboptimization_guide_internal.so differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/libvk_swiftshader.so and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/libvk_swiftshader.so differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/libvulkan.so.1 and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/libvulkan.so.1 differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/af.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/af.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/am.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/am.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ar.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ar.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/bg.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/bg.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/bn.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/bn.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ca.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ca.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/cs.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/cs.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/da.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/da.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/de.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/de.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/el.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/el.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/en-GB.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/en-GB.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/en-US.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/en-US.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/es-419.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/es-419.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/es.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/es.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/et.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/et.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/fa.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/fa.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/fil.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/fil.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/fi.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/fi.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/fr.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/fr.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/gu.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/gu.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/he.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/he.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/hi.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/hi.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/hr.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/hr.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/hu.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/hu.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/id.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/id.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/it.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/it.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ja.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ja.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/kn.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/kn.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ko.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ko.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/lt.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/lt.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/lv.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/lv.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ml.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ml.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/mr.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/mr.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ms.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ms.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/nb.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/nb.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/nl.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/nl.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/pl.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/pl.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/pt-BR.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/pt-BR.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/pt-PT.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/pt-PT.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ro.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ro.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ru.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ru.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/sk.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/sk.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/sl.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/sl.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/sr.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/sr.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/sv.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/sv.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/sw.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/sw.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ta.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ta.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/te.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/te.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/th.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/th.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/tr.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/tr.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/uk.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/uk.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/ur.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/ur.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/vi.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/vi.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/zh-CN.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/zh-CN.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/locales/zh-TW.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/locales/zh-TW.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/resources.pak and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/resources.pak differ
Files google-chrome-stable.131.0.6778.69-1/opt/google/chrome/v8_context_snapshot.bin and google-chrome-stable.131.0.6778.204-1/opt/google/chrome/v8_context_snapshot.bin differ
Files google-chrome-stable.131.0.6778.69-1/usr/share/applications/google-chrome.desktop and google-chrome-stable.131.0.6778.204-1/usr/share/applications/google-chrome.desktop differ
Files google-chrome-stable.131.0.6778.69-1/usr/share/doc/google-chrome-stable/changelog.gz and google-chrome-stable.131.0.6778.204-1/usr/share/doc/google-chrome-stable/changelog.gz differ

Recompilador / Backup de paquetes ya instalados – Debian/Ubuntu Read More »

BatCat / Bat

El batcat es como un less con colores con deteccion de sintaxis, por defecto muestra números de lineas que para copiar y pegar codigo es bastante molesto por eso le agrego el style plain asi solo me muestra el codigo.
Funciona como less y te permite moverte para arriba y abajo con las flechas haciendo facil de leer un script muy largo y llevarte lo que queres.

sudo apt install bat -y
#Agregar a .bashrc
alias cat='batcat --style plain'

BatCat / Bat Read More »

Versionamiento de scripts

Si no queres lidear con GIT ni servidores por proteccion de datos del script ejemplo: “script.sh”
Lo vas modificando y vas probando, cada vez que lo ejecutas se hace backup

#!/bin/bash

echo "Haciendo backup del script $0"
cp $0 $0.$(date +'%Y%m%d-%H%M')
chown $SUDO_USER: $0.*

#Inicio Script##


echo Hola Mundo!!!


#Fin Script####

Luego para ver las diferencias que tuviste en el dia creas un “script.sh.changes” por ejemplo

#!/bin/bash
BLUE='\033[0;34m' 
NC='\033[0m'
ANTERIOR='' 
for i in $(ls script.sh.$(date +'%Y%m%d')*) 
 do if [ ! -z "$ANTERIOR" ]
    then 
      echo -e "${BLUE}----------- diff $ANTERIOR $i ------------${NC}" 
      diff --color $ANTERIOR $i 
    fi 
    ANTERIOR=$i
 done

Si queres cambiar colores

# Reset
Color_Off='\033[0m'       # Text Reset

# Regular Colors
Black='\033[0;30m'        # Black
Red='\033[0;31m'          # Red
Green='\033[0;32m'        # Green
Yellow='\033[0;33m'       # Yellow
Blue='\033[0;34m'         # Blue
Purple='\033[0;35m'       # Purple
Cyan='\033[0;36m'         # Cyan
White='\033[0;37m'        # White

# Bold
BBlack='\033[1;30m'       # Black
BRed='\033[1;31m'         # Red
BGreen='\033[1;32m'       # Green
BYellow='\033[1;33m'      # Yellow
BBlue='\033[1;34m'        # Blue
BPurple='\033[1;35m'      # Purple
BCyan='\033[1;36m'        # Cyan
BWhite='\033[1;37m'       # White

# Underline
UBlack='\033[4;30m'       # Black
URed='\033[4;31m'         # Red
UGreen='\033[4;32m'       # Green
UYellow='\033[4;33m'      # Yellow
UBlue='\033[4;34m'        # Blue
UPurple='\033[4;35m'      # Purple
UCyan='\033[4;36m'        # Cyan
UWhite='\033[4;37m'       # White

# Background
On_Black='\033[40m'       # Black
On_Red='\033[41m'         # Red
On_Green='\033[42m'       # Green
On_Yellow='\033[43m'      # Yellow
On_Blue='\033[44m'        # Blue
On_Purple='\033[45m'      # Purple
On_Cyan='\033[46m'        # Cyan
On_White='\033[47m'       # White

# High Intensity
IBlack='\033[0;90m'       # Black
IRed='\033[0;91m'         # Red
IGreen='\033[0;92m'       # Green
IYellow='\033[0;93m'      # Yellow
IBlue='\033[0;94m'        # Blue
IPurple='\033[0;95m'      # Purple
ICyan='\033[0;96m'        # Cyan
IWhite='\033[0;97m'       # White

# Bold High Intensity
BIBlack='\033[1;90m'      # Black
BIRed='\033[1;91m'        # Red
BIGreen='\033[1;92m'      # Green
BIYellow='\033[1;93m'     # Yellow
BIBlue='\033[1;94m'       # Blue
BIPurple='\033[1;95m'     # Purple
BICyan='\033[1;96m'       # Cyan
BIWhite='\033[1;97m'      # White

# High Intensity backgrounds
On_IBlack='\033[0;100m'   # Black
On_IRed='\033[0;101m'     # Red
On_IGreen='\033[0;102m'   # Green
On_IYellow='\033[0;103m'  # Yellow
On_IBlue='\033[0;104m'    # Blue
On_IPurple='\033[0;105m'  # Purple
On_ICyan='\033[0;106m'    # Cyan
On_IWhite='\033[0;107m'   # White

Versionamiento de scripts Read More »

Listar dependencias de todos los paquetes instalados

#!/bin/bash
RED='\033[0;31m'
BLUE='\033[0;34m' 
NC='\033[0m'


dpkg -l | grep -E "^i|^rc" | sed 's/:amd64//g' | awk '{print $2}'  | while read line 
 do echo -e ${BLUE} 
      apt-cache depends --no-pre-depends --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances -qqqq $line \
     | sed -z 's/\n  Depends: /,/g;s/\n |Depends: /,/g;s/\n    /,/g;s/>//g;s/<//g'
    echo -e ${RED}-------- ${NC}
done

Version copada con sugerencias prompeadas y elaborado por chatgpt

#!/bin/bash

# Definir los colores
GREEN='\033[0;32m'
RED='\033[0;31m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
WHITE='\033[0;37m'
CYAN='\033[0;36m'
PURPLE='\033[0;35m'
NC='\033[0m'  # Sin color

# Definir una lista de colores para cada nivel de dependencias
COLORS=($GREEN $RED $BLUE $YELLOW $WHITE $CYAN $PURPLE)

# Función recursiva para obtener las dependencias sin repetir, mostrando con colores e indentación
get_dependencies() {
    local package=$1
    local level=$2
    local indent=$(printf "%${level}s")  # Generar la indentación
    local deps

    # Si ya hemos listado este paquete, no lo repetimos
    if [[ " ${visited[@]} " =~ " ${package} " ]]; then
        return
    fi

    # Marcar el paquete como visitado
    visited+=("$package")

    # Obtener las dependencias del paquete
    deps=$(apt-cache depends --no-pre-depends --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances -qqqq "$package" \
           | sed -z 's/\n  Depends: /,/g;s/\n |Depends: /,/g;s/\n    /,/g;s/>//g;s/<//g' | tr ',' '\n' | sort -u)

    # Obtener el color correspondiente al nivel actual
    color=${COLORS[$((level % ${#COLORS[@]}))]}

    # Imprimir el paquete con el color correspondiente al nivel y con la indentación
    echo -e "${indent}${color}${package}${NC}"

    # Llamar a la función recursiva para cada dependencia
    for dep in $deps; do
        if [[ -n "$dep" ]]; then
            get_dependencies "$dep" $((level + 2))  # Incrementar la indentación
        fi
    done
}

# Función para manejar múltiples paquetes
process_packages() {
    for package in "$@"; do
        echo -e "${CYAN}Procesando paquete: ${package}${NC}"
        get_dependencies "$package" 0
    done
}

# Si no se proporciona ningún paquete
if [ -z "$1" ]; then
    echo -e "${RED}No se proporcionó ningún paquete como argumento.${NC}"
else
    # Inicializar una lista de paquetes visitados
    visited=()

    # Guardar la salida en una variable y pasarla a less -R para mantener los colores
    output=$(process_packages "$@")
    echo "$output" | less -R
fi

Listar dependencias de todos los paquetes instalados Read More »

OBS-Studio en Ubuntu

clear
echo ---OBS-Studio por PPA---------------
echo -------Quitando el anterior---------
sudo apt remove obs-studio --auto-remove -y >/dev/null 2>&1
echo -------Agregando repo ppa-----------
sudo add-apt-repository ppa:obsproject/obs-studio -y >/dev/null
echo -------Actualizando lista-----------
sudo apt update >/dev/null 2>&1
echo -------Instalando ultima version----
sudo apt install obs-studio -y  >/dev/null 2>&1

echo ---OBS Background removal-----------
PAQUETE=$(wget -qO- https://github.com/occ-ai/obs-backgroundremoval/releases/latest | grep linux-gnu.deb | cut -d \: -f1 | uniq)
VERSION=$(wget -qO- https://github.com/occ-ai/obs-backgroundremoval/releases/latest | grep linux-gnu.deb | cut -d \- -f3 | uniq)
wget -q -O /tmp/$PAQUETE --show-progress https://github.com/occ-ai/obs-backgroundremoval/releases/download/$VERSION/$PAQUETE
echo -------Instalando ultima version----
sudo apt install -y /tmp/$PAQUETE  >/dev/null 2>&1

#sudo add-apt-repository ppa:obsproject/obs-studio -r -y

OBS-Studio en Ubuntu Read More »

Scroll al inicio