четверг, 20 апреля 2017 г.

(L)Ubuntu postinstall - Java and other

apt install aptitude mc openssh-server x2x libreoffice xscreensaver
apt install gcc make

win fonts
wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb


LXDE / Lubuntu

apt-get purge `dpkg -l | awk '{print $2}' | grep -E 'gnome|unity'`
apt-get install lubuntu-desktop
apt-get autoremove

Java

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install maven gradle oracle-java8-installer 
add to /etc/environment or /etc/profile
JAVA_HOME=/usr/lib/jvm/java-8-oracle
reload in terminal: source /etc/environment

Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'

sudo apt-get update
sudo apt-get install google-chrome-stable

Fonts


~/.fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts.conf file to configure system font access -->
<fontconfig>
<!-- Antialias -->
<match target="font">
        <test qual="any" name="size" compare="more">
                <double>8</double>
        </test>
        <test qual="any" name="size" compare="less">
                <double>25</double>
        </test>
        <edit name="antialias" mode="assign">
                <bool>false</bool>
        </edit>
</match>


Idea
echo "fs.inotify.max_user_watches = 524288" >  /etc/sysctl.d/90-idea.conf
sudo sysctl -p --system

Maven issue "Loading archetype list..." : http://mldav.blogspot.com.by/2015/12/intellij-idea-loading-archetype-list.html
Build,Execution,Deployment → Build Tools → Maven → Importing need to set "VM options for importer = -Xmx1024m"


Programs crash notification

rm /var/crash/*
in file  /etc/default/apport  set enabled=0
service apport stop

Screen Locker and Screenshot
add to ~/.config/openbox/lubuntu-rc.xml

 <keybind key="W-l">
      <action name="Execute">
        <command>xscreensaver-command -lock</command>
      </action>
 </keybind>
  <!-- Take a screenshot of the current window with scrot when Alt+Print are pressed -->
  <keybind key="A-Print">
      <action name="Execute">
        <command>scrot --focused --border ~/Screenshots/%Y-%m-%d-%T-window-screenshot.png</command>
      </action>
  </keybind>
  <!-- Take a screenshot of the screen with scrot when Print are pressed -->
  <keybind key="Print">
      <action name="Execute">
        <command>scrot ~/Screenshots/%Y-%m-%d-%T-all-screenshot.png</command>
      </action>
  </keybind>
remove config for F11 - need to Idea

reload new config:
openbox --reconfigure

Printer HP

https://developers.hp.com/hp-linux-imaging-and-printing/gethplip
или
apt install cups hplip

Dual monitors
color for second monitor - adjust ~/.config/pcmanfm/lubuntu/desktop-items-1.conf  like desktop-items-0.conf
color login screen - change /etc/lightdm/lightdm-gtk-greeter.conf.d/30_lubuntu.conf 
background=#2e4060

sudo systemctl disable cups-browsed.service
Skype double icon
env XDG_CURRENT_DESKTOP=Unity

Thunderbird - missed icon
https://github.com/googlei18n/noto-emoji/raw/master/fonts/NotoEmoji-Regular.ttf - copy to /usr/share/fonts/truetype/noto