Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # $FS/SETUP
- # Custom FS Hierarchy Config
- #
- # Arkanon <arkanon@lsd.org.br>
- # 2013/08/04 (Sun) 19:13:13 (BRS)
- # 2013/07/24 (Wed) 16:09:53 (BRS)
- # 2013/02/14 (Qui) 16:48:40 (BRD)
- # 2013/02/08 (Sex) 18:00:22 (BRD)
- # 2013/02/07 (Qui) 09:52:08 (BRS)
- # 2013/02/05 (Ter) 17:19:03 (BRS)
- # 2013/01/30 (Qua) 08:35:30 (BRS)
- # 2013/01/29 (Ter) 11:27:34 (BRS)
- #
- # Guide To Setting Up LXDE, The Lightweight Champion <http://lxlinux.com>
- ### habilita login do root
- sudo su -
- passwd
- ### root fs
- eval $(blkid $(df / | tail -n1 | cut -d\ -f1) | tr " " "\n" | grep LABEL)
- # RLABEL="local-07-ext4"
- touch /.$RLABEL
- ### swap
- DISK="/dev/sda"
- SPART=$(sgdisk -p $DISK | grep 8200 | awk -F" +" '{print $NF}')
- SLABEL=$(sgdisk -p $DISK | grep 8200 | awk -F" +" '{print $NF}')
- swaplabel -L $SLABEL $DISK$SPART
- ### distro name, flavor and version
- which gnome-session && FLAVOR=""
- which lxsession && FLAVOR="l"
- which xde-session && FLAVOR="x"
- which kde-session && FLAVOR="k"
- . /etc/os-release
- # NAME="Ubuntu"
- # VERSION="13.04, Raring Ringtail"
- # ID=ubuntu
- # ID_LIKE=debian
- # PRETTY_NAME="Ubuntu 13.04"
- # VERSION_ID="13.04"
- # HOME_URL="http://www.ubuntu.com/"
- # SUPPORT_URL="http://help.ubuntu.com/"
- # BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
- ARCH=$(uname -m | grep -qw x86_64 && echo 64 || echo 32)
- # 32
- touch /.$FLAVOR$ID-$VERSION_ID-$ARCH
- ### data partitions
- rmdir /cdrom/
- mkdir /mnt/{1,2,3,4}
- mkdir /mnt/mp1-media
- mount /dev/disk/by-label/mp1-media /mnt/mp1-media
- mkdir /mnt/mp2-23-export
- mount /dev/disk/by-label/mp2-23-exportmp2-23-export /mnt/mp2-23-export
- ### slash fs
- export FS="/fs"
- HOST="spiderman"
- NETW="lsd"
- mkdir -p /export
- mount /dev/disk/by-label/local-10-export /export
- ln -nfs export/fs $FS
- mkdir -p /var/fs
- # cp -a /export/fs-repo/etc/$NETW-$HOST/ubuntu-11.10-64/ /export/fs-repo/etc/$NETW-$HOST/$ID-$VERSION_ID-$ARCH/
- ln -nfs ../../export/fs-repo/etc/$NETW-$HOST/$ID-$VERSION_ID-$ARCH /var/fs/etc
- # alias h='history'
- # alias l='ls -lap --color'
- # alias df='df -haT'
- # alias du='du -chs'
- # export PATH=$FS/sbin:$FS/bin:$PATH
- . $FS/etc/profile
- ### apt-get
- rm -rf /var/cache/apt/archives
- mkdir -p /export/data/archives/$ID-$VERSION_ID-$ARCH/{incoming,repo}
- ln -nfs /export/data/archives/$ID-$VERSION_ID-$ARCH ~/archives
- cp -al ~/archives/repo/*.deb ~/archives/incoming/
- ln -nfs ~/archives/incoming /var/cache/apt/archives
- ln -nfs $FS/etc/apt/sources.list.d/more.list /etc/apt/sources.list.d/
- . <(grep aptkey /etc/apt/sources.list.d/more.list | grep '^ ' | cut -c5-)
- # sed -i 's/oneiric/quantal/' /etc/apt/sources.list.d/more.list # $(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d= -f2)
- time apt-get update
- udisksctl mount -b /dev/sda6
- mkdir /var/cache/oracle-jdk7-installer/
- cp -a /media/administrador/local-06-ext4/var/cache/oracle-jdk7-installer/jdk-7u25-linux-i586.tar.gz /var/cache/oracle-jdk7-installer/
- cp -al ~/archives/repo/* ~/archives/incoming/
- time apt-get -y remove $(sed -r 's/#.*//g;/^$/d' REM)
- time apt-get -y --force-yes install $(sed -r 's/#.*//g;/^$/d' ADD-{0..6}*)
- time apt-file update
- time update-apt-xapian-index # <http://forums.bodhilinux.com/index.php?/topic/5597-quick-search-missing-synaptic/>
- du ~/archives/{repo,incoming}
- mv ~/archives/incoming/*.deb ~/archives/repo/
- ### system default appss
- update-alternatives --get-selections | grep x-www-browser
- update-alternatives --list x-www-browser
- update-alternatives --set x-www-browser /usr/bin/chromium-browser
- update-alternatives --get-selections | grep gnome-www-browser
- update-alternatives --list gnome-www-browser
- update-alternatives --set gnome-www-browser /usr/bin/chromium-browser
- ### user apps
- ln -fs $FS/etc/toprc ~/.toprc
- ln -fs $FS/home/.lynxrc ~/
- ### synaptic
- mkdir -p $FS/.ori/root/.synaptic/
- touch $FS/.ori/root/.synaptic/synaptic.conf
- ln -fs $FS/home/.synaptic/synaptic.conf ~/.synaptic/synaptic.conf
- ### libtrash
- unset LD_PRELOAD
- touch $FS/.ori/etc/libtrash.conf
- touch $FS/.ori/root/.libtrash
- ln -fs $FS/etc/libtrash.conf /etc
- ln -fs /etc/libtrash.conf ~/.libtrash
- rm -r ~/Trash
- mkdir ~/.trash/
- ### xorg
- ori s /etc/X11/xorg.conf
- rm -f /etc/X11/xorg.conf
- ### bash
- ori s ~/.bashrc
- rm -f ~/.bashrc
- ori s ~/.profile
- rm -f ~/.profile
- ori s /etc/profile
- ln -fs $FS/etc/profile /etc/
- ori s /etc/bash.bashrc
- ln -fs $FS/etc/profile /etc/bash.bashrc
- ori s /etc/bash_completion.d/apport_completion
- ln -fs $FS/etc/bash_completion.d/apport_completion /etc/bash_completion.d/
- ln -fs $FS/etc/bash_completion.d/misc /etc/bash_completion.d/
- cp -a /bin/sh $FS/.ori/bin/
- ln -fs bash /bin/sh
- ori s /etc/screenrc
- ln -fs $FS/etc/screenrc /etc/
- ### vim
- ori s /etc/vim/
- rm -rf /etc/vim
- ln -fs $FS/etc/vim /etc/
- ### fstab
- ori s /etc/fstab
- cp -a $FS/etc/.cp/fstab /etc/
- ### grub
- ori s /etc/default/grub
- ln -fs $FS/etc/default/grub /etc/default/
- ori s /etc/grub.d/10_linux
- ln -fs $FS/etc/grub.d/10_linux /etc/grub.d/
- ori s /etc/grub.d/40_custom
- ln -fs $FS/etc/grub.d/40_custom /etc/grub.d/
- update-grub
- ### host
- echo $HOST >| /etc/hostname
- ori s /etc/hosts
- ln -fs $FS/etc/hosts /etc
- ### nfs
- ori s /etc/exports
- ln -fs $FS/etc/exports /etc
- rc.nfs start
- exportfs -a
- showmount -e
- ### ssh
- ori s /etc/ssh/sshd_config
- ln -fs $FS/etc/ssh/sshd_config /etc/ssh
- ori s /etc/ssh/ssh_config
- ln -fs $FS/etc/ssh/ssh_config /etc/ssh
- cp -a $FS/home/.ssh/root ~/.ssh
- chown -R root:root ~/.ssh/
- ### no-ip
- ln -fs $FS/etc/rc2.d/S90noip2 /etc/rc2.d/
- rc.noip2 status
- rc.noip2 start
- ### init
- for i in $FS/.ori/etc/rc2.d/*; do echo rm /etc/rc2.d/$(basename $i); done
- for i in $FS/etc/init/*
- do
- echo ori s /etc/init/$(basename $i)
- echo ln -fs $i /etc/init
- done
- ### scanner/impressora
- # <http://www.meier-geinitz.de/sane/gt68xx-backend/>
- # <http://ubuntuforums.org/archive/index.php/t-24087.html>
- ln -s $FS/share/sane/gt68xx /usr/share/sane/
- cupsd
- id root
- usermod -G lp,lpadmin
- # <logout-login>
- mkdir ~/.hplip
- touch ~/.hplip/hplip.conf
- # <http://hplipopensource.com/hplip-web/install/install/index.html>
- # <http://hplipopensource.com/hplip-web/release_notes.html>
- hp-check -t
- hp-plugin -i
- scanimage -L
- scanimage > /dev/null
- ### log
- l /var/log/{,*/}*.{gz,0,1,old}
- rm /var/log/{,*/}*.{gz,0,1,old}
- ### lesspipe
- (
- cpanm App::TarColor
- cd $FS/src
- wget http://www-zeuthen.desy.de/~friebel/unix/less/lesspipe.tar.gz
- ver=$(tar tvf lesspipe.tar.gz | head -n1 | awk -F- '{print$NF}' | cut -d/ -f1) # 1.82
- mv lesspipe.tar.gz lesspipe-$ver.tar.gz
- tar zxf lesspipe-$ver.tar.gz
- cd lesspipe-$ver
- ./configure # y n n
- cp -ai code2color lesspipe.sh $FS/bin
- )
- ### users
- ori s /etc/{passwd,shadow,group}
- ### sudo
- ori s /etc/sudoers
- ### crontab
- ori s /var/spool/cron/crontabs/arkanon
- ### /etc/samba/smb.conf
- ### /etc/lightdm/lightdm.conf
- ### /etc/gnome/defaults.list
- ### /etc/xdg/autostart/loginsound.desktop
- ### /usr/share/applications/mimeinfo.cache
- ### /usr/share/unity-2d/shell/common/IconTile.qml
- ### /usr/share/unity-2d/shell/launcher/LauncherList.qml
- ### /usr/share/unity-2d/shell/launcher/Launcher.qml
- ### /usr/share/unity-2d/shell/launcher/LauncherItem.qml
- ### /usr/share/unity-2d/shell/Shell.qml
- ### user environment
- # diminuir o tamanho do icone do unity-2d
- # desabilitar as teclas super e alt no unity-2d
- # deixar apenas 1 desktop virtual
- # remover a lixeira e a preview do destop no unity-2d
- # instalar os driver proprietarios
- # definir o relogio como hh:mm:ss
- # desabilitar o autolaunch dos dispositivos de armazenamento
- # habilitar control+alt+bs para matar o X
- # habilitar o som do login
- # corrigir o defeito do wakeup apos um sleep
- # definir smplayer como media player default
- # habilitar o tray menu para qualquer aplicativo
- gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
- # separar o fundo de tela do login do ambiente do usuario
- dbus-send --system --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetBackgroundFile string:/usr/share/backgrounds/warty-final-ubuntu.png
- # /.ori/home/administrador/examples.desktop
- # /.ori/home/administrador/.bash_logout
- # EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement