sts10 / linux-config

Some personal tips for setting up a Linux Desktop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux Config Files and Other Notes

I've moved most of my notes to my docs mdbook. This repo is mostly for configuration code files.

bashrc

I've got a few .bashrcs for you in the bash directory. The one called bashrc has my preferred prompt coded out, plus the necessary settings for both rbenv and Rust. To use that one, run:

curl -o ~/.bashrc https://raw.githubusercontent.com/sts10/linux-config/master/bash/bashrc

Konsole profile and Pink Moon colorsheme

Move the contents of plasma/konsole to ~/.local/share/konsole.

If you need to, set a Custom color for cursor: #71798a and turn on blinking.

Gnome-terminal profile

Via this gist:

Load our profile with:

dconf load /org/gnome/terminal/legacy/profiles:/:da23a4a8-af92-46a8-ad3e-65fa07a0e113/ < gnome-terminal-config/pink-moon-profile.dconf

Or cd into the gnome-terminal-config directory in this repo and run:

dconf load /org/gnome/terminal/legacy/profiles:/:da23a4a8-af92-46a8-ad3e-65fa07a0e113/ < pink-moon-profile.dconf

If there's a problem, dconf dump /org/gnome/terminal/legacy/profiles:/ might be helpful, as it lists the profiles loaded on your system.

Git

Before you do anything below, especially with Neovim or Vim, install git! sudo apt install git

Given the holistic setup in this document, you're going to want to use the ssh URL when cloning down repos from GitHub (as opposed to HTTPS).

Neovim

I think I used the stable ppa and followed these instructions. A decent init.vim file is contained in this repo.

mkdir ~/.config/nvim
curl -o ~/.config/nvim/init.vim https://raw.githubusercontent.com/sts10/linux-config/master/neovim/init.vim

Syncing and Security

  1. You're probably going to want to install snap with sudo apt install snapd
  2. I then installed KeePassXC with snap install keepassxc, though the app image is good too.
  3. Next, I installed Syncthing via the instructions at the top of this page
  4. I then setup Syncthing, including my KeePass database.
  5. For a GPG GUI application, "GNU Privacy Assistant" gets the job done. To install it, I ran: sudo apt install gpa.

Other Apps

  1. Installed Wire desktop via these instructions
  2. Download and install Signal
  3. Install Ricochet from the POP store (though check version).
  4. Install Tor Browser (forget how exactly I did this-- maybe Tor Browser Launcher? From POP store?)
  5. To install OnionShare, I followed the "Ubuntu" instructions on their download page and added their PPA. (The version in the POP store was 0.9 -- too old for me.)
  6. Install Chromium via the POP app store if you like.
  7. Install Standard Notes app from their site

Flash/Chrome

Install Chrome from (https://www.google.com/chrome/browser/desktop/index.html). The downloaded file open in Eddy. One click install!!

Dev Environment

Ruby and rbenv

  1. Install rbenv (via "basic github checkout")
  2. Install ruby-build as an rbenv plugin.
  3. You made need to run sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev
  4. rbenv install -l lists available versions of Ruby. Pick one to install.
  5. Set that version to global.

You can update the Ruby versions available to rbenv by running rbenv_upgrade (found in bashrc).

Rust

  1. Install Rust
  • I needed to add export PATH="$HOME/.cargo/bin:$PATH" to end of ~/.bashrc, though this line is likely in the included bashrc in this repo.
  • Note: you can uninstall at anytime with rustup self uninstall
  1. Install rustfmt and its Vim counterpart, rust.vim

  2. Install Rust Clippy

  3. Install pip3 with sudo apt-get install python3-pip and then pip3 install neovim

  4. Check Deoplete installed

  5. Install Racer

  6. Make sure Vim Racer is installed. My vim-racer config is:

Plug 'racer-rust/vim-racer'
set hidden
let g:racer_cmd = "/home/sschlinkert/.cargo/bin/racer"
let g:racer_experimental_completer = 1

Github/ssh keys

  1. Set git username (email) and email locally

  2. Generate a new shh key pair on your machine, then upload the public key to Github. I followed these instructions, creating an ssh key locally, with a passphrase that I stored in my Keepass database.

  3. In the bashrc included in this repo is some code that handles your ssh-agent. I got it from this section of the Arch Linux wiki. Here's the bash code if you need:

if ! pgrep -u "$USER" ssh-agent > /dev/null; then
    ssh-agent > ~/.ssh-agent-thing
fi
if [[ "$SSH_AGENT_PID" == "" ]]; then
    eval "$(<~/.ssh-agent-thing)"
fi
  1. touch ~/.ssh/config and in that file write AddKeysToAgent yes, as per the Arch wiki entry.

Alternatively, you could try storing ssh key in KeePassXC database, but I haven't had luck with that in the past.

Given this setup, you're going to want to use the ssh URL (git@github.com:sts10/terminal_and_vim_settings.git) when cloning down repos from GitHub (as opposed to HTTPS).

Install and set up Jekyll for my Github blog

  1. Be sure rbenv is set up and a modern version of Ruby is set to global.
  2. gem install jekyll bundler
  3. git clone git@github.com:sts10/sts10.github.io.git
  4. cd into the repo
  5. bundle exec install
  • To publish changes: commit changes, then run bundle exec jekyll build, then git push origin master

Gnome

Some System-Level Basics (Gnome)

  1. In settings > "Mouse and Track Pad", put "Mouse Speed" about in the dead center and turn off "Natural Scrolling"
  2. In Gnome Keyboard settings, change "Switch windows of an application" OR "Switch windows of an app directly" to "Super + Escape"
  • You may also want to remap commands like "View split on left" and "Move one monitor left", as well as the Workspace commands
  1. Download the Gnome Tweaks Tool via the Pop app store. In Tweaks:
  • Remap Caps Lock to Control in "Keyboard & Mouse" > "Additional Layout Options".
  • Suggested: Change "Mouse" "Acceleration Profile" to "Flat"
  1. Change your desktop background!

  2. Disable blinking cursor in gnome-terminal: In terminal: gsettings set org.gnome.desktop.interface cursor-blink false

Changing Default Fonts

Weirdly the only place I could find this is in Gnome Tweak Tool (which I think I installed via the GUI Pop software store). Here are the defaults and what I changed them to:

  - Window title: Fira Sans SemiBold 10 --> Noto Sans CJK KR Bold 10
  - Interface: Fira Sans Book 10        --> Noto Sans CJK KR Regular 10
  - Document: Roboto Slab Regular 11    --> IBM Plex Sans Regular 11
  - Monospace: Fira Mono Regular 11     --> Deja Vu Sans Mono Book 11

You can download IBM Plex here.

Images/Video

For editing RAW photos, try Darktable. Here are some free film emulators. There's also GIMP and Kdenlive (for video)!

KDE Troubleshooting

If, after installing the proper NVIDIA drivers and restarting the machine, everything looks big, go to Fonts settings menu and "Force" the DPI to 96.

General tips:

How to Install from an AppImage if it's not going easily

This tutorial instructs to right-click the download appimage file, go to "Properties" > "Permissions" and then check "Allow executing file as program". Alternatively chmod u+x <AppImage File> to make it executable.

How to Mount an external harddrive that's formatted as exFAT

Simply install these programs by running this line: sudo apt-get install exfat-fuse exfat-utils (via).

Using a PGP private key from a Smartcard on Ubuntu

  1. Add the public key to your system: Get the .asc file onto your system, then run gpg2 --import <file-name>.asc
  2. Plug the smartcard into your computer.
  3. Try running gpg2 --card-status.

Troubleshooting

  • If the above doesn't work try installing scdaemon and pcscd with sudo apt install scdaemon and then sudo apt install pcscd. You may also need to sudo apt install gpgsm
  • You may also need to kill and restart scdaemon with:
killall scdaemon
pgrep scdaemon

You can now encrypt and decrypt files with the pgp keys on your smartkey using the gpg2 command line tool. To decrypt a file run something like this: gpg --output test --decrypt '/home/schlinkert/keepass-databases/key-files/fly1.key.gpg'. Check that you can decrypt a Keepass database AND that you can alter settings.

For a GPG GUI application, try sudo apt install gpa which installs a program called "GNU Privacy Assistant"

Putting a new distro on Oryx Pro

Once you've got the USB stick in the computer, reboot your system. You’ll need to tell the computer to boot from the live disk by holding F7 or F1 source.

If you're NOT going with Pop_OS, you'll likely need to install System76 drivers and the appropriate NVIDIA drivers. More info on this here.

Generic Upgrade Line

On the command line, sudo apt-get update && sudo apt-get dist-upgrade is a good way to upgrade everything.

Redshift + Xorg + KDE

If you're running KDE and Xorg, you'll likely need to use Redshift to tint your screen at night. "Redshift Control" is a KDE widget that gives you a nice GUI to configure Redshift (found by searching the "Get new widgets" interface).

I also found (in this video) what might be the command line way to install both redshift and the plasma widget:

sudo apt install redshift plasma-applet-redshift-control

Although elsewhere I've seen an additional program recommended:

sudo apt-get install plasma-widget-redshift plasma-applet-redshift-control

For gtk-based desktop environments like GNOME, you're probably going to want to run sudo apt-get install redshift redshift-gtk

Configuring Redshift in Plasma

First, I'd recommend moving the widget to the task bar. Then, to configure it, simply right-click the widget and click configure. Hit "Locate" to automatically locate your position. Then for temperature 6500 for Day and 3250 for Night seems to work well.

System76/Pop!_OS Links

Support articles

Pop Docs

Installing System76 and appropriate NVIDIA drivers for System76 machine

About

Some personal tips for setting up a Linux Desktop


Languages

Language:Vim Script 77.9%Language:Shell 22.1%