Created
January 6, 2018 11:14
-
-
Save id4ehsan/09045390b4a2773a2a275640abd5a34c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
#echo "\033[31m" | |
echo "you must be root to run this script" | |
#echo "\033[0m" | |
exit 1 | |
fi | |
# first of all install updates | |
#mkdir -p /var/cache/apt/archives | |
#mv archives/* /var/cache/apt/archives | |
#rm -fr archives | |
apt-get update | |
apt-get upgrade | |
#apt-get dist-upgrade | |
apt-get install ubuntu-restricted-extras | |
#apt-get install flashplugin-installer | |
apt-get install redshift-gtk | |
#apt-get install chromium-browser chromium-browser-l10n | |
#apt-get install nautilus-dropbox | |
#apt-get install libappindicator1 | |
#apt-get install vlc | |
#apt-get install libdvdread4 | |
#sh /usr/share/doc/libdvdread4/install-css.sh | |
apt-get install unace unrar zip unzip p7zip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller | |
#apt-get install flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview mpeg3-utils mpegdemux liba52-dev mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 totem-mozilla icedax lame libmad0 libjpeg-progs libdvdread4 libdvdnav4 libav-tools ffmpegthumbnailer gstreamer1.0-libav ubuntu-restricted-extras flashplugin-installer | |
apt-get install smplayer | |
#apt-get install libxine1-ffmpeg mencoder flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview libmpeg3-1 mpeg3-utils mpegdemux liba52-dev mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 totem-mozilla icedax lame libmad0 libjpeg-progs libdvdcss2 libdvdread4 libdvdnav4 libswscale-extra-2 ubuntu-restricted-extras flashplugin-installer adobe-flashplugin | |
apt-get install gimp gimp-data gimp-plugin-registry gimp-data-extras | |
apt-get install inkscape ink-generator sozi | |
apt-get install goldendict goldendict-wordnet | |
apt-get install alarm-clock-applet nfoview | |
#libusb | |
apt-get install wireshark | |
apt-get install wine winetricks playonlinux innoextract q4wine unmass | |
apt-get install bless | |
#hplip-gui | |
#sudo apt-get install festival festlex-cmu festlex-poslex festlex-oald libestools1.2 | |
#sudo apt-get install festvox-don festvox-rablpc16k festvox-kallpc16k festvox-kdlpc16k | |
apt-get install unity-tweak-tool | |
apt-get install gnome-tweak-tool | |
#gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']" | |
apt-get install gksu | |
apt-get install git | |
#apt-get install libfribidi0 libfribidi-dev | |
#apt-get install libc6:i386 libgcc1:i386 libasound2:i386 libfreetype6:i386 zlib1g:i386 libsm6:i386 libxdamage1:i386 libxext6:i386 libxfixes3:i386 libxrender1:i386 libxtst6:i386 | |
#apt-get install libc6-i386 | |
#add-apt-repository ppa:pidgin-developers/ppa | |
#add-apt-repository ppa:jd-team/jdownloader | |
#add-apt-repository ppa:linrunner/tlp | |
#apt-get install tlp tlp-rdw | |
#tlp start | |
hciconfig hci0 name 'PCRider' | |
ls /sys/class/backlight/ | |
#nano /usr/share/X11/xorg.conf.d/20-intel.conf | |
#Section "Device" | |
# Identifier "card0" | |
# Driver "intel" | |
# Option "Backlight" "intel_backlight" | |
# BusID "PCI:0:2:0" | |
#EndSection | |
#local-gen fa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "[Desktop Entry] | |
Name=apjp | |
Type=Application | |
Categories=AntiFilter | |
Terminal=true | |
Icon=/opt/apjp/apjp.png | |
Exec=sh /opt/apjp/apjp.sh | |
Name[en_US]=APJP" > /usr/share/applications/apjp.desktop | |
echo "[Desktop Entry] | |
Name=Xtreme Downloader | |
Type=Application | |
Categories=Download Manager | |
Terminal=false | |
Icon=/opt/xdman/icon.ico | |
Exec=java -jar /opt/xdman/xdman.jar | |
Name[en_US]=xdman" > /usr/share/applications/xdman.desktop | |
cd /usr/share/applications/ | |
chmod 644 apjp.desktop | |
chmod 644 eclipse.desktop | |
chmod 644 xdman.desktop | |
#chmod 644 jdownloader.desktop | |
chown root:root apjp.desktop | |
chown root:root eclipse.desktop | |
chown root:root xdman.desktop | |
#chown root:root jdownloader.desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# second install i8kutils | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
#echo "\033[31m" | |
echo "you must be root to run this script" | |
#echo "\033[0m" | |
exit 1 | |
fi | |
apt-get install i8kutils | |
nano /etc/init.d/i8kmon | |
#echo "i8k" >> /etc/modules | |
#echo "options i8k force=1" >> /etc/modprobe.d/options | |
echo "set config(daemon) 1 | |
set config(auto) 1 | |
set config(verbose) 1 | |
set config(timeout) 1 | |
set config(0) {{-1 0} -1 55 -1 56} | |
set config(1) {{-1 1} 53 57 55 58} | |
set config(2) {{-1 2} 54 128 56 128}" > /etc/i8kmon.conf | |
#echo "set config(daemon) 1 | |
#set config(auto) 1 | |
#set config(verbose) 1 | |
#set config(timeout) 1 | |
#set config(0) {{-1 0} -1 55 -1 56} | |
#set config(1) {{-1 1} 53 57 55 58} | |
#set config(2) {{-1 2} 54 128 56 128}" > ~/.i8kmon.conf | |
#echo "set config(daemon) 1 | |
#set config(auto) 1 | |
#set config(verbose) 1 | |
#set config(timeout) 1 | |
#set config(0) {{-1 0} -1 55 -1 56} | |
#set config(1) {{-1 1} 53 57 55 58} | |
#set config(2) {{-1 2} 54 128 56 128}" > /etc/default/i8kmon.conf | |
# mkdir -p ~/.config/autostart | |
#modprobe i8k force=1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 3rd install java | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
#echo "\033[31m" | |
echo "you must be root to run this script" | |
#echo "\033[0m" | |
exit 1 | |
fi | |
#check the alternatives , are there installed and what version they are? | |
#update-alternatives --display java | |
# uninstall old alternatives and installl new one | |
#update-alternatives --remove-all "java" | |
#update-alternatives --remove-all "javac" | |
#update-alternatives --remove-all "javaws" | |
# Remove unwanted version of java | |
#apt-get purge icedtea-* openjdk-* | |
#rm -rf /usr/lib/jvm/jdk1.8.0_45/* | |
mkdir -p /usr/lib/jvm | |
mv java/jdk-8u45-linux-x64.tar.gz /usr/lib/jvm | |
mv java/jdk-8u45-docs-all.zip /usr/lib/jvm | |
mv java/jdk-8u45-linux-x64-demos.tar.gz /usr/lib/jvm | |
mv java/javafx-8u45-apidocs.zip /usr/lib/jvm | |
mv java/javafx_scenebuilder-2_0-linux-x64.tar.gz /usr/lib/jvm | |
rm -rf java | |
cd /usr/lib/jvm | |
tar xzf jdk-8u45-linux-x64.tar.gz | |
rm -f jdk-8u45-linux-x64.tar.gz | |
chmod -R 755 jdk1.8.0_45 | |
chown -R root:root jdk1.8.0_45 | |
mv jdk-8u45-docs-all.zip /usr/lib/jvm/jdk1.8.0_45 | |
mv jdk-8u45-linux-x64-demos.tar.gz /usr/lib/jvm/jdk1.8.0_45 | |
mv javafx-8u45-apidocs.zip /usr/lib/jvm/jdk1.8.0_45 | |
mv javafx_scenebuilder-2_0-linux-x64.tar.gz /usr/lib/jvm/jdk1.8.0_45 | |
cd jdk1.8.0_45 | |
unzip jdk-8u45-docs-all.zip | |
tar xzf jdk-8u45-linux-x64-demos.tar.gz | |
unzip javafx-8u45-apidocs.zip | |
tar xzf javafx_scenebuilder-2_0-linux-x64.tar.gz | |
#chmod -R 755 docs | |
#chown -R root:root docs | |
#rm -f jdk-8u45-docs-all.zip | |
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_45/jre/bin/java" 1 | |
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_45/bin/javac" 1 | |
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0_45/jre/bin/javaws" 1 | |
update-alternatives --set java /usr/lib/jvm/jdk1.8.0_45/jre/bin/java | |
update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_45/bin/javac | |
update-alternatives --set javaws /usr/lib/jvm/jdk1.8.0_45/jre/bin/javaws | |
#Delete the line with JAVA_HOME | |
#sudo nano /etc/environment | |
# write java path to profile | |
# sudo gedit /etc/profile | |
# gksudo gedit /etc/profile | |
# sudo nano /etc/profile | |
#echo 'JAVA_HOME="/usr/lib/jvm/jdk1.8.0_45" | |
#JRE_HOME="/usr/lib/jvm/jdk1.8.0_45/jre" | |
#PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin | |
#export JAVA_HOME | |
#export JRE_HOME | |
#export PATH' >> /etc/profile | |
# run the profile | |
#. /etc/profile | |
#java -version | |
#javac -version | |
# install java browser plugins | |
# for chorme | |
#mkdir -p /opt/google/chrome/plugins | |
#cd /opt/google/chrome/plugins | |
#rm -rf libnpjp2.so | |
#ln -s /usr/lib/jvm/jdk1.8.0_45/jre/lib/amd64/libnpjp2.so | |
# for mozila | |
#mkdir -p /usr/lib/mozilla/plugins | |
#cd /usr/lib/mozilla/plugins | |
#rm -rf libnpjp2.so | |
#ln -s /usr/lib/jvm/jdk1.8.0_45/jre/lib/amd64/libnpjp2.so | |
# for opera | |
#mkdir -p /usr/lib/opera/plugins | |
#cd /usr/lib/opera/plugins | |
#rm -rf libnpjp2.so | |
#ln -s /usr/lib/jvm/jdk1.8.0_45/jre/lib/amd64/libnpjp2.so | |
# for chromium | |
#mkdir -p /usr/lib/chromium-browser/plugins | |
#cd /usr/lib/chromium-browser/plugins | |
#rm -rf libnpjp2.so | |
#ln -s /usr/lib/jvm/jdk1.8.0_45/jre/lib/amd64/libnpjp2.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
#echo "\033[31m" | |
echo "you must be root to run this script" | |
#echo "\033[0m" | |
exit 1 | |
fi | |
# 4rd install java programs | |
mkdir -p /opt/apjp | |
#mkdir -p /opt/xdman | |
#mkdir -p /opt/eclipse | |
#mkdir -p /opt/jdownloader | |
#mkdir -p /opt/android | |
mv apjp/* /opt/apjp | |
#mv xdman/* /opt/xdman | |
#mv eclipse/* /opt/eclipse | |
#mv jdownloader/* /opt/jdownloader | |
#mv android/* /opt/android | |
rm -fr apjp | |
#rm -fr eclipse | |
#rm -fr jdownloader | |
#rm -rf android | |
#rm -rf xdman | |
cd /opt | |
chmod -R 755 apjp | |
#chmod -R 777 eclipse | |
#chmod -R 777 jdownloader | |
#chmod -R 755 android | |
#chmod -R 755 xdman | |
#chown -R root:root android | |
chown -R root:root apjp | |
#chown -R root:root xdman | |
#chown -R root:root eclipse | |
#chown -R root:root jdownloader | |
echo "[Desktop Entry] | |
Name=apjp | |
Type=Application | |
Categories=AntiFilter | |
Terminal=true | |
Icon=/opt/apjp/apjp.png | |
Exec=sh /opt/apjp/apjp.sh | |
Name[en_US]=APJP" > /usr/share/applications/apjp.desktop | |
#echo "[Desktop Entry] | |
#Name=eclipse | |
#Type=Application | |
#Categories=DevEnvironment | |
#Terminal=false | |
#Icon=/opt/eclipse/icon.xpm | |
#Exec=/opt/eclipse/eclipse | |
#Name[en_US]=Eclipse" > /usr/share/applications/eclipse.desktop | |
#echo "[Desktop Entry] | |
#Name=jdownloader | |
#Type=Application | |
#Categories=Download Manager | |
#Terminal=false | |
#Icon=/opt/jdownloader/jd/img/logo/icon.ico | |
#Exec=java -jar /opt/jdownloader/JDownloader.jar | |
#Name[en_US]=JDownloader" > /usr/share/applications/jdownloader.desktop | |
#echo "[Desktop Entry] | |
#Name=Xtreme Downloader | |
#Type=Application | |
#Categories=Download Manager | |
#Terminal=false | |
#Icon=/opt/xdman/icon.ico | |
#Exec=java -jar /opt/xdman/xdman.jar | |
#Name[en_US]=xdman" > /usr/share/applications/xdman.desktop | |
cd /usr/share/applications/ | |
chmod 644 apjp.desktop | |
#chmod 644 eclipse.desktop | |
#chmod 644 xdman.desktop | |
#chmod 644 jdownloader.desktop | |
chown root:root apjp.desktop | |
#chown root:root eclipse.desktop | |
#chown root:root xdman.desktop | |
#chown root:root jdownloader.desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
#echo "\033[31m" | |
echo "you must be root to run this script" | |
#echo "\033[0m" | |
exit 1 | |
fi | |
# 5rd install fonts | |
#apt-get install ttf-mscorefonts-installer | |
#apt-get install flashplugin-installer | |
#mkdir -p /usr/share/fonts/truetype/BFonts | |
#mkdir -p /usr/share/fonts/truetype/XBFonts | |
#mkdir -p /usr/share/fonts/truetype/vista | |
#mv BFonts/* /usr/share/fonts/truetype/BFonts | |
#mv XBFonts/* /usr/share/fonts/truetype/BFonts | |
#cabextract -F ppviewer.cab PowerPointViewer.exe | |
#cabextract -F '*.TT?' -d /usr/share/fonts/vista ppviewer.cab | |
#rm -rf BFonts | |
#cd /usr/share/fonts/truetype | |
#chmod -R 755 BFonts | |
#chmod -R 755 XBFonts | |
#chmod -R 755 vista | |
#chown -R root:root BFonts | |
#chown -R root:root XBFonts | |
#chown -R root:root vista | |
#fc-cache -fv | |
#apt-get remove totem | |
apt-get install libav-tools ffmpegthumbnailer gstreamer1.0-libav | |
echo "[Thumbnailer Entry] | |
TryExec=ffmpegthumbnailer | |
Exec=ffmpegthumbnailer -s %s -i %i -o %o -c png -f -t 10 | |
MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp2;audio/mp4;audio/mpeg;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;application/x-flac;" > /usr/share/thumbnailers/totem.thumbnailer | |
rm ~/.cache/thumbnails/fail/gnome-thumbnail-factory/* | |
rm ~/.cache/thumbnails/normal/* | |
#nautilus -q | |
#apt-get install vlc browser-plugin-vlc vlc-plugin-notify vlc-plugin-pulse | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#mkdir -p /usr/share/nautilus-python/extensions | |
apt-get install git | |
su -c 'wget https://github.com/aliva/SubtitleFixer/raw/master/install.sh \ | |
-O subtitlefixer-install.sh \ | |
&& chmod +x+u subtitlefixer-install.sh \ | |
&& ./subtitlefixer-install.sh' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "[Desktop Entry] | |
Name=bluej | |
Type=Application | |
Categories=DevEnvironment | |
Terminal=false | |
Icon=/opt/bluej/icons/bluej-icon-512-embossed.png | |
Exec=/opt/bluej/bluej | |
Name[en_US]=BlueJ" > /usr/share/applications/bluej.desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z "$1" ]]; then | |
echo "Syntax: $0 debfile" | |
exit 1 | |
fi | |
DEBFILE="$1" | |
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1 | |
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb | |
if [[ -e "$OUTPUT" ]]; then | |
echo "$OUTPUT exists." | |
rm -r "$TMPDIR" | |
exit 1 | |
fi | |
dpkg-deb -x "$DEBFILE" "$TMPDIR" | |
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN | |
if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then | |
echo DEBIAN/control not found. | |
rm -r "$TMPDIR" | |
exit 1 | |
fi | |
CONTROL="$TMPDIR"/DEBIAN/control | |
MOD=`stat -c "%y" "$CONTROL"` | |
nano "$CONTROL" | |
if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then | |
echo Not modfied. | |
else | |
echo Building new deb... | |
dpkg -b "$TMPDIR" "$OUTPUT" | |
fi | |
rm -r "$TMPDIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Ensure that the flash plugin is installed and the latest version: | |
sudo apt-get install -y flashplugin-installer | |
FLASH_VERSION_LINE=$(grep -m 1 ^FLASH_VERSION= /var/lib/dpkg/info/flashplugin-installer.postinst) | |
eval $FLASH_VERSION_LINE | |
echo Flash version: "$FLASH_VERSION" | |
FILENAME=adobe-flashplugin_${FLASH_VERSION}.orig.tar.gz | |
PARTNER_URL=http://archive.canonical.com/pool/partner/a/adobe-flashplugin/$FILENAME | |
wget -c "$PARTNER_URL" | |
echo Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
FONTS='andale32.exe arial32.exe arialb32.exe comic32.exe courie32.exe | |
georgi32.exe impact32.exe times32.exe trebuc32.exe verdan32.exe webdin32.exe' | |
URLROOTS="http://downloads.sourceforge.net/corefonts/ | |
http://switch.dl.sourceforge.net/sourceforge/corefonts/ | |
http://mesh.dl.sourceforge.net/sourceforge/corefonts/ | |
http://dfn.dl.sourceforge.net/sourceforge/corefonts/ | |
http://heanet.dl.sourceforge.net/sourceforge/corefonts/ | |
http://jaist.dl.sourceforge.net/sourceforge/corefonts/ | |
http://nchc.dl.sourceforge.net/sourceforge/corefonts/ | |
http://ufpr.dl.sourceforge.net/sourceforge/corefonts/ | |
http://internode.dl.sourceforge.net/sourceforge/corefonts/ | |
http://voxel.dl.sourceforge.net/sourceforge/corefonts/ | |
http://kent.dl.sourceforge.net/sourceforge/corefonts/ | |
http://internap.dl.sourceforge.net/sourceforge/corefonts/" | |
for font in $FONTS | |
do | |
for website in $URLROOTS | |
do | |
if ! wget -c ${website}${font} ; then | |
continue 1; | |
fi | |
break | |
done | |
done | |
echo Done | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wget -c http://gb.archive.ubuntu.com/ubuntu/pool/universe/c/cabextract/cabextract_1.4-1_amd64.deb | |
wget -c http://gb.archive.ubuntu.com/ubuntu/pool/main/d/debconf/debconf-utils_1.5.42ubuntu1_all.deb | |
wget -c http://gb.archive.ubuntu.com/ubuntu/pool/multiverse/f/flashplugin-nonfree/flashplugin-installer_11.2.202.335ubuntu0.12.04.1_amd64.deb | |
wget -c http://gb.archive.ubuntu.com/ubuntu/pool/universe/n/nspr/libnspr4-0d_4.9.5-0ubuntu0.12.04.1_amd64.deb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EDITOR=gedit | |
if [[ -z "$1" ]]; then | |
echo "Syntax: $0 debfile" | |
exit 1 | |
fi | |
DEBFILE="$1" | |
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1 | |
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb | |
if [[ -e "$OUTPUT" ]]; then | |
echo "$OUTPUT exists." | |
rm -r "$TMPDIR" | |
exit 1 | |
fi | |
dpkg-deb -x "$DEBFILE" "$TMPDIR" | |
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN | |
if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then | |
echo DEBIAN/control not found. | |
rm -r "$TMPDIR" | |
exit 1 | |
fi | |
CONTROL="$TMPDIR"/DEBIAN/control | |
MOD=`stat -c "%y" "$CONTROL"` | |
$EDITOR "$CONTROL" | |
if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then | |
echo Not modfied. | |
else | |
echo Building new deb... | |
dpkg -b "$TMPDIR" "$OUTPUT" | |
fi | |
rm -r "$TMPDIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in startup you should have | |
# 1-VGA Switch OFF | |
sudo su -c "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" | |
# 2-PM Power Save | |
sudo pm-powersave true | |
# 3-Min Power | |
sudo su -c "echo "min_power" | sudo tee /sys/class/scsi_host/host*/link_power_management_policy" | |
sudo nano /etc/modules | |
# add i8k to it | |
sudo nano /etc/modprobe.d/options | |
# Add "options i8k force=1" | |
sudo nano /etc/i8kmon.conf | |
sudo nano ~/.i8kmon | |
# 4-i8kutil | |
i8kmon --daemon | |
# Edit your /etc/default/grub file: | |
sudo gedit /etc/default/grub | |
# Add the options "acpi_osi=Linux acpi_backlight=vendor" to the | |
# GRUB_CMDLINE_LINUX_DEFAULT line. It should look like this: | |
# *GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"* | |
# original line was: | |
# *GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"* | |
#Update grub configuration!!!! - do not forget to do this, the configuration change | |
#will not be set up if you don't run the next command: | |
sudo update-grub | |
#I've been having the same issue on Debian Sid and find removing the .Xauthority file | |
#rectifies it, although not a very reliable solution as I have had to do it every time | |
#I reboot, it's a workaround that enables me to get back to my gui. | |
# Rename the file /var/lib/lightdm/.Xauthority to /var/lib/lightdm/.Xauthority-BAK | |
sudo mv /var/lib/lightdm/.Xauthority /var/lib/lightdm/.Xauthority-BAK | |
# Restart lightdm service | |
sudo service lightdm stop | |
sudo service lightdm start | |
sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop | |
sudo sed -i 's/NoDisplay=false/NoDisplay=true/g' /etc/xdg/autostart/*.desktop | |
echo "[Desktop Entry] | |
Type=Application | |
Exec=i8kmon --daemon | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=I8kMonitor | |
Name=I8kMonitor | |
Comment[en_GB]=This Program Monitor CPU Temp and Control Fan Speed | |
Comment=This Program Monitor CPU Temp and Control Fan Speed" > ~/.config/autostart/i8kmon.desktop | |
echo '[Desktop Entry] | |
Type=Application | |
Exec=sudo su -c "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=VGASwitchOFF | |
Name=VGASwitchOFF | |
Comment[en_GB]=This Program wil Switch VGA OFF | |
Comment=This Program wil Switch VGA OFF' > ~/.config/autostart/vgaswitchoff.desktop | |
echo "[Desktop Entry] | |
Type=Application | |
Exec=sudo pm-powersave true | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=PMPowerSave | |
Name=PMPowerSave | |
Comment[en_GB]=This Program Will Save Power | |
Comment=This Program Will Save Power" > ~/.config/autostart/pmpowersave.desktop | |
echo '[Desktop Entry] | |
Type=Application | |
Exec=sudo su -c "echo "min_power" | sudo tee /sys/class/scsi_host/host*/link_power_management_policy" | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=MinPower | |
Name=MinPower | |
Comment[en_GB]=This Program Will Set Link Power to Min | |
Comment=This Program Will Set Link Power to Min' > ~/.config/autostart/linkminpower.desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
#echo "\033[31m" | |
echo "you must be root to run this script" | |
#echo "\033[0m" | |
exit 1 | |
fi | |
mv 2MRT /usr/share/fonts/truetype/ | |
mv Alborz5 /usr/share/fonts/truetype/ | |
mv Borna /usr/share/fonts/truetype/ | |
mv EnFonts /usr/share/fonts/truetype/ | |
mv F /usr/share/fonts/truetype/ | |
mv HMS1 /usr/share/fonts/truetype/ | |
mv IPT /usr/share/fonts/truetype/ | |
mv IranNastaliq /usr/share/fonts/truetype/ | |
mv IslamicSymbol /usr/share/fonts/truetype/ | |
mv MaryamSoft /usr/share/fonts/truetype/ | |
mv MasoudMazar /usr/share/fonts/truetype/ | |
mv Lucida /usr/share/fonts/truetype/ | |
mv MojtabaKia /usr/share/fonts/truetype/ | |
mv NBFonts /usr/share/fonts/truetype/ | |
mv NPI /usr/share/fonts/truetype/ | |
mv ParianSoft /usr/share/fonts/truetype/ | |
mv PersianSoft /usr/share/fonts/truetype/ | |
mv PW /usr/share/fonts/truetype/ | |
mv SinaPardazesh /usr/share/fonts/truetype/ | |
mv SinaSoft /usr/share/fonts/truetype/ | |
mv XBFonts /usr/share/fonts/truetype/ | |
mkdir -p /usr/share/fonts/truetype/PPViewer | |
cabextract -F ppviewer.cab PowerPointViewer.exe | |
cabextract -F '*.TT?' -d /usr/share/fonts/PPViewer ppviewer.cab | |
cd /usr/share/fonts/truetype | |
chown -R root:root 2MRT | |
chown -R root:root Alborz5 | |
chown -R root:root Borna | |
chown -R root:root EnFonts | |
chown -R root:root F | |
chown -R root:root HMS1 | |
chown -R root:root IPT | |
chown -R root:root IranNastaliq | |
chown -R root:root IslamicSymbol | |
chown -R root:root Lucida | |
chown -R root:root MaryamSoft | |
chown -R root:root MasoudMazar | |
chown -R root:root MojtabaKia | |
chown -R root:root NBFonts | |
chown -R root:root NPI | |
chown -R root:root ParianSoft | |
chown -R root:root PersianSoft | |
chown -R root:root PW | |
chown -R root:root SinaPardazesh | |
chown -R root:root SinaSoft | |
chown -R root:root XBFonts | |
chown -R root:root ParianSoft | |
chown -R root:root PPViewer | |
chmod -R 755 2MRT | |
chmod -R 755 Alborz5 | |
chmod -R 755 Borna | |
chmod -R 755 EnFonts | |
chmod -R 755 F | |
chmod -R 755 HMS1 | |
chmod -R 755 IPT | |
chmod -R 755 IranNastaliq | |
chmod -R 755 IslamicSymbol | |
chmod -R 755 Lucida | |
chmod -R 755 MaryamSoft | |
chmod -R 755 MasoudMazar | |
chmod -R 755 MojtabaKia | |
chmod -R 755 NBFonts | |
chmod -R 755 NPI | |
chmod -R 755 ParianSoft | |
chmod -R 755 PersianSoft | |
chmod -R 755 PW | |
chmod -R 755 SinaPardazesh | |
chmod -R 755 SinaSoft | |
chmod -R 755 XBFonts | |
chmod -R 755 ParianSoft | |
chmod -R 755 PPViewer | |
fc-cache -fv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run as daemon, override with --daemon option | |
set config(daemon) 1 | |
# Automatic fan control, override with --auto option | |
set config(auto) 1 | |
# Report status on stdout, override with --verbose option | |
set config(verbose) 1 | |
# Status check timeout (seconds), override with --timeout option | |
set config(timeout) 1 | |
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt} | |
set config(0) {{-1 0} -1 55 -1 55} | |
set config(1) {{-1 1} 53 58 55 58} | |
set config(2) {{-1 2} 56 128 56 128} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run as daemon, override with --daemon option | |
set config(daemon) 0 | |
# Automatic fan control, override with --auto option | |
set config(auto) 1 | |
# Report status on stdout, override with --verbose option | |
set config(verbose) 1 | |
# Status check timeout (seconds), override with --timeout option | |
set config(timeout) 1 | |
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt} | |
set config(0) {{-1 0} -1 55 -1 55} | |
set config(1) {{-1 1} 53 57 55 57} | |
set config(2) {{-1 2} 55 128 57 128} | |
# For computer with 2 fans, use a variant of this instead: | |
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt} | |
# set config(0) {{-1 0} -1 52 -1 65} | |
# set config(1) {{-1 1} 41 66 55 75} | |
# set config(2) {{-1 1} 55 80 65 85} | |
# set config(3) {{-1 2} 70 128 75 128} | |
# end of file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/files-downloaded | |
sudo dpkg -i debconf-utils_*.deb cabextract_*.deb libnspr4-0d_*.deb | |
echo flashplugin-installer flashplugin-installer/local string ~/files-downloaded/ | sudo debconf-set-selections | |
echo ttf-mscorefonts-installer msttcorefonts/dldir string ~/files-downloaded/ | sudo debconf-set-selections | |
sudo dpkg -i flashplugin-installer_*.deb | |
sudo dpkg -i ttf-mscorefonts-installer_*.deb | |
echo flashplugin-installer flashplugin-installer/local string | sudo debconf-set-selections | |
echo ttf-mscorefonts-installer msttcorefonts/dldir string | sudo debconf-set-selections | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will install the Microsoft fonts on your Ubuntu installation | |
# This script must be run as root with 755 permissions | |
# update package manager | |
sudo apt-get update | |
# install msttcorefonts package | |
sudo apt-get install msttcorefonts | |
# Install the Tahoma fonts to the msttcorefonts folder | |
# Since Tahoma does not come with msttcorefont, we will install them manually | |
# Change to the users home folder | |
cd ~ | |
# get the tahoma.zip file from www.stchman.com | |
wget http://www.stchman.com/tools/tahoma.zip | |
# extract the .zip achive to the msttcorefonts folder | |
sudo unzip -d /usr/share/fonts/truetype/msttcorefonts ~/tahoma.zip | |
# update the font cache | |
sudo fc-cache -f -v | |
# remove the .zip file as it is no longer needed | |
rm -r -f ~/tahoma.zip | |
# get the scripts from www.stchman.com to make Ubuntu look like M$ fonts | |
# change to users home folder | |
cd ~ | |
# get the font scripts from www.stchman.com | |
wget http://www.stchman.com/tools/MS_fonts/fontconfig.tbz | |
# unpack archive in the /etc/fonts folder | |
sudo tar -xvjpf ~/fontconfig.tbz -C /etc/fonts/ | |
# remove the archive that was downloaded | |
rm -r -f ~/fontconfig.tbz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# save work dir | |
workdir = pwd | |
# first of all install updates | |
cd ~ | |
mkdir -p /var/cache/apt/archives | |
mv archives/* /var/cache/apt/archives | |
rm -fr archives | |
apt-get update | |
# second install i8kutils | |
cd ~ | |
apt-get install i8kutils | |
echo "i8k" >> /etc/modules | |
echo "options i8k force=1" >> /etc/modprobe.d/options | |
echo "set config(daemon) 1 | |
set config(auto) 1 | |
set config(verbose) 1 | |
set config(timeout) 1 | |
set config(0) {{-1 0} -1 55 -1 55} | |
set config(1) {{-1 1} 53 57 55 57} | |
set config(2) {{-1 2} 55 128 57 128}" > /etc/i8kmon.conf | |
echo "set config(daemon) 1 | |
set config(auto) 1 | |
set config(verbose) 1 | |
set config(timeout) 1 | |
set config(0) {{-1 0} -1 55 -1 55} | |
set config(1) {{-1 1} 53 57 55 57} | |
set config(2) {{-1 2} 55 128 57 128}" > ~/.i8kmon | |
echo "set config(daemon) 1 | |
set config(auto) 1 | |
set config(verbose) 1 | |
set config(timeout) 1 | |
set config(0) {{-1 0} -1 55 -1 55} | |
set config(1) {{-1 1} 53 57 55 57} | |
set config(2) {{-1 2} 55 128 57 128}" > /etc/default/i8kmon.conf | |
mkdir -p ~/.config/autostart | |
echo "[Desktop Entry] | |
Type=Application | |
Exec=i8kmon --daemon | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=I8kMonitor | |
Name=I8kMonitor | |
Comment[en_GB]=This Program Monitor CPU Temp and Control Fan Speed | |
Comment=This Program Monitor CPU Temp and Control Fan Speed" > ~/.config/autostart/i8kmon.desktop | |
echo '[Desktop Entry] | |
Type=Application | |
Exec=sudo su -c "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=VGASwitchOFF | |
Name=VGASwitchOFF | |
Comment[en_GB]=This Program wil Switch VGA OFF | |
Comment=This Program wil Switch VGA OFF' > ~/.config/autostart/vgaswitchoff.desktop | |
echo "[Desktop Entry] | |
Type=Application | |
Exec=sudo pm-powersave true | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=PMPowerSave | |
Name=PMPowerSave | |
Comment[en_GB]=This Program Will Save Power | |
Comment=This Program Will Save Power" > ~/.config/autostart/pmpowersave.desktop | |
echo '[Desktop Entry] | |
Type=Application | |
Exec=sudo su -c "echo "min_power" | sudo tee /sys/class/scsi_host/host*/link_power_management_policy" | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=MinPower | |
Name=MinPower | |
Comment[en_GB]=This Program Will Set Link Power to Min | |
Comment=This Program Will Set Link Power to Min' > ~/.config/autostart/linkminpower.desktop | |
modprobe i8k force=1 | |
# 3rd install java | |
cd ~ | |
#check the alternatives , are there installed and what version they are? | |
update-alternatives --display java | |
# uninstall old alternatives and installl new one | |
update-alternatives --remove-all "java" | |
update-alternatives --remove-all "javac" | |
update-alternatives --remove-all "javaws" | |
# Remove unwanted version of java | |
apt-get purge icedtea-* openjdk-* | |
rm -rf /usr/lib/jvm/jdk1.7.0_45/* | |
mkdir -p /usr/lib/jvm | |
mv java/jdk-7u45-linux-x64.tar.gz /usr/lib/jvm | |
mv java/jdk-7u45-apidocs.zip /usr/lib/jvm | |
rm -rf java | |
cd /usr/lib/jvm | |
tar xzf jdk-7u45-linux-x64.tar.gz | |
rm -f jdk-7u45-linux-x64.tar.gz | |
mv jdk-7u45-apidocs.zip /usr/lib/jvm/jdk1.7.0_45 | |
cd jdk1.7.0_45 | |
unzip -z jdk-7u45-apidocs.zip | |
rm -f jdk-7u45-apidocs.zip | |
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_45/jre/bin/java" 1 | |
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_45/bin/javac" 1 | |
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_45/jre/bin/javaws" 1 | |
update-alternatives --set java /usr/lib/jvm/jdk1.7.0_45/jre/bin/java | |
update-alternatives --set javac /usr/lib/jvm/jdk1.7.0_45/bin/javac | |
update-alternatives --set javaws /usr/lib/jvm/jdk1.7.0_45/jre/bin/javaws | |
#Delete the line with JAVA_HOME | |
#sudo vi /etc/environment | |
# write java path to profile | |
# sudo gedit /etc/profile | |
# gksudo gedit /etc/profile | |
# sudo nano /etc/profile | |
echo 'JAVA_HOME=/usr/lib/jvm/jdk1.7.0_45 | |
JRE_HOME=/usr/lib/jvm/jdk1.7.0_45/jre | |
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin | |
export JAVA_HOME | |
export JRE_HOME | |
export PATH' >> /etc/profile | |
# run the profile | |
. /etc/profile | |
java -version | |
javac -version | |
# install java browser plugins | |
# for chorme | |
mkdir -p /opt/google/chrome/plugins | |
cd /opt/google/chrome/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so | |
# for mozila | |
mkdir -p /usr/lib/mozilla/plugins | |
cd /usr/lib/mozilla/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so | |
# for opera | |
mkdir -p /usr/lib/opera/plugins | |
cd /usr/lib/opera/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so | |
# for chromium | |
mkdir -p /usr/lib/chromium-browser/plugins | |
cd /usr/lib/chromium-browser/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so | |
# 4rd install java programs | |
cd ~ | |
mkdir -p /opt/apjp | |
mkdir -p /opt/eclipse | |
mkdir -p /opt/jdownloader | |
mkdir -p /opt/android | |
mv apjp/* /opt/apjp | |
mv eclipse/* /opt/eclipse | |
mv jdownloader/* /opt/jdownloader | |
mv android/* /opt/android | |
rm -fr apjp | |
rm -fr eclipse | |
rm -fr jdownloader | |
rm -rf android | |
cd /opt | |
chmod -R 755 apjp | |
chmod -R 755 eclipse | |
chmod -R 755 jdownloader | |
chown -R root:root apjp | |
chown -R root:root eclipse | |
chown -R root:root jdownloader | |
echo "[Desktop Entry] | |
Name=APJP | |
Type=Application | |
Categories=AntiFilter | |
Terminal=true | |
Icon=/opt/apjp/apjp.png | |
Exec=sh /opt/apjp/apjp.sh | |
Name[en_US]=APJP" > /usr/share/applications/apjp.desktop | |
echo "[Desktop Entry] | |
Name=eclipse | |
Type=Application | |
Categories=DevEnvironment | |
Terminal=false | |
Icon=/opt/eclipse/icon.xpm | |
Exec=/opt/eclipse/eclipse | |
Name[en_US]=Eclipse" > /usr/share/applications/eclipse.desktop | |
echo "[Desktop Entry] | |
Name=JDownloader | |
Type=Application | |
Categories=Download Manager | |
Terminal=false | |
Icon=/opt/jdownloader/jd/img/logo/icon.ico | |
Exec=java -jar /opt/jdownloader/JDownloader.jar | |
Name[en_US]=JDownloader" > /usr/share/applications/jdownloader.desktop | |
cd /usr/share/applications/ | |
chmod 644 apjp.desktop | |
chmod 644 eclipse.desktop | |
chmod 644 jdownloader.desktop | |
chown root:root apjp.desktop | |
chown root:root eclipse.desktop | |
chown root:root jdownloader.desktop | |
# isntalling workspace and project | |
# 5rd install fonts | |
cd ~ | |
apt-get install ttf-mscorefonts-installer | |
mkdir -p /usr/share/fonts/truetype/linfonts | |
mv linfonts/* /usr/share/fonts/truetype/linfonts | |
rm -rf linfonts | |
cd /usr/share/fonts/truetype | |
chmod -R 755 linfonts | |
chown -R root:root linfonts | |
fc-cache -f | |
apt-get install flashplugin-installer | |
apt-get remove totem | |
apt-get install ffmpeg ffmpegthumbnailer gstreamer0.10-ffmpeg | |
echo "[Thumbnailer Entry] | |
TryExec=ffmpegthumbnailer | |
Exec=ffmpegthumbnailer -s %s -i %i -o %o -c png -f -t 10 | |
MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp2;audio/mp4;audio/mpeg;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;application/x-flac;" > /usr/share/thumbnailers/totem.thumbnailer | |
rm ~/.thumbnails/fail/gnome-thumbnail-factory/* | |
rm ~/.thumbnails/normal/* | |
nautilus -q | |
apt-get install vlc browser-plugin-vlc vlc-plugin-notify vlc-plugin-pulse videolan-doc | |
cd ~ | |
mkdir -p /usr/share/nautilus-python/extensions | |
apt-get install git | |
su -c 'wget https://github.com/aliva/SubtitleFixer/raw/master/install.sh \ | |
-O subtitlefixer-install.sh \ | |
&& chmod +x+u subtitlefixer-install.sh \ | |
&& ./subtitlefixer-install.sh' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p /usr/share/fonts/truetype/linfonts | |
mv linfonts/* /usr/share/fonts/truetype/linfonts | |
rm -rf linfonts | |
cd /usr/share/fonts/truetype | |
chmod -R 755 linfonts | |
chown -R root:root linfonts | |
fc-cache -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#check the alternatives , are there installed and what version they are? | |
update-alternatives --display java | |
# uninstall old alternatives and installl new one | |
update-alternatives --remove-all "java" | |
update-alternatives --remove-all "javac" | |
update-alternatives --remove-all "javaws" | |
# Remove unwanted version of java | |
apt-get purge icedtea-* openjdk-* | |
rm -rf /usr/lib/jvm/jdk1.7.0_45/* | |
mkdir -p /usr/lib/jvm | |
mv java/jdk-7u45-linux-x64.tar.gz /usr/lib/jvm | |
mv java/jdk-7u45-apidocs.zip /usr/lib/jvm | |
rm -rf java | |
cd /usr/lib/jvm | |
tar xzf jdk-7u45-linux-x64.tar.gz | |
rm -f jdk-7u45-linux-x64.tar.gz | |
mv jdk-7u45-apidocs.zip /usr/lib/jvm/jdk1.7.0_45 | |
cd jdk1.7.0_45 | |
unzip -z jdk-7u45-apidocs.zip | |
rm -f jdk-7u45-apidocs.zip | |
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_45/jre/bin/java" 1 | |
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_45/bin/javac" 1 | |
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_45/jre/bin/javaws" 1 | |
update-alternatives --set java /usr/lib/jvm/jdk1.7.0_45/jre/bin/java | |
update-alternatives --set javac /usr/lib/jvm/jdk1.7.0_45/bin/javac | |
update-alternatives --set javaws /usr/lib/jvm/jdk1.7.0_45/jre/bin/javaws | |
#Delete the line with JAVA_HOME | |
#sudo vi /etc/environment | |
# write java path to profile | |
# sudo gedit /etc/profile | |
# gksudo gedit /etc/profile | |
# sudo nano /etc/profile | |
echo 'JAVA_HOME=/usr/lib/jvm/jdk1.7.0_45 | |
JRE_HOME=/usr/lib/jvm/jdk1.7.0_45/jre | |
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin | |
export JAVA_HOME | |
export JRE_HOME | |
export PATH' >> /etc/profile | |
# run the profile | |
. /etc/profile | |
java -version | |
javac -version | |
# install java browser plugins | |
# for chorme | |
mkdir -p /opt/google/chrome/plugins | |
cd /opt/google/chrome/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so | |
# for mozila | |
mkdir -p /usr/lib/mozilla/plugins | |
cd /usr/lib/mozilla/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so | |
# for opera | |
mkdir -p /usr/lib/opera/plugins | |
cd /usr/lib/opera/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so | |
# for chromium | |
mkdir -p /usr/lib/chromium-browser/plugins | |
cd /usr/lib/chromium-browser/plugins | |
rm -rf libnpjp2.so | |
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#it is better to install this script after installing all browsers | |
# Check for system informaion | |
# Are we in linux? | |
if [ "uname" != "Linux" ] | |
then | |
echo "\033[31m" | |
echo "you need linux to run this script" | |
echo "\033[0m" | |
exit 1 | |
fi | |
#file /sbin/init | |
echo "\033[90m" | |
echo "your os is:" | |
uname -a | |
echo "\033[0m" | |
# Are we in Bourne Shell? | |
if [ $SHELL != "/bin/bash" ] | |
then | |
echo "\033[31m" | |
echo "we are not in bourne again shell" | |
echo "\033[0m" | |
exit 1 | |
fi | |
echo "\033[32m" | |
echo $SHELL | |
echo "\033[0m" | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
echo "\033[31m" | |
echo "you must be root to run this script" | |
echo "\033[0m" | |
exit 1 | |
fi | |
echo "\033[33m" | |
echo "Your UserName is: ${myname}" | |
echo "\033[0m" | |
# Where we are in file system | |
echo "\033[34m" | |
echo "Your Work Directory is:" | |
echo "\033[0m" | |
# Check version of java if we have java | |
echo "\033[35m" | |
java -version | |
echo "\033[36m" | |
javac -version | |
echo "\033[37m" | |
javaws -version | |
echo "\033[90m" | |
which java | |
echo "\033[91m" | |
which javac | |
echo "\033[92m" | |
which javaws | |
# Make Directory for new java (better to change it some place inside /usr/lib/jvm | |
sudo mkdir -p /usr/local/java | |
# Go to Download Location | |
cd /home/${myname}/Downloads | |
echo "\033[0m" | |
# Download new version of java and copy to java home | |
#http://ivan-site.com/2012/05/download-oracle-java-jre-jdk-using-a-script/ | |
#visit http://www.oracle.com/technetwork/java/javase/downloads/index.html and determine latest update | |
update=45 | |
version=7 | |
for bitness in x64 i586; do | |
#Overwrite with the latest build | |
for build in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20;do | |
wget --no-cookies --header "Cookie: gpw_e24=http" "http://download.oracle.com/otn-pub/java/jdk/${version}u${update}-b${build}/jdk-${version}u${update}-linux-${bitness}.tar.gz" | |
if [[ $bitness == 'i586' ]];then | |
ourbitness="i386" | |
else | |
ourbitness="x86_64" | |
fi | |
# mv jdk-${version}u${update}-linux-${bitness}.tar.gz jdk1.${version}.0_${update}-Linux-${ourbitness} | |
done | |
done | |
sudo cp -r jdk-7u45-linux-x64.tar.gz /usr/local/java | |
#sudo cp -r jre-7u45-linux-x64.tar.gz /usr/local/java | |
# go to java home | |
cd /usr/local/java | |
# uncompress downloaded files | |
sudo tar xvzf jdk-7u45-linux-x64.tar.gz | |
sudo tar xvzf jre-7u45-linux-x64.tar.gz | |
ls -a | |
# write java path to profile | |
# sudo gedit /etc/profile | |
# gksudo gedit /etc/profile | |
# sudo nano /etc/profile | |
echo "JAVA_HOME=/usr/local/java/jdk1.7.0_45 | |
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin | |
JRE_HOME=/usr/local/java/jre1.7.0_45 | |
PATH=$PATH:$HOME/bin:$JRE_HOME/bin | |
export JAVA_HOME | |
export JRE_HOME | |
export PATH" >> /etc/profile | |
# uninstall old alternatives and installl new one | |
#check the alternatives , are there installed and what version they are? | |
sudo update-alternatives --display java | |
sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java" | |
sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk[version]/bin/javac" | |
sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk[version]/bin/javaws" | |
#Delete the line with JAVA_HOME | |
#sudo vi /etc/environment | |
# Remove unwanted version of java | |
sudo apt-get purge icedtea-* openjdk-* | |
sudo rm -r /usr/lib/jvm/jdk[version] | |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.7.0_45/bin/java" 1 | |
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_45/bin/javac" 1 | |
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jre1.7.0_45/bin/javaws" 1 | |
sudo update-alternatives --set java /usr/local/java/jre1.7.0_45/bin/java | |
sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_45/bin/javac | |
sudo update-alternatives --set javaws /usr/local/java/jre1.7.0_45/bin/javaws | |
# run the profile | |
. /etc/profile | |
# check new java version | |
java -version | |
javac -version | |
# install java browser plugins | |
# for chorme | |
sudo mkdir -p /opt/google/chrome/plugins | |
cd /opt/google/chrome/plugins | |
sudo ln -s /usr/local/java/jre1.7.0_45/lib/amd64/libnpjp2.so | |
cd /opt/google/chrome/plugins | |
sudo rm -rf libnpjp2.so | |
# for mozila | |
cd /usr/lib/mozilla/plugins | |
sudo mkdir -p /usr/lib/mozilla/plugins | |
sudo ln -s /usr/local/java/jre1.7.0_45/lib/amd64/libnpjp2.so | |
cd /usr/lib/mozilla/plugins | |
sudo rm -rf libnpjp2.so | |
# for opera | |
# for chromium |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Are we root user? | |
myname=`whoami` | |
if [ $myname != root ]; then | |
#echo "\033[31m" | |
echo "you must be root to run this script" | |
#echo "\033[0m" | |
exit 1 | |
fi | |
mv 2MRT /usr/share/fonts/truetype/ | |
mv Alborz5 /usr/share/fonts/truetype/ | |
mv Borna /usr/share/fonts/truetype/ | |
mv EnFonts /usr/share/fonts/truetype/ | |
mv F /usr/share/fonts/truetype/ | |
mv HMS1 /usr/share/fonts/truetype/ | |
mv IPT /usr/share/fonts/truetype/ | |
mv IranNastaliq /usr/share/fonts/truetype/ | |
mv IslamicSymbol /usr/share/fonts/truetype/ | |
mv MaryamSoft /usr/share/fonts/truetype/ | |
mv MasoudMazar /usr/share/fonts/truetype/ | |
mv Lucida /usr/share/fonts/truetype/ | |
mv MojtabaKia /usr/share/fonts/truetype/ | |
mv NBFonts /usr/share/fonts/truetype/ | |
mv NPI /usr/share/fonts/truetype/ | |
mv ParianSoft /usr/share/fonts/truetype/ | |
mv PersianSoft /usr/share/fonts/truetype/ | |
mv PW /usr/share/fonts/truetype/ | |
mv SinaPardazesh /usr/share/fonts/truetype/ | |
mv SinaSoft /usr/share/fonts/truetype/ | |
mv XBFonts /usr/share/fonts/truetype/ | |
mkdir -p /usr/share/fonts/truetype/PPViewer | |
cabextract -F ppviewer.cab PowerPointViewer.exe | |
cabextract -F '*.TT?' -d /usr/share/fonts/PPViewer ppviewer.cab | |
cd /usr/share/fonts/truetype | |
chown -R root:root 2MRT | |
chown -R root:root Alborz5 | |
chown -R root:root Borna | |
chown -R root:root EnFonts | |
chown -R root:root F | |
chown -R root:root HMS1 | |
chown -R root:root IPT | |
chown -R root:root IranNastaliq | |
chown -R root:root IslamicSymbol | |
chown -R root:root Lucida | |
chown -R root:root MaryamSoft | |
chown -R root:root MasoudMazar | |
chown -R root:root MojtabaKia | |
chown -R root:root NBFonts | |
chown -R root:root NPI | |
chown -R root:root ParianSoft | |
chown -R root:root PersianSoft | |
chown -R root:root PW | |
chown -R root:root SinaPardazesh | |
chown -R root:root SinaSoft | |
chown -R root:root XBFonts | |
chown -R root:root ParianSoft | |
chown -R root:root PPViewer | |
chmod -R 755 2MRT | |
chmod -R 755 Alborz5 | |
chmod -R 755 Borna | |
chmod -R 755 EnFonts | |
chmod -R 755 F | |
chmod -R 755 HMS1 | |
chmod -R 755 IPT | |
chmod -R 755 IranNastaliq | |
chmod -R 755 IslamicSymbol | |
chmod -R 755 Lucida | |
chmod -R 755 MaryamSoft | |
chmod -R 755 MasoudMazar | |
chmod -R 755 MojtabaKia | |
chmod -R 755 NBFonts | |
chmod -R 755 NPI | |
chmod -R 755 ParianSoft | |
chmod -R 755 PersianSoft | |
chmod -R 755 PW | |
chmod -R 755 SinaPardazesh | |
chmod -R 755 SinaSoft | |
chmod -R 755 XBFonts | |
chmod -R 755 ParianSoft | |
chmod -R 755 PPViewer | |
fc-cache -fv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sleep 5 && echo "min_power" | tee /sys/class/scsi_host/host*/link_power_management_policy | |
pm-powersave true | |
i8kmon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. | |
# | |
# By default this script does nothing. | |
sh /home/pc0d3sign3r/.powerfix | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -jar VncViewer.jar PORT 5908 HOST 5.39.220.189 PASSWORD thereisnofateforme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/.config/autostart | |
echo "[Desktop Entry] | |
Type=Application | |
Exec=i8kmon --daemon | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=I8kMonitor | |
Name=I8kMonitor | |
Comment[en_GB]=This Program Monitor CPU Temp and Control Fan Speed | |
Comment=This Program Monitor CPU Temp and Control Fan Speed" > ~/.config/autostart/i8kmon.desktop | |
echo '[Desktop Entry] | |
Type=Application | |
Exec=sudo su -c "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=VGASwitchOFF | |
Name=VGASwitchOFF | |
Comment[en_GB]=This Program wil Switch VGA OFF | |
Comment=This Program wil Switch VGA OFF' > ~/.config/autostart/vgaswitchoff.desktop | |
echo "[Desktop Entry] | |
Type=Application | |
Exec=sudo pm-powersave true | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=PMPowerSave | |
Name=PMPowerSave | |
Comment[en_GB]=This Program Will Save Power | |
Comment=This Program Will Save Power" > ~/.config/autostart/pmpowersave.desktop | |
echo '[Desktop Entry] | |
Type=Application | |
Exec=sudo su -c "echo "min_power" | sudo tee /sys/class/scsi_host/host*/link_power_management_policy" | |
Hidden=false | |
NoDisplay=false | |
X-GNOME-Autostart-enabled=true | |
Name[en_GB]=MinPower | |
Name=MinPower | |
Comment[en_GB]=This Program Will Set Link Power to Min | |
Comment=This Program Will Set Link Power to Min' > ~/.config/autostart/linkminpower.desktop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment