Ubuntu

From My Notepad
Jump to: navigation, search

Microsoft True Type Fonts

sudo apt install ttf-mscorefonts-installer

Terminal Font Preference

Ubuntu Mono Regular 10 is currently my favorite setting. It's closest to the appearance of the normal font used by default in PuTTy on Windows.

Color Schemes

I really like the Hybrid and Monokai Dark colors Schemes. Easiest way to get it is using the links below:

Source

wget -O gogh https://git.io/vQgMr && chmod +x gogh && ./gogh && rm gogh

Changes to /etc/bash.bashrc

These are common aliases I like to use.

Past the content below into a shell to automatically add them to your system.

cat << EOF >> /etc/profile.d/skyhawk.sh
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias en='sudo su -l'
alias llh='ls -l --human-readable'
alias lls='ls -lS -r --human-readable'
alias llt='ls -lt -r --human-readable'
alias multitail='multitail --mergeall'
alias mtail='multitail -m 10000'
alias show-iptabes='iptables --list -n -v'
alias watch-apache-logs='multitail --mergeall --mark-change --no-repeat /var/log/apache2/*.log'
alias watch-apache-logs-mark-interval='multitail --mergeall --mark-change --mark-interval 300 --no-repeat /var/log/apache2/*.log'
alias watch-nginx-logs='multitail --mergeall --mark-change --no-repeat /var/log/nginx/*.log'
alias watch-nginx-logs-mark-interval='multitail --mergeall --mark-change --mark-interval 300 --no-repeat /var/log/nginx/*.log'
alias watch-mail-logs='multitail --mergeall --mark-change  --no-repeat /var/log/mail.*'
alias mta='multitail /var/log/asterisk/full'
alias mtaf='multitail -m 10000 /var/log/asterisk/full'
EOF

Additional aliases for asterisk management:

cat << EOF >> /etc/profile.d/skyhawk-asterisk.sh
alias acsc='asterisk -rx "core show channels"'
alias arv='asterisk -rvvv'
alias asnp='asterisk -rx "sip notify polycom-check-cfg"'
alias assp='asterisk -rx "sip show peers"'
alias asspg='asterisk -rx "sip show peers" | grep $1'
alias ast='cd /etc/asterisk'
EOF

Gnome Alt-Tab Changes

Source

I do not like how Gnome 3 groups applications when using Alt-Tab. The changes below will revert back to the traditional behavior but still allow you to switch just applications by using the Super key instead of Alt.

gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"

Gnome 3 Extensions

Dash to Panel

  • Go to Tweaks, Top Bar, set Clock / Date to On.

Arc Menu

  • Go to Tweaks, Extensions, Arc Menu (Settings), set "<Ctrl>Escape" as the custom menu binding.

Remmina

Source

Use the PPA below to install the latest version of Remmina:

sudo apt-add-repository ppa:remmina-ppa-team/remmina-next
sudo apt-get install remmina remmina-plugin-rdp libfreerdp-plugins-standard

L2TP/IPSEC and OpenVPN support using Network Manager

Source

You need to install some packages and disable the included xl2tpd daemon due to some bug supposedly.

sudo apt install network-manager-l2tp-gnome network-manager-openvpn-gnome
sudo service xl2tpd stop
sudo systemctl disable xl2tpd

When making an L2TP/IPSEC connection, the following settings need to be made:

Click IPSec Settings…
Click the box for “Enable IPsec tunnel to L2TP host”
Enter the shared secret into the Pre-shared key field.
Leave the Gateway ID field empty.
Expand the Advanced options area
Enter “aes128-sha1-modp1024” into the Phase 1 Algorithms box.
Enter “aes128-sha1” into the Phase 2 Algorithms box.
Leave the box checked for “Enforce UDP encapsulation”.

SSTP VPN Support using Network Manager

Source

sudo add-apt-repository ppa:eivnaes/network-manager-sstp
sudo apt install network-manager-sstp-gnome

Using Unbound as local DNS cache

Install Unbound:

sudo apt install unbound

Edit the file /etc/NetworkManager/NetworkManager.conf and add the line "dns=unbound" as shown below:

# vi /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
dns=unbound

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

Edit the Unbound config:

# vi /etc/unbound/unbound.conf.d/config.conf 
server:
	verbosity: 1
	port: 53

	access-control: 10.0.0.0/8 allow
	access-control: 127.0.0.0/8 allow
	access-control: 192.168.0.0/16 allow

	hide-identity: yes
	hide-version: yes

	# Send minimum amount of information to upstream servers to enhance
	# privacy. Only sends minimum required labels of the QNAME and sets
	# QTYPE to NS when possible.

	# See RFC 7816 "DNS Query Name Minimisation to Improve Privacy" for
	# details.

	qname-minimisation: yes

	# The following line will configure unbound to perform cryptographic
	# DNSSEC validation using the root trust anchor.
	auto-trust-anchor-file: "/var/lib/unbound/root.key"

	stub-zone:
		name: "enterprise.domain1.loc"
 			stub-addr: 10.10.20.6

	stub-zone:
		name: "enterprise.domain2.loc"
 			stub-addr: 10.10.20.5
			stub-addr: 10.244.244.2

	forward-zone:
		name: "."
 			forward-addr: 8.8.8.8
			forward-addr: 8.8.4.4