Published using Google Docs
Debian Notes
Updated automatically every 5 minutes

Debian/Linux Notes

Justine Haupt

When installing Debian:

When asked to choose the desktop environment, leave “Debian Desktop Environment” checked and check whatever desktop environment you want. Other things can be checked too, but that’s the main thing. It seems like MATE (for example) has some dependencies that come from the Debian Desktop Environment, and selecting MATE (for example) without the other will result in the network connection tool being missing and maybe other oddness.

If after installation the “awesome” WM will be installed, it’s not clear to me whether anything is lost by not including the Debian Desktop Environment, but I would hesitate to ever not include it in case other users want to use GNOME-based desktop environments.

If errors pop up relating to the desktop environment, or some widget needing transparent effects:

A compositing manager might be needed. There is now a default compositing manager built into MATE that can be switched on somewhere through the control panel. Alternatively, install xcompmgr and then run it to see if it fixes the problem. If it does, set to autorun on login.

Switch to xscreensaver:

  1. Install xscreensaver, as well as xscreensaver-gl (adds GL graphics based screensavers), anything xscreensaver related that comes up with the -extra bit in an apt search (adds extra screensavers), and maybe xscreensaver-screensaver-bsod too, which adds the cool BSOD screensaver.
  2. Uninstall the default/installed screensaver. If using mate, this is mate-screensaver, which is removed with apt.
  3. Set the xscreensaver daemon to run automatically after login (go to automatically run something at login section).

Automatically run something after login:

There are many ways to do this. Your desktop environment or window manager may have its own preferred way:

-With the “awesome” WM, include the line awful.util.spawn("command to run") at the end of rc.lua which is in ~/.config/awesome


        -A good universal way is to simply place the .sh script in /etc/profile or /etc/profile.d.

-Another, gui-based window manager-agnostic method is to put a something.desktop file in the ~/.config/autostart directory (if the directory doesn’t exist create). something.desktop is a launcher file, which appears with a “launcher” icon if using a graphical file browser. For xscreensaver, the command it should execute is xscreensaver -nosplash.

A launcher can be created by right-clicking the desktop and clicking “Create launcher”. The file can then be moved to the above directory. Or just make a new empty file and put this in it:

[Desktop Entry]
Exec=xscreensaver -nosplash

The most important part is Exec=, which is the command that’s actually run by either clicking on the launcher or having it be in that autostart folder.

Manage wallpaper across multiple monitors:

Install nitrogen, then set to autorun with $nitrogen --restore.

Create user:

To add a user, do #useradd -m [username]

Here, the -m creates a home directory for the new user

To set this user’s password, do #passwd [username]

Share drives/directories on the network that Windows can see:

  1. Install samba
  2. Edit /etc/samba/smb.conf to define directories to be shared, and do this:
  1. workgroup = WORKGROUP (if using Windows defaults)
  2. Add section like this:

                        [share name (e.g. Projects)]

                        path = /home/<userid>/Projects

                        available = yes

                        valid users = <userid>

                        read only = no

browsable = yes

public = yes

writable = yes

  1. Add your user to the samba users list: smbpasswd -a <userid>
  2. Start samba: #service smbd start

It’s working To access from Windows, go into the file explorer and navigate to \\<IP of host machine> or \\<hostname>. If running Synergy too, Synergy reports the host IP address right in the program control panel.

To add/create a user:                #adduser jhaupt

To give a user sudo privilidges:        #usermod -aG sudo jhaupt

The -aG option adds the given user to the given group.

Add user to sudoers file without requiring a password:

In the file /etc/sudoers, add this line:


To remove a user:        #userdel jhaupt                

Include -r option to delete user’s home directory and mail spool as well.

Add user to dialout group (mainly needed for USB access directly from programs): 

#adduser jhaupt dialout

To ` one’s own password: $passwd

To change another user’s password: #passwd [user]

Packages in the Debian Stable apt repository are not updated except for security updates. On the other hand, Debian Testing keeps more up-to-date versions of packages in the repository. To install the most recent version of a program on Stable, install from the “backports” repository, which will install whatever versions that “Testing” is currently using. For the really latest version of a program, install from “experimental” instead.

In the file /etc/apt/sources.list, add this line (here “Stretch” is the current stable release):

deb stretch-backports main contrib non-free

Or add this for experimental support:

deb experimental main

Run #apt update

To install a program from backports, use this command:

#apt install -t bullseye-backports somepackage

To install from experimental, use:

#apt install -t experimental somepackage

To list the device name of all connected devices (as in /dev/sda1, etc):

$df -hT

To make a bootable USB stick using an ISO image:

Check the device assignment using df as above, then do:

#dd status=progress if=/PathToISO/ISOfile.iso  of=/dev/[device]

Or use Balena Etcher. The same dd command can be used to put an ISO image on a stick without it being bootable.

To make an ISO image:

Check the device assignment using df as above, then do:

#dd status=progress if=/dev/[device] of=/PathToISO/ISOfile.iso

Machine to machine communication and file transfer on a local network using netcat:

On a given machine, start listening over any port (any port over 1024 without needing su privileges). Here we arbitrarily chose port 1120:

$netcat -l -p 1120

The -l tag says we want to listen and the -p tag specifies the port.

On another machine connected to the same local network, connect to the first machine. If the first machine’s hostname is “3body” we do:

        $netcat 3body 1120

Now we should be able to type messages to the first machine to the other, and back the other way too over the same connection. We can transfer files this way too.

Using nmap to analyse a network:

$nmap -sP          Look for all machines on the network that respond to a ping.


$nmap -sP 192.168.1.*


$nmap -sn

-v option is good in that it just lists all open ports on target

#nmap -p 1-65535 -sV -sS -T4 [target]                Full TCP port scan including service version detection.

Using nethogs to monitor which processes on a PC are sending/receiving the most network traffic:

        # nethogs

Using netstat to analyze a network (installed via net-tools):

        Continuously report on network connections (very cool): $netstat -c

Special IP addresses:

192.168.0.X        Local area network        Local private network        Loopback address

Using “ip”, which supersedes ifconfig:

        List all network devices with local ip addresses:        $ip a  or $ip addr

        List all network devices without ips: $ip link

To shut down a network device:         #ip link set wlan0 down

To turn it back on:         #ip link set wlan0 up

Using dhclient to release and renew and ip address:

To release one’s IP addrewss: sudo dhclient -v -r

...Which also shuts down dhclient, so do #dhcient [device name] as shown below to bring it back up.

Bring up a network connection from the command line:

For example, this might be needed to recover a system that only has shell access.

  1. Bring up the desired network interface using ip as shown above.
  2. Run #dhclient [device name]

Display the signal strength of a wifi network continuously in the terminal:

Connect to the network of interest and then run $watch -n 1 "cat /proc/net/wireless"

For a more readable display run $watch -n 1 "awk 'NR==3 {print \"WiFi Signal Strength = \" \$3 \"00 %\"}''' /proc/net/wireless"

A significant limitation is that you must be able to connect to the network first (i.e., know the password). Explore /proc/net/ files to see if there’s an alternative.

See what USB devices are connected:

Show names of devices:        $lsusb

Show connect/disconnect history of devices including mount location(e.g.  /dev/ttyACM0):        $dmesg

Another way to see what ports are mounted where is to do something like $ls /dev/ttyUSB*, unplug the device of interest, then plug it back in and rerun that command.

Find a file:         $find  . -name nameoffile*        (Note the dot, which signifies a search within the current directory. The star at the end has the normal UNIX meaning. 

Mount a remote file system using sshfs: $sshfs user@host:[directory] [mountpoint]

        To close connection once opened: #umount [mountpoint]

After sshing into a remote computer, to run a GUI program that will display on the remote computer’s screen:         $export DISPLAY=:0         (Run before any other commands)


I need to do this because I need to run things like Autodesk Inventor and Zemax, and one should be able to live modern life with a SINGLE laptop, in my case running Debian linux. That companies like Autodesk and ANSYS still force users to use their software on Windows is rage-inducing, and I believe it will be these companies’ downfall, as users like me develop comparable or better open source alternatives. Unfortunately, for mechanical CAD and optical design, we haven’t gotten to this point yet.

So what are the options? Dual booting? I don’t really understand how people can recommend this. It’s not a tenable option for getting work done. You want to do your daily work in ONE operating system. Restarting every time you need to use a specific program, and then restarting again to go back to your preferred OS, is absurd.

However there IS a good solution:

If you have certain software that will really ONLY run on Windows, a sure way of doing it while staying on Linux is to create a “virtual machine” with Windows installed on it. In this way, the horror that is Windows can be kept safely confined inside a host Linux system where it can’t ruin your day.

This way of doing things can be seamless by sharing needed directories on the host operating system with the guest system. For example, if I work on a project in the Windows guest and save it, it’s saved to my host computer’s native filesystem where it can be emailed or edited or moved or whatever. Likewise, if I create a file on my host system, it’s just there in the shared directory of the Windows guest. I can keep the guest opened on a certain desktop (I’ve gotten used to the awesomewm’s 9-desktop default, and always keep the vm on desktop 9), keep my other work open on other desktops, and from my perspective I’m just switching to the program I want to use (say, Autodesk Inventor) on desktop 9, without caring that there’s a virtualized Windows installation supporting it.

Terminology: When talking about virtual machines, when we say “guest” or “client”, we’re talking about the operating system that’s running on the virtual machine. The “host” is the operating system that the virtual machine is installed inside… i.e. the “actual” OS of the physical computer.

The caveat is using a virtual machine is that it can be annoying to set up. I used to use vmware player, and notes for this are here:

Install vmware player:        #sh [vmwareplayerinstallscript].bundle

Launch vmware player directly into the guest operating system:

$vmplayer -M /home/jhaupt/VM/Windows\ 7\ x64/Windows\ 7\ x64.vmx

(Here, it’s the .vmx file located in ~/VM/Windows/)

HOWEVER, it somehow stopped faithfully producing the needed environment to install needed software in Windows. Now I use QEMU/KVM, as described next.

Virtualization with QEMU/KVM via virt-manager:

QEMU and KVM together represent a high performance open source solution for virtualization, however it represents the height (in my mind) of open source confusion. That is, understanding what “it” even is in this context and what’s needed to make it work is not obvious. Like, why are two open source virtualization projects needed (both QEMU and KVM), and not one or the other as a cursory Google search would have you believe? It’s also not obvious to the newbie that QEMU and KVM are in fact generally used together. It just seems to be something people innately know from other sources, without ever explaining. Lack of documentation for open source projects is the one true problem with the open source community.

Suffice to say, my crude understanding is that in normal use, KVM is the main virtual machine emulator whereas QEMU comes in to emulate certain hardware, and a third program called “virt-manager” is used as a viewer for vm’s created and managed by QEMU+KVM , which could otherwise be launched and configured entirely from the terminal if one is so masochistic.

OK, so the bottom line is that one needs all three of QEMU, KVM, and Virt-Manager to do high performance open source virtualization on a linux host.  I skip for now the details of installing all three and go straight to the process of installing Windows on a guest virtual machine, which in itself is easy enough, assuming you have a good ISO file for the Windows installer:

  1. Run $virt-manager
  2. Click the icon to create a new VM
  3. Select the first option, “Local install media (ISO image or CDROM)”
  4. Type the OS your installing into the search box (e.g. Windows 10)
  5. Click forward, and then point in to the OS installer ISO image. This MUST be an ISO file (e.g., if you have a directory full of the installation files, this must be converted to an ISO), and preferably it’s a “lightened” version of Windows that has most of the bloat and evil default settings removed/changed.
  6. It allows you to set allocate basic system resources next, namely RAM, number of cores, and disk space. On a laptop with 64gb of ram and 20 cores, I allocated 24Gb and 5 cores to the vm, and give it 65Gb of space. But don’t worry, everything can be changed later, with the possible exception of the disk space which can be a PITA to change later if you want a contiguous partition on the virtual drive.
  7. A window will open showing the vm, where the normal Windows installation to a fresh computer appears. After this, the computer will reboot and you’ll have a Windows installation.

Creating a shared directory in a QEMU/KVM VM, and installing “guest tools” in the Guest:

The installation of the “guest tools” is needed as a step to getting the shared directory working, and has other performance benefits. This guest-tools package is a part of the virtio set of drivers.

First, a package called “virtiofs” is needed. My source for these instructions is:

  1. Install virtiofsd on the host system… #apt install virtiofsd
  2. With the guest vm turned off…
  3. In your VM’s settings/details, go to “Memory”, then check “Enable shared memory”
  4. In your VM’s settings/details, do “add hardware”
  5. Select “Filesystem”
  6. Set the driver to “virtiofs”
  7. Set the source path to be the full path to the directory on your host you want to share (e.g. for me this is /home/jhaupt/Projects)
  8. Set the target path to the directory this should show up as on the guest. For me this is /Projects.
  9. The accessmode should be set to “passthrough” by default, which can be seen in the XML. Mine looks like this:

<filesystem type="mount" accessmode="passthrough">

  <driver type="virtiofs"/

  <source dir="/home/jhaupt/Projects"/>

  <target dir="/Projects"/>

  <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>


  1. Start the VM.
  2. We need to install something called WinFSP, which lets Windows mount Linux filesystems. From the Windows guest, browse to and download the latest stable version of WinFSP, which is an msi file.
  3. Run the MSI file to install WinFSP. The MSI can be deleted after.
  4. Now we need to install the Guest Tools. This is a “helper daemon” that makes the VM run more smoothly by allowing the host OS to be able to control it. It gets installed inside the guest OS and is the equivalent to “vmware tools” (if one is used to working with vmware Player). Still within the guest, go to, navigate into the “stable” directory, and download virtio-win-guest-tools.exe.
  5. Install virtio-win-guest-tools.exe.
  6. After installation, reboot the guest.
  7. Confirm installation was successful by opening the Device Manager and checking that “VirtIO FS Device” is listed under System Devices.
  8. Open Services, look for “VirtIO-FS Service”, and double click it. We want this service to start automatically at start time, so double click the service and also switch the Startup Type from “manual” to “automatic”. Also, press “start” so it starts now.
  9. The shared folder should now appear in Windows Explorer.

Houskeeping for the Guest:

  1. Install all M$ updates.
  2. It’s a nice idea to run BCU (Bulk Crap Uninstaller) to remove any remaining bloat from the install.

To get MATE to NOT display the Computer icon (or other icons):

Run $dconf-editor, go to org > mate > caja > desktop, and turn off those visibilities.

dconf-editor can access a lot of configuration settings that aren’t otherwise accessible.

Change computer’s hostname:

Easy way: Use nmtui

Or on Raspbian, do it through raspi-config.

To do it manually:

  1. Edit the file “hostname” in the /etc directory. The file contains a single entry, which is the hostname.

  1. Edit the file “hosts” in the /etc directory. Change every occurrence of the hostname.

  1. Reboot.

If mouse cursor is stuck in “drag and drop” mode, as though left clicks are inverted:

The touchscreen may be giving whacky signals. Try disabling it with xinput:

Run $xinput. This will list all the input devices. Find the number associated with the touchscreen. As of this writing mine was 13. Then disable it with $xinput disable 13

To assign a particular icon to all files of the same type (NOTE, this didn’t fully work the first time I tried it):

This is based on MIME types, which are like identification cards for files. To start, we need to see if a MIME type for the particular filetype in question already exists. To do this run:

 $grep 'py' /etc/mime.types 

In this example we’re looking for files with a .py extension. This returns two outputs, one with the extensions pyc and pyo, and the other with the extension ‘py’, which is the one we want. It looks like this:

text/x-python                                   py

Note the left part of this output, the part that says “text/x-python”.

Find the icon you want to use and put it someplace sensible, like /usr/share/pixmaps or /usr/share/icons, if it’s not already there. It MUST be an svg file. Rename (or copy and rename, if it’s already in use on the system) the icon to be the left part of the output above but with any slashes replaced with a hyphen. For example, “text/x-python” becomes “text-x-python”, and the filename is “text-x-python.svg”.

Now, from the directory where the renamed file is placed, run these commands:

#cp text-x-python.svg /usr/share/icons/gnome/scalable/mimetypes
#gtk-update-icon-cache /usr/share/icons/gnome/ -f

To reinstall something that won’t run because files have been deleted but which apt-get won’t reinstall because it thinks it’s already installed correctly:

        #apt-get --reinstall install [package]

Make a file executable. That is, make it so it can be run from the command line just by typing .[filename]. The shebang at the top of the file will determine how it’s run.

$chmod u+x [file]

Change permissions to let anyone read, write or execute a file:

$chmod 777 [file]

Create a symbolic link:        #ln -s  [file to be referenced] [virtual file]

Install a .deb file:        #dpkg -i [deb file]

Convert one type of install file to another (e.g. .rpm tp .deb) using “alien”: #alien -d [rpm file]

This produces a .deb file from a .rpm file. It can convert in other directions. Use -h to see all possibilities.

Install LaTex (say “la tec”)

        #apt install texlive*

                -If you don’t install related packages (via the *), class files you may wish to import may be missing dependencies.

Using LaTex

        After creating your latex markup file (.tex extension), to make a PDF out of it do

                $pdflatex myfile.tex

        BETTER. Use latexmk to automatically compile the .tex file to a PDF every time it’s updated, while also handling the bibliography:

                $latexmk -pvc myfile.tex

Install a LaTex class file:

        -To use a downloaded document class for a specific .tex document, we can simply put the .cls file in the same directory as the .tex document and be done.

        - To make class files universally available on the system, they should be put in


                And then run #texhash

Display/overlay text on a screen:  $conky -t “text”

Conky can do a lot of things. Use -h to see options, like positioning text and changing font.

Login automatically (turn on “autologin”):

The login GUI is called the Display Manager. Debian uses either the gdm or lightdm display manager to handle the “greeter”, the login screen, after which the desktop environment gets launched. To see where the config files for lightdm are, run $/usr/sbin/lightdm --show-config. For gdm, it’s in /etc/gdm3/daemon.conf.

For lightdm,  one of the config files is probably at /etc/lightdm/lighdm.conf.  In that file (or whichever comes up), uncomment the lines
autologin-user=  and autologin-user-timeout=0, adding the username we want to login automatically for the former one. Also be sure that autologin-session= is set to the preferred desktop environment. (E.g. autologin-session=mate).

For gdm, uncomment the following lines and set the username:



Related: This will likely make a keyring password prompt come up when starting Chrome. Tried a bunch of things to turn this off and failed..

Change the login greeter (display manager):

As mentioned above, the GUI login interface is strangely called the display manager. A list of Debian-supported display managers is here: Probably all of them can be installed with apt. Upon installation of a new one you may be prompted to change which one is used at start time. Otherwise use #dpkg-reconfigure [name of display manager] to switch.

Changing settings in a more advanced way then the desktop environment’s Control Center allows:

$gsettings is the key to all of the GNOME-based settings you didn’t know you needed.

Categories of settings are grouped into “schemas”. Specific settings within each schema are called “keys”.


Too see a list of all the schemas: $gsettings list-schemas

To see all of the keys within a schema: $gsettings list-keys [schema]

To see the value of a key: $gsettings get [schema] [key]

To set the value of a key (usually true or false): $gsettings set [schema] [key] [value]

Can be combined with BASH commands.

To search within the keys of a given schema: $gsettings list-keys org.mate.power-manager | grep lock

NOTE: It’s useful to use more than one terminal at once to list schemas or keys in one and type get or set commands in the other.


Make a command/script executable globally (run from any directory):


        There are a few ways to do this.

-We can create an alias in the .bashrc file so that the desired command is aliased to the full path. This looks like alias arduino=’/opt/arduino-1.8.9/arduino’


-We could also create a symbolic link from the actual executable file doing something like #ln -s [path to executable] /usr/bin/[executable name]

-We can export the directory where the executable command lies to the path variable using a command like $export PATH=$PATH:/home/jhaupt/bin. This will make all executable files in the /home/jhaupt/bin directory be runnable from anywhere in the system.

This needs to be set to run automatically when starting up. It could be added to .bashrc file or to rc.lua if using the “awesome” desktop manager.

Record mouse location/coordinates to a text file:

$while true; do xdotool getmouselocation | sed -e 's/ screen:0 window:[^ ]*//g' >> coordinates.txt; done

To open that with Octave, use octave:> data = importdata('coordinates.txt')

To address specific digits from data, use octave:> data{linenum}(colnum). Note the curly brackets first, then parentheses.

To update a system:

Refresh sources:        #apt update

Update all installed packages:                #apt upgrade 

Update (patch) the distribution or upgrade to latest stable (depends on sources.list):        #apt dist-upgrade

To upgrade to a new version of the system, do the same steps but with the sources in sources.list pointing to the new version.

Recap: The function of apt-get upgrade and apt-get dist-upgrade depends on which sources are used. If it’s the sources for the current version of Debian, this will accomplish a system update. If it’s the sources for the next version of Debian, this will accomplish a version upgrade.

Fix “don't have enough free space in /var/cache/apt/archives/” when trying to apt install something:

        The standard online solution is to run #apt clean or #apt autoclean. This never works for me. What does free up space is #apt autoremove. And a good workaround if there just isn’t enough space is to move /var/cache/apt to some other directory, like one’s home directory, and then symlink to it. Like:

        #mv /var/cache/apt ~/

        followed by

        #ln -s ~/apt /var/cache/apt

To make a file executable:         $chmod u+x myfile        The shebang at the top of the file will tell the computer how to run it (e.g. shell script? Python?, etc). Otherwise this might be determined by the file extension, if present.

Using PuTTY to connect to an Arduino serial console (but there’s no reason not to use ‘screen’ instead)

-The default serial speed (9600), data bits (8), stop bits (1), parity (NONE) and flow control (XON/XOFF) are good, so no need to go to the settings under Connection > Serial.

-Naturally we’ll connect to device /dev/ttyUSB0 (or whatever) instead of ttyS0.

-Under the “Terminal” settings, we can optionally set “Local echo” to “Force on” to see any characters we send.

-Also under “Terminal” settings, keeping “Local line editing” set to “Auto” should be OK, but if in doubt we can set to “Force off”.

-Under “Terminal” > “Keyboard” settings, set “The function keys and keypad” to either “Linux” or “Xterm R6”.

To send a string, type what you want to send, then instead of pressing the Enter key, press Ctrl+J. Ctrl+J is PuTTY’s shortcut for Line Feed, which in combination with the other settings above has the effect of replacing the Enter key for sending strings.

To make life easier, enter all those settings and then under "Session" highlight "Default Settings" under "Load, save, or delete a stored session" and then click Save. Or save it as a new name.

To make life easier still, now bypass the PuTTY Configuration GUI altogether by running $putty -serial /dev/ttyUSB0 -sercfg 9600 to start the serial terminal directly.

To make life EVEN easier, add something like alias puttyarduino='putty -serial /dev/ttyUSB0 -sercfg 9600' to your .bashrc file, logout and login, and forever and always bring up the PuTTY terminal with $ puttyarduino.

Installing and configuring the “awesome” wm:

        -Install with apt

        -Log out and log back in, selecting awesome as the wm

        -The default location of the configuration files is /etc/xdg/awesome/ . This should be moved to ~/.config/awesome and edited from there.

        -At the very least we want to have a theme.lua config file in our home directory too, to do things like set the wallpaper. In rc.lua find the “beautiful.init(....” line and edit it to be:


-And create that directory and file, and copy some starting point theme into it (google “awesome defualt theme”).

        -To scale graphics for a high DPI (hidpi / UHD) display, add/modify the following line within ~/.Xresources:

Xft.dpi: 200

If .Xresources doesn’t exist, it can be created. The value of this setting is in dots per inch and can be determined from your display resolution and size, but the smaller the number, the smaller the scaling. 200 works well for me.

-To scale text in tty consoles, run:

        #dpkg-reconfigure console-setup


Using screen for an RS232 terminal:

        -To connect to a device on ttyUSB0:  $screen /dev/ttyUSB0

        -For Arduino, use “Ctrl+J” instead of “Return” to send commands (see explanation below).

-For Arduino, the default serial speed (9600), data bits (8), stop bits (1), parity (NONE) and flow control (XON/XOFF) , so no need to do anything special.

        -To connect with a different baud rate (e.g. 4800), just do $screen /dev/ttyUSB0 4800


        -NOWHERE on the internet have I found this information, but Ctrl+J sends the Line Feed character. This doesn’t seem to be documented screen’s man page. Also, I can’t find it spelled out explicitly anywhere but pressing the RETURN/ENTER key on the keyboard sends the Carriage Return character alone. I confirmed this with an FTDI console cable and a logic analyzer. Sheesh.

        -To close the connection, do Ctrl+A followed by K. Some systems may require Ctrl for the K as well. In general, screen commands are all done after first doing Ctrl+A.

Handling high-DPI displays (tested in “awesome” window manager)

  1. We want to use the .Xresources file to configure the DPI. This files is not present by default, so we create it in the home directory. The line to include in the file to set the DPI is Xft.dpi: 144

  1. The system needs to know to include configuration settings within the .Xresources at start time, and the command xrdb -merge ~/.Xresources will do that. This command needs to be run automatically at start. With “awesome”, the easiest thing is to add awful.util.spawn("xrdb -merge ~/.Xresources")  to the end of ~/.config/awesome/rc.lua

Important note: The order of the above awful.util.spawn line in rc.lua may be important. For the purpose of testing different DPI settings, if after restarting awesome nothing happens, try running $xrdb -merge ~/.Xresources in a terminal and THEN restart Awesome.

Other useful tidbits:

-To see DPI of current screen configuration: $xdpyinfo | grep -B 2 resolution

-To see physical screen size and resolution of display: $xrandr | grep -w connected

This method STILL doesn’t seem to fix DPI across every program. Luckily, some programs allow font to be specified separately from the system settings, like PuTTY.

Change the color of the prompt, or make it multicolored

If we do this in the terminal it will make each section of the prompt have a different color. The parts that change the color is the 5 instances of the two numbers followed by “m”. Mess with that to see what does what:

$ export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h\[\033[01;36m\]:\$\[\033[00m\] '

To make the change permanent add this line (minus the “export”) in the part of the .bashrc file where there’s the PS1= bit. In mine, there are three such bits close to each other, ad the one that changes the prompt looks like this:

if [ "$color_prompt" = yes ]; then

        PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h\[\033[01;36m\]:\$\[\033[00m\] '


Turn off the system bell

$xset b off        Will turn it off for programs run from the BASH shell.

-Add to .bashrc to make permanent for anything launched from a BASH terminal.

The state of the Function key is reversed/toggled.

 I think this is somewhat computer-specific, but on my laptop (perhaps all), pressing Fn + Esc will toggle the default-state. So if usually you need to press Fn to use the F keys and you want it to bet the other way around, doing this should fix it. On desktops the combination might be Fn + NumLock.

Using github:

To download a copy of a repository: $git clone [url.git]

To upload (push) files to a repository:

  1. If the name of the local repository (directory) is identical to the remote repository (the github URL), from within that directory do the following to stage all the files in the local directory, or alternatively, specific ones you want to update in the repo:

                $ git add .        

  1. If you want to add a comment for the push, do:

 $ git commit -m "a comment about the changes"

  1. To push (upload and overwrite) the changes, do:

$ git push

To create a new repository:

  1. Make it on the github website
  2. Clone the empty repo: $git clone [repository url] 
  3. Move the project files into the newly cloned directory
  4. Push the files to the repo using the above instructions


  1. If it asks for authentication, enter username, and for the password, enter your Personal Access Token (basically a long/fancy password). The token is something GitHub generates for you by going to Settings > Developer Settings > Personal Access Tokens
  2. After entering that token, it’ll connect. To save that token for future automatic login, do:

 $git config --global credential.helper cache