LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-14-2021, 10:11 PM   #1
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 271

Rep: Reputation: 26
Question Slackware(64) 14.2 + chroot Slackware(32) 14.2 Xfce4-Session Dunnos ?


Hi there look i had wrote this script for me.
Just for make more ease for mount my Slackware 14.2 Installation i had on another patition (is 32 Bits 100% real native)

Note : i ask the same at StackExchange :
https://unix.stackexchange.com/quest...session-dunnos

Well making some test this afternoon i can start xfce4-session like root user (but that is not the thing i need XD) :

Screenshot -> https://i.postimg.cc/SRJjVfm5/Xephyr-ch-ROOT.png

Well i need to know if someone can help me with the follow things
1 - Redirect Audio to Host, because i don't had any sound from chroot

Screenshot -> https://i.postimg.cc/50ttNSQ0/chroot-sinaudio.png


2 - Is possible use 3D,DRI with nvidia ? (i saw something on Gentoo forum but i don't understand the point of that explaniation)

screenshot -> https://i.postimg.cc/PJ3Y5qqG/chroot-sin3d.png

3 - Hide some commands and/or outputs from my script :
The lines are :

Code:
local being added to access control list

export DISPLAY=localhost:1 2>/dev/null

exit
and when i close the Xephyr Window appear below of exit :
Code:
-su: línea 3: $'\E[01mHP': no se encontró la orden
screenshot -> https://i.postimg.cc/nhptv8qW/chroot-ocultar-lineas.png

My script "slack32-chroot" content :
Code:
#!/usr/bin/env bash

echo '
Autor ----------------> Inukaze ( Venezuela )
Sitio ----------------> https://goo.gl/ij6WqW
Correo-E -------------> bloginukaze@gmail.com
Licencia -------------> GPL 2
'
#Establecer mediante la variable "$OBJETIVO" 
#La particion con una distribucion a la cual se accedera mediante chroot
export OBJETIVO="/media/Slack32"

#Prevenir que se autoejecuten las funciones que se definiran despues
unset montar
unset desmontar
unset MensajeBase

#Establecer y definir funciones :
function MensajeBase()
{
echo -e "\nLa forma correcta de utilizar este guion es :\n$0 «montar» , «montar_xephyr» ó «desmontar», Por ejemplo : \n"
echo -e "$0 montar"
echo -e "$0 montar_xephyr"
echo -e "$0 desmontar\n"
}

function montar(){
#Preparar acceso para programas de entorno grafico :
export DISPLAY=:0.0 2>/dev/null
xhost + local 2>/dev/null

#Montar todo de una vez para una distro de 32 Bits (En este caso Slackware32 14.2) : 
mount --rbind /proc							"$OBJETIVO/proc"						; \
mount --make-rslave							"$OBJETIVO/proc"						; \
mount --rbind /sys								"$OBJETIVO/sys"							; \
mount --make-rslave							"$OBJETIVO/sys"							; \
mount --rbind /dev							"$OBJETIVO/dev"							; \
mount --make-rslave							"$OBJETIVO/dev"							; \
mount --rbind /run								"$OBJETIVO/run"							; \
mount --make-rslave							"$OBJETIVO/run"							; \
mount --rbind /tmp							"$OBJETIVO/tmp"							; \
mount --make-rslave							"$OBJETIVO/tmp"							; \
mount --bind /etc/fstab						"$OBJETIVO/etc/fstab"					; \
mount --bind /etc/hostname			"$OBJETIVO/etc/hostname"		; \
mount --bind /etc/hosts						"$OBJETIVO/etc/hosts"				; \
mount --bind /etc/resolv.conf			"$OBJETIVO/etc/resolv.conf"		; \

cat << EOF | linux32 chroot	"$OBJETIVO"
export DISPLAY=localhost:1 2>/dev/null
EOF

linux32 chroot									"$OBJETIVO"	/bin/bash -l				; \
umount -l											"$OBJETIVO"									; \
mount -a 2>/dev/null
}


function xephyr(){
#Copiar archivo de autorizacion X.Org :
rm -f "$OBJETIVO/home/inukaze/.Xauthority"
rm -f "$OBJETIVO/root/.Xauthority"
cp -f "/home/inukaze/.Xauthority" "$OBJETIVO/root/.Xauthority"
cp -f "/home/inukaze/.Xauthority" "$OBJETIVO/home/inukaze/.Xauthority"
chown inukaze:users "$OBJETIVO/home/inukaze/.Xauthority"

if [ ! -f "$OBJETIVO/etc/X11/Xwrapper.config" ] ; then
# Prevenir el error « /usr/libexec/Xorg.wrap: Only console users are allowed to run the X server »
echo '# Xwrapper.config (Debian X Window System server wrapper configuration file)
#
# This file was generated by the post-installation script of the x11-common
# package using values from the debconf database.
#
# See the Xwrapper.config(5) manual page for more information.
#
# This file is automatically updated on upgrades of the x11-common package
# *only* if it has not been modified since the last upgrade of that package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command as root:
#   dpkg-reconfigure x11-common
#allowed_users=console
allowed_users=anybody' | tee "$OBJETIVO/etc/X11/Xwrapper.config"
fi

#Preparar acceso para programas de entorno grafico :
export DISPLAY=:0.0 2>/dev/null
xhost + local 2>/dev/null

#Montar todo de una vez para una distro de 32 Bits (En este caso Slackware32 14.2) : 
mount --rbind /proc							"$OBJETIVO/proc"						; \
mount --make-rslave							"$OBJETIVO/proc"						; \
mount --rbind /sys								"$OBJETIVO/sys"							; \
mount --make-rslave							"$OBJETIVO/sys"							; \
mount --rbind /dev							"$OBJETIVO/dev"							; \
mount --make-rslave							"$OBJETIVO/dev"							; \
mount --rbind /run								"$OBJETIVO/run"							; \
mount --make-rslave							"$OBJETIVO/run"							; \
mount --rbind /tmp							"$OBJETIVO/tmp"							; \
mount --make-rslave							"$OBJETIVO/tmp"							; \
mount --bind /etc/fstab						"$OBJETIVO/etc/fstab"					; \
mount --bind /etc/hostname			"$OBJETIVO/etc/hostname"		; \
mount --bind /etc/hosts						"$OBJETIVO/etc/hosts"				; \
mount --bind /etc/resolv.conf			"$OBJETIVO/etc/resolv.conf"		; \

cat << EOF | linux32 chroot	"$OBJETIVO"
export DISPLAY=localhost:1 2>/dev/null
EOF

linux32 chroot									"$OBJETIVO"	/bin/bash -l		<<"EOT"
#Primero Detectar Particiones, Crear Directorios dentro de /media y finalmente montarlas
#Nombre De Particion :
#	NPD1="1SlackIni"	# Esta es la particion /boot de la particion que estoy usando en chroot
	NPD2="72GB"
	NPD3="Compartido"
	NPD4="2SlackIni"
#	NPD5="Slack64"	#Esta es la particion Anfrition, asi que realmente no la necesito para esto.
#	NPD6="Slack32"	#Esta es la que estoy usando en chroot
	NPD7="2Compartir"
#Parte de la Particion
#	PPD1=$(blkid | grep "$NPD1" | cut -c01-09)
	PPD2=$(blkid | grep "$NPD2" | cut -c01-09)
	PPD3=$(blkid | grep "$NPD3" | cut -c01-09)
	PPD4=$(blkid | grep "$NPD4" | cut -c01-09)
#	PPD5=$(blkid | grep "$NPD5" | cut -c01-09)
#	PPD6=$(blkid | grep "$NPD6" | cut -c01-09)
	PPD7=$(blkid | grep "$NPD7" | cut -c01-09)
$(mkdir -p /media/"$NPD2" ; mount "$PPD2" /media/"$NPD2" )
$(mkdir -p /media/"$NPD3" ; mount "$PPD3" /media/"$NPD3" )
$(mkdir -p /media/"$NPD4" ; mount "$PPD4" /media/"$NPD4" )
$(mkdir -p /media/"$NPD7" ; mount "$PPD7" /media/"$NPD7" )
$(su - inukaze)
$(Xephyr -ac -screen 1070x888 -br -reset -terminate :1.0 2>/dev/null &)
$(export DISPLAY=:1.0)
$(DISPLAY=:1 /usr/bin/xfce4-session -- :1 2>/dev/null)
EOT

umount -l											"$OBJETIVO"									; \
mount -a 2>/dev/null
}

function desmontar(){
# Desmontar
umount -l			"$OBJETIVO"							; \
mount -a 2>/dev/null
}


#Este guión necesita ser ejecutado como SuperUsuario
#o en su defecto con permisos administrativos suficientes
#Para montar / desmontar particiones.
if [ "$(whoami)" != root ]; then

	echo
	echo
	echo 'Por favor ejecuta este guion como SuperUsuario (root)'
	echo
	echo 'Utilize este guión bajo su Propio Riesgro'
	echo 'El Autor , o sea yo , no me hago responsable'
	echo 'de las consecuencias imprevistas que puedan'
	echo 'acontecer en tu sistema operativo'
	echo
else
# Proceder en caso de tener los permisos suficientes para montar/desmontar particiones :

#Si el usuario no pasa ningun parametro indicar como se usa este guion
			if [ -z "$1" ]; then
					MensajeBase
			fi

#Guion : Aqui se ha definido como se utilizara este guion correctamente para montar o desmontar la particion Objetivo
#Entrada : Cualquier palabra pasada por el parametro $1 sera convertida en minusculas
Entrada=$(echo "$1" | tr -s  '[:upper:]'  '[:lower:]')

			if [ "$Entrada" == "montar" ]; then
					montar
			fi

			if [ "$Entrada" == "xephyr" ]; then
					xephyr
			fi

			if [ "$Entrada" == "desmontar" ]; then
					desmontar
			fi

#Finalizar la condicion globar de requerir usar el SuperUsuario o en su defectos persmisos administrativos
#Para poder (des)montar particiones :
fi

#Finalizar este guion sin problemas :
exit 0 2>/dev/null

Last edited by inukaze; 12-14-2021 at 10:34 PM.
 
Old 12-17-2021, 05:09 AM   #2
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 271

Original Poster
Rep: Reputation: 26
1 - Because i don't use pulseaudio in the chroot the audio solution fix is just delete the file /etc/asound.conf

2 - the access to 3D/DRI requiere 2 things, the first is edit the file /etc/X11/xorg.conf and add

Code:
Section "Files"
#    ModulePath "/usr/lib64/nvidia-304.137/xorg"
     ModulePath "/usr/lib/xorg/modules"
EndSection
Add some extensions and +iglx parameter to enable access to glx, xephyr command now is :

Code:
$(Xephyr -ac -screen 1070x888 -br -reset -terminate -render :1.0 \
+extension Composite \
+extension DAMAGE \
+extension DOUBLE-BUFFER \
+extension DPMS \
+extension GLX \
+extension NV-GLX \
+extension RANDR \
+extension RENDER \
+extension X-Resource \
+extension XFIXES \
+xinerama \
+iglx \
2>/dev/null &)
Well making testings my current "slack32-chroot" script content is the follow :
Code:
#!/usr/bin/env bash

echo '
Autor ----------------> Inukaze ( Venezuela )
Sitio ----------------> https://goo.gl/ij6WqW
Correo-E -------------> bloginukaze@gmail.com
Licencia -------------> GPL 2
'
#Establecer mediante la variable "$OBJETIVO" 
#La particion con una distribucion a la cual se accedera mediante chroot
export OBJETIVO="/media/Slack32"

#Prevenir que se autoejecuten las funciones que se definiran despues
unset montar
unset desmontar
unset MensajeBase

#Establecer y definir funciones :
function MensajeBase()
{
echo -e "\nLa forma correcta de utilizar este guion es :\n$0 «montar» , «montar_xephyr» ó «desmontar», Por ejemplo : \n"
echo -e "$0 montar"
echo -e "$0 montar_xephyr"
echo -e "$0 desmontar\n"
}

function montar(){
#Preparar acceso para programas de entorno grafico :
export DISPLAY=:0.0 2>/dev/null
xhost + local 2>/dev/null

#Montar todo de una vez para una distro de 32 Bits (En este caso Slackware32 14.2) : 
mount --rbind /proc							"$OBJETIVO/proc"						; \
mount --make-rslave							"$OBJETIVO/proc"						; \
mount --rbind /sys								"$OBJETIVO/sys"							; \
mount --make-rslave							"$OBJETIVO/sys"							; \
mount --rbind /dev							"$OBJETIVO/dev"							; \
mount --make-rslave							"$OBJETIVO/dev"							; \
mount --rbind /run								"$OBJETIVO/run"							; \
mount --make-rslave							"$OBJETIVO/run"							; \
mount --rbind /tmp							"$OBJETIVO/tmp"							; \
mount --make-rslave							"$OBJETIVO/tmp"							; \
mount --bind /etc/fstab						"$OBJETIVO/etc/fstab"					; \
mount --bind /etc/hostname			"$OBJETIVO/etc/hostname"		; \
mount --bind /etc/hosts						"$OBJETIVO/etc/hosts"				; \
mount --bind /etc/resolv.conf			"$OBJETIVO/etc/resolv.conf"		; \

cat << EOF | linux32 chroot	"$OBJETIVO"
export DISPLAY=localhost:1 2>/dev/null
EOF

linux32 chroot									"$OBJETIVO"	/bin/bash -l				; \
umount -l											"$OBJETIVO"									; \
mount -a 2>/dev/null
}


function xephyr(){
#Copiar archivo de autorizacion X.Org :
rm -f "$OBJETIVO/home/inukaze/.Xauthority"
rm -f "$OBJETIVO/root/.Xauthority"
cp -f "/home/inukaze/.Xauthority" "$OBJETIVO/root/.Xauthority"
cp -f "/home/inukaze/.Xauthority" "$OBJETIVO/home/inukaze/.Xauthority"

#Audio :
#rm -rf													"$OBJETIVO/etc/asound.conf"
#cp -f "/etc/asound.state"						"$OBJETIVO/etc/asound.state"

#Video :
#cp -f /usr/lib/libGL.so.304.137-nvidia	"$OBJETIVO/usr/lib/libGL.so.304.137-nvidia"
#cp -f /usr/lib/libGL.so.304.137-nvidia	"$OBJETIVO/usr/lib/libGL.so.304.137"
#cp -f /usr/lib/libGL.so.1.2.0					"$OBJETIVO/usr/lib/libGL.so.1.2.0"
#cp -f /usr/lib/libGL.so								"$OBJETIVO/usr/lib/libGL.so"
#cp -f /usr/lib/libGL.la-nvidia					"$OBJETIVO/usr/lib/libGL.la-nvidia"

chown inukaze:users "$OBJETIVO/home/inukaze/.Xauthority"

if [ ! -f "$OBJETIVO/etc/X11/Xwrapper.config" ] ; then
# Prevenir el error « /usr/libexec/Xorg.wrap: Only console users are allowed to run the X server »
echo '# Xwrapper.config (Debian X Window System server wrapper configuration file)
#
# This file was generated by the post-installation script of the x11-common
# package using values from the debconf database.
#
# See the Xwrapper.config(5) manual page for more information.
#
# This file is automatically updated on upgrades of the x11-common package
# *only* if it has not been modified since the last upgrade of that package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command as root:
#   dpkg-reconfigure x11-common
#allowed_users=console
allowed_users=anybody' | tee "$OBJETIVO/etc/X11/Xwrapper.config"
fi

#Preparar acceso para programas de entorno grafico :
$(export DISPLAY=:1.0)
$(xhost + local 2>/dev/null)

#Montar todo de una vez para una distro de 32 Bits (En este caso Slackware32 14.2) : 
mount --rbind /proc													"$OBJETIVO/proc"													; \
mount --make-rslave													"$OBJETIVO/proc"													; \
mount --rbind /sys														"$OBJETIVO/sys"														; \
mount --make-rslave													"$OBJETIVO/sys"														; \
mount --rbind /dev													"$OBJETIVO/dev"														; \
mount --make-rslave													"$OBJETIVO/dev"														; \
mount --rbind /run														"$OBJETIVO/run"														; \
mount --make-rslave													"$OBJETIVO/run"														; \
mount --rbind /tmp													"$OBJETIVO/tmp"														; \
mount --make-rslave													"$OBJETIVO/tmp"														; \
mount --rbind /var/run/dbus										"$OBJETIVO/var/run/dbus"										; \
mount --make-rslave													"$OBJETIVO/var/run/dbus"										; \
mount --rbind /var/lib/dbus										"$OBJETIVO/var/lib/dbus"										; \
mount --make-rslave													"$OBJETIVO/var/lib/dbus"										; \
mount --rbind /etc/X11												"$OBJETIVO/etc/X11"												; \
mount --make-rslave													"$OBJETIVO/etc/X11"												; \
mount --rbind /usr/X11R6										"$OBJETIVO/usr/X11R6"											; \
mount --make-rslave													"$OBJETIVO/usr/X11R6"											; \
mount --rbind /lib/modules										"$OBJETIVO/lib/modules"										; \
mount --make-rslave													"$OBJETIVO/lib/modules"										; \
mount --bind /etc/fstab												"$OBJETIVO/etc/fstab"												; \
mount --bind /etc/hostname									"$OBJETIVO/etc/hostname"									; \
mount --bind /etc/hosts												"$OBJETIVO/etc/hosts"											; \
mount --bind /etc/resolv.conf									"$OBJETIVO/etc/resolv.conf"									; \
#NV_GLX#mount --bind /usr/lib/libnvidia-glcore.so.304.137	"$OBJETIVO/usr/lib/libnvidia-glcore.so.304.137"	; \
#NV_GLX#mount --bind /usr/lib/tls/libnvidia-tls.so.304.137	"$OBJETIVO/usr/lib/tls/libnvidia-tls.so.304.137"	; \
#NV_GLX#mount --bind /usr/lib/libGLEW.so.1.13.0					"$OBJETIVO/usr/lib/libGLEW.so.1.13.0"					; \
#NV_GLX#mount --bind /usr/lib/libGLEW.so.1.13						"$OBJETIVO/usr/lib/libGLEW.so.1.13"						; \
#NV_GLX#mount --bind /usr/lib/libGLEW.so								"$OBJETIVO/usr/lib/libGLEW.so"								; \
#NV_GLX#mount --bind /usr/lib/libGLU.so.1.3.1						"$OBJETIVO/usr/lib/libGLU.so.1.3.1"						; \
#NV_GLX#mount --bind /usr/lib/libGLU.so.1								"$OBJETIVO/usr/lib/libGLU.so.1"								; \
#NV_GLX#mount --bind /usr/lib/libGLU.so									"$OBJETIVO/usr/lib/libGLU.so"								; \
#NV_GLX#mount --bind /usr/lib/libGLU.la									"$OBJETIVO/usr/lib/libGLU.la"									; \
#NV_GLX#mount --bind /usr/lib/libGL.so.304.137-nvidia			"$OBJETIVO/usr/lib/libGL.so.304.137-nvidia"		; \
#NV_GLX#mount --bind /usr/lib/libGL.so.1.2.0							"$OBJETIVO/usr/lib/libGL.so.1.2.0"							; \
#NV_GLX#mount --bind /usr/lib/libGL.so.1								"$OBJETIVO/usr/lib/libGL.so.1"								; \
#NV_GLX#mount --bind /usr/lib/libGL.so									"$OBJETIVO/usr/lib/libGL.so"									; \
#NV_GLX#mount --bind /usr/lib/libGL.la-nvidia						"$OBJETIVO/usr/lib/libGL.la-nvidia"						; \
#NV_GLX#mount --bind /usr/lib/libGL.la									"$OBJETIVO/usr/lib/libGL.la"									; \
#AUDIO#mount --bind /usr/lib/libasound.so.2.0.0					"$OBJETIVO/usr/lib/libasound.so.2.0.0"					; \
#AUDIO#mount --bind /usr/lib/libasound.so.2						"$OBJETIVO/usr/lib/libasound.so.2"						; \
#AUDIO#mount --bind /usr/lib/libasound.so							"$OBJETIVO/usr/lib/libasound.so"							; \
#AUDIO#mount --bind /usr/lib/libasound.la							"$OBJETIVO/usr/lib/libasound.la"							; \


cat << EOF | linux32 chroot	"$OBJETIVO"
$(export DISPLAY=:1.0 2>/dev/null) 
EOF

linux32 chroot									"$OBJETIVO"	/bin/bash -l		<<"EOT"
#Primero Detectar Particiones, Crear Directorios dentro de /media y finalmente montarlas
#Nombre De Particion :
#	NPD1="1SlackIni"	# Esta es la particion /boot de la particion que estoy usando en chroot
	NPD2="72GB"
	NPD3="Compartido"
	NPD4="2SlackIni"
#	NPD5="Slack64"	#Esta es la particion Anfrition, asi que realmente no la necesito para esto.
#	NPD6="Slack32"	#Esta es la que estoy usando en chroot
	NPD7="2Compartir"
#Parte de la Particion
#	PPD1=$(blkid | grep "$NPD1" | cut -c01-09)
	PPD2=$(blkid | grep "$NPD2" | cut -c01-09)
	PPD3=$(blkid | grep "$NPD3" | cut -c01-09)
	PPD4=$(blkid | grep "$NPD4" | cut -c01-09)
#	PPD5=$(blkid | grep "$NPD5" | cut -c01-09)
#	PPD6=$(blkid | grep "$NPD6" | cut -c01-09)
	PPD7=$(blkid | grep "$NPD7" | cut -c01-09)
$(mkdir -p /media/"$NPD2" ; mount "$PPD2" /media/"$NPD2" )
$(mkdir -p /media/"$NPD3" ; mount "$PPD3" /media/"$NPD3" )
$(mkdir -p /media/"$NPD4" ; mount "$PPD4" /media/"$NPD4" )
$(mkdir -p /media/"$NPD7" ; mount "$PPD7" /media/"$NPD7" )
$(su - inukaze)

$(Xephyr -ac -screen 1070x888 -br -reset -terminate -render :1.0 \
+extension Composite \
+extension DAMAGE \
+extension DOUBLE-BUFFER \
+extension DPMS \
+extension GLX \
+extension NV-GLX \
+extension RANDR \
+extension RENDER \
+extension X-Resource \
+extension XFIXES \
+xinerama \
+iglx \
2>/dev/null &)

$(export DISPLAY=:1.0)
$(DISPLAY=:1 /usr/bin/xfce4-session -- :1 2>/dev/null) 

##DESACTIVADO##$(DISPLAY=:1 /usr/bin/startx -- :1 2>/dev/null)	#Inicia en otra tty con (NV-)GLX a pantalla completa
EOT

umount -l											"$OBJETIVO"									; \
mount -a 2>/dev/null
}

function desmontar(){

# Desmontar

umount -l			"$OBJETIVO"							; \
mount -a 2>/dev/null

}


#Este guión necesita ser ejecutado como SuperUsuario
#o en su defecto con permisos administrativos suficientes
#Para montar / desmontar particiones.

if [ "$(whoami)" != root ]; then

	echo
	echo
	echo 'Por favor ejecuta este guion como SuperUsuario (root)'
	echo
	echo 'Utilice este guión bajo su Propio Riesgo'
	echo 'El Autor , o sea yo , no me hago responsable'
	echo 'de las consecuencias imprevistas que puedan'
	echo 'acontecer en tu sistema operativo'
	echo
else

# Proceder en caso de tener los permisos suficientes para montar/desmontar particiones :

#Si el usuario no pasa ningún parámetro indicar como se usa este guion

			if [ -z "$1" ]; then
					MensajeBase
			fi

#Guion : Aquí se ha definido como se utilizara este guion correctamente para montar o desmontar la partición Objetivo
#Entrada : Cualquier palabra pasada por el parámetro $1 sera convertida en minúsculas

Entrada=$(echo "$1" | tr -s  '[:upper:]'  '[:lower:]')

			if [ "$Entrada" == "montar" ]; then
					montar
			fi

			if [ "$Entrada" == "xephyr" ]; then
					xephyr
			fi

			if [ "$Entrada" == "desmontar" ]; then
					desmontar
			fi

#Finalizar la condición global de requerir usar el SuperUsuario o en su defectos permisos administrativos
#Para poder (des)montar particiones :

fi

#Finalizar este guion sin problemas :

$(exit 0)
Notes :
A) The #AUDIO & #NV-GLX section are thing are really don't need it

B) Because making test with that, i try to compile nvidia-legacy304 drivers directly on chroot and that result very bad, right now i not had 3D/DRI on my Slackware64 14.2 because i can't compile "nvidia-legeacy304-kernel" i just got the follow error :

Code:
Creating directory NVIDIA-Linux-x86_64-304.137
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 304.137................................................................................................................................................................
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

makefile:53: fallo en las instrucciones para el objetivo 'select_makefile'

Last edited by inukaze; 12-17-2021 at 06:15 AM.
 
Old 12-17-2021, 09:36 AM   #3
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 590

Rep: Reputation: Disabled
Quote:
Originally Posted by inukaze View Post
i try to compile nvidia-legacy304 drivers directly on chroot and that result very bad, right now i not had 3D/DRI on my Slackware64 14.2 because i can't compile "nvidia-legeacy304-kernel" i just got the follow error :

Code:
Creating directory NVIDIA-Linux-x86_64-304.137
...*** Unable to determine the target kernel version. ***
Your chroot is 32bit. The kernel is 64bit and also that Nvidia installer file is 64bit. You would need https://www.nvidia.com/content/Drive...s&type=GeForce which is for 32bit, and possibly you have to execute "linux32" command in your chroot first, to make the Nvidia installer believe it is running on a 32bit architecture.
 
Old 12-19-2021, 11:28 AM   #4
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 271

Original Poster
Rep: Reputation: 26
Post

Quote:
Originally Posted by Windu View Post
Your chroot is 32bit. The kernel is 64bit and also that Nvidia installer file is 64bit. You would need https://www.nvidia.com/content/Drive...s&type=GeForce which is for 32bit, and possibly you have to execute "linux32" command in your chroot first, to make the Nvidia installer believe it is running on a 32bit architecture.
Let me explain better because i notice i say is not understood

1 - i mount chroot to my Slackware32 14.2 with graphical access to Xfce

2 - Trying to enable GLX access i compile nvidia-legacy304-{driver,kernel} directly on chroot when i had use
Code:
mount --bind /lib "$OBJETIVO/lib"
3 - That result when i restart my pc, provoke "nvidia.ko" kernel module error exec format

4 - i try to compile again Nvidia-Legacy304-{driver,kernel} directly on my Slackware64 14.2 but that just result on the installer error :

Code:
Creating directory NVIDIA-Linux-x86_64-304.137
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 304.137................................................................................................................................................................
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

makefile:53: fallo en las instrucciones para el objetivo 'select_makefile'
Because i don't know whats need the makefile or my kernel to fix it, i can't compile directly from my main distro.

Right now i am thinking on make a virtual machine, install Slackware64 14.2, and install nvidia drivers there just for grab the nvidia.ko because is the unique file i need to enable 3D Acceleration again, but must be compile by GCC 5.3.0 against Linux 4.4.14

Last edited by inukaze; 12-19-2021 at 11:29 AM.
 
Old 12-21-2021, 08:04 PM   #5
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 271

Original Poster
Rep: Reputation: 26
I had solve the nvidia issue, the post is -> https://www.linuxquestions.org/quest...93#post6311493

Well again i not had GLX inside the chroot + xephyr.

the first was using the parameter "-render" or "-render default" is make the script don't start Xephyr.

right now i try to copy some files from Slackware32 to Slackware64 :
Code:
su
cd /usr/lib/modules
mkdir {drivers,extensions}
cp /media/Slack32/usr/lib/xorg/modules/libnvidia-wfb.so.304.137 .
cp /media/Slack32/usr/lib/xorg/modules/libnvidia-wfb.so.1 .
cp /media/Slack32/usr/lib/xorg/modules/drivers/nvidia_drv.so ./drivers/
cp /media/Slack32/usr/lib/xorg/modules/extensions/libglx.la ./extensions/
cp /media/Slack32/usr/lib/xorg/modules/extensions/libglx.so.304.137-nvidia ./extensions/
cd extensions
ln -s libglx.so.304.137-nvidia libglx.so.304.137
ln -s libglx.so.304.137 libglx.so
cd -
i restart i reading the log i notice the system try to load first the 32 Bits driver.
i suposse is because i had this at the end of the /etc/X11/xorg.conf
Code:
Section "Files"
        ModulePath "/usr/lib/xorg/modules"
        ModulePath "/usr/lib64/xorg/modules"
#       ModulePath "/usr/lib64/nvidia-304.137/xorg"
EndSection

Well i delete the "drivers" folder :
Code:
su
cd /usr/lib/modules
rm -rf "drivers"
i don't remove the "extensions" folder yet, but curious cause the same symptom i had inside the chroot + xephyr env.

Code:
[~]$ glxgears
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't get an RGB, Double-buffered visual

[ inukaze | 21-12-2021 | 09:44 pm ]
[~]$ LD_PRELOAD="/usr/lib64/modules/extensions/libglx.so" glxgears
glxgears: symbol lookup error: /usr/lib64/modules/extensions/libglx.so: undefined symbol: XRC_DRAWABLE
Screenshot of nvidia-settings -> https://i.postimg.cc/mZjLzPG9/glxfail.png


Just for testing i copied again the drivers and extension,
Code:
su
cd /usr/lib/modules
mkdir {drivers,extensions}
cp /media/Slack32/usr/lib/xorg/modules/libnvidia-wfb.so.304.137 .
cp /media/Slack32/usr/lib/xorg/modules/libnvidia-wfb.so.1 .
cp /media/Slack32/usr/lib/xorg/modules/drivers/nvidia_drv.so ./drivers/
cp /media/Slack32/usr/lib/xorg/modules/extensions/libglx.la ./extensions/
cp /media/Slack32/usr/lib/xorg/modules/extensions/libglx.so.304.137-nvidia ./extensions/
cd extensions
ln -s libglx.so.304.137-nvidia libglx.so.304.137
ln -s libglx.so.304.137 libglx.so
cd -

i just edit the line orders at the end inside the /etc/X11/xorg.conf
Code:
Section "Files"
        ModulePath "/usr/lib64/xorg/modules"
        ModulePath "/usr/lib/xorg/modules"
#       ModulePath "/usr/lib64/nvidia-304.137/xorg"
EndSection
Restarting . . . [i continue editing this when i came back]

Last edited by inukaze; 12-21-2021 at 08:24 PM.
 
Old 12-21-2021, 09:55 PM   #6
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 271

Original Poster
Rep: Reputation: 26
Well the order on the last section of /etc/X11/xorg.conf really affect which folder and files are read first.

The problem is the NV-GLX extension is not load on DISPLAY:1.0 and looks like "dri" neither, and i need both.

Well i had modify my /etc/X11/xorg.conf :
Code:
Section "ServerLayout"
    Identifier		"Layout0"
    Screen			 0								"Screen0"0	0
    InputDevice		"Keyboard0"						"CoreKeyboard"
    InputDevice		"Mouse0"						"CorePointer"
    Option			"Xinerama"						"True"
EndSection

Section "ServerFlags"
    Option			"Xinerama"						"True"
EndSection

Section "InputDevice"
    # generated from default
    Identifier		"Mouse0"
    Driver			"mouse"
    Option			"Protocol"						"auto"
    Option			"Device"						"/dev/psaux"
    Option			"Emulate3Buttons"				"no"
    Option			"ZAxisMapping"					"4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier		"Keyboard0"
    Driver			"kbd"
EndSection

Section "Monitor"
    Identifier		"Monitor0"
    VendorName		"Toshiba0 Matsushita Display Technology Co., Ltd"
    ModelName		"190LM00006"
    Option			"DPMS" "TRUE"
EndSection

Section "Device"
	Identifier		"Device0"
	Driver			"nvidia"
	VendorName		"NVIDIA Corporation"
	BoardName		"GeForce GT 620"
	Option			"DPMS"								"True"
	Option			"NoLogo"							"True"
	Option			"AddARGBVisuals"					"True"
	Option			"AddARGBGLXVisuals"					"True"
	Option			"AllowGLXWithComposite"				"True"
	Option			"TripleBuffer"						"True"
	Option			"DRI"								"True"
	Option			"RenderAccel"						"True"
	Option			"HWCursor"							"True"
	Option			"CursorShadow"						"True"
	Option			"NvAGP"								"3"
	Option			"RegistryDwords"					"PerfLevelSrc=0x3333"
	Option			"NoPowerConnectorCheck"				"True"
	Option			"UseEdidFreqs"						"True"
	Option			"backingstore"						"True"
	Option			"DPI"								"92"
	Option			"XAANoOffscreenPixmaps"				"True"

	# Cuando Se Actualizan los Controladores Privatidos
	# A la version 304.88 , El Sistema se vuelve muy lento
	# Aqui esta el Arreglo de Lentitud :

	Option			"UBB"								"True"
	Option			"GLShaderDiskCache"					"True"
	Option			"Dac8Bit"							"True"
	Option			"Overlay"							"True"
	Option			"CIOverlay"							"True"
	Option			"TransparentIndex"					"25"
	Option			"OverlayDefaultVisual"				"True"
	Option			"nvidiaXineramaInfo"				"True"
	Option			"nvidiaXineramaInfoOrder"			"True"
	Option			"MultisampleCompatibility"			"True"
	Option			"DamageEvents"						"True"
	Option			"SLI"								"0"
	Option			"UseEvents"							"True"
	Option			"AllowSHMPixmaps"					"True"
	Option			"InitializeWindowBackingPixmaps"	"True"
	Option			"AllowUnofficialGLXProtocol" 	 	"True"
	Option			"Interactive"						"True"
	Option			"ConstrainCursor"					"True"
	Option			"UseHotplugEvents"					"True"
EndSection

Section "Screen"
    Identifier		"Screen0"
    Device			"Device0"
    Monitor			"Monitor0"
    DefaultDepth     24
    Option			"Stereo" "0"
    #Option			"nvidiaXineramaInfoOrder" "CRT-0"
	Option			"metamodes" "1280x1024_75 +0+0; 1152x864_75 +0+0; 1024x768_75 +0+0; 800x600_75 +0+0; 640x480_75 +0+0"
	Option			"DPMS"
    SubSection		"Display"
        Depth		 24
    EndSubSection
EndSection

Section "Extensions"
#    Option			"DRI"							"Enable"	#No es reconocida por los controladores 304.147
#    Option			"RandR"							"Enable"	#No es reconocida por los controladores 304.137
    Option			"RENDER"						"Enable"
    Option			"Composite"						"Enable"
    Option			"GLX"							"Enable"
EndSection

Section "DRI"
	Group			"video"
	Mode			 0666
EndSection

Section "Files"
	ModulePath "/usr/lib64/xorg/modules"
	ModulePath "/usr/lib/xorg/modules"
#	ModulePath "/usr/lib/nvidia-304.137/xorg"
#	ModulePath "/usr/lib64/nvidia-304.137/xorg"
EndSection
Reading the "Linux From Scrath" i try installing this packages :
Code:
slpkg -s slack --reinstall libepoxy rendercheck ; slpkg -s multi libva-compat32 libdrm-compat32
at the moment i know the problem is "DRI", becauase not show render but the rest looks like is working via indirect rendering, because when i try use

Code:
glxgears
Xlib:  extension "GLX" missing on display ":1.0".
19038 frames in 5.0 seconds = 3806.875 FPS
another example
Code:
glxinfo
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".
Xlib:  extension "GLX" missing on display ":1.0".

name of display: :1.0
display: :1  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float, 
    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_swap_control, 
    GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_NV_copy_image, 
    GLX_NV_float_buffer, GLX_NV_multisample_coverage, GLX_NV_present_video, 
    GLX_NV_swap_group, GLX_NV_video_capture, GLX_NV_video_out, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_swap_control, 
    GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_fbconfig_float, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float, 
    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer
OpenGL vendor string: 
OpenGL renderer string: 
OpenGL version string: 
OpenGL extensions:

240 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x021 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0
after that 0x021 had a lot of lines

Last edited by inukaze; 12-22-2021 at 04:42 AM.
 
  


Reply

Tags
bash, chroot, inukaze, script, xephyr



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware(64) 14.2 - Svga and/or DirectFB dunnos? inukaze Slackware 7 03-26-2021 07:51 PM
[SOLVED] Two Dunnos, First about ALSA on Screencast and Second How Live USB? inukaze Slackware 4 03-06-2020 02:45 PM
Unable to launch "cinnamon-session-cinnamon" X session "cinnamon-session-cinnamon" -found; Falling back to default "session." xxxindigo Linux Mint 22 09-01-2019 09:21 AM
Slackware64 14.2 : SMPlayer dont load anymore and other dunnos inukaze Slackware 3 06-18-2017 01:46 PM
xfce4-session fails to save session ! OneManArmy Debian 0 12-10-2004 02:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration