It's been half a year since I started using [Ubuntu18.04], so I'll introduce the settings !!

What to do after installing Ubuntu 18.04.

Introduction

Hello. ** It's been half a year since I started using Ubuntu 18.04 on my main PC **. I would like to show you what kind of software you put in and customized for Ubuntu in half a year.

Target audience

--People who are interested in Linux --People using Ubuntu on their main PC. --People who find Ubuntu inconvenient.

For virtualbox (skip for main OS)

guest adition(virtualbox)

$ sudo apt install linux-headers-$(uname -r) build-essential dkms
$reboot

Change host key

--From the menu bar, go to File-> Preferences-> Input-> Virtual Machine, select "Shortcut" from "Host Key Combinations", and press any key to set it as the host key. Right shift is recommended


terminal color setting

git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized/
./install.sh

--Run ./install.sh and you will be presented with a selection of color schemes to use. --Select dark alternative and select 1 unnamed. Then download additional packages. However, in this state, the text color was difficult to see, so I changed it from the terminal pleasure.

Introduced Mac-like key mapping

On Mac (jis), you can switch between half-width and full-width using ** kana ** and ** alphanumeric **. I personally like this so I changed the Ubuntu key mapping.

  1. Click the input mode at the top right of the screen.
  2. tool→properties
  3. Click Customize for keymap style
  4. Since there are 3 conversions and 3 non-conversions, set conversion to activateIME and non-conversion to deactivateIME.
  5. To prevent erroneous input, set katakana and hiragana to activateIME respectively. (Because the key is small in the case of Let's note.)

Even after this setting, there are cases where the function as no conversion or conversion can be used. (Cannot be used with Vim)


Desktop settings

GNOME Tweaks --To switch Ctrl and Caps, select Keyboard & mouse → Additional Layout Option → Ctrl Position → Caps Lock as Ctrl

emacs input --Launch gnome Tweaks → Keyboard and Mouse → emacsinput --It was confirmed that C-j and C-s were as usual. --Since C-a is the cursor movement, let's substitute Shift-Ctrl-a etc. for all selection.

Screen size setting

--GNOME Tweaks-> Fonts-> Change all four items. --Since the shape of the terminal changed with this alone, I changed it with Preferreds from the edit tab of Terminal.

change name

You can change the user name displayed in the terminal from Settings → Details

Resize icon

Open File Manager → Three → Resize Icon

Change font size

Open Tweaks and select font

gnome extensions

Reference Reference 2 Explanation of extensions ――The desktop environment is one that unifies the appearance and usability. There are GNOME, Unity, KDE, etc.

Initial settings for extensions to gnome tweaks

gnome-shell --version
sudo apt install gnome-shell-extensions

Install GNOME Shell extensions from a web browser

  1. Go to the download page for open weather etc. and install the recommended add-on in your browser
  2. Install the native connector
sudo apt install chrome-gnome-shell
  1. Go to the page where the extension is provided in your browser and turn off off.

Introduced extensions

Change theme

--gnome-Turn on tweaks extension theme changes.

sudo apt install arc-theme
sudo add-apt-repository ppa:dyatlov-igor/materia-theme
sudo apt update
sudo apt install -y materia-gtk-theme

icon

sudo add-apt-repository ppa:dyatlov-igor/la-capitaine
sudo apt update
sudo apt install la-capitaine-icon-theme

open weather --Change the location from the settings and set the unit to ° C.

gnome-shell-extensions-windows-navigator --Enable keyboard switching when using overview.

Dash to dock --Change the location of the dock or stop displaying all the time --Check shows on all monitor. --Appearance → Customize the dash color → middle blue color, middle black

Playing with opacity may make you crazy.

Dim On Battery Power --Brightness can be set when the power is connected and when the battery is driven. I feel that this has solved the problem. Alternative tab --Set the unit of Alt-tab switching from the application to the window unit. --It is effective when the same application is opened multiple times, but it cannot be used to switch tabs in the browser.

Native Window placement --Changed how to display the overview ――I don't like it so much

Caffeine --You can enable or disable auto suspend with a single click.

CPU Power Manager --Can measure the number of CPU clocks and change to silent mode, high performance, power saving, etc. --Operation is intel only

Refresh Wifi Connections --Create wifi refresh button

Hide Activities Button --Delete the activity button displayed in the upper left

Remove Dropdown Arrows --Erase the drop-down triangle to keep it simple.

Workspaces to Dock --Easy to use virtual display. ――It was troublesome to leave it out, so I turned it off. pompodoro One of the timers. You can download it below.

$ sudo apt install -y gnome-shell-pomodoro

Detailed settings can be changed from Notification Center → preferance.


bashrc settings

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' #No action
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias ls='ls -F --color=auto'
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
#------------added by tomita------------
alias matrix='cmatrix -ab'
#alias python='/usr/bin/python3'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias open='xdg-open'
alias screenshot='gnome-screenshot'
alias lock="xdg-screensaver lock"
alias lhS='ls -lhS'
alias lsl='clear && ls'
alias upower='upower -i /org/freedesktop/UPower/devices/battery_BAT1'
alias dd='echo "dd is not available"'
alias chmod='chmod --preserve-root'
alias chown='chmod --preserve-root'
PATH=$PATH":/home/tomita/bash"
CDPATH=:/home/tomita/memo/
alias chrome='google-chrome-stable &'
alias firefox='firefox &'
alias vim='/home/tomita/bash/vim'
#alias jupyter-notebook='conda activate base && jupyter-notebook'
export WWW_HOME="https://www.google.com/"
alias cd='cd '
alias dl='/home/tomita/Downloads'
alias pict='/home/tomita/Pictures'
alias gs='git status'
alias mkprg='mkprg.bash'
alias fc='fc -e'
alias winekd='wine ~/app/kindle-for-pc-1-17-44183.exe'
alias vpngate='cd ~/app/vpngate-with-proxy && ./run tui && cd -'
alias torb='cd ~/app/tor_browser && ./start-tor-browser.desktop'
#---------------------------------------

#------------Automatic insertion after introducing anaconda------------
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/tomita/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/tomita/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/tomita/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/tomita/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
#----------------------------------------

# joke command
#fortune
#-----------------------------------------

# OpenMPI
MPIROOT=/usr/local/openmpi-2.0.1
export PATH=$MPIROOT/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MPIROOT/lib
export MANPATH=$MANPATH:$MPIROOT/share/man

#-----Check proxy settings to use printenv-----
export http_proxy="http://proxy_server:port/"
export https_proxy=$http_proxy

Battery related

Improve battery life

You can optimize the power consumption of the powertop.

sudo apt install powertop
sudo apt install tlp tlp-rdw
Power consumption is displayed in wattage in the sudo powertop overview. You can see if the power is optimized in Tunables. It is troublesome to change each one, so execute the following command
sudo powertop --auto-tune
sudo tlp start Optimization starts automatically.

Extend battery life

sudo vim /etc/default/tlp
Edit the following
START_CHARGE_THRESH_BAT0=80
STOP_CHARGE_THRESH_BAT0=90

Use Kindle on Ubuntu.

Since Kindle does not support Linux, I use Kindle using a Windows emulator called wine.

wine --You can run some windows software on Ubuntu.

sudo apt update
sudo apt -yV upgrade
sudo apt install wine-stable
wine --version
winecfg
>windows8.Select 1

Download Kindle

At this time, versions newer than version 1-17 may not work.

Backup related

TimeShift --A time machine that can be used with ubuntu.

sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift

Recommended Posts

It's been half a year since I started using [Ubuntu18.04], so I'll introduce the settings !!
It's been a year since I became a web engineer, so I looked back.
2018. It's been two years since I became an SE, so I'll expose the book I read.
It's been a month since I started programming seriously @ Tech Camp
It's been a year since I became an engineer from 28 years old
It's been a year since I became a working Android engineer, and it's almost two years.
It's been a month since I became an engineer from inexperienced ...
I stumbled when I tried using neo4j in the jenv environment, so make a note