Skip to content

Instantly share code, notes, and snippets.

@justafish
Last active February 16, 2022 18:21
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justafish/5679be8cb6ccc37bf1f266ffa2f5c4bf to your computer and use it in GitHub Desktop.
Save justafish/5679be8cb6ccc37bf1f266ffa2f5c4bf to your computer and use it in GitHub Desktop.

Kubuntu 18.04 on Dell XPS 13"

  • Install with Encrypted LVM

Fix Sleep

sudo apt-get install sysfsutils
sudo echo 'power/mem_sleep = deep' > /etc/sysfs.d/mem_sleep.conf

Disable WiFi Power Management

iwconfig
lo        no wireless extensions.

br-9ab811eb3a43  no wireless extensions.

docker0   no wireless extensions.

br-bbbc8f4433c0  no wireless extensions.

veth646ea3c  no wireless extensions.

wlp2s0    IEEE 802.11  ESSID:"MI5SurveillanceVan5"  
          Mode:Managed  Frequency:5.26 GHz  Access Point: 6C:70:9F:E9:FA:1B   
          Bit Rate=6 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=52/70  Signal level=-58 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:171   Missed beacon:0

sudo vim /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Change wifi.powersave = 3 to wifi.powersave = 2

NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3): enable powersave

Add Backports

Backports of new versions of KDE Platform, Plasma and Applications as well as major KDE apps for Kubuntu.

sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update

Some Basics

sudo apt-get install vim git curl zsh fonts-firacode

zsh / oh-my-zsh

  • sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • Set ZSH_THEME to agnoster in .zshrc https://github.com/robbyrussell/oh-my-zsh/wiki/themes#agnoster
  • Configure a Konsole profile to Solarised and Fira Code Retina (maybe bump the font size too). Tweak the Konsole settings to move the tabs to the top and add the close tab button.

Snap

Add Snap back-end for access to apps like Slack, WebStorm etc

sudo apt-get install plasma-discover-snap-backend

If you're using zsh, create a ~/.zprofile file and populate it with

emulate sh -c 'source /etc/profile.d/apps-bin-path.sh'

Docker

sudo apt-get update
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo docker run hello-world
sudo groupadd docker
sudo usermod -aG docker $USER

Log out and log back in

docker run hello-world
sudo systemctl enable docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Dropbox

Install Dropbox headless

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
~/.dropbox-dist/dropboxd
# or if running Wayland (can be rin fine under X too)
QT_QPA_PLATFORM="xcb" ~/.dropbox-dist/dropboxd
  • This will open a new browser tab asking you to login to Dropbox
  • Go to Dolphin Configure / Service and install dropbox-servicemenu-kde
  • Create the following file in ~/.local/share/applications/dropbox.desktop and chmod to 755 (QT_QPA_PLATFORM is only needed for Wayland)
[Desktop Entry]
Name=Dropbox
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
Exec=QT_QPA_PLATFORM="xcb" ~/.dropbox-dist/dropboxd
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false
mkdir -p /home/justafish/.local/share/kservices5/ServiceMenus
touch dropbox-dolphin.desktop
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Actions=getPublicURL;copyPublicURL;
X-KDE-Submenu=Dropbox
X-KDE-StartupNotify=false
X-KDE-Priority=TopLevel


[Desktop Action copyPublicURL]
Name=Copy Public URL 
Exec=dbus-send --type=method_call --dest=org.kde.klipper /klipper org.kde.klipper.klipper.setClipboardContents string:"`python ~/Scripts/dropbox.py sharelink %u`"

OpenVPN

sudo apt-get install openvpn network-manager-openvpn

Git Related

gpg --full-generate-key
gpg --list-secret-keys --keyid-format LONG
gpg --armor --export <Key>
git config --global commit.gpgsign true

Add the key to your account https://help.github.com/articles/adding-a-new-gpg-key-to-your-github-account

git config --global user.name "Your Name"
git config --global user.email "your@email.address"
git config --global core.editor "vim"
git config --global merge.tool vimdiff
git config --global push.default current
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global # add .idea into there for *storm

Desktop

  • Set Task Switcher icons to large
  • Go to Input Device in System Settings and configure the Touchpad
  • Right click on Desktop / Configure Desktop to remove annoying Mouse Actions and Show Desktop Toolbox. Also go to Location and select "Show files linked to the current activity" to remove the folders from the Desktop
  • Remove the bottom panel, and add a new panel at the top with the Global Menu widget. Also add the System tray plus any additional items (WiFi, Bluetooth, Log out etc). You can add a spacer in between to get the global menu on the left and system tray on the right. Configure the System Tray widget (hover over whilst in Panels Settings mode to get the config dialog) to remove any duplicates of the additional items you added. Lock the widgets on the panel to get rid of the burger menu on the right.
  • Add latte for a Mac-style application dock sudo apt-get install latte-dock. Configure it to start automatically in System Settings.

Albert

wget -nv -O Release.key \
  https://build.opensuse.org/projects/home:manuelschneid3r/public_key
sudo apt-key add - < Release.key
sudo apt-get update
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/home:manuelschneid3r.list"
sudo apt-get update
sudo apt-get install albert

Add to startup in System Settings

Enable the python plugins to further enable the emoji picker

WebStorm

Bump the inotify limit. Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory:

fs.inotify.max_user_watches = 524288

Then run

sudo sysctl -p --system

Extras

Todo

Wayland

Next gen display server - try this out if you're using an external monitor and want different scaling / resolutions to your laptop (however there's no global menu bar for now https://bugs.kde.org/show_bug.cgi?id=385880 and some apps appear blurry)

sudo apt-get install plasma-workspace-wayland

Log out and select Wayland from the drop down on the left

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment