/macbuntu

How I set up my Ubuntu that looks like mac

Primary LanguageShell

macbuntu

How I set up my Ubuntu Desktop that looks like a mac. Low Budget iMac...

Installation

Creating a boot USB

  1. Download Ubuntu Desktop ISO file. (Currently 18.04.3 LTS)
  2. Use Rufus to create a boot USB, using the downloaded ISO file.

Boot with USB

  1. Make sure that you have a partition that you can install Ubuntu.
(Windows) cmd> diskmgmt.msc
  1. Configure boot priority.
  2. On GNU GRUB, select Install Ubuntu.

Begin Installation

  1. Select preferred language, and keyboard layout.
  2. On Installation Type, select Something Else. (Also check if the installer is installing on the correct partition)
  3. Select free space and click + button.
  4. Create a new partition.
    • Size: 20GB+
    • Type for new partition: Primary
    • Location for the new partition: Beginning of this space
    • Use as: Ext4 journaling file system
    • Mount point: /
  5. Wait for the installer to finish.
  6. Remove the boot USB, and restart the computer.

These normal steps didn't work for me, so I had to go to BIOS settings, and changed UEFI Hard Disk Drive BBS Priorities to ubuntu.

Setting up Ubuntu

sudo apt-get update
sudo apt-get upgrade

Changing Hostname

sudo hostname <new_hostname>

NVIDIA Graphics Driver

  1. Go to NVIDIA Driver Downloads and get .run file.
  2. Open terminal and execute the downloaded file as root.
sudo ./NVIDIA-*.run
  1. Logout and log back in.

Alternative

  1. Search and open Software & Updates.
  2. Select Additional Drivers tab.
  3. Select appropriate driver and Apply Changes (auto reboot).

Korean Input

(uim Method)

sudo apt-get install uim uim-byeoru
  1. Go to Language Support and change Keyboard input method system to uim
  2. Reboot
  3. Modify keymap
echo "xmodmap -e 'keycode 108 = Hangul'" > keymap
chmod 744 keymap
./keymap
  1. Open Input Method and configure.
  • Enable Specify default IM
  • Select Default input method as Byeoru
  • Select only Byeoru in Enabled input methods
  • Go to Byeoru key bindings 1 and set "hangul" for both [Byeoru] on / [Byeoru] off

Necessary Programs

  • Chrome, VSCode, Slack
  • git, gcc/g++, java, python3, python3-pip
  • zsh, zsh-syntax-highlighting, powerlevel10k

UPD: Ubuntu 20.04.1 LTS

  • gcc/g++, python3 are automatically installed.
sudo apt-get install -y git openjdk-11-jre-headless python3-pip
sudo snap install --classic code
sudo snap install --classic slack
  • git config
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

zsh

sudo apt-get install zsh
chsh -s `which zsh`
sudo apt-get install curl
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
  1. zsh syntax highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
  • Note: The second line must be executed inside zsh. (Not in bash)
  1. powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
  • And set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc
  1. Install Powerline Fonts.
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
cd ..
rm -rf fonts

vim

sudo apt-get install vim

(When hitting arrow keys add characters, try installing vim)

.vimrc
set number
set ai
set si
set cindent
set shiftwidth=4
set tabstop=4
set ignorecase
set hlsearch
set nocompatible
set fileencodings=utf-8,euc-kr
set fencs=ucs-bom,utf-8,euc-kr
set bs=indent,eol,start
set ruler
set title
set showmatch
set wmnu
syntax on
filetype indent on
set mouse=a

Windows & Ubuntu Time Difference

timedatectl set-local-rtc 1 --adjust-system-clock

macOS Theme

Theme

  1. Install gnome-shell
sudo apt-get install gnome-shell
  1. Install gnome-tweak-tool
sudo apt-get install gnome-tweak-tool
  1. Install theme and save it to ~/.themes. macOS Theme.
  2. Install icon theme and save it to ~/.icons. La Capitaine Icon Theme, Os-Catalina-icons
  3. Open Tweaks application and configure.
  • Troubleshooting
  1. Unable to change shell theme

    sudo apt-get install chrome-gnome-shell
    
  2. Try Rebooting ...

Plank

  1. Install
sudo apt-get install plank
  1. Disable Ubuntu Dock
sudo apt remove gnome-shell-extension-ubuntu-dock
  1. Press Alt + F2 and type r
  2. Configure Plank
plank --preferences

Touchpad Gestures

Window Title Bar Height Modification

vim ~/.config/gtk-3.0/gtk.css 
gtk.css
/* shrink headerbars (don't forget semicolons after each property) */
headerbar {
    min-height: 0px;
    padding-left: 5px; /* same as childrens vertical margins for nicer proportions */
    padding-right: 5px;
    padding-top: 0px;
    padding-bottom: 0px;
    background-color: #2d2d2d;
}

headerbar entry,
headerbar spinbutton,
headerbar button,
headerbar separator {
    margin-top: 0px; /* same as headerbar side padding for nicer proportions */
    margin-bottom: 0px;
}

/* shrink ssd titlebars */
.default-decoration {
    min-height: 0; /* let the entry and button drive the titlebar size */
    padding: 0px;
    background-color: #2d2d2d;
}

.default-decoration .titlebutton {
    min-height: 0px; /* tweak these two props to reduce button size */
    min-width: 0px;
}

window.ssd headerbar.titlebar {
    padding: 5px;
    min-height: 0;
}

window.ssd headerbar.titlebar button.titlebutton {
    padding: 5px;
    min-height: 0;
}