vboxadd-x11.sh revision 28f7c365de35f0ff8b8d9d04444f178d13a654de
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Sun VirtualBox
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Linux Additions X11 setup init script ($Revision$)
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Copyright (C) 2006-2009 Sun Microsystems, Inc.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# available from http://www.virtualbox.org. This file is free software;
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# additional information or have any questions.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# chkconfig: 35 30 70
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# description: VirtualBox Linux Additions kernel modules
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync### BEGIN INIT INFO
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Provides: vboxadd-x11
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Required-Start:
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Required-Stop:
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Default-Start:
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Default-Stop:
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Description: VirtualBox Linux Additions X11 setup
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync### END INIT INFO
4d939f327b6fe2b8201ab00e2d7e7d12b6d47d23vboxsync# Check architecture
# The last of the three is for the X.org 6.7 included in Fedora Core 2
x_version=`echo "$xver" | sed -n 's/^X Window System Version \([0-9.]\+\)/\1/p'``echo "$xver" | sed -n 's/^XFree86 Version \([0-9.]\+\)/\1/p'``echo "$xver" | sed -n 's/^X Protocol Version 11, Revision 0, Release \([0-9.]\+\)/\1/p'``echo "$xver" | sed -n 's/^X.Org X Server \([0-9.]\+\)/\1/p'`
/etc/X11/XF86Config /etc/XF86Config /usr/X11R6/etc/X11/XF86Config-4 \
/usr/X11R6/etc/X11/XF86Config /usr/X11R6/lib/X11/XF86Config-4 \
/usr/X11R6/lib/X11/XF86Config"
rc_status -v
rc_status -v
eend 1
eend $?
ebegin $1
eerror $1
app_src=$1
desktop_src=$2
service_name=$3
alt_command=$4
found=0
found=1
found=1
found=1
found=1
found=1
stop && start
for dir in /usr/lib64/xorg/modules /usr/lib/xorg/modules /usr/X11R6/lib64/modules /usr/X11R6/lib/modules /usr/X11R6/lib/X11/modules; do
if [ -d $dir ]; then
case $x_version in
test -r /etc/SuSE-release &&
cat << EOF
test -f /etc/debian_version -a -d /usr/share/xserver-xorg/pci &&
for i in $x11conf_files; do
cat << EOF
cat << EOF
rm -f /usr/lib64/dri/vboxvideo_dri.so
rm -f /usr/lib/dri/vboxvideo_dri.so
install_x11_startup_app "$lib_dir/98vboxadd-xclient" "$share_dir/vboxclient.desktop" VBoxClient VBoxClient-all ||
for i in $x11conf_files; do