VirtualBox

Ignore:
Timestamp:
Dec 18, 2015 11:17:06 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
104797
Message:

bugref:8087: Additions/x11: support non-root X server: switch our method of loading our GL library to simply overriding the system one. If our 3D library is loaded by the X server (we check this by seeing if the DISPLAY environment variable is unset; we cannot do anything useful in this case anyway), we load the original system library using deep binding, as the default X server GLX module is tied to the Mesa GL implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r58838 r59180  
    4545  i[3456789]86|x86)
    4646    cpu="x86"
     47    ldconfig_arch="(libc6)"
    4748    lib_candidates="/usr/lib/i386-linux-gnu /usr/lib /lib"
    4849    ;;
    4950  x86_64|amd64)
    5051    cpu="amd64"
     52    ldconfig_arch="(libc6,x86-64)"
    5153    lib_candidates="/usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib /lib64 /lib"
    5254    ;;
     
    209211    # This is needed as X.Org Server 1.13 does not auto-load the module.
    210212    running_vboxvideo || $MODPROBE vboxvideo > /dev/null 2>&1
     213    rm -rf /etc/ld.so.conf.d/00vboxvideo.conf
     214    ldconfig
     215    if /usr/bin/VBoxClient --check3d; then
     216        rm -r /tmp/VBoxOGL
     217        mkdir -m 0755 /tmp/VBoxOGL
     218        mkdir -m 0755 /tmp/VBoxOGL/system
     219        ldconfig -p | while read -r line; do
     220            case "${line}" in "libGL.so.1 ${ldconfig_arch} => "*)
     221                ln -s "${line#libGL.so.1 ${ldconfig_arch} => }" /tmp/VBoxOGL/system/libGL.so.1
     222                break
     223            esac
     224        done
     225        echo "/tmp/VBoxOGL" > /etc/ld.so.conf.d/00vboxvideo.conf
     226        ln -s "${INSTALL_DIR}/lib/VBoxOGL.so" /tmp/VBoxOGL/libGL.so.1
     227        ln -s "${INSTALL_DIR}/lib/VBoxEGL.so" /tmp/VBoxOGL/libEGL.so.1
     228        ldconfig
     229    fi
    211230
    212231    # Mount all shared folders from /etc/fstab. Normally this is done by some
     
    222241{
    223242    begin "Stopping VirtualBox Additions" console;
     243    if test -r /etc/ld.so.conf.d/00vboxvideo.conf; then
     244        rm /etc/ld.so.conf.d/00vboxvideo.conf
     245        ldconfig
     246    fi
    224247    if ! umount -a -t vboxsf 2>/dev/null; then
    225248        fail "Cannot unmount vboxsf folders"
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette