-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuboxee_setup.sh
More file actions
151 lines (125 loc) · 4.58 KB
/
uboxee_setup.sh
File metadata and controls
151 lines (125 loc) · 4.58 KB
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
#!/bin/bash
# __
#.--.--.| |--.-----.--.--.-----.-----.
#| | || _ | _ |_ _| -__| -__|
#|_____||_____|_____|__.__|_____|_____|
# Setup Script
if [[ `whoami` != "root" ]]
then
echo "Please run this script with sudo or as root"
exit
fi
#############
## OPTIONS ##
#############
# Set default menu type
var_menutype="basic"
# Set CPU architecture type
architecture=`uname -m`
# Get ubuntu codename
var_codename=`lsb_release -c | awk '{print $2}'`
# Log file
var_log=/var/log/uboxee.log
function info(){
echo $@ | tee -a ${var_log}
}
function install(){
info "Installing $@..."
apt-get install -qq --force-yes $@ >> $var_log 2>&1
}
function add_repo(){
apt-add-repository $1 >> $var_log 2>&1
}
function enableAutoUpdate() {
sed -i '4s|//| |g' /etc/apt/apt.conf.d/50unattended-upgrades
sed -i 's|//Unattended-Upgrade::Mail|Unattended-Upgrade::Mail|g' /etc/apt/apt.conf.d/50unattended-upgrades
sed -i 's|APT::Periodic::Download-Upgradeable-Packages "0";|APT::Periodic::Download-Upgradeable-Packages "1";|g' /etc/apt/apt.conf.d/10periodic
sed -i 's|APT::Periodic::AutocleanInterval "0";|APT::Periodic::AutocleanInterval "1";|g' /etc/apt/apt.conf.d/10periodic
echo 'APT::Periodic::Unattended-Upgrade "1";' >> /etc/apt/apt.conf.d/10periodic
}
function wizard(){
info "Customising Ubuntu please wait..."
info "Adding repository information..."
#add_repo "ppa:nvidia-vdpau/ppa"
add_repo "ppa:team-xbmc/ppa"
add_repo "ppa:pmcenery/ppa"
add_repo "ppa:sevenmachines/flash"
info "Updating repositories and upgrading..."
apt-get update -qq
apt-get dist-upgrade
# Disable console blanking
setterm -blank 0
install "unattended-upgrades"
enableAutoUpdate
install "openssh-server"
install "flashplugin-installer"
info "Installing release candidate flash plugin for hardware acceleration..."
wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_r2_32bit_linux_012611.tar.gz
tar zxvf flashplayer10_2_r2_32bit_linux_012611.tar.gz
sudo cp libflashplayer.so /usr/lib/flashplugin-installer/
info "Installing Nvidia drivers..."
install "nvidia-current"
nvidia-xconfig
# Disable compiz
su $USER -c 'metacity --replace &'
info "Disabling screensaver timeout..."
gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type=bool false
info "Disabling monitor sleep timeout..."
gconftool-2 -s /apps/gnome-power-manager/ac_sleep_display --type=int 0
info "Unmuting HDMI spdif channels..."
amixer sset 'IEC958 Default PCM' unmute
amixer sset 'IEC958,0' unmute
amixer sset 'IEC958,1' unmute
install "boxee"
install "gvfs ipheth-utils"
# Add user to fuse group
usermod -a -G fuse $USER
#info "Installing boxee splash screen..."
#update-alternatives --install /usr/lib/usplash/usplash-artwork.so usplash-artwork.so /usr/lib/usplash/usplash-theme-boxee.so 55
# Clean up
apt-get clean
apt-get -y autoremove
info "+----------------------------------------+"
info "| Configuration complete, please reboot! |"
info "+----------------------------------------+"
info "+-------------------------------------------------+"
info "| !!!IMPORTANT !!! |"
info "| ---------------- |"
info "| Please reboot, load Boxee and go to... |"
info "| - Settings > Media > Advanced |"
info "| Uncheck hardware assisted decoding and select |"
info "| VDPAU in the render method selection. |"
info "| - Restart Boxee |"
info "| ALL DONE! |"
info "+-------------------------------------------------+"
}
printBanner(){
printMsg " __ "
printMsg ".--.--.| |--.-----.--.--.-----.-----."
printMsg "| | || _ | _ |_ _| -__| -__|"
printMsg "|_____||_____|_____|__.__|_____|_____|"
}
printMsg(){
echo -e "\033[1m$1\033[0m"
}
menu(){
printMsg "+------------------------------------+"
printMsg "| Select an option and hit <enter> |"
printMsg "+------------------------------------+"
printMsg "| 1) Start wizard |"
printMsg "| 2) Quit |"
printMsg "+------------------------------------+"
}
while [ 1 ]; do
printBanner
menu
read CHOICE
case "$CHOICE" in
"1")
wizard
;;
"2")
exit
;;
esac
done