forked from MrMEEE/bumblebee-Old-and-abbandoned
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·673 lines (576 loc) · 17.5 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
#!/bin/bash -l
# ----------------------------------------------------------------------------
# "Red Bull License"
# <mj@casalogic.dk> wrote this file and is providing free support
# in any spare time. If you need extended support, you can fuel him up by
# donating a Red Bull here to get him through the nights..:
#
# https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mj%40casalogic
# %2edk&lc=US&item_name=The%20Bumblebee%20Project%20by%20Martin%20Juhl&amount=
# 3%2e00¤cy_code=EUR¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateC
# C_LG%2egif%3aNonHosted
#
# ----------------------------------------------------------------------------
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <mj@casalogic.dk> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Martin Juhl
# ----------------------------------------------------------------------------
#
# This file is part of bumblebee.
#
# bumblebee is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# bumblebee is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with bumblebee. If not, see <http://www.gnu.org/licenses/>.
#
ROOT_UID=0
#Determine Arch x86_64 or i686
ARCH=`uname -m`
#Get tools location
LSPCI=`whereis lspci | gawk -F' ' '{ print $2 }'`
MODPROBE=`whereis modprobe | gawk -F' ' '{ print $2 }'`
if [ `cat /etc/issue |grep -nir fedora |wc -l` -gt 0 ]; then
DISTRO=FEDORA
elif [ `cat /etc/issue |grep -nir ubuntu |wc -l` -gt 0 ]; then
DISTRO=UBUNTU
elif [ `cat /etc/issue |grep -nir openSUSE |wc -l` -gt 0 ]; then
DISTRO=OPENSUSE
elif [ `cat /etc/issue |grep -nir "Arch Linux" |wc -l` -gt 0 ]; then
DISTRO=ARCH
echo "You are running Arch Linux, please see the buildscript here for support:"
echo
echo "http://aur.archlinux.org/packages.php?ID=48866"
echo
read
exit 0
fi
echo
echo $DISTRO" distribution found"
echo
if [ $UID != $ROOT_UID ]; then
echo "You don't have sufficient privileges to run this script."
echo
if [ $DISTRO = UBUNTU ]; then
echo "Please run the script with: sudo install.sh"
elif [ $DISTRO = FEDORA ]; then
echo "Please run the script with: sudo -E install.sh"
fi
exit 1
fi
if [ $HOME = /root ]; then
echo "Do not run this script as the root user"
echo
if [ $DISTRO = UBUNTU ]; then
echo "Please run the script with: sudo install.sh"
elif [ $DISTRO = FEDORA ]; then
echo "Please run the script with: sudo -E install.sh"
fi
exit 2
fi
echo "Welcome to the bumblebee installation v.1.3.17"
echo "Licensed under Red Bull, BEER-WARE License and GPL"
echo
echo "This will enable you to utilize both your Intel and nVidia card"
echo
echo "Please note that this script will probably only work with Ubuntu and Fedora Based machines"
echo "and has (by me) only been tested on Ubuntu Natty 11.04 and Fedora 14 but should work on others as well"
echo
echo "Are you sure you want to proceed?? (Y/N)"
read answer
case "$answer" in
y | Y )
;;
*)
exit 0
;;
esac
clear
BUMBLEBEEPWD=$PWD
echo
echo "Installing needed packages"
if [ $DISTRO = UBUNTU ]; then
VERSION=`cat /etc/issue | cut -f2 -d" "`
if [ $VERSION = 11.04 ]; then
echo
echo "Ubuntu 11.04 Detected"
echo
else
echo
echo "Ubuntu "$VERSION" Detected"
echo "Adding X-Swat Driver Repository"
echo
apt-add-repository ppa:ubuntu-x-swat/x-updates
fi
apt-get update
apt-get -y install nvidia-current
if [ $? -ne 0 ]; then
echo
echo "Package manager failed to install needed packages..."
echo
exit 21
fi
${MODPROBE} -r nouveau
${MODPROBE} nvidia-current
elif [ $DISTRO = FEDORA ]; then
yum -y install wget binutils gcc kernel-devel mesa-libGL mesa-libGLU
if [ $? -ne 0 ]; then
echo
echo "Package manager failed to install needed packages..."
echo
exit 21
fi
rm -rf /tmp/NVIDIA*
echo "Getting latest NVidia drivers version"
NV_DRIVERS_VERSION=`wget -q -O - http://www.nvidia.com/object/unix.html | grep "Linux x86_64/AMD64/EM64T" | cut -f5 -d">" | cut -f1 -d"<"`
echo "Latest NVidia drivers version is $NV_DRIVERS_VERSION"
if [ "$ARCH" = "x86_64" ]; then
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/${NV_DRIVERS_VERSION}/NVIDIA-Linux-x86_64-${NV_DRIVERS_VERSION}.run -O /tmp/NVIDIA-Linux-driver.run
elif [ "$ARCH" = "i686" ]; then
wget http://us.download.nvidia.com/XFree86/Linux-x86/${NV_DRIVERS_VERSION}/NVIDIA-Linux-x86-${NV_DRIVERS_VERSION}.run -O /tmp/NVIDIA-Linux-driver.run
fi
chmod +x /tmp/NVIDIA-Linux-driver.run
/tmp/NVIDIA-Linux-driver.run --no-x-check -a -K
cd /tmp/
/tmp/NVIDIA-Linux-driver.run -x
cd $BUMBLEBEEPWD
depmod -a
ldconfig
${MODPROBE} -r nouveau
${MODPROBE} nvidia
if [ "$ARCH" = "x86_64" ]; then
rm -rf /usr/lib64/nvidia-current/
rm -rf /usr/lib/nvidia-current/
mkdir -p /usr/lib64/nvidia-current/
mv /tmp/NVIDIA-Linux-x86_64-${NV_DRIVERS_VERSION}/* /usr/lib64/nvidia-current/
ln -s /usr/lib64/nvidia-current/32 /usr/lib/nvidia-current
mkdir -p /usr/lib64/nvidia-current/xorg
ln -s /usr/lib64/nvidia-current/libglx.so.${NV_DRIVERS_VERSION} /usr/lib64/nvidia-current/xorg/libglx.so
ln -s /usr/lib64/nvidia-current/nvidia_drv.so /usr/lib64/nvidia-current/xorg/nvidia_drv.so
rm -rf /usr/lib64/nvidia-current/xorg/xorg
ln -s /usr/lib64/nvidia-current/xorg/ /usr/lib32/nvidia-current/xorg
rm -rf /usr/lib64/xorg/xorg
ln -s /usr/lib64/xorg/ /usr/lib32/xorg
elif [ "$ARCH" = "i686" ]; then
rm -rf /usr/lib/nvidia-current/
mkdir -p /usr/lib/nvidia-current/
mv /tmp/NVIDIA-Linux-x86-${NV_DRIVERS_VERSION}/* /usr/lib/nvidia-current/
mkdir -p /usr/lib/nvidia-current/xorg
ln -s /usr/lib/nvidia-current/libglx.so.${NV_DRIVERS_VERSION} /usr/lib/nvidia-current/xorg/libglx.so
ln -s /usr/lib/nvidia-current/nvidia_drv.so /usr/lib/nvidia-current/xorg/nvidia_drv.so
fi
elif [ $DISTRO = OPENSUSE ]; then
VERSION=`cat /etc/issue |grep openSUSE | cut -f4 -d" "`
echo "Do you want me to install NVidia repository for openSUSE $VERSION (y/n) ?"
read answer
case "$answer" in
y|Y)
zypper ar -f ftp://download.nvidia.com/opensuse/${VERSION}/nvidia
if [ $? -ne 0 ]; then
echo
echo "Package manager failed to install needed packages..."
echo
exit 21
fi
zypper update
;;
n|N)
echo "NVidia drivers repository will NOT be installed."
;;
*)
;;
esac
echo "What is your NVidia card family ?"
echo "1) GF6 or newer"
echo "2) FX5XXX"
echo "3) GF4 or older"
echo "4) Skip NVidia drivers install (you need to do this by yourself in this case)"
read card
case $card in
1)
zypper install x11-video-nvidiaG02
;;
2)
zypper install x11-video-nvidiaG01
;;
3)
zypper install x11-video-nvidiaG01
;;
4)
echo "Skip drivers installation. Please remember that NVidia drivers *HAVE TO BE INSTALLED*"
;;
*)
echo
echo "Please choose a valid option, Press any key to try again"
read
;;
esac
${MODPROBE} -r nouveau
${MODPROBE} nvidia
fi
echo
echo "Backing up Configuration"
if [ $DISTRO = UBUNTU ]; then
if [ `cat /etc/bash.bashrc |grep VGL |wc -l` -ne 0 ]; then
cp /etc/bash.bashrc.optiorig /etc/bash.bashrc
fi
elif [ $DISTRO = FEDORA ]; then
if [ `cat /etc/bashrc |grep VGL |wc -l` -ne 0 ]; then
cp /etc/bashrc.optiorig /etc/bashrc
fi
elif [ $DISTRO = OPENSUSE ]; then
if [ `cat /etc/bash.bashrc |grep VGL |wc -l` -ne 0 ]; then
cp /etc/bash.bashrc.optiorig /etc/bash.bashrc
fi
fi
cp -n /etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist.conf.optiorig
cp -n /etc/modules /etc/modules.optiorig
cp -n /etc/X11/xorg.conf /etc/X11/xorg.conf.optiorig
echo
echo "Installing Optimus Configuration and files"
cp install-files/xorg.conf.intel /etc/X11/xorg.conf
cp install-files/xorg.conf.nvidia /etc/X11/
if [ $DISTRO = UBUNTU ]; then
rm -rf /etc/X11/bumblebee
cp -a install-files/bumblebee /etc/X11/
cp install-files/bumblebee.script /etc/init.d/bumblebee
cp -n /etc/bash.bashrc /etc/bash.bashrc.optiorig
elif [ $DISTRO = FEDORA ]; then
cp install-files/bumblebee.script.fedora /etc/init.d/bumblebee
cp -n /etc/bashrc /etc/bashrc.optiorig
elif [ $DISTRO = OPENSUSE ]; then
cp install-files/bumblebee.script.openSUSE /etc/init.d/bumblebee
chmod +x /etc/init.d/bumblebee
cp -n /etc/bash.bashrc /etc/bash.bashrc.optiorig
fi
cp install-files/virtualgl.conf /etc/modprobe.d/
cp install-files/optimusXserver /usr/local/bin/
cp install-files/bumblebee-bugreport /usr/local/bin/
cp install-files/bumblebee-uninstall /usr/local/bin/
if [ "$ARCH" = "x86_64" ]; then
cp install-files/optirun32 /usr/local/bin/
cp install-files/optirun64 /usr/local/bin/
chmod +x /usr/local/bin/optirun*
else
cp install-files/optirun64 /usr/local/bin/optirun
chmod +x /usr/local/bin/optirun
fi
if [ $DISTRO = UBUNTU ]; then
if [ "$ARCH" = "x86_64" ]; then
echo
echo "64-bit system detected"
echo
dpkg -i install-files/VirtualGL_amd64.deb
elif [ "$ARCH" = "i686" ]; then
echo
echo "32-bit system detected"
echo
dpkg -i install-files/VirtualGL_i386.deb
fi
if [ $? -ne 0 ]; then
echo
echo "Package manager failed to install VirtualGL..."
echo
exit 20
fi
update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf
rm /etc/alternatives/xorg_extra_modules
rm /etc/alternatives/xorg_extra_modules-bumblebee
rm /usr/lib/nvidia-current/xorg/xorg
ln -s /usr/lib/nvidia-current/xorg /etc/alternatives/xorg_extra_modules-bumblebee
ldconfig
elif [ $DISTRO = FEDORA ]; then
if [ "$ARCH" = "x86_64" ]; then
echo
echo "64-bit system detected"
echo
echo $PWD
yum -y --nogpgcheck install install-files/VirtualGL.x86_64.rpm
elif [ "$ARCH" = "i686" ]; then
echo
echo "32-bit system detected"
echo
yum -y --nogpgcheck install install-files/VirtualGL.i386.rpm
fi
if [ $? -ne 0 ]; then
echo
echo "Package manager failed to install VirtualGL..."
echo
exit 20
fi
elif [ $DISTRO = OPENSUSE ]; then
if [ "$ARCH" = "x86_64" ]; then
echo
echo "64-bit system detected"
echo
echo $PWD
zypper --no-gpg-check install -l install-files/VirtualGL.x86_64.rpm
elif [ "$ARCH" = "i686" ]; then
echo
echo "32-bit system detected"
echo
zypper --no-gpg-check install -l install-files/VirtualGL.i386.rpm
fi
if [ $? -ne 0 ]; then
echo
echo "Package manager failed to install VirtualGL..."
echo
exit 20
fi
fi
chmod +x /usr/local/bin/optimusXserver
chmod +x /usr/local/bin/bumblebee-bugreport
if [ "`cat /etc/modprobe.d/blacklist.conf |grep "blacklist nouveau" |wc -l`" -eq "0" ]; then
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
fi
if [ "`cat /etc/modules |grep "nvidia-current" |wc -l`" -eq "0" ]; then
echo "nvidia-current" >> /etc/modules
fi
INTELBUSID=`echo "PCI:"\`${LSPCI} |grep VGA |grep Intel |cut -f1 -d:\`":"\`${LSPCI} |grep VGA |grep Intel |cut -f2 -d: |cut -f1 -d.\`":"\`${LSPCI} |grep VGA |grep Intel |cut -f2 -d. |cut -f1 -d" "\``
if [ `${LSPCI} |grep VGA |wc -l` -eq 2 ]; then
NVIDIABUSID=`echo "PCI:"\`${LSPCI} |grep VGA |grep nVidia |cut -f1 -d:\`":"\`${LSPCI} |grep VGA |grep nVidia |cut -f2 -d: |cut -f1 -d.\`":"\`${LSPCI} |grep VGA |grep nVidia |cut -f2 -d. |cut -f1 -d" "\``
elif [ `${LSPCI} |grep 3D |wc -l` -eq 1 ]; then
NVIDIABUSID=`echo "PCI:"\`${LSPCI} |grep 3D |grep nVidia |cut -f1 -d:\`":"\`${LSPCI} |grep 3D |grep nVidia |cut -f2 -d: |cut -f1 -d.\`":"\`${LSPCI} |grep 3D |grep nVidia |cut -f2 -d. |cut -f1 -d" "\``
else
echo
echo "The BusID of the nVidia card can't be determined"
echo "You must correct this manually in /etc/X11/xorg.conf.nvidia"
echo "Please report this problem.."
echo
echo "Press Any Key to continue"
echo
read
fi
clear
echo
echo "Changing Configuration to match your Machine"
echo
sed -i 's/REPLACEWITHBUSID/'$INTELBUSID'/g' /etc/X11/xorg.conf
sed -i 's/REPLACEWITHBUSID/'$NVIDIABUSID'/g' /etc/X11/xorg.conf.nvidia
CONNECTEDMONITOR="UNDEFINED"
while [ "$CONNECTEDMONITOR" = "UNDEFINED" ]; do
echo
echo "Select your Laptop:"
echo "1) Alienware M11X"
echo "2) Dell XPS 15/17"
echo "3) CLEVO W150HNQ"
echo "4) Asus EeePC 1215N"
echo "5) Acer Aspire 5745PG"
echo "6) Dell Vostro 3300"
echo "7) Dell Vostro 3400/3500"
echo "8) Samsung RF511"
echo "9) Toshiba Satellite M645-SP4132L"
echo "10) Asus U35J/U43JC/U35JC/U43JC/U53JC/P52JC/K52JC/X52JC/N53SV/N61JV/X64JV"
#echo "11) "
#echo "12) "
#echo "13) "
echo
echo "97) Manually Set Output to CRT-0"
echo "98) Manually Set Output to DFP-0"
echo "99) Manually Enter Output"
echo
read machine
echo
case "$machine" in
1)
CONNECTEDMONITOR="CRT-0"
;;
2)
CONNECTEDMONITOR="CRT-0"
;;
3)
CONNECTEDMONITOR="DFP-0"
;;
4)
CONNECTEDMONITOR="DFP-0"
;;
5)
CONNECTEDMONITOR="DFP-0"
;;
6)
CONNECTEDMONITOR="DFP-0"
;;
7)
CONNECTEDMONITOR="CRT-0"
;;
8)
CONNECTEDMONITOR="CRT-0"
;;
9)
CONNECTEDMONITOR="CRT-0"
;;
10)
CONNECTEDMONITOR="CRT-0"
;;
#11)
#CONNECTEDMONITOR=""
#;;
#12)
#CONNECTEDMONITOR=""
#;;
#13)
#CONNECTEDMONITOR=""
#;;
97)
CONNECTEDMONITOR="CRT-0"
;;
98)
CONNECTEDMONITOR="DFP-0"
;;
99)
echo
echo "Enter output device for nVidia Card"
echo
read manualinput
CONNECTEDMONITOR=`echo $manualinput`
;;
*)
echo
echo "Please choose a valid option, Press any key to try again"
read
clear
;;
esac
done
echo
echo "Setting output device to: $CONNECTEDMONITOR"
echo
sed -i 's/REPLACEWITHCONNECTEDMONITOR/'$CONNECTEDMONITOR'/g' /etc/X11/xorg.conf.nvidia
echo
echo "Enabling Optimus Service"
if [ $DISTRO = UBUNTU ]; then
update-rc.d bumblebee defaults
elif [ $DISTRO = FEDORA ]; then
chkconfig bumblebee on
elif [ $DISTRO = OPENSUSE ]; then
chkconfig bumblebee on
fi
echo
echo "Setting up Enviroment variables"
echo
IMAGETRANSPORT="UNDEFINED"
while [ "$IMAGETRANSPORT" = "UNDEFINED" ]; do
clear
echo
echo "The Image Transport is how the images are transferred from the"
echo "nVidia card to the Intel card, people has different experiences of"
echo "performance, but just select the default if you are in doubt."
echo
echo "I recently found out that yuv and jpeg both has some lagging"
echo "this is only noticable in fast moving games, such as 1st person"
echo "shooters and for me, its only good enough with xv, even though"
echo "xv sets down performance a little bit."
echo
echo "1) YUV"
echo "2) JPEG"
echo "3) PROXY"
echo "4) XV (default)"
echo "5) RGB"
echo
read machine
echo
case "$machine" in
1)
IMAGETRANSPORT="yuv"
;;
2)
IMAGETRANSPORT="jpeg"
;;
3)
IMAGETRANSPORT="proxy"
;;
4)
IMAGETRANSPORT="xv"
;;
5)
IMAGETRANSPORT="rgb"
;;
*)
echo
echo "Please choose a valid option, Press any key to try again"
read
clear
;;
esac
done
if [ $DISTRO = UBUNTU ]; then
echo "VGL_DISPLAY=:1
export VGL_DISPLAY
VGL_COMPRESS=$IMAGETRANSPORT
export VGL_COMPRESS
VGL_READBACK=fbo
export VGL_READBACK" >> /etc/bash.bashrc
elif [ $DISTRO = FEDORA ]; then
echo "VGL_DISPLAY=:1
export VGL_DISPLAY
VGL_COMPRESS=$IMAGETRANSPORT
export VGL_COMPRESS
VGL_READBACK=fbo
export VGL_READBACK" >> /etc/bashrc
elif [ $DISTRO = OPENSUSE ]; then
echo "VGL_DISPLAY=:1
export VGL_DISPLAY
VGL_COMPRESS=$IMAGETRANSPORT
export VGL_COMPRESS
VGL_READBACK=fbo
export VGL_READBACK" >> /etc/bash.bashrc
fi
echo '#!/bin/sh' > /usr/bin/vglclient-service
echo 'vglclient -gl' >> /usr/bin/vglclient-service
chmod +x /usr/bin/vglclient-service
if [ -d $HOME/.kde4/Autostart ]; then
if [ -f $HOME/.kde4/Autostart/vglclient-service ]; then
rm $HOME/.kde4/Autostart/vglclient-service
fi
ln -s /usr/bin/vglclient-service $HOME/.kde4/Autostart/vglclient-service
elif [ -d $HOME/.kde/Autostart ]; then
if [ -f $HOME/.kde/Autostart/vglclient-service ]; then
rm $HOME/.kde/Autostart/vglclient-service
fi
ln -s /usr/bin/vglclient-service $HOME/.kde/Autostart/vglclient-service
elif [ -d $HOME/.config/autostart ]; then
if [ -f $HOME/.config/autostart/vglclient-service ]; then
rm $HOME/.config/autostart/vglclient-service
fi
ln -s /usr/bin/vglclient-service $HOME/.config/autostart/vglclient-service
fi
/etc/init.d/bumblebee start
/usr/bin/vglclient-service &
echo
echo
echo
echo "Ok... Installation complete..."
echo
echo "Now you need to make sure that the command \"vglclient -gl\" is run after your Desktop Enviroment is started"
echo
echo "In KDE this is done by this script.. Thanks to Peter Liedler.."
echo
echo "In GNOME this is done by this script.. Thanks to Peter Liedler.."
echo
if [ "$ARCH" = "x86_64" ]; then
echo "After that you should be able to start applications with \"optirun32 <application>\" or \"optirun64 <application>\""
echo "optirun32 can be used for legacy 32-bit applications and Wine Games.. Everything else should work on optirun64"
echo "But... if one doesn't work... try the other"
elif [ "$ARCH" = "i686" ]; then
echo "After that you should be able to start applications with \"optirun <application>\"."
fi
echo
echo "If you have any problems in or after the installation, please try to run the bumblebee-uninstall script and then"
echo "rerun this script... if that doesn't work: please run the bumblebee-bugreport tool and send me a bugreport."
echo
echo "Or even better.. create an issue on github... this really makes bugfixing much easier for me and faster for you"
echo
echo "Good luck... MrMEEE / Martin Juhl"
echo
echo "http://www.martin-juhl.dk, http://twitter.com/martinjuhl, https://github.com/MrMEEE/bumblebee"
exit 0