4/30/2018

Fix Ubuntu doesn't sleep after closing the computer lid

Add
sudo su <
echo LID0 > /proc/acpi/wakeup && echo XHC1 > /proc/acpi/wakeup && echo ARPT > /proc/acpi/wakeup                                      
EOF

To /etc/rc.local file.




4/26/2018

After installing Ubuntu: what else to do? Install Ubuntu, Install Linux

  • http://liangzou.blogspot.com/2018/01/how-to-install-latest-cinnamon-on.html
  • If automatic login wants to be enabled (login Ubuntu without using the password): sudo apt install gnome-system-tools, then start the new Users and Groups application to enable the automatic login
  • Fix Desktop: sudo apt remove nautilus
  • sudo apt install vim
  • Install Sougou shuangpin (need to disable cloud pinyin)
  • Install Collapsible Systray (Right click on panel, Add applets, need to hide fcitx and sougou icons)
  • Fix touchpad:
    • sudo emacs /usr/share/X11/xorg.conf.d/70-synaptics.conf. Comment out Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0
  • gnome terminal tab bar height too high
  • title bar too high: go to settings | Themes | Windows boarders, choose Ambiance
  • Install git & bazel: https://docs.bazel.build/versions/master/install-ubuntu.html
  • Install git-review by using pip install git-review, DO NOT use sudo apt install git-review (too old)
  • Install the good theme: sudo apt-get install numix-gtk-theme numix-icon-theme
  • Disable the audible bell by signing out of Cinnamon and signing in to the default desktop environment. Setting | Sound | Disable Alert volume
  • Add keyboard short:
    • ctrl + shift + Y to gnome-terminal --title=Python -e "/home/liangzou/.pyenv/shims/python"
    • ctrl + shift + A to slack
    • super + shift + S to /home/liangzou/bin/screenshot.sh (content below)
      • #!/bin/sh
      • sleep 0.125
      • gnome-screenshot --area -c
  • Install the MSYH.ttc font: download the font to /usr/share/fonts/windows/, then run: fc-cache
  • Download from OneDrive: ubuntu_home/bin-scripts.tgz and put to ~/bin/, then set up shortcuts.
  • To make the notification settings better: sudo emacs /usr/share/cinnamon/js/ui/messageTray.js and change var NOTIFICATION_TIMEOUT = 86400;
  • Fix the scrolling stop after suspend issue:
#!/bin/sh
if [ $1 = post ] && [ $2 = suspend ]
then /home/liangzou/bin/fix-mouse-arc.sh
fi

Content of fix-mouse-arc.sh:

 #!/bin/bash

sudo service bluetooth restart

  

 

4/16/2018

How to fix grub after upgrading Macbook pro - reinstalling grub

Followed the last step in this post: 

Mac Pro cannot boot


Press Alt while restarting the system with the USB drive inserted. The USB should contain a Ubuntu system.

Run boot-repair by logging into Ubuntu (using a USB if the installed version is broken). After running the fix, I have to use the GRUB menu to start the windows, not the original Alt + Power and select Windows way.

https://help.ubuntu.com/community/Boot-Repair