Wed, Oct 20, 21, like windows reinstall, like macos install, a to z steps

hpmosa (hp z workstations)

From a to Z [dualboot-blog](https://adamtheautomator.com/install-ubuntu-on-a-partition/)

</div>

prelog

I’ve been using my personal desktop since October 2019, and decided it’s high time to redo the ubuntu install, since it’s been dotted with numereous issues, especially with the distro repos and list (/etc/apt/sources.list). Nobody wanted to fix this; all the hired helps dropped in the middle of their work. I felt enough is enough and reformat the partition.

my hardware specs

jobs

  1. Open Ubuntu Download page and create a bootable usb stick ubuntu_22.04 sha256sum ~/Downloads/ubuntu-22.04-desktop-amd64.iso and for windows certutil -hashfile C:/Users/YOUR_USER/Downloads/ubuntu-22.04-desktop-amd64.iso SHA256
  2. Create a starup program; in ubuntu search for and open “Startup Disk Creator” from the Activities overview screen. and for windows, check unetbootin
  3. I have followed a blog for instructions
  4. First order of install was to install git and the followings
  5. Git
  6. create ssh key and connect with my github
  7. Download Chrome and run sudo dpkg -i google-chrome-stable_current_amd64.deb in the terminal
  8. Install Gparted by running sudo apt install gparted -y
  9. to install vscode sudo apt update && sudo apt upgrade -y, sudo apt install software-properties-common apt-transport-https wget -y, sudo apt install software-properties-common apt-transport-https wget -y, echo deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/vscode stable main | sudo tee /etc/apt/sources.list.d/vscode.list, sudo apt update, ` sudo apt install code`
  10. Anydesk install; anydesk dependency install sudo apt-get install -y libgtkglext1 before downloading anydesk_download
  11. Slack download with snap sudo snap install slack and for instructions, instruction
  12. Follow instructions for Vim install

image image

jdlab

issues

bash-history

  1. setting up vim
  2. add `startify’ to vim by copying all from .vim folder
  3. install brew gem link
    1. sudo apt-get install build-essential curl file git
    2. sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
    3. vim .bashrc, source .bashrc

4.~bluetooth driver install for ubuntu link; to install, These firmware files need to be copied and renamed to: /lib/firmware/rtl_bt/rtl8761b_fw.bin~

  1. for drivers googledrive for bluetooth/uart/interface/network drivers
  2. or if the above causes issues, download from here
  3. copy install.sh requirments.txt and Contents folder to target server and directory path.
  4. For the network card; ``` For motherboard manufacturer https://www.asrock.com/MB/Intel/B660M%20Pro%20RS/index.asp#Specification

For intel drivers;

https://www.intel.com/content/www/us/en/download/14611/15817/intel-network-adapter-driver-for-pcie-intel-gigabit-ethernet-network-connections-under-linux.html?product=71307

I have uploaded the driver to google driver under tonylee@joy-drone.com

tar zxf igb-xxx.gz cd igb-xxx/src sudo make install

reboot

8. kakao talk 설치 [블로그](https://www.hahwul.com/2018/08/02/install-kakaotalk-on-ubuntu-18.04/)


```bash
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"

export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"

export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"
  • to try out, run brew install hello

  • kakaotalk sh - to show how it works with Kerlym

sudo apt install wine-stable
WINEARCH=win32 WINEPREFIX=~/.wine wine wineboot
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod 777 winetricks
sudo apt-get install cabextract
./winetricks

# 1. Select the default wineprefix 체크(Checked
# 2. Install a Windows DLL or component 체크(Checked)
# 3. gdiplus, msxml6, riched30, wmp9 체크(Checked / 거꾸로 찾으시면 금방 찾습니다) 

wget http://app.pc.kakao.com/talk/win32/xp/KakaoTalk_Setup.exe
cp KakaoTalk.desktop /usr/share/applications/

Thi

The basic steps I often do every time I install a new Ubuntu system. The order of things is important.

👉 Note: Linux 👉 Note: Windows fresh start 👉 Note: Mac fresh start 👉 Note: Bash

:::info Most of commands are for both Ubuntu and Pop!_OS, there are some which are only for Pop!_OS. :::

::: warning For Pop!_OS: You don’t need to do everything in below steps. :::

  1. Download Ubuntu ISO. If you like a MacOS-like version, you can choose Elementary OS.
  2. Using Rufus (on Windows) or Etcher (on any system, recommended) or popsicle (usb flasher, on pop!_os) to create a bootable USB drives.
  3. [Pop!_OS] Download Pop!_OS (with NVIDIA)
    1. (Update 05 Jun 2021 - IMPORTANT) If you’re using DisplayLink Dock (more than 1 external screens, Pop!_OS doesn’t work with the DisplayLink Driver 5.4 but it works for Ubuntu 20.04). So, you have no choice to use Ubuntu instead of Pop!_OS!!!! Read more.
    2. Choose custom partition while installing > use at least 2 partitions for the installing (1 which is main for Root / and one which is ~500MB for Boot /boot/etc)
  4. Update & Upgrade

     sudo apt update & sudo apt upgrade
    
  5. Download and install Google Chrome.
    1. Sign in to Google Account + sync all extensions + settings.
    2. Disable Tab hover information: Go to chrome://flags/ and search “tab hover” then choose “Disable”.
    3. Install also these extensions:
      1. mate translate, google dictionary, TabCloud, raindrop, last pass, AVIM, adblock, GNOME Shell integration.
      2. Google Aut alternative on Chrome: use this.
  6. Install Guake Terminal (drop-down terminal supporting tabs). We install it first because we working mainly on terminal.

    sudo apt-get install guake
    # then add it to startup applications
    #
    # load preferences
    guake --restore-preferences ~/Downloads/guake_prefs
    
  7. Install GNOME Tweaks from App Store.
  8. Install Dash to panel extension and use this config for pop and this for ubuntu.
  9. Install git

    sudo add-apt-repository ppa:git-core/ppa
    sudo apt update
    sudo apt install git
    
  10. Using (rEFInd)](https://www.rodsbooks.com/refind/)

    sudo apt-add-repository ppa:rodsmith/refind
    sudo apt-get update
    sudo apt-get install refind
    

    In case you wanna hide some options in the boot manager with rEFInd, you can use [[-]] button to hide it.

    Old method

    [Pop!_OS] Dual boot with Windows and others Linux distro: different from Ubuntu (using grub), Pop!_OS uses systemd-boot -> follow this guide.

    # 1. Open Disks
    # Click on "play" icon on the partition having "Partition type" is "EFI system"
    #
    # 2. Run to check the mount point of these partitions
    lsblk -o NAME,FSTYPE,FSSIZE,MOUNTPOINT
    # output (s/t like that)
    # nvme0n1
    # ├─nvme0n1p1 vfat     176M /media/thi/ESP # <- this is windows mounting point
    # ├─...
    # └─nvme0n1p9 vfat     511M /boot/efi
    #
    # 3. copy to pop!_os
    sudo cp -r /media/thi/ESP/EFI/Microsoft /boot/efi/EFI
    #
    # 4. Add timeout (wait for choosing)
    sudo nano /boot/efi/loader/loader.conf
    # add below others
    timeout 15
    
  11. Make Alt-Tab show windows instead of applications: change in Settings > Keyboards > Custom keyboards > Switch windows. Gnome: install this one to switch between windows on current screen only.
  12. Hangul for system and vscode, and powerline
    • ibus/xim seem to have some issues in my case, not in general ; try to install fcitx blog and set the inputsource to fcitx in the system settings. In some cases, you need to install sudo apt install gnome-tweak-tool, which would provide a gui to customize the settings. Other cli that will need would be sudo dpkg-reconfigure keyboard-configuration after running sudo vim /etc/default/keyboard.
    • Another option is to edit sudo vim /usr/share/X11/xkb/symbols/pc Check this sof
    • Run this xev, escape and ctrl+c to cancel.
    • For the powerline to be used in VScode, check this dev.to, which suggest you to download the patched powerline font and run sudo fc-cache -vf /usr/share/fonts/ You will need to unzip the downloaded file into /usr/share/fonts/truetype/. Type fc-list grep -i “meslo” to know the names of other fonts so you can use other fonts in the terminal.
  1. [Optional] Make emojis showing up

    sudo apt install fonts-noto-color-emoji
    

    After that (make browser recognize more icons), create a new file

    ~/.config/fontconfig/conf.d/01-emoji.conf
    

    with this content.

  2. Cannot use f keys on keyboard Keychron K8 (this is useful too):

    echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode
    # restore
    echo 1 | sudo tee /sys/module/hid_apple/parameters/fnmode
    

    Hint: You can add this command to a script on startup.

  3. [Ubuntu only] Auto install drivers

    sudo ubuntu-drivers autoinstall
    

    In case you wanna switch between Intel (more power efficient) and NVDIA driver (more powerful)

    sudo prime-select intel
    sudo prime-select nvidia
    
  4. [Ubuntu only] Check the NVDIA driver and install the newest version: check in Additional Drivers. In case you wanna remove it and reinstall it later, use

    sudo apt purge nvidia-*
    
  5. [Ubuntu only] Install GNOME Shell extensions

    sudo apt install gnome-shell-extensions
    

    Install also chrome extension. Go to the corresponding extension link and turn it on and install it. List of useful extensions: Start Overlay in Application View, ESC to close overview from applications list, Caffein, Alt-Tab Switcher Popup Delay Removal, Sound Input & Output Device Chooser, gtile, icon-hider (on gnome taskbar), Emoji selector, Current screen only on window switcher.

  6. Install video codecs,

    sudo apt install ubuntu-restricted-extras
    
  7. [Pop!_OS] Install snap: sudo apt update && sudo apt install snapd.
  8. Install email client Mailsrping with snap: sudo snap install mailspring.

    # Copy icon
    sudo cp /var/lib/snapd/desktop/applications/mailspring_mailspring.desktop /usr/share/applications/
    
  9. Install GoldenDict (app store) and dictionaries.
  10. Visual Studio Code and its basic extensions: Bracket Pair Colorizer, Docker, Linux Themes for VS Code, Markdown All in One, Markdown Shortcuts, Remote Development, Python, Auto Close Tags.

    Also add below settings to setting json file ; (Ctrl + Shift + P and search Preferences: Open Settings (JSON), its in ~/.config/Code/User).

  11. Install Git Client as Gitkraken. Log in with Github account and clone all working repositories.
  12. Turn off Gnome Shell Activities Animations (click on window taskbar to toggle max/min),

    gsettings set org.gnome.desktop.interface enable-animations true # enable
    gsettings set org.gnome.desktop.interface enable-animations false # disable
    
  13. IBUS Bamboo, Vietnamese Input Method. Need to restart Ibus and choose Bamboo in the keyboard layout. You can use also Shift + ~ for changing the options (Removing the underline, for example) – You have to switch to Vietnamese Input before using this shortcut. Use Super + Space to change between input methods.
  14. [Optional] You may need to install Python before install (successfully) Overgrive.
  15. Google Drive client for Ubuntu: OverGrive (5$ for each account). An alternative to Vgrive.

    # startup commandline for overgrive
    python3 /opt/thefanclub/overgrive/overgrive
    
  16. LaTeX

    sudo apt-get install texlive-full # 5GB
    sudo apt-get install texmaker
    
  17. If you install Matlab, you can install matlab-support to add matlab icon to applications. Note that, if matlab exe file is at /usr/local/MATLAB/R2017b/bin/matlab, we add the location of folder as /usr/local/MATLAB/R2017b/.
  18. Use super + E to open Nautilus File Manager: change in Keyboard shortcut > Custom Shortcut with command nautilus.
  19. Default text editor gedit, you can use this command in terminal.
  20. Gnome Calendar in app store.
  21. Screen Recorder, use Kazam (app store). If cannot recognize mic and speaker, read this solution. An alternative is SimpleScreenRecorder.
  22. VLC (app store). If there is a problem of displaying video (there is only sound without video), check this.
  23. Read SD card

    sudo apt-get install exfat-utils exfat-fuse
    
  24. If you wanna make nautilus default again:

    xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
    gsettings set org.gnome.desktop.background show-desktop-icons true
    
  25. If you wanna make some web app a desktop app, use nativefier.
  26. Bluetooth problem on Dell XPS 15 only: cannot turn on bluetooth ⇒ Try turn off and turn on again the bluetooth in BIOS setting.
  27. Useful shortcuts:
    • Capture fullscreen: Ctrl+Alt+Print (photos will be saved in Pictures)
    • Show desktop: set in Keyboards settings, try to find “Hide all normal windows”.
  28. [Only Ubuntu] Connect Airpod to Ubuntu 20.04:

    # check bluetooth service is running
    hciconfig -a
    #
    # open a file
    sudo nano /etc/bluetooth/main.conf
    #
    # add
    ControllerMode = bredr
    #
    # restart bluetooth service
    sudo /etc/init.d/bluetooth restart
    #
    # disconnect other headphone device
    # press and hold backward button in the airpod case (flash light)
    # connect to airpod as other device via bluetooth
    
  29. Location of .desktop files,

    ~/.local/share/applications/
    /usr/share/applications/
    /var/lib/snapd/desktop/applications/
    # or
    locate *.desktop # bash
    locate \*.desktop # zsh
    
  30. [Optional] Xbox controller bluetooth connection: check this.
  31. Remove icon from dash application

    sudo add-apt-repository ppa:caldas-lopes/ppa
    sudo apt-get update
    sudo apt-get install ezame
    
  32. Restore dconf setting:

    dconf load / < dconf-settings.ini
    # or
    cat dconf-settings.ini | dconf load /
    
  33. Restore custom keyboard shortcuts,

    # load
    dconf load /org/gnome/desktop/wm/keybindings/ < keybindings.dconf
    dconf load /org/gnome/settings-daemon/plugins/media-keys/ < keybindings.dconf
    
  34. [Optional] Disable touchpad automatically when plugging mouse:

    sudo add-apt-repository ppa:atareao/atareao
    sudo apt update
    sudo apt install touchpad-indicator
    # then open > click on icon > preferences
    # > action tab > "Disable touchpad when mouse plugged"
    
  35. Other applicatons:
    1. Skype
    2. Extreme Download Manager (uninstall by running as root /opt/xdman/uninstall.sh)
    3. AO (MS to do for Ubuntu): snap install ao
    4. Shotwell or gThumb (image viewer + quick editor, install on Store)
    5. KolourPaint (photo editor supports cut and move a selection like Paint on Windows, install from AppStore)
    6. Cheese (camera app)
    7. Drawing
    8. Stacer (optimizer system like Advanced System Care)
    9. Google Music. This one: Youtube Music Desktop (install with snap) – Remove the coincisive keys with the systems.
    10. Authenticator
    11. alacarte (Main Menu, can be found in App Store): change/add icon in launcher.
  36. Swap function keyboards on Logitech K380, using this tool (try all keyboard hidraws if you are not sure!).
  37. Force Unity Dash to index all files on Home: sudo updatedb (install by sudo apt-get install mlocate)
  38. [Only Ubuntu] There are 2 ubuntu softwares in dash? (ref this question). “Ubuntu software” is pre-installed snap store (run by snap-store), the other is gnome-software.
  39. Backup before installing a new system.
    • Settings in ~/.config/ or ~/.<software-name>
    • All apps in ~/apps/ with their desktop files in ~/.local/share/applications/
  40. Pop!_OS Tips:
    1. Super + Y: toggle tiling mode.
    2. Add a windows/applition exepton of tiling mode (it wont be counted)
    3. Make clocks + dates 2 lines -> tutorial.
      • Install clock override extension.
      • Using ` %H:%M%n%d/%m/%Y` in text to display instead of the clock (with the spaces so that they are center aligned).

The following wiki, pages and posts are tagged with

TitleTypeExcerpt
download to install and customize post Wed, Oct 20, 21, like windows reinstall, like macos install, a to z steps
bash command line summary post Thu, Oct 21, 21, cmder bash commandline tools hotkeys and how to create sh file to automate actions
references for using and customizing Linux post Sat, Oct 23, 21, run macos apps, android apps, shell cli, screenshot, drive and app process
connecting raspi on ubuntun20.04 without a monitor post Tue, Jan 25, 22, change network/ssh and user configuration to use rasp without a monitor