Instantly share code, notes, and snippets.

Embed
What would you like to do?

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

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

  • Go to Input Device in System Settings and configure the Touchpad
  • Go to Window Management / Task Switcher and select Large Icons
  • 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

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