snipt

Ctrl+h for KB shortcuts

Bash

codecs-debian.sh

#!/bin/bash
# =================================================
#             File: Codecs and progs to debian linux
#          CREATED: Qui 30/Mai/2013 hs 20:56
#      LAST CHANGE: 2013 Mai 30 20:57:09
# THIS SCRIPT AIMS: describe here
#           AUTHOR: {2:Sérgio Luiz Araújo Silva}
#             SITE: {3:http://vivaotux.blogspot.com}
#          TWITTER: @voyeg3r
#            SKYPE: sergioaraujosilva
# =================================================

#                ( O O )
# +===========oOO==(_)==OOo==============+

# based in: https://gist.github.com/voyeg3r/5473634
# References:
# http://wiki.debian.org/MultimediaCodecs
# https://sites.google.com/site/mydebiansourceslist/
# http://sejalivre.org/o-que-fazer-apos-instalar-o-debian-passo-a-passo-da-pos-instalacao/

# Excelente artigo do Lex Aleksandre sobre hardware não livre
# http://www.debianmaniaco.blogspot.com.br/2012/06/instalando-debian-com-firmware-nao.html

# à partir do squeezy se deixar a senha do root em branco o usuário padrão terá poderes sudo
# dica do Lex Aleksandre

# imagens do instalador
# http://cdimage.debian.org/debian-cd/7.0.0/
# http://cdimage.debian.org/debian-cd/7.0.0/i386/bt-dvd/

# configurações do NetworkManager:
# http://wiki.debian.org/NetworkManager
# /etc/NetworkManager/NetworkManager.conf
# /etc/init.d/network-manager restart

# trying set up hotspot
# http://forums.debian.net/viewtopic.php?f=16&t=49136
#  sudo aptitude install hostapd

# http://sistemaoperacionalinux.blogspot.com.br/2013/04/diminuindo-o-tamanho-dos-icones-do.html

# bash tips:
# http://indlovu.wordpress.com/2010/07/26/useful-bash-functions/
# o3totxt !!!
# function o3() { unzip -p "$1" content.xml | o3totxt | utf8tolatin1; }

fixetchosts () {
# https://snipt.net/voyeg3r/fix-etchosts-in-ubuntu/
[ "`awk 'NR==1 {print $NF}' /etc/hosts`" = "`hostname`" ] && echo '/etc/hosts already fixed!' || sed -i.backup -r "1s/(.*)/\1 `hostname`/g" /etc/hosts
} && fixetchosts

apt-get install -y cairo-dock cairo-dock-plug-ins

descompactadores () {
# http://www.rarlab.com/download.htm
if [ "$(id -u)" != "0" ] && echo "  Need be root" && sleep 3 &&  exit 1
[ "`dpkg -s build-essential | awk '/Status/ {print $4}'`" != "installed" ] && apt-get -y build-essential
wget -c http://www.rarlab.com/rar/rarlinux-4.2.0.tar.gz && tar zxvf rarlinux-4.2.0.tar.gz && cd rar && make
apt-get --force-yes install arj cabextract file-roller mpack p7zip p7zip-full unrar-free sharutils unace  unzip uudeview zip
}

adminstrativetools () {
sudo apt-get install -y openssh-server sshfs nmap iptstate iptraf nfs-common nfs-kernel-server portmap moreutils zsync rsync curl libcurl3 python-pycurl ngrep arp-scan nautilus-open-terminal mercurial checkinstall gparted unetbootin testdisk fdupes reaver build-essential
}

installaircrack () {
# como hackear redes wifi: http://www.youtube.com/watch?v=2_3MpVoY4Cg
# http://www.aircrack-ng.org/doku.php?id=install_aircrack
# http://krazyk-world.blogspot.com.br/2011/07/aircrack-ng-en-debian-testing-wheezy.html
# http://packages.debian.org/sid/i386/aircrack-ng/download
wget -c http://ftp.de.debian.org/debian/pool/main/a/aircrack-ng/aircrack-ng_1.1-5_i386.deb && dpkg -i aircrack-ng_1.1-5_i386.deb
apt-get install -y reaver build-essential

}

installgraphicsapplications () {
sudo apt-get install -y gmic gimp-data-extras gimp-plugin-registry inkscape shotwell nautilus-image-converter imagemagick gimp-resynthesizer libgimp2.0-dev ghostscript pdftk xclip xsel xsane
} && installgraphicsapplications

instainsync () {
# http://debianmaniaco.blogspot.com.br/2012/10/google-drive-no-debian.html
# lsync is a google-docs client
# https://www.insynchq.com/
wget -O - https://d2t3ff60b2tol4.cloudfront.net/[email protected] | sudo apt-key add -
[ -z "`grep -o http://apt.insynchq.com/debian /etc/apt/sources.list`" ] && \
echo 'deb http://apt.insynchq.com/debian wheezy non-free' >> /etc/apt/sources.list
apt-get update &&  apt-get install -y insync-beta-gnome
} && instainsync

installbootsplash () {
# instalando splash screen - tela de boot animada :
# http://debianmaniaco.blogspot.com.br/2011/08/boot-animado-no-debian-squeeze.html
sudo aptitude install plymouth plymouth-themes-all plymouth-x11 v86d
# para escolher o tema
# plymouth-set-default-theme -l
# plymouth-set-default-theme "nome-do-tema" --rebuild-initrd
plymouth-set-default-theme spacefun --rebuild-initrd
sed -i.backup -r '/GRUB_CMDLINE_LINUX_DEFAULT/ s/quiet/& splash/g' /etc/default/grup
sed -i.backup -r 's/^(#)(GRUB_GFXMODE).*/\2=1024x768/g' /etc/default/grub
update-grub2
} && installbootsplash

kernel39 () {
# http://debianmaniaco.blogspot.com.br/2013/04/instalando-o-kernel-39-no-debian.html
[ -z "`grep 'http://linux-libre.fsfla.org/pub/linux-libre/freesh/ 2> /dev/null' /etc/apt/sources.list`" ] && echo 'deb http://linux-libre.fsfla.org/pub/linux-libre/freesh/ freesh main' >> /etc/apt/sources.list
wget http://linux-libre.fsfla.org/pub/linux-libre/freesh/archive-key.asc && sudo apt-key add archive-key.asc
sudo aptitude update
sudo aptitude install linux-libre32-3.9
# caso queira remover o kernel use o comando abaixo para listar
# dpkg --list | grep linux-image
} && kernel39

installpfkernel () {
# http://sejalivre.org/aumentando-o-desempenho-do-ubuntu-e-debian-com-pf-kernel/
cd ~/Downloads
wget -c http://repos.natalenko.name/ubuntu/pf/linux-image-3.9.2-pf_1_i386.deb
sudo dpkg -i linux-image*.deb

# caso queira remover faça:
# sudo apt-get remove $(dpkg --get-selections | grep linux-.*pf | sed -e 's/-pf.*/-pf/g')
}

addppa () {
# source: http://debianmaniaco.blogspot.com.br/2012/02/script-para-adicionar-repositorios-ppas.html
wget -c https://gist.github.com/voyeg3r/5520774/raw/ -O /usr/sbin/add-apt-repository && \
chmod o+x $_ && chown root:roo $_
}

singlesourcelist () {
# solving sources.list issues
# http://http.debian.net/
cp /etc/apt/sources.list{,-backup}
cat <<-EOF > /etc/apt/sources.list
# http://debianmaniaco.blogspot.com.br/2013/05/usando-endereco-unico-para-os.html
deb http://http.debian.net/debian wheezy main
EOF
} && singlesourcelist

# ls sempre colorido
# http://www.vivaolinux.com.br/dica/Mantenha-o-ls-sempre-colorido : alias ls='ls --color=auto'

# como instalar o firefox verdadeiro
# http://superuser.com/questions/322376/how-to-install-real-firefox-on-debian
# how improve it: http://www.makeuseof.com/tag/tired-of-buffering-3-ways-to-speed-up-youtube/

installfirefoxtrunck () {
sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
sudo apt-get update
sudo apt-get install -y firefox-trunk
}

installyoutubedl (){
# http://rg3.github.io/youtube-dl/download.html
sudo wget http://youtube-dl.org/downloads/2013.05.10/youtube-dl -O /usr/local/bin/youtube-dl && chmod +x $_
}

# como criar um atalho personalizado
# http://superuser.com/questions/476937/ctrlaltt-doesnt-open-a-terminal-in-cinnamon-1-6

improveperformance () {
# reference http://artipc10.vub.ac.be/wordpress/2011/05/27/linux-performance-improvements/
sync && echo 3 > /proc/sys/vm/drop_caches # limpa o cache da memória
if test -f /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
then
    echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
fi
} && improveperformance

sudo apt-get install -y sysv-rc-conf


installbrotherDCP7065DN () {
# aqui no trabalho tenho uma impressoras dessas e por isso uso este script
sudo apt-get install brother*

# SCANNING
sudo apt-get install xsane sane-utils xsane-common
cd ~/Downloads
#wget http://pub.brother.com/pub/com/bsc/linux/dlf/brscan4-0.3.0-2.amd64.deb
wget http://www.brother.com/pub/bsc/linux/dlf/brscan4-0.4.1-3.i386.deb
sudo dpkg -i brscan4-0.4.1-3.i386.deb
sudo cp /usr/lib/sane/libsane-brother4.so.1.0.7 /usr/lib/sane/
sudo cp /usr/lib/sane/libsane-brother4.so /usr/lib/sane/
sudo cp /usr/lib/sane/libsane-brother4.so.1 /usr/lib/sane/
brsaneconfig4 -a name=DCP-7065DN model=DCP-7065DN nodename=`hostname`.local
# ...where drucksack is the local hostname of the printer/scanner ↑
# If you want if you want to specify your printer rather using its IP, run this instead:
#brsaneconfig4 -a name=DCP-7065DN model=DCP-7065DN ip=192.168.2.30

## PRINTING

sudo apt-get install cups csh lib32stdc++6
sudo mkdir /var/spool/lpd
sudo mkdir -p /usr/lib/cups/filter
sudo mkdir /usr/share/cups/model
sudo mkdir -p /usr/lib/cups/filter
cd ~/Downloads
wget http://pub.brother.com/pub/com/bsc/linux/dlf/dcp7065dnlpr-2.1.0-1.i386.deb
wget http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperDCP7065DN-2.0.4-2.i386.deb
sudo dpkg -i dcp7065dnlpr-2.1.0-1.i386.deb
sudo dpkg -i cupswrapperDCP7065DN-2.0.4-2.i386.deb
sudo cp /usr/lib/libbr* /usr/lib32/
sudo cp /usr/lib/cups/filter/brlpdwrapper* /usr/lib64/cups/filter
sudo cp /usr/lib/cups/filter/brlpdwrapper* /usr/lib/cups/filter
} && installbrotherDCP7065DN

confvim (){
sudo apt-get -y install vim-gnome vim-doc
sudo apt-get -y install aspell-pt-br
sudo apt-get install -y mercurial
hg clone https://bitbucket.org/sergio/vimfiles .vim
rm -f .bashrc
rm -f .inputrc
ln -s ~/.vim/inputrc ~/.inputrc
ln -s ~/.vim/bashrc ~/.bashrc
ln -s ~/.vim/pythonstartup ~/.pythonstartup
ln -s ~/.vim/vimrc ~/.vimrc

cat <<-EOF > ~/.hgrc
[ui]
ssh = ssh -i ~/.ssh/id_rsa.pub -C
username = sergio silva <[email protected]>
editor = vim
[paths]
default = ssh://[email protected]/sergio/vimfiles
EOF
} && confvim

addaudacious () {
apt-get install -y audacious sox sudo apt-get install libsox-fmt-mp3 mpg321
} && addaudacious

# para suavizar as fontes digite o comando como usuário dpkg-reconfigure fontconfig-config e responda as perguntas com
# “Autohinder”, “Sempre” e “Não”. Aguarde e você notará uma leve diferença nas fontes na área de trabalho. Se o comando não for # aplicado de imediato, então, reinicie o computador.

openterminal () {
apt-get install -y nautilus-open-terminal
} && openterminal

googletalkplugin () {
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/talkplugin/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install -y google-talkplugin
} && googletalkplugin

fixmountexternalhd () {
# http://forums.debian.net/viewtopic.php?p=492527&sid=8564023a0121552da21f5584ecc1f592
# http://www.tuxera.com/community/ntfs-3g-faq/#unprivileged
sed -i.backup -r '/usb0/ s/^/#/g' /etc/fstab
mount -a
} && fixmountexternalhd


installflashplayer () {
wget -c https://www.dropbox.com/s/t3yymfkpus89jqv/libflashplayer.so?dl=1 -O libflashplayer.so && sudo cp libflashplayer.so /usr/lib/mozilla/plugins/
} && installflashplayer

consertabrilho () {
# references: http://ubuntuforums.org/showthread.php?t=1742352
# http://stereopsis.com/flux/ # where I am? http://stereopsis.com/flux/map.html
# sudo wget -c https://www.dropbox.com/s/f837y509u68jdz7/xflux?dl=1 -O /usr/bin/xflux && sudo chmod +x $_
# this coordenates are to Quixeramobim -- to get your location visit: http://stereopsis.com/flux/map.html
# xflux -l 5.1981 -g -39.2962
# consertando o ajuste do brilho do monitor em computadores acer
# source: http://www.vivaolinux.com.br/topico/Ubuntu-Ultimate/Ajuste-do-brilho-da-tela
sudo sed -i.backup -r '/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/=.*/="quiet splash acpi_backlight=vendor"/g' /etc/default/grub
sudo sed -i.backup -r '/^GRUB_CMDLINE_LINUX=/ s/=.*/="acpi_osi=Linux"/g' /etc/default/grub
sudo update-grub
} && consertabrilho

networkimproviment () {
# see how mutch swapp ubuntu is using -- cat /proc/sys/vm/swap­pi­ness
sudo cp /etc/sysctl.conf{,.backup} && sudo wget -c https://gist.github.com/voyeg3r/368407/raw/ -O - > /etc/sysctl.conf && sysctl -p
apt-fast install -y ethtool
wget -c https://raw.github.com/gist/1261754 -O /etc/network/if-up.d/100Mbs && chmod +x $_
} && networkimproviment

stopterminals (){
# /etc/inittab.
sed -ri 's/^([3-6].*respawn.*tty[3-6])/#\1/g' /etc/inittab
telinit q
}

addbackports () {
# deb http://ftp.debian.org/debian/ wheezy-backports main
} && addbackports

showicons () {
# to display icons in ubuntu 12.04 precise pangolin do this
# source: http://www.ubuntugeek.com/hhow-to-display-computerhomenetworktrash-and-mounted-volumes-icons-on-ubuntu-12-04-precise-desktop.html
gsettings set org.gnome.desktop.background show-desktop-icons true
# gsettings set org.gnome.nautilus.desktop computer-icon-visible true
gsettings set org.gnome.nautilus.desktop home-icon-visible true
gsettings set org.gnome.nautilus.desktop trash-icon-visible true
gsettings set org.gnome.nautilus.desktop volumes-visible true
gsettings set org.gnome.nautilus.preferences click-policy 'single'
} && showicons

multimedia () {
   apt-get install libavcodec-extra-53
   wget http://www.deb-multimedia.org/pool/non-free/w/w32codecs/w32codecs_20110131-0.1_i386.deb
   dpkg -i w32codecs_20110131-0.1_i386.deb
   wget http://www.deb-multimedia.org/pool/main/libd/libdvdcss/libdvdcss2_1.2.10-0.3_i386.deb
   dpkg -i libdvdcss2_1.2.10-0.3_i386.deb
   wget http://www.deb-multimedia.org/pool/main/g/gst-plugins-ugly/gstreamer0.10-lame_0.10.17-0.0_i386.deb
   dpkg -i gstreamer0.10-lame_0.10.17-0.0_i386.deb
} && multimedia

install firefox () {
apt-get remove iceweasel
echo "deb http://packages.linuxmint.com debian import" >> /etc/apt/sources.list
apt-get update
apt-get install firefox
apt-get install firefox-l10n-en-us
}
https://snipt.net/embed/ebd6489c2cb17b3fda078ebc36e7b2a5/
/raw/ebd6489c2cb17b3fda078ebc36e7b2a5/
ebd6489c2cb17b3fda078ebc36e7b2a5
bash
Bash
320
2019-05-25T08:55:23
True
False
False
May 30, 2013 at 08:03 PM
/api/public/snipt/62682/
codecs-debiansh
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1"> 1</a> <a href="#L-2"> 2</a> <a href="#L-3"> 3</a> <a href="#L-4"> 4</a> <a href="#L-5"> 5</a> <a href="#L-6"> 6</a> <a href="#L-7"> 7</a> <a href="#L-8"> 8</a> <a href="#L-9"> 9</a> <a href="#L-10"> 10</a> <a href="#L-11"> 11</a> <a href="#L-12"> 12</a> <a href="#L-13"> 13</a> <a href="#L-14"> 14</a> <a href="#L-15"> 15</a> <a href="#L-16"> 16</a> <a href="#L-17"> 17</a> <a href="#L-18"> 18</a> <a href="#L-19"> 19</a> <a href="#L-20"> 20</a> <a href="#L-21"> 21</a> <a href="#L-22"> 22</a> <a href="#L-23"> 23</a> <a href="#L-24"> 24</a> <a href="#L-25"> 25</a> <a href="#L-26"> 26</a> <a href="#L-27"> 27</a> <a href="#L-28"> 28</a> <a href="#L-29"> 29</a> <a href="#L-30"> 30</a> <a href="#L-31"> 31</a> <a href="#L-32"> 32</a> <a href="#L-33"> 33</a> <a href="#L-34"> 34</a> <a href="#L-35"> 35</a> <a href="#L-36"> 36</a> <a href="#L-37"> 37</a> <a href="#L-38"> 38</a> <a href="#L-39"> 39</a> <a href="#L-40"> 40</a> <a href="#L-41"> 41</a> <a href="#L-42"> 42</a> <a href="#L-43"> 43</a> <a href="#L-44"> 44</a> <a href="#L-45"> 45</a> <a href="#L-46"> 46</a> <a href="#L-47"> 47</a> <a href="#L-48"> 48</a> <a href="#L-49"> 49</a> <a href="#L-50"> 50</a> <a href="#L-51"> 51</a> <a href="#L-52"> 52</a> <a href="#L-53"> 53</a> <a href="#L-54"> 54</a> <a href="#L-55"> 55</a> <a href="#L-56"> 56</a> <a href="#L-57"> 57</a> <a href="#L-58"> 58</a> <a href="#L-59"> 59</a> <a href="#L-60"> 60</a> <a href="#L-61"> 61</a> <a href="#L-62"> 62</a> <a href="#L-63"> 63</a> <a href="#L-64"> 64</a> <a href="#L-65"> 65</a> <a href="#L-66"> 66</a> <a href="#L-67"> 67</a> <a href="#L-68"> 68</a> <a href="#L-69"> 69</a> <a href="#L-70"> 70</a> <a href="#L-71"> 71</a> <a href="#L-72"> 72</a> <a href="#L-73"> 73</a> <a href="#L-74"> 74</a> <a href="#L-75"> 75</a> <a href="#L-76"> 76</a> <a href="#L-77"> 77</a> <a href="#L-78"> 78</a> <a href="#L-79"> 79</a> <a href="#L-80"> 80</a> <a href="#L-81"> 81</a> <a href="#L-82"> 82</a> <a href="#L-83"> 83</a> <a href="#L-84"> 84</a> <a href="#L-85"> 85</a> <a href="#L-86"> 86</a> <a href="#L-87"> 87</a> <a href="#L-88"> 88</a> <a href="#L-89"> 89</a> <a href="#L-90"> 90</a> <a href="#L-91"> 91</a> <a href="#L-92"> 92</a> <a href="#L-93"> 93</a> <a href="#L-94"> 94</a> <a href="#L-95"> 95</a> <a href="#L-96"> 96</a> <a href="#L-97"> 97</a> <a href="#L-98"> 98</a> <a href="#L-99"> 99</a> <a href="#L-100">100</a> <a href="#L-101">101</a> <a href="#L-102">102</a> <a href="#L-103">103</a> <a href="#L-104">104</a> <a href="#L-105">105</a> <a href="#L-106">106</a> <a href="#L-107">107</a> <a href="#L-108">108</a> <a href="#L-109">109</a> <a href="#L-110">110</a> <a href="#L-111">111</a> <a href="#L-112">112</a> <a href="#L-113">113</a> <a href="#L-114">114</a> <a href="#L-115">115</a> <a href="#L-116">116</a> <a href="#L-117">117</a> <a href="#L-118">118</a> <a href="#L-119">119</a> <a href="#L-120">120</a> <a href="#L-121">121</a> <a href="#L-122">122</a> <a href="#L-123">123</a> <a href="#L-124">124</a> <a href="#L-125">125</a> <a href="#L-126">126</a> <a href="#L-127">127</a> <a href="#L-128">128</a> <a href="#L-129">129</a> <a href="#L-130">130</a> <a href="#L-131">131</a> <a href="#L-132">132</a> <a href="#L-133">133</a> <a href="#L-134">134</a> <a href="#L-135">135</a> <a href="#L-136">136</a> <a href="#L-137">137</a> <a href="#L-138">138</a> <a href="#L-139">139</a> <a href="#L-140">140</a> <a href="#L-141">141</a> <a href="#L-142">142</a> <a href="#L-143">143</a> <a href="#L-144">144</a> <a href="#L-145">145</a> <a href="#L-146">146</a> <a href="#L-147">147</a> <a href="#L-148">148</a> <a href="#L-149">149</a> <a href="#L-150">150</a> <a href="#L-151">151</a> <a href="#L-152">152</a> <a href="#L-153">153</a> <a href="#L-154">154</a> <a href="#L-155">155</a> <a href="#L-156">156</a> <a href="#L-157">157</a> <a href="#L-158">158</a> <a href="#L-159">159</a> <a href="#L-160">160</a> <a href="#L-161">161</a> <a href="#L-162">162</a> <a href="#L-163">163</a> <a href="#L-164">164</a> <a href="#L-165">165</a> <a href="#L-166">166</a> <a href="#L-167">167</a> <a href="#L-168">168</a> <a href="#L-169">169</a> <a href="#L-170">170</a> <a href="#L-171">171</a> <a href="#L-172">172</a> <a href="#L-173">173</a> <a href="#L-174">174</a> <a href="#L-175">175</a> <a href="#L-176">176</a> <a href="#L-177">177</a> <a href="#L-178">178</a> <a href="#L-179">179</a> <a href="#L-180">180</a> <a href="#L-181">181</a> <a href="#L-182">182</a> <a href="#L-183">183</a> <a href="#L-184">184</a> <a href="#L-185">185</a> <a href="#L-186">186</a> <a href="#L-187">187</a> <a href="#L-188">188</a> <a href="#L-189">189</a> <a href="#L-190">190</a> <a href="#L-191">191</a> <a href="#L-192">192</a> <a href="#L-193">193</a> <a href="#L-194">194</a> <a href="#L-195">195</a> <a href="#L-196">196</a> <a href="#L-197">197</a> <a href="#L-198">198</a> <a href="#L-199">199</a> <a href="#L-200">200</a> <a href="#L-201">201</a> <a href="#L-202">202</a> <a href="#L-203">203</a> <a href="#L-204">204</a> <a href="#L-205">205</a> <a href="#L-206">206</a> <a href="#L-207">207</a> <a href="#L-208">208</a> <a href="#L-209">209</a> <a href="#L-210">210</a> <a href="#L-211">211</a> <a href="#L-212">212</a> <a href="#L-213">213</a> <a href="#L-214">214</a> <a href="#L-215">215</a> <a href="#L-216">216</a> <a href="#L-217">217</a> <a href="#L-218">218</a> <a href="#L-219">219</a> <a href="#L-220">220</a> <a href="#L-221">221</a> <a href="#L-222">222</a> <a href="#L-223">223</a> <a href="#L-224">224</a> <a href="#L-225">225</a> <a href="#L-226">226</a> <a href="#L-227">227</a> <a href="#L-228">228</a> <a href="#L-229">229</a> <a href="#L-230">230</a> <a href="#L-231">231</a> <a href="#L-232">232</a> <a href="#L-233">233</a> <a href="#L-234">234</a> <a href="#L-235">235</a> <a href="#L-236">236</a> <a href="#L-237">237</a> <a href="#L-238">238</a> <a href="#L-239">239</a> <a href="#L-240">240</a> <a href="#L-241">241</a> <a href="#L-242">242</a> <a href="#L-243">243</a> <a href="#L-244">244</a> <a href="#L-245">245</a> <a href="#L-246">246</a> <a href="#L-247">247</a> <a href="#L-248">248</a> <a href="#L-249">249</a> <a href="#L-250">250</a> <a href="#L-251">251</a> <a href="#L-252">252</a> <a href="#L-253">253</a> <a href="#L-254">254</a> <a href="#L-255">255</a> <a href="#L-256">256</a> <a href="#L-257">257</a> <a href="#L-258">258</a> <a href="#L-259">259</a> <a href="#L-260">260</a> <a href="#L-261">261</a> <a href="#L-262">262</a> <a href="#L-263">263</a> <a href="#L-264">264</a> <a href="#L-265">265</a> <a href="#L-266">266</a> <a href="#L-267">267</a> <a href="#L-268">268</a> <a href="#L-269">269</a> <a href="#L-270">270</a> <a href="#L-271">271</a> <a href="#L-272">272</a> <a href="#L-273">273</a> <a href="#L-274">274</a> <a href="#L-275">275</a> <a href="#L-276">276</a> <a href="#L-277">277</a> <a href="#L-278">278</a> <a href="#L-279">279</a> <a href="#L-280">280</a> <a href="#L-281">281</a> <a href="#L-282">282</a> <a href="#L-283">283</a> <a href="#L-284">284</a> <a href="#L-285">285</a> <a href="#L-286">286</a> <a href="#L-287">287</a> <a href="#L-288">288</a> <a href="#L-289">289</a> <a href="#L-290">290</a> <a href="#L-291">291</a> <a href="#L-292">292</a> <a href="#L-293">293</a> <a href="#L-294">294</a> <a href="#L-295">295</a> <a href="#L-296">296</a> <a href="#L-297">297</a> <a href="#L-298">298</a> <a href="#L-299">299</a> <a href="#L-300">300</a> <a href="#L-301">301</a> <a href="#L-302">302</a> <a href="#L-303">303</a> <a href="#L-304">304</a> <a href="#L-305">305</a> <a href="#L-306">306</a> <a href="#L-307">307</a> <a href="#L-308">308</a> <a href="#L-309">309</a> <a href="#L-310">310</a> <a href="#L-311">311</a> <a href="#L-312">312</a> <a href="#L-313">313</a> <a href="#L-314">314</a> <a href="#L-315">315</a> <a href="#L-316">316</a> <a href="#L-317">317</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="ch">#!/bin/bash</span> </span><span id="L-2"><a name="L-2"></a><span class="c1"># =================================================</span> </span><span id="L-3"><a name="L-3"></a><span class="c1"># File: Codecs and progs to debian linux</span> </span><span id="L-4"><a name="L-4"></a><span class="c1"># CREATED: Qui 30/Mai/2013 hs 20:56</span> </span><span id="L-5"><a name="L-5"></a><span class="c1"># LAST CHANGE: 2013 Mai 30 20:57:09</span> </span><span id="L-6"><a name="L-6"></a><span class="c1"># THIS SCRIPT AIMS: describe here</span> </span><span id="L-7"><a name="L-7"></a><span class="c1"># AUTHOR: {2:Sérgio Luiz Araújo Silva}</span> </span><span id="L-8"><a name="L-8"></a><span class="c1"># SITE: {3:http://vivaotux.blogspot.com}</span> </span><span id="L-9"><a name="L-9"></a><span class="c1"># TWITTER: @voyeg3r</span> </span><span id="L-10"><a name="L-10"></a><span class="c1"># SKYPE: sergioaraujosilva</span> </span><span id="L-11"><a name="L-11"></a><span class="c1"># =================================================</span> </span><span id="L-12"><a name="L-12"></a> </span><span id="L-13"><a name="L-13"></a><span class="c1"># ( O O )</span> </span><span id="L-14"><a name="L-14"></a><span class="c1"># +===========oOO==(_)==OOo==============+</span> </span><span id="L-15"><a name="L-15"></a> </span><span id="L-16"><a name="L-16"></a><span class="c1"># based in: https://gist.github.com/voyeg3r/5473634</span> </span><span id="L-17"><a name="L-17"></a><span class="c1"># References:</span> </span><span id="L-18"><a name="L-18"></a><span class="c1"># http://wiki.debian.org/MultimediaCodecs</span> </span><span id="L-19"><a name="L-19"></a><span class="c1"># https://sites.google.com/site/mydebiansourceslist/</span> </span><span id="L-20"><a name="L-20"></a><span class="c1"># http://sejalivre.org/o-que-fazer-apos-instalar-o-debian-passo-a-passo-da-pos-instalacao/</span> </span><span id="L-21"><a name="L-21"></a> </span><span id="L-22"><a name="L-22"></a><span class="c1"># Excelente artigo do Lex Aleksandre sobre hardware não livre</span> </span><span id="L-23"><a name="L-23"></a><span class="c1"># http://www.debianmaniaco.blogspot.com.br/2012/06/instalando-debian-com-firmware-nao.html</span> </span><span id="L-24"><a name="L-24"></a> </span><span id="L-25"><a name="L-25"></a><span class="c1"># à partir do squeezy se deixar a senha do root em branco o usuário padrão terá poderes sudo</span> </span><span id="L-26"><a name="L-26"></a><span class="c1"># dica do Lex Aleksandre</span> </span><span id="L-27"><a name="L-27"></a> </span><span id="L-28"><a name="L-28"></a><span class="c1"># imagens do instalador</span> </span><span id="L-29"><a name="L-29"></a><span class="c1"># http://cdimage.debian.org/debian-cd/7.0.0/</span> </span><span id="L-30"><a name="L-30"></a><span class="c1"># http://cdimage.debian.org/debian-cd/7.0.0/i386/bt-dvd/</span> </span><span id="L-31"><a name="L-31"></a> </span><span id="L-32"><a name="L-32"></a><span class="c1"># configurações do NetworkManager:</span> </span><span id="L-33"><a name="L-33"></a><span class="c1"># http://wiki.debian.org/NetworkManager</span> </span><span id="L-34"><a name="L-34"></a><span class="c1"># /etc/NetworkManager/NetworkManager.conf</span> </span><span id="L-35"><a name="L-35"></a><span class="c1"># /etc/init.d/network-manager restart</span> </span><span id="L-36"><a name="L-36"></a> </span><span id="L-37"><a name="L-37"></a><span class="c1"># trying set up hotspot</span> </span><span id="L-38"><a name="L-38"></a><span class="c1"># http://forums.debian.net/viewtopic.php?f=16&amp;t=49136</span> </span><span id="L-39"><a name="L-39"></a><span class="c1"># sudo aptitude install hostapd</span> </span><span id="L-40"><a name="L-40"></a> </span><span id="L-41"><a name="L-41"></a><span class="c1"># http://sistemaoperacionalinux.blogspot.com.br/2013/04/diminuindo-o-tamanho-dos-icones-do.html</span> </span><span id="L-42"><a name="L-42"></a> </span><span id="L-43"><a name="L-43"></a><span class="c1"># bash tips:</span> </span><span id="L-44"><a name="L-44"></a><span class="c1"># http://indlovu.wordpress.com/2010/07/26/useful-bash-functions/</span> </span><span id="L-45"><a name="L-45"></a><span class="c1"># o3totxt !!!</span> </span><span id="L-46"><a name="L-46"></a><span class="c1"># function o3() { unzip -p &quot;$1&quot; content.xml | o3totxt | utf8tolatin1; }</span> </span><span id="L-47"><a name="L-47"></a> </span><span id="L-48"><a name="L-48"></a>fixetchosts <span class="o">()</span> <span class="o">{</span> </span><span id="L-49"><a name="L-49"></a><span class="c1"># https://snipt.net/voyeg3r/fix-etchosts-in-ubuntu/</span> </span><span id="L-50"><a name="L-50"></a><span class="o">[</span> <span class="s2">&quot;`awk &#39;NR==1 {print </span><span class="nv">$NF</span><span class="s2">}&#39; /etc/hosts`&quot;</span> <span class="o">=</span> <span class="s2">&quot;`hostname`&quot;</span> <span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s1">&#39;/etc/hosts already fixed!&#39;</span> <span class="o">||</span> sed -i.backup -r <span class="s2">&quot;1s/(.*)/\1 `hostname`/g&quot;</span> /etc/hosts </span><span id="L-51"><a name="L-51"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> fixetchosts </span><span id="L-52"><a name="L-52"></a> </span><span id="L-53"><a name="L-53"></a>apt-get install -y cairo-dock cairo-dock-plug-ins </span><span id="L-54"><a name="L-54"></a> </span><span id="L-55"><a name="L-55"></a>descompactadores <span class="o">()</span> <span class="o">{</span> </span><span id="L-56"><a name="L-56"></a><span class="c1"># http://www.rarlab.com/download.htm</span> </span><span id="L-57"><a name="L-57"></a><span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;</span><span class="k">$(</span>id -u<span class="k">)</span><span class="s2">&quot;</span> !<span class="o">=</span> <span class="s2">&quot;0&quot;</span> <span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s2">&quot; Need be root&quot;</span> <span class="o">&amp;&amp;</span> sleep <span class="m">3</span> <span class="o">&amp;&amp;</span> <span class="nb">exit</span> 1 </span><span id="L-58"><a name="L-58"></a><span class="o">[</span> <span class="s2">&quot;`dpkg -s build-essential | awk &#39;/Status/ {print </span><span class="nv">$4</span><span class="s2">}&#39;`&quot;</span> !<span class="o">=</span> <span class="s2">&quot;installed&quot;</span> <span class="o">]</span> <span class="o">&amp;&amp;</span> apt-get -y build-essential </span><span id="L-59"><a name="L-59"></a>wget -c http://www.rarlab.com/rar/rarlinux-4.2.0.tar.gz <span class="o">&amp;&amp;</span> tar zxvf rarlinux-4.2.0.tar.gz <span class="o">&amp;&amp;</span> <span class="nb">cd</span> rar <span class="o">&amp;&amp;</span> make </span><span id="L-60"><a name="L-60"></a>apt-get --force-yes install arj cabextract file-roller mpack p7zip p7zip-full unrar-free sharutils unace unzip uudeview zip </span><span id="L-61"><a name="L-61"></a><span class="o">}</span> </span><span id="L-62"><a name="L-62"></a> </span><span id="L-63"><a name="L-63"></a>adminstrativetools <span class="o">()</span> <span class="o">{</span> </span><span id="L-64"><a name="L-64"></a>sudo apt-get install -y openssh-server sshfs nmap iptstate iptraf nfs-common nfs-kernel-server portmap moreutils zsync rsync curl libcurl3 python-pycurl ngrep arp-scan nautilus-open-terminal mercurial checkinstall gparted unetbootin testdisk fdupes reaver build-essential </span><span id="L-65"><a name="L-65"></a><span class="o">}</span> </span><span id="L-66"><a name="L-66"></a> </span><span id="L-67"><a name="L-67"></a>installaircrack <span class="o">()</span> <span class="o">{</span> </span><span id="L-68"><a name="L-68"></a><span class="c1"># como hackear redes wifi: http://www.youtube.com/watch?v=2_3MpVoY4Cg</span> </span><span id="L-69"><a name="L-69"></a><span class="c1"># http://www.aircrack-ng.org/doku.php?id=install_aircrack</span> </span><span id="L-70"><a name="L-70"></a><span class="c1"># http://krazyk-world.blogspot.com.br/2011/07/aircrack-ng-en-debian-testing-wheezy.html</span> </span><span id="L-71"><a name="L-71"></a><span class="c1"># http://packages.debian.org/sid/i386/aircrack-ng/download</span> </span><span id="L-72"><a name="L-72"></a>wget -c http://ftp.de.debian.org/debian/pool/main/a/aircrack-ng/aircrack-ng_1.1-5_i386.deb <span class="o">&amp;&amp;</span> dpkg -i aircrack-ng_1.1-5_i386.deb </span><span id="L-73"><a name="L-73"></a>apt-get install -y reaver build-essential </span><span id="L-74"><a name="L-74"></a> </span><span id="L-75"><a name="L-75"></a><span class="o">}</span> </span><span id="L-76"><a name="L-76"></a> </span><span id="L-77"><a name="L-77"></a>installgraphicsapplications <span class="o">()</span> <span class="o">{</span> </span><span id="L-78"><a name="L-78"></a>sudo apt-get install -y gmic gimp-data-extras gimp-plugin-registry inkscape shotwell nautilus-image-converter imagemagick gimp-resynthesizer libgimp2.0-dev ghostscript pdftk xclip xsel xsane </span><span id="L-79"><a name="L-79"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> installgraphicsapplications </span><span id="L-80"><a name="L-80"></a> </span><span id="L-81"><a name="L-81"></a>instainsync <span class="o">()</span> <span class="o">{</span> </span><span id="L-82"><a name="L-82"></a><span class="c1"># http://debianmaniaco.blogspot.com.br/2012/10/google-drive-no-debian.html</span> </span><span id="L-83"><a name="L-83"></a><span class="c1"># lsync is a google-docs client</span> </span><span id="L-84"><a name="L-84"></a><span class="c1"># https://www.insynchq.com/</span> </span><span id="L-85"><a name="L-85"></a>wget -O - https://d2t3ff60b2tol4.cloudfront.net/[email protected] <span class="p">|</span> sudo apt-key add - </span><span id="L-86"><a name="L-86"></a><span class="o">[</span> -z <span class="s2">&quot;`grep -o http://apt.insynchq.com/debian /etc/apt/sources.list`&quot;</span> <span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="se">\</span> </span><span id="L-87"><a name="L-87"></a><span class="nb">echo</span> <span class="s1">&#39;deb http://apt.insynchq.com/debian wheezy non-free&#39;</span> &gt;&gt; /etc/apt/sources.list </span><span id="L-88"><a name="L-88"></a>apt-get update <span class="o">&amp;&amp;</span> apt-get install -y insync-beta-gnome </span><span id="L-89"><a name="L-89"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> instainsync </span><span id="L-90"><a name="L-90"></a> </span><span id="L-91"><a name="L-91"></a>installbootsplash <span class="o">()</span> <span class="o">{</span> </span><span id="L-92"><a name="L-92"></a><span class="c1"># instalando splash screen - tela de boot animada :</span> </span><span id="L-93"><a name="L-93"></a><span class="c1"># http://debianmaniaco.blogspot.com.br/2011/08/boot-animado-no-debian-squeeze.html</span> </span><span id="L-94"><a name="L-94"></a>sudo aptitude install plymouth plymouth-themes-all plymouth-x11 v86d </span><span id="L-95"><a name="L-95"></a><span class="c1"># para escolher o tema</span> </span><span id="L-96"><a name="L-96"></a><span class="c1"># plymouth-set-default-theme -l</span> </span><span id="L-97"><a name="L-97"></a><span class="c1"># plymouth-set-default-theme &quot;nome-do-tema&quot; --rebuild-initrd</span> </span><span id="L-98"><a name="L-98"></a>plymouth-set-default-theme spacefun --rebuild-initrd </span><span id="L-99"><a name="L-99"></a>sed -i.backup -r <span class="s1">&#39;/GRUB_CMDLINE_LINUX_DEFAULT/ s/quiet/&amp; splash/g&#39;</span> /etc/default/grup </span><span id="L-100"><a name="L-100"></a>sed -i.backup -r <span class="s1">&#39;s/^(#)(GRUB_GFXMODE).*/\2=1024x768/g&#39;</span> /etc/default/grub </span><span id="L-101"><a name="L-101"></a>update-grub2 </span><span id="L-102"><a name="L-102"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> installbootsplash </span><span id="L-103"><a name="L-103"></a> </span><span id="L-104"><a name="L-104"></a>kernel39 <span class="o">()</span> <span class="o">{</span> </span><span id="L-105"><a name="L-105"></a><span class="c1"># http://debianmaniaco.blogspot.com.br/2013/04/instalando-o-kernel-39-no-debian.html</span> </span><span id="L-106"><a name="L-106"></a><span class="o">[</span> -z <span class="s2">&quot;`grep &#39;http://linux-libre.fsfla.org/pub/linux-libre/freesh/ 2&gt; /dev/null&#39; /etc/apt/sources.list`&quot;</span> <span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s1">&#39;deb http://linux-libre.fsfla.org/pub/linux-libre/freesh/ freesh main&#39;</span> &gt;&gt; /etc/apt/sources.list </span><span id="L-107"><a name="L-107"></a>wget http://linux-libre.fsfla.org/pub/linux-libre/freesh/archive-key.asc <span class="o">&amp;&amp;</span> sudo apt-key add archive-key.asc </span><span id="L-108"><a name="L-108"></a>sudo aptitude update </span><span id="L-109"><a name="L-109"></a>sudo aptitude install linux-libre32-3.9 </span><span id="L-110"><a name="L-110"></a><span class="c1"># caso queira remover o kernel use o comando abaixo para listar</span> </span><span id="L-111"><a name="L-111"></a><span class="c1"># dpkg --list | grep linux-image</span> </span><span id="L-112"><a name="L-112"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> kernel39 </span><span id="L-113"><a name="L-113"></a> </span><span id="L-114"><a name="L-114"></a>installpfkernel <span class="o">()</span> <span class="o">{</span> </span><span id="L-115"><a name="L-115"></a><span class="c1"># http://sejalivre.org/aumentando-o-desempenho-do-ubuntu-e-debian-com-pf-kernel/</span> </span><span id="L-116"><a name="L-116"></a><span class="nb">cd</span> ~/Downloads </span><span id="L-117"><a name="L-117"></a>wget -c http://repos.natalenko.name/ubuntu/pf/linux-image-3.9.2-pf_1_i386.deb </span><span id="L-118"><a name="L-118"></a>sudo dpkg -i linux-image*.deb </span><span id="L-119"><a name="L-119"></a> </span><span id="L-120"><a name="L-120"></a><span class="c1"># caso queira remover faça:</span> </span><span id="L-121"><a name="L-121"></a><span class="c1"># sudo apt-get remove $(dpkg --get-selections | grep linux-.*pf | sed -e &#39;s/-pf.*/-pf/g&#39;)</span> </span><span id="L-122"><a name="L-122"></a><span class="o">}</span> </span><span id="L-123"><a name="L-123"></a> </span><span id="L-124"><a name="L-124"></a>addppa <span class="o">()</span> <span class="o">{</span> </span><span id="L-125"><a name="L-125"></a><span class="c1"># source: http://debianmaniaco.blogspot.com.br/2012/02/script-para-adicionar-repositorios-ppas.html</span> </span><span id="L-126"><a name="L-126"></a>wget -c https://gist.github.com/voyeg3r/5520774/raw/ -O /usr/sbin/add-apt-repository <span class="o">&amp;&amp;</span> <span class="se">\</span> </span><span id="L-127"><a name="L-127"></a>chmod o+x <span class="nv">$_</span> <span class="o">&amp;&amp;</span> chown root:roo <span class="nv">$_</span> </span><span id="L-128"><a name="L-128"></a><span class="o">}</span> </span><span id="L-129"><a name="L-129"></a> </span><span id="L-130"><a name="L-130"></a>singlesourcelist <span class="o">()</span> <span class="o">{</span> </span><span id="L-131"><a name="L-131"></a><span class="c1"># solving sources.list issues</span> </span><span id="L-132"><a name="L-132"></a><span class="c1"># http://http.debian.net/</span> </span><span id="L-133"><a name="L-133"></a>cp /etc/apt/sources.list<span class="o">{</span>,-backup<span class="o">}</span> </span><span id="L-134"><a name="L-134"></a>cat <span class="s">&lt;&lt;-EOF &gt; /etc/apt/sources.list</span> </span><span id="L-135"><a name="L-135"></a><span class="s"># http://debianmaniaco.blogspot.com.br/2013/05/usando-endereco-unico-para-os.html</span> </span><span id="L-136"><a name="L-136"></a><span class="s">deb http://http.debian.net/debian wheezy main</span> </span><span id="L-137"><a name="L-137"></a><span class="s">EOF</span> </span><span id="L-138"><a name="L-138"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> singlesourcelist </span><span id="L-139"><a name="L-139"></a> </span><span id="L-140"><a name="L-140"></a><span class="c1"># ls sempre colorido</span> </span><span id="L-141"><a name="L-141"></a><span class="c1"># http://www.vivaolinux.com.br/dica/Mantenha-o-ls-sempre-colorido : alias ls=&#39;ls --color=auto&#39;</span> </span><span id="L-142"><a name="L-142"></a> </span><span id="L-143"><a name="L-143"></a><span class="c1"># como instalar o firefox verdadeiro</span> </span><span id="L-144"><a name="L-144"></a><span class="c1"># http://superuser.com/questions/322376/how-to-install-real-firefox-on-debian</span> </span><span id="L-145"><a name="L-145"></a><span class="c1"># how improve it: http://www.makeuseof.com/tag/tired-of-buffering-3-ways-to-speed-up-youtube/</span> </span><span id="L-146"><a name="L-146"></a> </span><span id="L-147"><a name="L-147"></a>installfirefoxtrunck <span class="o">()</span> <span class="o">{</span> </span><span id="L-148"><a name="L-148"></a>sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa </span><span id="L-149"><a name="L-149"></a>sudo apt-get update </span><span id="L-150"><a name="L-150"></a>sudo apt-get install -y firefox-trunk </span><span id="L-151"><a name="L-151"></a><span class="o">}</span> </span><span id="L-152"><a name="L-152"></a> </span><span id="L-153"><a name="L-153"></a>installyoutubedl <span class="o">(){</span> </span><span id="L-154"><a name="L-154"></a><span class="c1"># http://rg3.github.io/youtube-dl/download.html</span> </span><span id="L-155"><a name="L-155"></a>sudo wget http://youtube-dl.org/downloads/2013.05.10/youtube-dl -O /usr/local/bin/youtube-dl <span class="o">&amp;&amp;</span> chmod +x <span class="nv">$_</span> </span><span id="L-156"><a name="L-156"></a><span class="o">}</span> </span><span id="L-157"><a name="L-157"></a> </span><span id="L-158"><a name="L-158"></a><span class="c1"># como criar um atalho personalizado</span> </span><span id="L-159"><a name="L-159"></a><span class="c1"># http://superuser.com/questions/476937/ctrlaltt-doesnt-open-a-terminal-in-cinnamon-1-6</span> </span><span id="L-160"><a name="L-160"></a> </span><span id="L-161"><a name="L-161"></a>improveperformance <span class="o">()</span> <span class="o">{</span> </span><span id="L-162"><a name="L-162"></a><span class="c1"># reference http://artipc10.vub.ac.be/wordpress/2011/05/27/linux-performance-improvements/</span> </span><span id="L-163"><a name="L-163"></a>sync <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="m">3</span> &gt; /proc/sys/vm/drop_caches <span class="c1"># limpa o cache da memória</span> </span><span id="L-164"><a name="L-164"></a><span class="k">if</span> <span class="nb">test</span> -f /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor </span><span id="L-165"><a name="L-165"></a><span class="k">then</span> </span><span id="L-166"><a name="L-166"></a> <span class="nb">echo</span> <span class="m">10</span> &gt; /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor </span><span id="L-167"><a name="L-167"></a><span class="k">fi</span> </span><span id="L-168"><a name="L-168"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> improveperformance </span><span id="L-169"><a name="L-169"></a> </span><span id="L-170"><a name="L-170"></a>sudo apt-get install -y sysv-rc-conf </span><span id="L-171"><a name="L-171"></a> </span><span id="L-172"><a name="L-172"></a> </span><span id="L-173"><a name="L-173"></a>installbrotherDCP7065DN <span class="o">()</span> <span class="o">{</span> </span><span id="L-174"><a name="L-174"></a><span class="c1"># aqui no trabalho tenho uma impressoras dessas e por isso uso este script</span> </span><span id="L-175"><a name="L-175"></a>sudo apt-get install brother* </span><span id="L-176"><a name="L-176"></a> </span><span id="L-177"><a name="L-177"></a><span class="c1"># SCANNING</span> </span><span id="L-178"><a name="L-178"></a>sudo apt-get install xsane sane-utils xsane-common </span><span id="L-179"><a name="L-179"></a><span class="nb">cd</span> ~/Downloads </span><span id="L-180"><a name="L-180"></a><span class="c1">#wget http://pub.brother.com/pub/com/bsc/linux/dlf/brscan4-0.3.0-2.amd64.deb</span> </span><span id="L-181"><a name="L-181"></a>wget http://www.brother.com/pub/bsc/linux/dlf/brscan4-0.4.1-3.i386.deb </span><span id="L-182"><a name="L-182"></a>sudo dpkg -i brscan4-0.4.1-3.i386.deb </span><span id="L-183"><a name="L-183"></a>sudo cp /usr/lib/sane/libsane-brother4.so.1.0.7 /usr/lib/sane/ </span><span id="L-184"><a name="L-184"></a>sudo cp /usr/lib/sane/libsane-brother4.so /usr/lib/sane/ </span><span id="L-185"><a name="L-185"></a>sudo cp /usr/lib/sane/libsane-brother4.so.1 /usr/lib/sane/ </span><span id="L-186"><a name="L-186"></a>brsaneconfig4 -a <span class="nv">name</span><span class="o">=</span>DCP-7065DN <span class="nv">model</span><span class="o">=</span>DCP-7065DN <span class="nv">nodename</span><span class="o">=</span><span class="sb">`</span>hostname<span class="sb">`</span>.local </span><span id="L-187"><a name="L-187"></a><span class="c1"># ...where drucksack is the local hostname of the printer/scanner ↑</span> </span><span id="L-188"><a name="L-188"></a><span class="c1"># If you want if you want to specify your printer rather using its IP, run this instead:</span> </span><span id="L-189"><a name="L-189"></a><span class="c1">#brsaneconfig4 -a name=DCP-7065DN model=DCP-7065DN ip=192.168.2.30</span> </span><span id="L-190"><a name="L-190"></a> </span><span id="L-191"><a name="L-191"></a><span class="c1">## PRINTING</span> </span><span id="L-192"><a name="L-192"></a> </span><span id="L-193"><a name="L-193"></a>sudo apt-get install cups csh lib32stdc++6 </span><span id="L-194"><a name="L-194"></a>sudo mkdir /var/spool/lpd </span><span id="L-195"><a name="L-195"></a>sudo mkdir -p /usr/lib/cups/filter </span><span id="L-196"><a name="L-196"></a>sudo mkdir /usr/share/cups/model </span><span id="L-197"><a name="L-197"></a>sudo mkdir -p /usr/lib/cups/filter </span><span id="L-198"><a name="L-198"></a><span class="nb">cd</span> ~/Downloads </span><span id="L-199"><a name="L-199"></a>wget http://pub.brother.com/pub/com/bsc/linux/dlf/dcp7065dnlpr-2.1.0-1.i386.deb </span><span id="L-200"><a name="L-200"></a>wget http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperDCP7065DN-2.0.4-2.i386.deb </span><span id="L-201"><a name="L-201"></a>sudo dpkg -i dcp7065dnlpr-2.1.0-1.i386.deb </span><span id="L-202"><a name="L-202"></a>sudo dpkg -i cupswrapperDCP7065DN-2.0.4-2.i386.deb </span><span id="L-203"><a name="L-203"></a>sudo cp /usr/lib/libbr* /usr/lib32/ </span><span id="L-204"><a name="L-204"></a>sudo cp /usr/lib/cups/filter/brlpdwrapper* /usr/lib64/cups/filter </span><span id="L-205"><a name="L-205"></a>sudo cp /usr/lib/cups/filter/brlpdwrapper* /usr/lib/cups/filter </span><span id="L-206"><a name="L-206"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> installbrotherDCP7065DN </span><span id="L-207"><a name="L-207"></a> </span><span id="L-208"><a name="L-208"></a>confvim <span class="o">(){</span> </span><span id="L-209"><a name="L-209"></a>sudo apt-get -y install vim-gnome vim-doc </span><span id="L-210"><a name="L-210"></a>sudo apt-get -y install aspell-pt-br </span><span id="L-211"><a name="L-211"></a>sudo apt-get install -y mercurial </span><span id="L-212"><a name="L-212"></a>hg clone https://bitbucket.org/sergio/vimfiles .vim </span><span id="L-213"><a name="L-213"></a>rm -f .bashrc </span><span id="L-214"><a name="L-214"></a>rm -f .inputrc </span><span id="L-215"><a name="L-215"></a>ln -s ~/.vim/inputrc ~/.inputrc </span><span id="L-216"><a name="L-216"></a>ln -s ~/.vim/bashrc ~/.bashrc </span><span id="L-217"><a name="L-217"></a>ln -s ~/.vim/pythonstartup ~/.pythonstartup </span><span id="L-218"><a name="L-218"></a>ln -s ~/.vim/vimrc ~/.vimrc </span><span id="L-219"><a name="L-219"></a> </span><span id="L-220"><a name="L-220"></a>cat <span class="s">&lt;&lt;-EOF &gt; ~/.hgrc</span> </span><span id="L-221"><a name="L-221"></a><span class="s">[ui]</span> </span><span id="L-222"><a name="L-222"></a><span class="s">ssh = ssh -i ~/.ssh/id_rsa.pub -C</span> </span><span id="L-223"><a name="L-223"></a><span class="s">username = sergio silva &lt;[email protected]&gt;</span> </span><span id="L-224"><a name="L-224"></a><span class="s">editor = vim</span> </span><span id="L-225"><a name="L-225"></a><span class="s">[paths]</span> </span><span id="L-226"><a name="L-226"></a><span class="s">default = ssh://[email protected]/sergio/vimfiles</span> </span><span id="L-227"><a name="L-227"></a><span class="s">EOF</span> </span><span id="L-228"><a name="L-228"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> confvim </span><span id="L-229"><a name="L-229"></a> </span><span id="L-230"><a name="L-230"></a>addaudacious <span class="o">()</span> <span class="o">{</span> </span><span id="L-231"><a name="L-231"></a>apt-get install -y audacious sox sudo apt-get install libsox-fmt-mp3 mpg321 </span><span id="L-232"><a name="L-232"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> addaudacious </span><span id="L-233"><a name="L-233"></a> </span><span id="L-234"><a name="L-234"></a><span class="c1"># para suavizar as fontes digite o comando como usuário dpkg-reconfigure fontconfig-config e responda as perguntas com</span> </span><span id="L-235"><a name="L-235"></a><span class="c1"># “Autohinder”, “Sempre” e “Não”. Aguarde e você notará uma leve diferença nas fontes na área de trabalho. Se o comando não for # aplicado de imediato, então, reinicie o computador.</span> </span><span id="L-236"><a name="L-236"></a> </span><span id="L-237"><a name="L-237"></a>openterminal <span class="o">()</span> <span class="o">{</span> </span><span id="L-238"><a name="L-238"></a>apt-get install -y nautilus-open-terminal </span><span id="L-239"><a name="L-239"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> openterminal </span><span id="L-240"><a name="L-240"></a> </span><span id="L-241"><a name="L-241"></a>googletalkplugin <span class="o">()</span> <span class="o">{</span> </span><span id="L-242"><a name="L-242"></a>wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub <span class="p">|</span> sudo apt-key add - </span><span id="L-243"><a name="L-243"></a>sudo sh -c <span class="s1">&#39;echo &quot;deb http://dl.google.com/linux/talkplugin/deb/ stable main&quot; &gt;&gt; /etc/apt/sources.list.d/google.list&#39;</span> </span><span id="L-244"><a name="L-244"></a>sudo apt-get update </span><span id="L-245"><a name="L-245"></a>sudo apt-get install -y google-talkplugin </span><span id="L-246"><a name="L-246"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> googletalkplugin </span><span id="L-247"><a name="L-247"></a> </span><span id="L-248"><a name="L-248"></a>fixmountexternalhd <span class="o">()</span> <span class="o">{</span> </span><span id="L-249"><a name="L-249"></a><span class="c1"># http://forums.debian.net/viewtopic.php?p=492527&amp;sid=8564023a0121552da21f5584ecc1f592</span> </span><span id="L-250"><a name="L-250"></a><span class="c1"># http://www.tuxera.com/community/ntfs-3g-faq/#unprivileged</span> </span><span id="L-251"><a name="L-251"></a>sed -i.backup -r <span class="s1">&#39;/usb0/ s/^/#/g&#39;</span> /etc/fstab </span><span id="L-252"><a name="L-252"></a>mount -a </span><span id="L-253"><a name="L-253"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> fixmountexternalhd </span><span id="L-254"><a name="L-254"></a> </span><span id="L-255"><a name="L-255"></a> </span><span id="L-256"><a name="L-256"></a>installflashplayer <span class="o">()</span> <span class="o">{</span> </span><span id="L-257"><a name="L-257"></a>wget -c https://www.dropbox.com/s/t3yymfkpus89jqv/libflashplayer.so?dl<span class="o">=</span><span class="m">1</span> -O libflashplayer.so <span class="o">&amp;&amp;</span> sudo cp libflashplayer.so /usr/lib/mozilla/plugins/ </span><span id="L-258"><a name="L-258"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> installflashplayer </span><span id="L-259"><a name="L-259"></a> </span><span id="L-260"><a name="L-260"></a>consertabrilho <span class="o">()</span> <span class="o">{</span> </span><span id="L-261"><a name="L-261"></a><span class="c1"># references: http://ubuntuforums.org/showthread.php?t=1742352</span> </span><span id="L-262"><a name="L-262"></a><span class="c1"># http://stereopsis.com/flux/ # where I am? http://stereopsis.com/flux/map.html</span> </span><span id="L-263"><a name="L-263"></a><span class="c1"># sudo wget -c https://www.dropbox.com/s/f837y509u68jdz7/xflux?dl=1 -O /usr/bin/xflux &amp;&amp; sudo chmod +x $_</span> </span><span id="L-264"><a name="L-264"></a><span class="c1"># this coordenates are to Quixeramobim -- to get your location visit: http://stereopsis.com/flux/map.html</span> </span><span id="L-265"><a name="L-265"></a><span class="c1"># xflux -l 5.1981 -g -39.2962</span> </span><span id="L-266"><a name="L-266"></a><span class="c1"># consertando o ajuste do brilho do monitor em computadores acer</span> </span><span id="L-267"><a name="L-267"></a><span class="c1"># source: http://www.vivaolinux.com.br/topico/Ubuntu-Ultimate/Ajuste-do-brilho-da-tela</span> </span><span id="L-268"><a name="L-268"></a>sudo sed -i.backup -r <span class="s1">&#39;/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/=.*/=&quot;quiet splash acpi_backlight=vendor&quot;/g&#39;</span> /etc/default/grub </span><span id="L-269"><a name="L-269"></a>sudo sed -i.backup -r <span class="s1">&#39;/^GRUB_CMDLINE_LINUX=/ s/=.*/=&quot;acpi_osi=Linux&quot;/g&#39;</span> /etc/default/grub </span><span id="L-270"><a name="L-270"></a>sudo update-grub </span><span id="L-271"><a name="L-271"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> consertabrilho </span><span id="L-272"><a name="L-272"></a> </span><span id="L-273"><a name="L-273"></a>networkimproviment <span class="o">()</span> <span class="o">{</span> </span><span id="L-274"><a name="L-274"></a><span class="c1"># see how mutch swapp ubuntu is using -- cat /proc/sys/vm/swap­pi­ness</span> </span><span id="L-275"><a name="L-275"></a>sudo cp /etc/sysctl.conf<span class="o">{</span>,.backup<span class="o">}</span> <span class="o">&amp;&amp;</span> sudo wget -c https://gist.github.com/voyeg3r/368407/raw/ -O - &gt; /etc/sysctl.conf <span class="o">&amp;&amp;</span> sysctl -p </span><span id="L-276"><a name="L-276"></a>apt-fast install -y ethtool </span><span id="L-277"><a name="L-277"></a>wget -c https://raw.github.com/gist/1261754 -O /etc/network/if-up.d/100Mbs <span class="o">&amp;&amp;</span> chmod +x <span class="nv">$_</span> </span><span id="L-278"><a name="L-278"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> networkimproviment </span><span id="L-279"><a name="L-279"></a> </span><span id="L-280"><a name="L-280"></a>stopterminals <span class="o">(){</span> </span><span id="L-281"><a name="L-281"></a><span class="c1"># /etc/inittab.</span> </span><span id="L-282"><a name="L-282"></a>sed -ri <span class="s1">&#39;s/^([3-6].*respawn.*tty[3-6])/#\1/g&#39;</span> /etc/inittab </span><span id="L-283"><a name="L-283"></a>telinit q </span><span id="L-284"><a name="L-284"></a><span class="o">}</span> </span><span id="L-285"><a name="L-285"></a> </span><span id="L-286"><a name="L-286"></a>addbackports <span class="o">()</span> <span class="o">{</span> </span><span id="L-287"><a name="L-287"></a><span class="c1"># deb http://ftp.debian.org/debian/ wheezy-backports main</span> </span><span id="L-288"><a name="L-288"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> addbackports </span><span id="L-289"><a name="L-289"></a> </span><span id="L-290"><a name="L-290"></a>showicons <span class="o">()</span> <span class="o">{</span> </span><span id="L-291"><a name="L-291"></a><span class="c1"># to display icons in ubuntu 12.04 precise pangolin do this</span> </span><span id="L-292"><a name="L-292"></a><span class="c1"># source: http://www.ubuntugeek.com/hhow-to-display-computerhomenetworktrash-and-mounted-volumes-icons-on-ubuntu-12-04-precise-desktop.html</span> </span><span id="L-293"><a name="L-293"></a>gsettings <span class="nb">set</span> org.gnome.desktop.background show-desktop-icons <span class="nb">true</span> </span><span id="L-294"><a name="L-294"></a><span class="c1"># gsettings set org.gnome.nautilus.desktop computer-icon-visible true</span> </span><span id="L-295"><a name="L-295"></a>gsettings <span class="nb">set</span> org.gnome.nautilus.desktop home-icon-visible <span class="nb">true</span> </span><span id="L-296"><a name="L-296"></a>gsettings <span class="nb">set</span> org.gnome.nautilus.desktop trash-icon-visible <span class="nb">true</span> </span><span id="L-297"><a name="L-297"></a>gsettings <span class="nb">set</span> org.gnome.nautilus.desktop volumes-visible <span class="nb">true</span> </span><span id="L-298"><a name="L-298"></a>gsettings <span class="nb">set</span> org.gnome.nautilus.preferences click-policy <span class="s1">&#39;single&#39;</span> </span><span id="L-299"><a name="L-299"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> showicons </span><span id="L-300"><a name="L-300"></a> </span><span id="L-301"><a name="L-301"></a>multimedia <span class="o">()</span> <span class="o">{</span> </span><span id="L-302"><a name="L-302"></a> apt-get install libavcodec-extra-53 </span><span id="L-303"><a name="L-303"></a> wget http://www.deb-multimedia.org/pool/non-free/w/w32codecs/w32codecs_20110131-0.1_i386.deb </span><span id="L-304"><a name="L-304"></a> dpkg -i w32codecs_20110131-0.1_i386.deb </span><span id="L-305"><a name="L-305"></a> wget http://www.deb-multimedia.org/pool/main/libd/libdvdcss/libdvdcss2_1.2.10-0.3_i386.deb </span><span id="L-306"><a name="L-306"></a> dpkg -i libdvdcss2_1.2.10-0.3_i386.deb </span><span id="L-307"><a name="L-307"></a> wget http://www.deb-multimedia.org/pool/main/g/gst-plugins-ugly/gstreamer0.10-lame_0.10.17-0.0_i386.deb </span><span id="L-308"><a name="L-308"></a> dpkg -i gstreamer0.10-lame_0.10.17-0.0_i386.deb </span><span id="L-309"><a name="L-309"></a><span class="o">}</span> <span class="o">&amp;&amp;</span> multimedia </span><span id="L-310"><a name="L-310"></a> </span><span id="L-311"><a name="L-311"></a>install firefox <span class="o">()</span> <span class="o">{</span> </span><span id="L-312"><a name="L-312"></a>apt-get remove iceweasel </span><span id="L-313"><a name="L-313"></a><span class="nb">echo</span> <span class="s2">&quot;deb http://packages.linuxmint.com debian import&quot;</span> &gt;&gt; /etc/apt/sources.list </span><span id="L-314"><a name="L-314"></a>apt-get update </span><span id="L-315"><a name="L-315"></a>apt-get install firefox </span><span id="L-316"><a name="L-316"></a>apt-get install firefox-l10n-en-us </span><span id="L-317"><a name="L-317"></a><span class="o">}</span> </span></pre></div> </td></tr></table>
bash, debian