Standard Desktop for Ubuntu-Mate 20.04
Install and Configuration Guide
REVISION: 1.0
DATE: Mon 20 Feb 2023 04:25:57 PM EST
Background Information
The Standard Desktop, or SD, provides a means of conveniently installing a wide range of multimedia and
scientific applications software and it provides a consistent and stable enhanced desktop for users built on the
Ubuntu-Mate 20.04 desktop using the 2D-desktop, marco, or the 3D-desktop, compiz. The user also has a
convenient means for dynamically changing and updating the software, and for installing a highly customized,
standard desktop (as shown in the screenshot, Workspace.png). This Standard Desktop, or SD, also attempts to
provide a full suite of applications for working in a technical or scientific computing environment, providing
convenient scripts for converting file formats, working with pdf and html files, including detailed support for latex,
working with office, image, video, and multimedia packages, along with detailed documentation on using these
packages. The desktop can be dynamically changed from 2D to 3D and back again, and it can be easily customized.
The purpose in developing and maintaining SD was to have a stable platform that installs a full range of
packages along with a desktop that does not change with each new release of Ubuntu, or Ubuntu-Mate. The SD
desktop layout has attempted to maintain a consistent appearance and feel since Ubuntu 12.04, emphasizing a
shell based, command-line interaction environment. The package, as of Ubuntu-Mate 16.04 has converted to using
Ubuntu-Mate as the base Linux package, primarily because of continued support for compiz. Overall the intent
underlying this customization of the Ubuntu-Mate Linux software base is to provide standard features that remain
consistent over all long-term release cycles of Ubuntu, thereby reducing the learning curve each time a new release
is issued. Although the SD package is extensive and requires greater understanding of the installation process, and
includes a steeper learning curve due to its comprehensive software base, it makes for less effort in the long run
due the stability of the framework.
The SD package assumes you have installed Ubuntu-Mate 20.04, or more to the point, are planning on installing
it consistent with the recommendations in Sec. 5, and that you have your Ubuntu-Mate 20.04 updated and working
properly. You will need an internet connection to complete the install of the u20.04 SD package. A full installation will
need 35Gb in the root partition, and during the install the size of the additional downloaded deb packages can swell
that to 42Gb. A full list of the installed deb packages is in the semicolon delimited csv file, SD_Installed-debs.csv.
Most of these deb packages are obtained from the standard repositories, or from the list of repositories listed in
/etc/apt/sourcs.list.d, however a few specialized deb files are installed from the packages in ./debfiles, and some
packages are installed from source in ./srcfiles. The ./customize directory contains customized scripts, icons, and
backgrounds. The SD package is built on a standard Ubuntu-Mate 20.04 install using the 5.4.0 kernel.
If you are interested in installing SD, go directly to install instructions, starting in Section 5.
Bugs, errors and errata
Please report any difficulties or issues to, kolibal.math@gmail.com. No warranty is provided as to the usability of
this software, and the user assumes all risks.
2
Copyright
Copyright (C) 2020 Joseph Kolibal. Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is
included in the section entitled “GNU Free Documentation License".
CONTENTS 3
Contents
1 Details of Ubuntu 20.04 and the SD package 6
1.1 Using this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Updating to SD u20.04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Known issues and workarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 The fundamentals of using the Standard Desktop 9
2.1 Hidden files, or dot files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Starting the Standard Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Selecting the 2D (marco) or 3D (compiz) desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 Navigating the SD top panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5 Customization and configuration of the desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3 Getting started with SD and Mate 19
3.1 Some basic commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4 Advanced desktop usage 22
4.1 Loading and saving marco defined desktop configuration files . . . . . . . . . . . . . . . . . . . . . . 22
4.2 Loading and saving compiz defined desktop configuration files . . . . . . . . . . . . . . . . . . . . . . 22
4.3 Setting up fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4 Setting the Desktop Directory Switcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.5 Using the window manager scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.6 Setting the Working Directory, wd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.7 Playing a video on the desktop background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.8 Fixing a frozen X session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.9 Fast window kills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.10 Logging in from a tty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5 Installing Ubuntu-Mate and SD 28
5.1 Step 1: Pre-install configuration, preparing to install Ubuntu-Mate 20.04 . . . . . . . . . . . . . . . . 28
5.2 Step 2: Post-install configuration of Ubuntu-Mate 20.04 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3 Post-install configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6 Instructions for maintaining the SD deb packages 33
7 SD package maintenance software 34
7.1 Building skeleton files using: $BASE/matesetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2 Online documentation using: $BASE/docsetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A Appendix A: System tweaks 36
A.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.2 Setup 00security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.3 Setup altenatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.4 Setup aptpolicy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.5 Setup consolefonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.6 Setup convert-pdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
A.7 Setup dbus-launch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
A.8 Setup dns-resolvconf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
CONTENTS 4
A.9 Setup dropbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
A.10 Setup gmplayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
A.11 Setup grub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
A.12 Setup lightdm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
A.13 Setup minidlna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
A.14 Setup motd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.15 Setup newhostname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.16 Setup nm-applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.17 Setup nvidia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
A.18 Setup patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
A.19 Setup procdns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
A.20 Setup pulseaudio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
A.21 Setup SD-utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
A.22 Setup setbackground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
A.23 Setup solaar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
A.24 Setup sshroot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
A.25 Setup sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
A.26 Setup tracker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A.27 Setup vendor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A.28 Setup x2go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A.29 Setup xflipdecorate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
B Appendix B: User tweaks 53
B.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
B.2 Setup caja . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
B.3 Setup chrome-keyring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
B.4 Setup claws-mail-plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
B.5 Setup color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
B.6 Setup crontab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
B.7 Setup desktopupdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
B.8 Setup dropbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
B.9 Setup firefox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
B.10 Setup fontsdesktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
B.11 Setup getmail-procmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
B.12 Setup groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
B.13 Setup hplip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
B.14 Setup Iconfrc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
B.15 Setup ICPANEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
B.16 Setup imap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
B.17 Setup kde . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
B.18 Setup mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
B.19 Setup marco-compiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
B.20 Setup octave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
B.21 Setup procmailrc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
B.22 Setup screensize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
B.23 Setup SD.usr-utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
B.24 Setup selectdefaultapplications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
B.25 Setup solaar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
CONTENTS 5
B.26 Setup sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
B.27 Setup sshforward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
B.28 Setup sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
B.29 Setup synapse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
B.30 Setup usb-automount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
B.31 Setup video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
B.32 Setup vim-addons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
B.33 Setup vim-alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
B.34 Setup workarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
B.35 Setup xdg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
B.36 Setup zotero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
C Appendix C: System configs 76
C.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
C.2 Setup apache2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
C.3 Setup apache2-mathjax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
C.4 Setup apache2-passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
C.5 Setup apache-cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
C.6 Setup apache-cgi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
C.7 Setup apache-headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
C.8 Setup certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
C.9 Setup dns-ipv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
C.10 Setup dns-resolvconf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
C.11 Setup gmailsmtp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
C.12 Setup mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
C.13 Setup mathjax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
C.14 Setup postfix-virtual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1 DETAILS OF UBUNTU 20.04 AND THE SD PACKAGE 6
1 Details of Ubuntu 20.04 and the SD package
Further information about u20.04 and other Ubuntu distributions is available online, along with a wiki that provides a
good starting point for reading about Ubuntu. In addition to the deb packages and software installed during a base
install of Ubuntu 20.04, the SD package installs a large number of new packages. A list of these deb packages that
are intended to be installed along with a concise description is available in as a web page listing the deb packages
and description. A detailed alphabetical listing and somewhat more detailed description of all installed deb
packages beginning with the letter: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, and, z. Note that
this is linked to /usr/local/sod/udefaults and so is available only if SD has been installed.
1.1 Using this document
The SD package is extensive and comprehensive. This document provides information on: a) installing SD,
b) configuring SD using the administrative scripts needed to set up user accounts and desktops, c) maintaining and
updating SD and installed collection of Ubuntu-Mate software packages, and d) working with SD. To assist with
reading the document, the text is also color-coded, with blue indicating a hyperlink to a file, web resource, or
another part of this document; brown indicating a file, red indicating an executable command, orange indicating the
arguments to executable command on the command line, and green indicating a shell variable, typically defining a
location where a value is stored. The color pink defines the name of tab or link in a graphical tool. References to
components of SD which are stored in /syshome/src/u20.04 are relative to this home directory, e.g., throughout this
document a reference to $BASE/customize denotes the directory, /syshome/src/u20.04/customize since the
variable $BASE = /syshome/src/u20.04. The Table of Contents on the next page is also hyperlinked to the contents
so that it is less effort to find topics of interest.
At this point it is also important to point out that SD works only if it is stored at this location so it is important to
follow the instructions which require that all of the source files in SD be untarred in this directory. Please not as well
that while this document can be read anywhere, some of the hyperlinks to referenced files may not work until all of
the SD packages are fully installed.
1.2 Updating to SD u20.04
This version of SD u20.04 incorporates Ubuntu-Mate 20.04, and while much of this Linux package is consistent
with Ubuntu 20.04, there might be slight differences that may cause some difficulties during the install. In
addition, If you are running SD for Ubuntu or Ubuntu-Mate for 16.04, or higher, your SD desktop that was
installed for your user is mostly consistent with the current u20.04 desktop. Run SD.adm_SetMateDesktop as
root to update your desktop configuration and examine the files in Appendix B that discuss the updates in
./sys+user/user_configs/README.desktop_update.
In addition, please review the documentation in Appendix A that discuss the updates to system configuration
files you should consider, along with a more detailed discussion of installing some standard system-wide
functionality discusses in Appendix C.
1.3 Known issues and workarounds
While most of the software base for Ubuntu-Mate 20.04 along with the u20.04 extensions appears to be fully
functional, The following software issues have cropped up with Ubuntu-Mate 20.04:
chromium-browser - only installs as a snap, but the deb file is also a dummy call to a snap install so that any
workarounds tend to break dpkg.
Workaround: we have replaced chromium-browser with google-chrome.
The program claws-mail no longer supports the Python plugin that allowed marking all emails as read with
the click of a button. In addition, the claws-mail inline browser plugin to read html, fancy.so, does not work.
1 DETAILS OF UBUNTU 20.04 AND THE SD PACKAGE 7
Workaround: the only option is to use dillo (properly configured setting options in $HOME/.dillo), as shown in
the template file in ./customize/defaults/dotfiles/dillorc.
Most of these errors are due to the fact that the a large number of gtk libraries were eliminated in going to
20.04 because they relied on the 2.7 version of python.
The program xine requires the addition of the library libvdpau-va-gl1, however even with this installed the
package fails to work properly, often crashing on: xiTK received SIGSEGV signal, RIP., followed by a core
dump.
Some applications such as nm-applet will not attach to the system tray when launched at startup, and
similarly other applications such as kazam used to take a screenshot also will not attach to the system tray
after a recording begins, making it difficult to stop the recording session.
Workaround: All of these can be forced to the system tray if they are started through dbus-launch, e.g., for
kazam we start it as, dbus-launch kazam. Setting up the launch of nm-applet is discussed in Appendix A.1,
as is configuring dbus-launch. SD supports utility scripts, such as kazam_launch, mate-screenshot_launch
and hptoolbox_launch that work to allow for launching applications from the top panel, or from a a shell with
the proper configuration to work as intended without need to prepend, dbus-launch to these programs.
At times the compiz key binding under the Category Window Management for Grid | Bindings | Restore that is
set to the value of CTRL-ALT-r does not get mapped. To restore this, set the value in ccsm directly.
The utility tracker which is implicit in this version of Ubuntu-mate cannot be easily removed without affecting
the dependencies of many other programs, however it sometimes becomes a runaway process using over
100% of a cpu. For that reason it is recommended to avoid starting it.
Workaround: This can be done for all users using the utility, sudo killtracker -t. This overwrites the existing
system startup files for tracker. It is also important for each user to assure that there are no startup files in
$HOME/.config/autostart for tracker.
If all else fails and tracker still starts, then removing the executable permission on the tracker files will work,
i.e., do
sudo chmod -x /usr/libexec/tracker-miner-fs
sudo chmod -x /usr/libexec/tracker-extract
sudo chmod -x /usr/libexec/tracker-store
A few applications such as hp-toolbox and vlcs Tools | Preferences interface attempt to launch a window
larger than all workspaces together and no ability to resize. The problem exists for both compiz and marco.
Workaround: Added the following to $HOME/.zshenv:
unset GTK2_MODULES
unset GTK_IM_MODULE
unset GTK_MODULES
unset GTK_OVERLAY_SCROLLING
Pulse audio sound does not start on Intel generation 10 computers with pavucontrol showing a Dummy
Sound Card, i.e., there is no controllable sound card. A workable patch is to reset alsa on boot by using
/usr/sbin/alsa force-reload and this could be initiated on reboot using root’s crontab with the line
@reboot root /root/bin/alsareload
where alsareload started alsa, however a more expedient workaround is to remove the timidity-daemon.deb
utility using aptitude purge timidity-daemon. The timidity-daemon deb file is removed from the list of files
to be installed to avoid conflict.
1 DETAILS OF UBUNTU 20.04 AND THE SD PACKAGE 8
In addition to these packages, several packages failed to install or when installed failed to launch due to
changes in the underlying Ubuntu-Mate package libraries. These packages require that at the libraries be patched
using Ubuntu-Mate 16.04 libraries and modules. Administrators wishing to implement these patched libraries can
use the SD package SD.pkg_AddPatches for: pdf2htmlEx and sliderule.py. In addition the Imagemagick package
will not convert image files to pdf unless the /etc/ImageMagick-6/policy.xml file is modified to allow this. The
utility SD.pkg_AddPatches can also make this modification. These software modifications and a range of other
customization options are discussed in Appendices A.1, B.1, and, C.1.
For those using vim, please note in addition that the editors vim and gvim are set to vim.athena which runs
through xterm, and is unusable as configured. For the practicality of being able to edit, it is recommended to use
update-alternatives to switch to vim.gtk3 and gvim.gtk3. Alternatively, use the graphical interface galternatives to
configure these selections.
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 9
2 The fundamentals of using the Standard Desktop
This section describes how to log in and become familiar with the SD desktop, including developing some
understanding of the large number of hidden configuration files that are in your home directory. The SD desktop
uses the zsh shell instead of the bash shell, and each shell is started as a login shell by sourcing the $HOME/.zlogin
file whenever a terminator, mate-terminal, or xterm terminal is opened.
2.1 Hidden files, or dot files
Along with the $HOME/.zlogin file, there are a number of .z* files associated with zsh. The .zprofile file calls
$HOME/.zlogin which defines a login shell. Most of the environment variables setting up various aliases for the
SD desktop are in the .zprofile file. You can also add your own modifications to the environment using the
$HOME/.zlocal file which is sourced last each time a shell or mate-terminal is started. Additional zsh resource files
include $HOME/.zshrc (sets up a customized terminal title and cursor) and $HOME/.zshenv. To obtain more detailed
information about your shell’s alias configuration use binman -z.
After you have installed the SD package and ran the package SD.usr_SetMateDesktop or if the system
administrator has run the package sudo SD.adm_SetMateDesktop, a large number of configuration files
are copied to your home directory. A template copy of the SD hidden desktop configuration files is kept in
/usr/local/sod/defaults/dotfiles, and there is also a copy of the skeleton files, i.e., the configuration files kept in
/etc/skel_sod/ for each customized skeleton listed. In addition to the SD configuration files, there are numerous
configuration files that are placed in your $HOME directory that configure mate, gnome and compiz applications. A
concise description of these along with some of their attributes can be found by opening a terminal and invoking the
command, h.whatis_dotfiles. A dot file (or dot directory) is a hidden file (or directory) that serves to configure your
user environment. At the start, you should check that your $HOME/.IC_MONITOR file has been correctly configured
when your account was setup since the scaling of shells and terminals is done relative to the monitor DPI setting.
You can reconfigure this file using, SD.usr_GetVideoInfo - w, or you can simply edit it and modify the contents
directly to correctly reflect the scaling needed. This customization is discussed further in Section 2.5.
The SD desktop also comes with a text based desktop configuration file, $HOME/.Iconfrc which allows each
user to specify default parameters for their desktop. In addition to this file, there is a long list of .IC_* files,
.IC config file Action or purpose
.IC_ALARM Set an audible alarm. Use with pingalarm
.IC_BROWSER Configure home/starting pages for browsers launched from top panel
.IC_DATES Configure date/semester shell variables
.IC_DESKTOP Set the desktop parameters including marco/compiz desktop.
.IC_LOCATION Set geolocation (longitude, latitude and zip)
.IC_LTX Configure the ltx Latex utility scripts, q.v., h.latex -H
.IC_MAILHOST Set up the mail servers, smtp hosts, imap fetch
.IC_MASTER Designate which computer is the master for backups
.IC_MONITOR Set the dimension of the computer monitor
.IC_MYTEMPLATES Configure file generation templates
.IC_PANEL Configure the top panel icons and their actions
.IC_PDF Configure the pdf viewer and pdf scanning
.IC_PULSE Configure your sound card and save the results using SD.usr_SetPulseAudio
.IC_SCANNER Configure the software used for scanning for any connected scanner
.IC_SIGNATURE Your signature used by latex letters and other scripts
.IC_SMS List of addresses for texting from computer to cell phone
.IC_SSH Configure remote ssh host used for tunneling
.IC_WEATHER Set up weather reports and assign stations for use by lweather
To customize any of these, for example $HOME/.Iconfrc file, make the desired changes, and save. If something
does not work, for example in the $HOME/.IC_MYTEMPLATES file, if you have not saved a backup copy, you can
reset it to the system default by doing:
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 10
cp /usr/local/sod/defaults/dotfiles/IC_MYTEMPLATES $HOME/.IC_MYTEMPLATES
It is also worthwhile practice to back up any configuration file prior to modifying it.
A partial list of some of the additional dot files and directories that you should be aware of include
Hidden file or directory/ Action or purpose
.bashrc The bash configuration file
.claws-mail/ The claws-mail configuration directory
.COLOR Configures 8 bit color
.COLOR256 Configures 256 bit color
.COLOR_BW Configures grayscale
.config/ Configuration directory for most utilities
.config/autostart/ Applications started when logging in to the mate desktop
.config/caja/scripts/ Scripts when using the caja file browser
.config/compiz-1/compizconfig/Default.ini Configuration for compiz
.config/nautilus/scripts/ Scripts when using the nautilus file browser
.config/mate/panel2.d/default/ Lists all of the panel application
.config/chromium Configuration directory for chromium browsers
.dillo/ Dillow browser configuration (for claws-mails)
.dropbox configuration directory for dropbox
.fetchmailrc Configure imap or pop mail fetch using fetchmail
.forward Configure mail forwarding
.getmail/ Configure imap fetch using getmail and its alias, gm
.gvimrc Sets up the defaults for the gvim editor
.gkrellm2/ Configuration files for gkrellm for system resource utilization
.grsync/ Configuration directory for grsync
.jigl/ Configuration for jigl layout and themes (photo package)
.mate2/ Configuration directory for gnome desktop applications.
.gnome2/nautilus_scripts Scripts which can be launched from nautilus browser
.local/share/applications/mimeapps.list Define apps which open files using xdg-open
.mailcap select which app open claws-mails attachments
.mozilla/firefox Firefox configuration directory
.mydconfuser Configuration file for the mate-compiz desktop
.procmailrc For filtering mail
.rsync_exclude-all rsync files excluded from synchronization used by l2n
.secpanl/ Configuration files secpanel i.e., sdssh
.signature configure signature for claws-mail
.spamassassin Configuration file for spamassassin for spam filtering
.ssh/ Configuration files for secure shell, i.e., ssh
.trash/ SD symlink to the user’s trash folder
.vimrc Sets up the defaults for the vim editor
.vim/ Directory containing configuration options for vim and gvim editor
.xbindkeysrc Sets up key bindings for X (different from the mate keybindings)
.Xdefaults Used to define defaults for X based utilities
.xinitrc Used to start X in a tty
.zkeys Set up caps lock and other keys
.zlocal zsh configuration file where users can define commands
.zlogin zsh login file
.zshrc zsh resource file
.zshenv zsh environment file
.zprofile zsh profile file
To list all your hidden files, do: ls -ad .*. To obtain a comprehensive description of dotfiles on your system, use the
SD utility h.whatis_dotfiles. This provides a listing along with a short description of the purpose of each dot file or
dot directory. In general, if you are trying to find where the configuration files are located for a program that you use,
say foo, search for these in $HOME/.foo for in $HOME/.config/foo of in $HOME/.local/share/foo.
In a shell you can bring up the SD utility, SD.usr_ConfigUtilities to provide a convenient link to several of the
standard desktop configuration programs that you can access. This is useful for debugging any problems, or in
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 11
making changes to your desktop setting. In addition, the System Tweaks and User Tweaks in the appendix of this
document should be reviewed for completeness when working through the task of configuring your system. These
files can also be accessed in any shell using the command, SD.pkg_SuggestedTweaks, or for short, just use,
tweaks.
2.2 Starting the Standard Desktop
If this is a new install of u20.04, you will need to modify the desktop configuration of your first user, SodUser that you
created during the install process, to have the standard SD desktop. To do this, you will need to log in to a tty screen
using <CNTL><ALT><F1>, then log in as root. From the tty screen you can then involke the command,
SD.adm_SetMateDesktop SodUser -a
to set SodUser’s desktop. The desktop selected will be the default SD desktop. To add another user, e.g., your user
with the name, JaneDoe, use the command,
SD.adm_AddUser JaneDoe
If you have not updated your login account using SD.adm_SetMateDesktop, the mate desktop will be the standard
one supplied with your version of Ubuntu-Mate. It is important to recognize that installing SD does not automatically
alter your user accounts, these changes have to be explicitly applied. SD installs a large software base that provides
users the opportunity to customize their desktop configuration as they choose.
The choice of window manager and desktop is specified through the lightdm graphical interface when you are
logging into your session. This is typically selected from the arrow next to the login panel of the lightdm log screen.
Select the Mate desktop.
2.3 Selecting the 2D (marco) or 3D (compiz) desktop
You can set the desktop to use compiz as the window manager, or to use marco. The marco window manager is the
mate version of metacity.
The default configuration after you load the SD desktop for your user using SD.adm_SetMateDesktop is compiz
using emerald as the decorator. The user has the option of using ccsm to install any compiz configuration files,
described in Appendex B.7: desktopupdate. This utility can be invoked directly from the command line as ccsm, or
can be accessed from the Mate-Control-Panel icon, on the top panel of the desktop, clicking on the link to
CompizConfig Settings Manager shown under the heading Look and Feel. With compiz you have a 3D desktop,
provided your video card supports this, while the marco window manager only provides the 2D desktop.
Please note that if you are using x2go for remote desktop access, you will need to turn off compiz (the
3D desktop) and turn on marco (the 2D desktop) on the remote computer, as desribed in Appendex A.28
detailing, x2go . The choice of 2d or 3d desktop is made by selecting the value of DEF_DESKTOP in the file
$HOME/.IC_DESKTOP, using the values DEF_DESKTOP=compiz or DEF_DESKTOP=marco. While you are logged in
to your desktop, you can actively toggle between the 2D and 3D desktops using the utility, SD.usr_SwitchMyDesktop.
The advantage of a scripted access is that you can log into the remote computer, switch the settings from 3D to 2D,
and then log in using x2go.
There are times when compiz or marco misbehave, i.e., they do not properly refresh. You can always log out of
your desktop session and then log back in again, however if you do this you lose your current desktop work, i.e., all
of your open desktop processes are typically terminated when you log out. Instead, you can restart the compiz
desktop during an active session using the compiz icon, (next to the caja icon, ) on the panel, or in a
terminal you can use the command, /usr/local/bin/ce, to restart the compiz desktop. An alternative command to
completely refresh your desktop is compiz-fixup which attempts to restart compiz and the emerald compositor.
You can also refresh the caja browser (which refreshes you desktop icons too) using the caja icon button, or by
using the command, /usr/local/bin/startcaja. Both of these commands are in your path by default so that it suffices
to type ce or startcaja in a terminal to have these take effect.
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 12
2.4 Navigating the SD top panel
When you have logged into your SD configured desktop
1
take a few moments to familiarize yourself with some
useful utilities and services that can be accessed from the icons on the top panel. The first seven from the left are
perhaps the most important:
Use the standard system mate menu icon, to provide access to system menus, system utilities and services.
This is the first icon from the left.
Use the user switcher/logout icon, to log into another session (you can have up to 4 windowing sessions
active at the same time). This is the second icon from the left.
Graphical information about your installed system can be obtained from the wrench and screwdriver tool icon,
to the left of the keyboard icon on the top toolbar. This is the fourth icon from the left.
Use the keyboard icon, i.e., the blue keyboard to the left of the i-icon button to examine the keyboard
shortcuts. This is the fifth icon from the left.
Use the i-help icon, i.e., the blue letter i icon on the lower left toolbar on the desktop to find additional user
information about the SD package and using Linux. This is the sixth icon from the left.
Use the small hammer icon, to provide convenient access to the mate-control-center. This allows for
customizing, using a graphical interface many of the desktop programs such as compiz, caja, emerald, and so on.
This is the seventh icon from the left.
A complete description of the icons on the SD desktop top panel is provided in the listing below:
Icon on top panel Short description of action
Standard mate menu.
Standard mate user switcher/log out button.
Standard mate systme monitor.
Shows hardware information in a GTK+ window (hardinfo).
Shows marco, compiz and some xbindkey key bindings and shortcuts.
Choice of browser to view /usr/local/sod/defaults/docs/index.html help file.
Brings up the Mate Control Center (mate-control-center).
Choice of file search database tool (recoll).
Choice of flat file database tool (xmbase-grok).
Choice of todo software package for taking notes (keepnote).
Access to alternative note taking on the desktop.
Choice of calendar (orage).
Choice of email client (claws-mail).
Choice of system calculator (qalculate-gtk).
Choice of stats package (rkward - front end to R).
Choice of math package.
Choice of symbolic math package.
Choice of numerical math package (qtoctave).
Choice of broswer (firefox).
Choice of broswer (midori).
1
The icons shown are the default version. Users can change these using the panel Properties (right click on any panel icon to bring
up the menu), or by configuring these through the $HOME/.IC_PANEL file, and then running SD.usr_SetPanelIcons.
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 13
Link to open default_info (opera).
Link to browser (chrome browser).
Standard mate Workplace switcher.
Standard mate action to invoke a means of starting a program.
Zenity dialog to open a preselected diretory using sld (ldselect).
Choice of filebrowser (caja).
Choice of terminal (terminator).
Editor for tex files.
Choice of html editor (bluefish).
Choice of word document editor (libreoffice).
Choice of thesaurus (artha).
Choice of dictionary (mate-dictionary).
Choice of word analysis tool (wnb).
Choice of scan software (simple-scan).
Choice of scanner feeder software (desktopscan).
SD tool for scanning image and printing directly to printer.
SD tool for setting window placements using wmctrl.
SD tool to restart caja browser.
A tool to restart compiz and the decorator.
Opens connections to remote hosts using ssh (sdssh).
Opens graphical syncronization tool to sync across file systems.
Opens def_remotedesktop to provide connection to remote hosts.
A tool to select the files that are shown on the desktop.
A tool to convert web page content to a pdf file.
Choice of webcam software (guvcview).
Choice of youtube video download software (utube2mp4).
Choice of photo editing and archiving software (digikam).
Choice of video recorder (kazam).
Choice of screenshot (shutter).
Opens alternative video messenger alternative to skype.
Opens skype.
Opens launcher.
Configures pulse audio (paset).
Opens gnome sound control tool.
Opens mate sound control tool.
The last three are also useful for configuring your speakers and your microphone (typically associated with a USB
camera) when it is not working. Both the gnome and mate sound control have to be used to manually set the
sources and sinks.
Each one of these icons and their actions can be modified by editing the file $HOME/.IC_PANEL. Any
changes made to the file are implemented when the utility SD.usr_SetPanelIcons is executed. It is then
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 14
necessary to either restart caja, or to log in than then log back into your desktop session. For example,
the fifth icon on the top panel, i.e., the one for the keyboard key, is configured to initiate the command,
default_bindings, when the button is pressed. It runs the program, /usr/local/bin/default_bindings that opens the
file /usr/local/sod/defaults/docs/fastpaths.pdf that contains a summary of the keyboard shortcuts for Mate,
Compiz, and for other programs suchs as xbindkeys that allow the user to define keyboard shortcuts. In this case
the value of DEF_BINDINGS=atril in the $HOME/.IC_PANEL file shows that this opens the file using the atril pdf
viewer, with the resulting action that the pdf, shown below, is opened
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 15
SD Rev. 0.98
Note: Use h.fastpath at the command line to obtain a text summary of these commands.
Use h.vim editor, h.terminator, h.firefox, h.zshenv and h.xbindkeys for additional key bindings.
Note: Set keybindings using: xbindkeys-config (X configuration), ccsm (compiz window manager),
mate-tweak (menu and windows), mate-mouse-properties (toggle cursor locate using Ctrl key),
mate-keybinding-properties (XF86 special keys), dconf-editor (teminal and marco keybindings),
caja-file-management-properties (set single or double click for caja and desktop icons),
and compose-key (mate-keyboard-properties). For KDE config, use systemsettings5.
Use SD.usr ConfigSystemUtilities to launch any configuration utility from a terminal.
Mouse Button and Key defintions
MButton-1 – Mouse Left; MButton-2 – Mouse Middle; MButton-3 – Mouse Right
MButton-4 – Scroll Mouse down; MButton-5 – Scroll Mouse up
Ctrl – Control key (bottom left only) and Alt keys next to space bar.
Right Ctrl – Control key (bottom right only).
Mod – Mod key is between the Ctrl and Alt keys, and is also denoted as Super.
Kp-Name – Named keypad button; Kp0 to Kp9 – Numeric keypad keys.
PrntScr– Print Screen key (may require FN key).
w
,
w
,
w
,
w
– The arrow keys.
Action (app intrinsic) Shortcut
Mouse font scale up / down (terminator) Ctrl
(MButton-4 / MButton-5)
Font scale up / down (terminator/mate-terminal) Ctrl
Shift
+ / Ctrl
Restore scale (terminator/mate-terminal) Ctrl
0
Toggle Menu bar: claws-mail / firefox / atril Ctrl
F12 / Alt / T
Open File/View/Help Menu (most apps) Alt
F / Alt
V / Alt
H
Search/Search next (most apps) Ctrl
F / Ctrl
G
Print (most apps) Ctrl
P
Open new tab (terminator/mate-terminap) Shift
Ctrl
T
Open new tab (browsers, file browsers) Ctrl
T
Fuzzy find files (fzf in shell) Ctrl
T
Note: Applies to most file browsers, web browsers, and most apps.
Action (defined by .xbindkeysrc) Shortcut
Display tint2 panel Mod
Alt
p
Display operations tint2 panel Mod
Alt
o
Display user tint2 panel Mod
Alt
u
Open Key maps help page Alt
Shift
K full pdf version
Open Command notes help page Alt
Shift
C
Open SD desktop Information Alt
Shift
I
Open web based man pages / Notebook (jots) Alt
Shift
M / Alt
Shift
N
Open xbindekeys listing / configuration Alt
Shift
Q / Alt
Shift
U
Toggle automouse (keeps mouse and screen active) Alt
Ctrl
M
Reset caps key and CNTL-ALT-Backspace to default Alt
Ctrl
K (in .IC_MYTEMPLATES)
Open xterm Alt
Shift
X
Toggle window decoration on/off Mod
Alt
MButton-1
Resize to DEF_TERMINALSIZE / DEF_BROWSERSIZE Mod
Alt
MButton-4 / MButton-5
Open default terminal at cursor Alt
Shift
S
Open default terminal at cursor Alt
Shift
MButton-1
Open default file browser at cursor in wd Alt
Shift
MButton-2
Open default terminal at cursor in wd Alt
Shift
MButton-3
Open default terminal / filebrowser at cursor in wd Alt
Shift
T / Alt
Shift
B
Note: The working directory, wd, is set by invoking the command swd in the directory.
Note: The underlying utility for the Open default actions is a wm.* utility using wmctrl.
Window Action (compiz/marco,x) Shortcut
Locate cursor Ctrl
Open System Menu / Run Dialog Alt
F1 / Alt
F2
Screenshot of Desktop / Single Window PrntScr/ Alt
PrntScr(Mate)
Open / Close window menu Alt
Space / Esc
Shade/Unshade window (pointer on titlebar) MButton-4 / MButton-5
Move window Alt
MButton-1 or Alt
F7
Resize window Alt
MButton-2
Open window menu Alt
MButton-3
Resize window Alt
A
Close window Alt
C
Lower / raise window below other windows Alt
D /Alt
R
Unmaximize window (vertical or horizontal) Alt
E
Toggle Maximize window horizontally /vertically Alt
L / Alt
Z
Maximize window to fullscreen F11 (works for apps that follow x11)
Open Mate terminal Ctrl
Alt
T (Mate)
Window Action (compiz only) Shortcut
Toggle pin window to all desktop Mod
= (i.e., use equal sign)
Toggle window stays on top Mod
. (i.e., use a period)
Toggle maximize window to fullscreen, bordered Alt
F5 (works for all apps)
Maximize window to fullscreen, bordered Alt
F10 (works for all apps)
Shade/Unshaded window Ctrl
Alt
S
Grid snap/move windows to number-key grid Ctrl
Alt
Kp1 Kp9 / Mod
Kp1 Kp9
Grid left / right snap windows maximum Ctrl
Mod
w
/ Ctrl
Mod
w
Grid unsnap windows Ctrl
Mod
w
Move / unmove window to mouse position Mod
Z / Mod
Kp-Insert
Hide all windows (show desktop) Ctrl
Alt
D
Desktop Action (compiz) Shortcut
Log out Ctrl
Alt
Backspace
Lock screen Ctrl
Alt
L
Lock screen (gnome xbindkeys lock) Ctrl
Alt
G
Screenshots
Take kazam screenshot/video (launch app) Alt
= (launches gui)
Take im screenshots of window (im import) Alt
0
Take scrot window w border/wo border Alt
1 / Alt
2
Take mate/gnome screenshot of window Alt
3 / Alt
4
Take flameshot gui Alt
5 (launches gui)
Take compiz area screenshot Mod
MButton-3(in ./Desktop)
Note: Screenshots are saved in: $HOME/Pictures, $HOME/Desktop, and $HOME.
Rotate cube w/pointer anywhere/on background Ctrl
Alt
MButton-1/ MButton-2
Switch to workspace 1 (Home) Mod
Home
Switch to workspace on the left / right Ctrl
Alt
w
/ Ctrl
Alt
w
Switch to workspace on the right Ctrl
Alt
Right
Workspace Select / Move left or right Ctrl
Alt
w
/ Ctrl
Alt
w
or
w
Move right / left between windows with popup Alt
Tab / Shift
Alt
Tab
Ring move right / left between windows Mod
Tab / Shift
Mod
Tab
Start or stop Flip move Shift
Mod
S
Flip move previous / next window Mod
Tab/ Shift
Mod
Tab
Scale displayed windows on current/all desktop(s) Mod
W / Shift
Mod
W
Expo display all desktops in line Mod
E
Note: that using Expo allows for items to be dragged by mouse between desktops.
Desktop Effects (compiz) Shortcut
Fade window translucency (up / down) Alt
(MButton-4 / MButton-5)
Desktop zoom (in / out) Ctrl
Shift
(MButton-4 / MButton-5)
Locate cursor / toggle cursor highlight Ctrl / Mod
;
Toggle window / desktop negative Mod
N / Shift
Mod
N
Highlight only the active window Mod
P
Benchmarks Mod
F12
Search, Jump and Launch Programs Shortcut
Open synapse command interface Ctrl
Space
Space
Undecorate any window (xundecorate) Mod
Alt
MButton-1
Change size of any terminal using wmctrl ++Enter (in .IC_MYTEMPLATES)
tilda, toggle transparent / slide out F12 / Ctrl
F2
autojump, go to directory j PATTERN
autojump, add pwd directory to list aja
autojump, search for directory ajs PATTERN
autojump, list directory list ajl PATTERN
autojump, purge directory list ajp PATTERN
fasd, to go to or open matched pattern z PATTERN
fasd, vim matched pattern v PATTERN
fasd, find matched pattern ff PATTERN
fasd, find directories with matched pattern fd PATTERN
fzf, invoke list and search of files Ctrl
T
start vim edit of command line in zsh Esc
Compose Key Shortcut
Create composed characters, such as §, æ, ¢. Right Ctrl
Key1
Key2
Note: To configure the Compose-Key: Use mate-keyboard-properties, select Layout tab,
Alternatively use: System Control Centre Keyboard Layout Options.
Scroll to position of Compose Key. Click on the triangle next to the the control-key selection.
§
§
§ The standard shell tty key commands include:
Tab— line completion;
Ctrl
A / E — move to start / end of line; Alt
B / F — move back / forward;
Ctrl
W — delete word; Ctrl
C — kill process;
Ctrl
D — logout; Ctrl
L — clear screen;
Ctrl
Q — allow screen output; Ctrl
R — search command history backwards;
Ctrl
S — stop screen output; Ctrl
U — delete line;
Ctrl
W — delete word; Ctrl
Z — suspend process to background (fg,
to restore process).
§
§
§ For terminator terminal, shortcuts include (run h.terminator for additional info):
Shift
Ctrl
I — open new terminator; Shift
Ctrl
O — split tab horizontally;
Shift
Ctrl
E — split tab vertically; Shift
Ctrl
E — split tab vertically;
Alt
w
/
w
— move tab left/right; Alt
w
/
w
— move tab up/down;
Mod
R — rotate tab split clockwise; Ctrl
Tab— cycle to next tab.
§
§
§ Configure xterm using $HOME/.Xdefaults with xrdb to refresh the database. Configure xbindkeys
using $HOME/.xbindkeysrc using killall xbindkeys; xbindkeys to refresh database.
§
§
§ The utilities fasd, autojump, and fzf are defined and invoked in $HOME/.zprofile. The zsh com-
mand bindkey invokes shell based key bindings, including binding the shell command line to vim
editing in $HOME/.zshenv. Since vim editing is used, all of the vim keys work, including $ for end
of line, and ˆ for start of line, and h, j, k, l for moving around in a command.
§
§
§ Desktop top panel menu actions are defined using the $HOME/.Iconfrc file.
§
§
§ Shell aliases are defined in $HOME/.zprofile include o aliased to xdg-open:
- Typing o as default open command, e.g., o file.pdf.
- Typing only the file name to open with default application, e.g., file.pdf .
- Typing only o . in a shell opens caja in the working directory.
- Menu, volume, media player, and calculator keys are active using XF86 key bindings.
§
§
§ To encode utf8, i.e., unicode characters, type: Ctrl
Shift
U, then type: hexcode
Space.
A short summary of the same information about keybindings is available in the command line using h.fasthpaths.
While this format may not always be as elegant, it can be quicker since by dumping the output, i.e., h.fastpath -d we
can search using grep for a pattern, as in the example
h.fastpath -d | grep zoom
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 16
which returns the result,
Desktop zoom (in/out) == Ctrl Shift (Mouse_B4 / Mouse_B5)
meaning that we use CNTL-SHIFT along with rolling the mouse button away from the screen (B4) or toward the
screen (B5) to accomplish a zoom. Lastly, in discussing fastpaths to various actions, the utilities h.firefox,
h.terminator and h.vim also provide concise summaries of key and mouse actions that are used to navigate firefox,
terminator, and vim, respectively.
Lastly, the utility h.xbindkeys provides a description of the key bindings set in $HOME/.xbindkeysrc. These key
bindings can be changes using xbindkeys-config, or directly changed by editing the file $HOME/.xbindkeysrc and
then runing killall -HUP xbindkeys. To list the bindings, do xbindkeys -s.
2.5 Customization and configuration of the desktop
Customizing and cofiguring your desktop is done through several standard Ubuntu-Mate utilities that are available,
along with some SD suggested tweaks that can be applied by the user. Most user system attributes can be set
through by accessing the Mate Control Panel is through: (1) the top panel hammer icon on the SD desktop,
(2) the System | Control Panel selection located in the upper left corner of the desktop in the main menu, as shown
below,
or (3) by executing the command, mate-control-center in any shell.
You can customize your desktop using the Mate Control Panel to access the the marco, compiz, and emerald
configuration packages, known as Appearance, CompizConfig Settings Manager and the Emerald Theme Manager
under the Look and Feel section of the Mate Control Panel, respectively, as shown in the image below,
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 17
In addition, the MATE Tweak icon links to some additional changes you can make to your marco 2d desktop. Beyond
these basic stylistic changes, there are several additional changes that should be considered for the user are
discussed in detail in Appendix B, and which can also be conveniently accessed using the command tweaks which
just brings up a copy of the file, /usr/local/sod/sodcontent/README_user-tweaks.html. For those interested in a
more direct command line access to the programs shownn on the Mate Control Panel, there is a complete
description of these under user tweaks. For example, clicking on Appearances icon in the above panel is the same
as running mate-appearance-properties on the command line.
One quick change that is worthwhile making if you find that the monitor for your desktop is either displaying text
and graphics that is too large or too small is to go into the Appearances link, and then follow the links on the top
menu bar to Fonts.
On the Fonts page select the button in the lower right of the panel marked Details
. . .
. That takes you to a panel for
the Font Rendering Details that allows for the screen resolution to be specified in terms of the number of Dots per
inch (DPI).
The larger you make this number, the larger the fonts will appear on your screen, while the smaller you make
the number, the smaller they will appear. The nominal choice is based on the size of the monitor you are using and
the resolution of the monitor. Using the SD utility SD.us_QueryVideo produces output which contains an analysis of
the size and density of the computer monintor and it suggests a DPI setting for the screen. You can set it to this
value, or you can tweak it higher or lower as you feel comfortable with the view it provides of the desktop icons and
text. Setting this value automatically was already discussed in Section 2.1 using the command,
SD.usr_QueryVideo -w
2 THE FUNDAMENTALS OF USING THE STANDARD DESKTOP 18
to write to video information to the SD configuration file, $HOME/.IC_MONITOR. The value of UHD is used when
launching terminals to set the size of the terminal based on the values set in $HOME/.Iconfrc. Indeed, you will
notice that if this information is not available, i.e., there is no .IC_MONITOR file, then one is generated in whenever
the .Iconfrc file is sourced. By adjusting the value of DEF_TERMINALSIZE in .IC_PANEL the size of terminals that are
set by pixel size, e.g., a terminator terminal, will be set to value of DEF_TERMINALSIZE.
Setting font and terminal size for terminator can be challenging since this is set in pixels and since you need 80
columns and 24 lines for a standard terminal. An way to finding a terminal size in pixels is to:
Open a mate-terminal (it sets its size based on 80 columns and 24 rows) by running the command,
mate-terminal in any shell.
Select the same font you are using for your terminator terminal (since the font you use changes the height and
width of each character in pixels). To select a font click on the Preferences dialog in the mate-terminal window
(right click in the terminal to bring up the menu).
Run the command, xwininfo (you will need to click on the mate-terminal).
Use the Width: and Height: data provided to set the size for terminator.
Note that you need to use a monospace font in any terminal, i.e., terminals, whether it is mate-terminal,
gnome-terminal, terminator terminal, or xterm, do not do proportional spacing. Suggestions for monospace fonts
include: Monospace Regular 9, Ubuntu Mono 10, Liberation Mono Regular 9.
A user can also change the configuration of the Desktop using many of the scripts that begin with SD.usr_<TAB>,
where the <TAB> indicates the pressing of the tab key after the underscore. For example, the SD.user_SetKeys
command configures the user’s desktop environment so that there is no Caps Lock key, setting the Caps Lock key to
the exclamation, and it sets Control-Alt-Backspace as a default means to exit from the mate desktop. These
keymap values are also set in /usr/local/Ebin/Exdefaults that is run at the start of each user session when the
desktop is started.
3 GETTING STARTED WITH SD AND MATE 19
3 Getting started with SD and Mate
The information base for SD is designed to help you navigate your desktop and to find files and scripts that are often
difficult to access because they are not used frequently.
The SD.* files are organized based on their purpose. Thus, we have SD.adm_* files that are designed to all the
system administrator to configure and set up the user environment. This includes updating and installing new
packages, as well as customizing each user’s desktop setup. The SD.pkg_* files are used to perform system
software updates; The .usr_* files help the user configure their desktop and applications files. Finally SD.con_* files
are file conversion utilities.
In addition, every SD script contains a line near the top that describes the script and its purpose, and this
information can be conveniently accessed with the binman script that allows a user to query which scripts have
certain patterns in their file names or in their descriptions. This brief description of each SD script can also be
obtained by using the -h to get additional help on how to use each utility.
Complementing these are a number of help files that can be invoked as scripts starting with the letter h.*. These
include:
h.fastpath h.imagetools h.screencapture h.vim_editor
h.file2html h.installed_debs h.shell_formatting h.whatis_browser
h.file_gather2html h.latex h.system-monitors h.whatis_dotfiles
h.findingfiles h.linuxcommands h.terminator h.whatis_pdf
h.firefox h.mediatools h.utf8 h.xbindkeys
h.gimp h.notmuch h.utilities h.zshenv
Other SD scripts and other system utilities with pattern based access in their names include:
Script pattern Common action
ap_.* Scripts that open chromium browser in app mode
cm_* Scripts for working with claws-mail
csv2* Utilities for converting csv files
default_* Dummy latches for connecting services defined in .IC_PANEL
ff_* Utilities for manipulating movie formats using ffmpeg
h.* SD system help files.
html2 SD system help files.
im_* ImageMagick scripts for working with image file formats
jigl* Utilities for creating photo albums using jigl
ltx_* Utilities for working with LaTeX files
pdf2* Utilities for converting pdf files
pdf.* Utilities for manipulating pdf files
SD.* SD utility script.
SD.adm_* SD administration utility script.
SD.con_* SD conversion utility script.
SD.pkg_* SD package utility script.
SD.usr_* SD user utility script.
wm.* Applications window control scripts using wmctrl
xls2* Utilities for converting and working with xls files
zen_* Zenity applications
To find these, use tab-based command completion, typing for example in a shell:
wm. <TAB>
When you find the wm. script you want, for example, wm.killallwin, type: wm.killallwin -h to get a description of the
utility and its usage. While finding a utility script such as wm.killallwin using the wm. prefix can be helpful, in
most cases the more memoroable name would be kiallallwin. The user can access this command using this
alternative naming since this name is symbolically linked to the command, i.e., if you do an ls -l on the file
/usr/local/bin/killallwin you will find
3 GETTING STARTED WITH SD AND MATE 20
/usr/local/bin/killallwin > wm.killallwin*
You can get a listing of alll symlinked files, and so get a list of all of the alternate names using the command,
file /usr/local/bin/* | grep symbolic
Almost all SD scripts can be queried using the help option, -h. If you are new to linux or are just trying to
remember a command, the h.linuxcommands provides a brief review of most of the installed linux utilities and how
to access these from command line access. On that note, binman again can provide quick access to the catalog of
programs and utilities that are installed. For example,
binman -P game
will list all deb packages that contain the word game in their description, while
binman -a
lists all executables in your path, while the option -a2 lists all conversion utilities that have 2 or to in their name, e.g.,
binman -a2
These software packages all typically do some form of file conversion, e.g., pdf2smallpdf which converts a pdf to
smaller sized pdf using several configurable options. For most system utlities, the best way to find out about how to
use the particular command is to use the manual pages., e.g., man ls to find out about the command ls to list files.
For SD packages, such as pdf2smallpdf additional informaiton on how to use it is typically obtained using help by
invoking the command with the -h option, e.g.,
pdf2smallpdf -h
To obtain more detailed information about installed SD utilities with patterned names, use binman with these
options,
binman option switch Action or purpose
-SD List Standard Desktop, i.e,. SD.* scripts and their function
-cm List claws-mail, i.e., cm_* scripts and their function
-im List imagemagick, i.e., im.* scripts and their function
-he List help, i.e., h.* scripts and their function
-wd List word and dict scripts, i.e., wd_ scripts and their function
-wm List all window manger, i.e., wm.* scripts and their function
All SD commands are accessed from /usr/local/bin, however there are some links to other system utilities
in this directory that are not SD commands, i.e., the practice is to place all SD added commands to this
directory as a repository of all additional programs that have been added by the SD install package manager
SD.pkg_CustomInstall.
3.1 Some basic commands
To open a terminal, you can use the icon on the top panel, (the default terminal defined in the $HOME/.Iconfrc file
using the value of DEF_TERMINAL). Alternatively, you can use the command: Et. You can also open a terminal by
right clicking on the desktop background and selection the menu option, Open in terminal. In this case the terminal
will be opened in the $HOME/Desktop directory. If you examine the fastpaths that are configured, you will find that
you can also open a terminal by using pressing Shift Alt on the keyboard while clicking the right mouse button. In
this case the terminal comes up with the upper left corner at the mouse arrow position.
To open the caja browser, use the command: Ec, to open the dolphin browser, use: Ed, and to open the nautilus
browser, use: En in any shell. You can also open any file using the alias o for xgd-open. For example, if you want to
view the file, FILE.pdf, you can use the command: xgd-open FILE.pdf, or the command: o FILE.pdf. The atril pdf
viewer is opened as this is the one that is defined in the mimeapps.list file. If you type o . on the command line, the
caja browser opens.
Some tips on using the caja or nautilus browsers:
3 GETTING STARTED WITH SD AND MATE 21
Use CNTL-1, CNTL-2, or CNTL-3 to change listing view. For example, CNTL-3 sets the view to a Compact view.
Use CNTL-d to set the places for any directory in which the browser is currently active so that it is saved in the
left margin .
To change the nautilus browser default editor, for example, to gvim, do: cd ~/.local/share/applications. Then
create the file, defaults.list, containing the lines,
[Default Applications]
text/plain=gvim.desktop
Create the file, mimeapps.list, containing
[Added Associations]
text/x-readme=gvim.desktop
text/x-log=gvim.desktop
If you are running nautilus, then restart nautilus with killall nautilus. If you are running caja, then restart caja
with killall caja.
4 ADVANCED DESKTOP USAGE 22
4 Advanced desktop usage
These topics present means for using your system that are beyond the requirements for a novice user. Even if you
are new to linux, give these a try to expand your ability to use your desktop environment. The 2d desktop is built on
marco, the mate analog of metacity that gnome provides. The 3d desktop is build using compiz wth the otption to
use compiz or emerald as the window decorator. The window decorator simply determines how the outside frame of
the window will appear.
An editable copy of the desktop configuration files for the 2d desktop are stored in $HOME/.mydconfuser, and
for the 3d desktop they are stored in $HOME/compizemerald2004.profile when your new SD desktop is loaded
using the SD configuration utility, SD.adm_SetMateDesktop. Thse files allow you to reload your desktop’s 2d and 3d
configuration manually using the instructions provided in Sec. 4.1 and Sec. 4.2. A copy of the 3d configuration
file is also kept in $HOME/.compizemerald2004.profile. The actual desktop configuration when you log in,
however, is determined by the binary file, $HOME/config/dconf/user. Whenver you make changes to your desktop
confgiguration, the changes are automatically saved in this file. The purpose in having a human readable copy is to
allow the user to copy and save a copy of their 2d and 3d desktop configuration as thse files can also be reloaded to
reset the desktop should there be any need to do so.
4.1 Loading and saving marco defined desktop configuration files
The overall desktop configuration is the one you would have if you logged in to the 2d desktop, i.e., to marco. In this
desktop the top and bottom panels along with the icons and their actions are defined. Fundamentally, this defines
the appearance of your desktop, and even for the 3d compiz desktop, this base setting is used to definesome
desktop attributes.
To manually save a copy of this desktop configuration to FILE, do:
dconf dump / > FILE
To manually load a copy of tis desktop configuration that has been saved to FILE, do:
dconf load / < FILE
If you are root, a new desktop can be loaded for another user $MYUSER using:
sudo -u $MYUSER dbus-launch dconf load / < /usr/local/sod/$MYUSER/.mydconfuser
4.2 Loading and saving compiz defined desktop configuration files
The 3d desktop is set up for compiz. You have a choice of which decorator to use with the 3d desktop, i.e., you can
elect to use compiz or emerald to put the frames around the window objects on the desktop. The compiz decorator
will give you a look and feel that is very much the same as the the one for the marco desktop, except that the menu
buttons are on the right, while the emerald decorator sets up a more elaborate set of window icons, including a
small button to toggle window stickiness. When this button is toggled and turns red, then the window will be
displayed on all desktops as shown in
The desktop parameters can be saved using ccsm, i.e., the CompizConfig Settings Manager accessible
through the Mate Control Panel that can be accessed from the command line as mate-control-panel. When this is
up, navigate to the Preferences panel, by clicking on the Preferences link on the bottom left tool. In that panel you
will have the option to import or export a profile, as shown in the figure below.
4 ADVANCED DESKTOP USAGE 23
By using these buttons you can import or export a profile. Your SD desktop was configured with the profile,
compizemerald2004.profile, and a copy of this is kept as a hidden file in $HOME/.compizemerald2004.profile.
4.3 Setting up fonts
Setting up fonts so that they scale appropriately for the size and the resolution of the monitor you are using is
important. The console fonts, i.e. those used by the TTY’s accessed through the keyboard using CNTL+ALT+F1 to
CNTL+ALT+F6 are discussed in detail in the Appendix A.5, Setup consolefonts. The configuration of the fonts for the
desktop is attempted using the configuration files, $HOME/.IC_MONITOR, and $HOME/.IC_PANEL. The .IC_MONITOR
file configures the size of the display in terms of whether it is qhd or uhd display. The qhd display setting is
appropriate for monitors that support a resolution of up to 2650
×
1440 dpi. The uhd display setting is appropriate for
4K monitors. You can find out about your monitor using the command, SD.usr_GetVideoInfo, and with the option,
SD.usr_GetVideoInfo -w, the utility will write out a new .IC_MONITOR file with a suggested size. This information is
used in the .IC_PANEL file to set the size of the terminator terminal since this is set in pixels and not in lines and
columns as is the case for a mate-terminal of a gnome-terminal. Note, that the size in pixels of the terminator
window is determined also by the font selected. The default values provided in the default .IC_PANEL file for the
terminator window are based on using the Liberation Mono Regular 9 font.
The configuration of the desktop fonts is done using the mate-appearance-properties, selecting the Fonts
menu as discussed in Sec. 2.5. Some suggestoins for usable fonts is provided in the User Tweaks in Appendix B.10.
4.4 Setting the Desktop Directory Switcher
The Desktop background typically points at the files in the directory, $HOME/Desktop, i.e., at the ‘Desktop’. If you
examine the icons on your Desktop they are exactly the same as the files in $HOME/Desktop. The Desktop
Directory Switcher allows the user to change these dynamically using the half white an orange ball icon on the top
panel, however the directory locations must be configured first in the file $HOME/.IC_DESKTOP. A typical file consists
of some configuration options, along with the specification of which directory each desktop should point to. In that
standard setup, there are 8 desktops shown in the Workspace Switcher, and so we define a directory for each one
to switch to, leaving the first one to point to the usual directory, $HOME/Desktop. We have in .IC_DESKTOP,
#Default Desktop Manager
#DEF_DESKTOP=’marco’
DEF_DESKTOP=’compiz’
4 ADVANCED DESKTOP USAGE 24
#
#Use DEF_TIME to define the wait time for launching the compiz desktop.
DEF_TIME=’2’
#Set the decorator
#DECORATOR=’compiz-decorator’
DECORATOR=’emerald’
#Set location of alternative desktop background image:
BACKGROUND="$HOME/.grok/backgrounds/SD_background.jpg"
#Set location of background video:
BACKVIDEO="/home/defaults/videoloops/MVI_9875SparkGlowBokeh1.mov"
#Set location of background video:
BACKSCREENSAVER="/usr/lib/xscreensaver/molecule"
# Set folders for use by wm.selectfolder_desktop.
DESKTOP1=’Desktop’
DESKTOP2=’Pictures’
DESKTOP3=’Videos’
DESKTOP4=’common/studies/current_studies’
DESKTOP5=’common/active/pdfs’
DESKTOP6=’Dropbox’
DESKTOP7=’Documents’
#DESKTOP8=’common/correspond/PCARDS/PCARDS_18Y’
DESKTOP8=’common/purchase/topurchase’
# Source this file in .zlocal to access these aliases:
alias cs1="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP1"
alias cs2="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP2"
alias cs3="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP3"
alias cs4="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP4"
alias cs5="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP5"
alias cs6="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP6"
alias cs7="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP7"
alias cs8="source $HOME/.IC_DESKTOP; cd $HOME/$DESKTOP8"
Note that the $HOME/.IC_DESKTOP file also defines the user’s desktop in terms of whether they are using the 2d
marco desktop or the 3d compiz desktop.
When you have configured the selection of directories to associate with each desktop, move to that desktop,
and click the Desktop Directory Switcher icon, . It will then change the desktop background to show the icons, i.e.,
the files and folders in that directory. To change back to the usual configuration, click the icon again, or move back
to the first desktop and click the icon there to reset the desktop to point to $HOME/Desktop. The icon itself is just a
link to wm.selectfolder_desktop which is a part of a collection of SD action scripts built around the utility, wmctrl, in
particular the wm.* scripts that provide the user a higher level access to the wmctrl program to manipulate their
desktop environment.
4.5 Using the window manager scripts
The wm.* scripts can be listed by using the prefix wm and the tab key to get a listing of all of the SD window
manager files built around wmctrl, e.g., by typing in any terminal,
wm.<TAB>
The primary one of these, i.e., where to start to work your way through the many wm.* utilities, is with wm.setwin.
This has the usual help support, as do all SD scripts, e.g.,
wm.setwin -h
and it also has an extended help feature called with
wm.setwin -H
4 ADVANCED DESKTOP USAGE 25
This shows that for wm.setwin to work, it needs to have pre-defined actions that are configured in the database
directory which is set by default as $HOME/.grok/windir. All of the attributes for wm.setwin, are specified in the
$HOME/.IC_MYTEMPLATES file, including the values of WINDIR, WDS, WDL, and WDV, where default value of is,
WINDIR=$HOME/.grok/windir. The directory specified by WINDIR needs to contain the required configuration files
used by wm.setwin, and this must include a list of how to open (o), position (p), undecorate (u) or close (c) all of the
windows on each desktop, numberer 1 to 8. The utility wm.setwin carries out the action depending on the desktop
number selected, and on the type of action, i.e., o, p, u or c.
To get things started, a set of window manager actions has been pre-configured in the default directory
WINDIR=$HOME/.grok/windir when the desktop was loaded. Before starting, it is worthwhile to examine the
extended help file using wm.setwin -H . From this the syntax is seen to be of the form,
wm.setwin N[action-code]
For example, to open up all of the windows specified for desktop 1, use
setwin 1opus
or, alternatively to close all of the windows on desktop 1, use
setwin 1c
The available actions codes are,
o open the windows in the file No;
p position the windows in the file Np;
u undecorate the windows in the file Nu;
s sticky the windows in the fileNs.
c close the windows in the file Nc.
opus process all files in desktop N for o, p, u and s.
where N is a desktop number and and where the action-code is given by opus, o, p, u, or s.
There needs to be a set of actions for each of the 8 desktops configured, there are action files in WINDIR that
configure the possible actions, and these are:
1opus - calls 1o, 1p, 1u, 1s to open, position, undecorate and sticky set windows in desktop 1.
1c - windows to close on number 1 desktop.
2opus - calls 2o, 2p, 2u, 2s to open, position, undecorate and sticky set windows.
2c - windows to close on number 2 desktop.
.
.
.
8opus - calls 8o, 8p, 8u, 8s to open, position, undecorate and sticky set windows.
8c - windows to close on number 8 desktop.
For example the file, $WINDIR/2o contains
# Open windows on desktop 2:
#
source $HOME/.Iconfrc
grok wwwpages -title panel-www
sleep $WDS
firefox file:///home/kolibal/public_html/meta.html &
When wm.setwin 2o is invoked, then these actions will take place on desktop 2. These actions are defined in the
context of wmctrl commands, and so a starting point for configuring these window manager actions are the
examples provided in $WINDIR and reading through the manual pages for wmctrl, i.e., starting with
man wmctrl
to work through the details. The benefit gained is the ability to open automatically a collection of windows and
programs on a given desktop that are typically used in a repeated task. Combining these actions with the window
manager desktop switching described in Section 4.4 gives the user the ability to work in each of the numbered
desktops on a specific task. In effect, each numbered desktop becomes a dedicated folder containing all of the files
and actions needed to work on each project.
4 ADVANCED DESKTOP USAGE 26
Intrisically there are two types of action atributes given to wm.setwin. The first is to do everything needed to set
up the windows on the desktop, i.e., to open, position, and undecrorate them as needed, so that the primary action
is Nopus where
N
is the desktop numbers. The second action is to close the desktop, i.e., to use wm.setwin Nc.
The other actions are there to redo things on an already opened up desktop, e.g., for on desktop 3, assuming all of
the window are open and positioned, it’s not long before they are accidentally moved. We use the p option to
reposition these, e.g.,
wm.setwin 3p
No windows are opened or closed, however the windows listed in $WINDIR/3p are repositioned on desktop 3.
Quite a bit can be done by using wmctrl effectively. For example, the keystroke ++ typed in any shell runs the
program, /usr/local/bin/++ that calls xdotool to find the location of the current window, and to find the number of
that window, and then to invoke a change of size on that window. The second time ++ is called in the same window,
it sets the size back to the default value for a terminal set in the user’s $HOME/.Iconfrc file.
4.6 Setting the Working Directory, wd
The Working Directory, or $wd is the directory to which a user can go when issuing the command, wd, which is an
alias in the $HOME/.zprofile,
wd=’. $HOME/.grok/.workdir; cd $WORK’
where the value of the shell variable, $WORK is set using the command to set the the working ,directory, i.e., swd,
e.g.,
swd /home/myuser/mydirectory
allowing the user the option to jump directly do the the directory using the command line in any shell. By default, the
storage location for most database items is in the hidden directory, $HOME/.grok. In SD, this value is also integrated
into the fastpath keystroke defined by CNTL-SHIFT-Button-5, where Button 5 is the right mouse button, to open a
terminal to the working directory, as described near the end of Section 2.4. While on the topic, note that using
Button 4, i.e., the left mouse button instead in the key/mouse action, as in CNTL-SHIFT-Button-4, opens a terminal in
the user’s home directory, $HOME.
In addition to these navigation tools, SD uses fasd and autojump to provide a quick means of accessing and
navigating a user’s working environment from the command line. A full description of these is available bu invoking
man fasd and man autojump. Both of these have been integrated into the zsh shell working environment of SD. In
addition to these command line navigation tools, in the desktop environment SD also loads synapse, which is
described in man synapse as, a utility to launch everything on your computer.
4.7 Playing a video on the desktop background
As can be seen in the $HOME/.IC_DESKTOP file, the value of the shell variable $BACKVIDEO is defined to be one of
the videos in the provided by the standard screensaver. To play this video, use SD.usr_PlayScreensaverBackground.
A related video player, SD.usr_PlayVideoBackground is also provided to play videos through vlc on the desktop
background.
Using a background video eliminates the icons on the desktop and prevents right clicking with the mouse on the
desktop background. To push the screensaver video below other background objects, press: ALT-D while the mouse
is positioned on the background.
4.8 Fixing a frozen X session
f your desktop windowing environment freezes, however you still have control of the keyboard (this may not always
be the case). You can restart your windowing session by moving over to a tty by typing:
<CNTL><ALT><F1>
4 ADVANCED DESKTOP USAGE 27
and then logging in at the login prompt as root, or logging in as your user, and moving to root status by using the
command:
sudo zsh
When you have established your superuser privileges, kill the lightdm window manager using the command:
/etc/init.d/lightdm restart
If all goes well and it is only the window manager that has locked up as opposed to the entire system, you should be
able to go back to the lightdm log in screen at <CNTL><ALT>F7 and log back into to a desktop session.
4.9 Fast window kills
If you are logging out and you have the tilda application running as a console (it is suggested that you open a tilda
session on startup), the you can kill all of your windows before logging out by typing wm.killlallwin in your tilda
terminal. The tilda window is not killed as the SD application wm.killallwin excludes this window from the kill list.
The utility is also symbolically linked to by the more convenient command, killallwin, i.e., if you use killallwin, all of
your desktop applications will be killed, except for tilda. To start a tilda application, described in it’s man page as ’a
highly configurable terminal emulator’, just type nohup tilda & in any terminal. Your SD desktop has been
configured to bring up a pre-configured copy in the center of your screen with the background color black. The
advantage of a tilda terminal is that pressing the F12 key while the mouse is on the tilda windo causes it to become
transparent, and pressing the CTL-F2 key causes tilda to slide out of the way or to come back again to the desktop.
Another useful time saver (given that so many different applications now use several different key combination to
close and quit) is to use <ALT>c typed atop any window to close it. This also works with even misbehaving or stuck
windows, so that this command is often a quicker way to kill a window the the window kill icon on the bottom panel.
4.10 Logging in from a tty
While starting from the lightdm login screen is the usual means to access your desktop, it is possible to start your
desktop without a login window manager running, e.g., when you are wanting to start X from a console, such as
when you type <ALT><F2> (logging in to a black tty screen). After you have logged in to the console, you can start
X using the command:
startx - - :2
where the numbers after the colon is the number of the running desktop. You must use a number greater than 1
if you already have an X session operating and the number must be unique. Note that for this to work, your
$HOME/.xinitrc file must have uncommented either of the lines
#exec ck-launch-session mate-session
#exec mate-session
A copy of $HOME/.xinitrc is kept in /usr/local/sod/defaults/dotfiles/xinitrc as are all other standard dotfiles used by
SD archived in this directory. While it is recommended that you use lightdm, having access to the X windowing mate
desktop using this approach can be useful.
5 INSTALLING UBUNTU-MATE AND SD 28
5 Installing Ubuntu-Mate and SD
While SD can be installed in any working version of Ubuntu-Mate 20.04 or Ubuntu 20.04, to fully integrate SD into a
newly installed Ubuntu-Mate system, it is desirable to configure the computer prior to installing Ubuntu-Mate 20.04 in
order assure the greatest flexibility in maintaining your computer, and for providing for future upgrades to other LTS
versions of Ubuntu-Mate and SD. This section examines: 1) Ubuntu-Mate pre-install configuration topics, i.e.,
recommendations on configuring your computer prior to installing Ubuntu-Mate, and 2) post-install configuration of
your Ubuntu-Mate 20.04 install. Then we begin to examine: 3) pre-install configuration of SD; 4) installing SD, and
5) post-install recommendations for SD, i.e., options for configuring your computer after SD is installed.
5.1 Step 1: Pre-install configuration, preparing to install Ubuntu-Mate 20.04
It is recommended that you provide at least 4 separate partitions when installing Ubuntu-Mate 20.04. In particular,
keep the /home partition where user data is kept out of the install process so that it is not over-written. For example,
the following configuration is recommended if you have only on disk. During the install of Ubuntu-Mate 20.04, set the
partitions manually so that:
Partition Mount Type Size
/dev/sda1 / ext4 recommended minimum size: 35Gb
/dev/sda2 /boot vfat set up as UEFI boot sector: Use 128Mb for a computer with single boot
/dev/sda3 /HOST ext4 recommended minimum size: 2G + your preffered /home folder size
/dev/sda4 /sysHOST ext4 recommended minimum size: 2x /dev/sda1 size, i.e, 70Gb
where $HOST is a name of your choice for your computer, e.g., if your computer is called euler, then $HOST = euler
and the mountpoint for the partition where you will ultimately install your /home directory is /euler. The partition
/sysHOST will be the partition onto which the /syshome/src/u20.04 is placed. Note that a swap partition is not
needed since Ubuntu has used a swap file since Ubuntu 17.04. If you are re-installing and you have an existing
swap partition, keep it if you prefer, or merge it with with your root partition. If you already have have an existing
partition containing your /home folder keep that partition out of the install list to avoid over-writing it during the install.
During the install of Ubuntu-Mate 20.04 create only the user soduser with a password you will use for your own
account. Note that Ubuntu-Mate 20.04 only allows lower case names for user accounts. The home directory for
soduser will be created during the install of Ubuntu-Mate in the directory /home/soduser. We will subsequently
create a home directory that is a symbolic link to /HOST, so that it resides on a separate partition. This means you
can re-install Ubuntu-Mate on the root partition at any time without losing the data on the /HOST partition containing
the user’s files. This same approach applies to keeping the /sysHOST partition out of the install, i.e., the SD
packages that reside on it will not be overwritten or wiped out during the install process. After any re-install of
Ubuntu-Mate the /syshome directory can be symbolically linked to the /sysHOST directory. If there is any need
to maintain consistency between updates of Ubuntu-Mate, e.g., when upgrading from Ubuntu-Mate 14.04 to
Ubuntu-Mate 20.04, it is recommended that you:
1.
Backup the system files in /etc and /var/www/html, and /etc/crontab, as well as system hardware
parameters, user files, including those in /root if you are updating an install (this will save your ssh keys). You
should also back up any crontabs installed as user root.
2.
If you have u20.04 installed on your system, or if you have downloaded a copy, you can use the SD utility
/syshome/src/u20.04/customize/bin/SD.adm_mkasbuilt to get a complete backup of yous system put on
/home/asbuilt, and you can use the SD utility, /syshome/src/u20.04/customize/bin/SD.usr_bkupdotfiles to
back up your dot, i.e., your hidden files and directories. You should put a copy of this on another computer or
on a usb drive for backup. Note that all of the SD utilities, e.g., the command ./SD.adm_mkasbuilt, requires
zsh to be installed. If it is not, then first do sudo apt-get install zsh.
3.
Check the /etc/fstab to determine the location of the root and swap file systems, as well as any other file
systems. You should have at least 35Gb in the root, i.e., the / partition.
5 INSTALLING UBUNTU-MATE AND SD 29
4.
Determine the type of install, i.e., whether your computer can use UEFI boot or a bios boot. It is recommended
that you use UEFI boot if your computer is new enough to support it.
5.
During the install of Ubuntu-Mate, create the first user as soduser. This is a dummy user that you can use to
test account preferences, and typically this user is user 1000. Later, you can either create your user account if
this is a completely new install, or you can merge your /etc/passwd and /etc/shadow files with the newly
created one to copy over your login parameters from the previous install.
The install of Ubuntu-Mate 20.04
The script Install does a preliminary install of some basic packages, including those in the ./pkgsetup folder where
the configuration files for SD are kept and that are needed to configure a basic install of SD onto u20.04. In addition,
after these are installed, Install then attempts to install the packages in the ./customize, ./debfiles, ./matesetup,
./docsetup, and sys+user_configs folders using the previously installed package, SD.pkg_UpkgMgr, the SD
Package Manager. This script is also symbolically linked to upkgmgr. and upkgmgr and are used to install all of the
packages in this distribution add-on. There are four types of additional packages that are installed:
1.
Those that are part of the standard Ubunutu 20.04 repositories, or other repositories (PPAs) that can be
installed using apt, apt-get, aptitutde, or synaptic. The selection of packages that are to be installed is
given by the value of $SD/bin/selections_library/selections_$AV, denoting the file to be used. This file should
not be modified, or should be modified with great care. Changes to the standard configuration may be made
by editing the file /etc/SDpkg.db. A master copy of this file is kept in the directory, $SD/pkgsetup. The install
of these packages is managed by SD.pkg_AptInstall script.
2.
Packages which are deb files which are not in any repository. These are located in the $SD/debfiles directory.
Their install is controlled by the SD.pkg_DebPkgInstall script.
3.
Packages which are source files that require compilation, or have been pre-compiled. These are located in
the $SD/srcfiles directory. Their install is controlled by the SD.pkg_SrcPkgInstall script.
4.
Scripts and other binary files are located in the $SD/customize directory and are installed by the
SD.pkg_CustomInstall script.
The maintenance of the packages is done by SD.pkg_UpkgMgr, and the utilities used by it are the individual
SD.pkg_* scripts. The options available can be found by doing, calling the the script with the -h option, i.e., as
SD.pkg_UpkgMgr -h. These options include:
Option Action taken by SD.pkg_Mgr
-p sync synchronize the apt database
-p preload [keys] set up /etc/apt/sources.list [and install keys]
-p preinstall install packages with dialog boxes (deprecated)
-p install [file] install from $SD/bin/selections_library/selections_$AV
-p upgrade upgrade existing and installed Ubuntu packages
-p document install from $SD/docsetup directory
-p customize install from $SD/customize directory
-p srcfiles install from $SD/srcfiles directory
-p debfiles install from $SD/debfiles directory
-p all install all options
-p query to query the existence of a different selections file
For example, to update the files in the $BASE/customize directory of the SD package, use the command,
SD.pkg_UpkgMgr-p customize
5 INSTALLING UBUNTU-MATE AND SD 30
OF course, this works to update the directory only if the latest copy of the SD custoize directory is installed in
$BASE, where $BASE is specified in /etc/SDpgkv.db.
5.2 Step 2: Post-install configuration of Ubuntu-Mate 20.04
After completing a base install, log in as user soduser to a tty, i.e., by first issuing the command CNTL-ALT-F2, then
logging in. Next create a password for root. Ubuntu uses sudo, so we use the command sudo passwd root to
create root’s password.
You will be prompted for root’s password. Save this. Having a root password is important for several reasons,
the most important of which is that if during a system boot you are thrown into a root shell, for example, to run fsck
to check out a corrupted file system, you will need the root password. The sudo password is useless at this point.
Test that your root account is accessible, by pressing: CNTL-ALT-F2, to get a new log in tty, then log in as user root
with your new root password. If it works, then you can continue to configure your system as root in the F2 screen
you are using. This is also a good place to configure soduser’s desktop so that it uses the SD desktop. To set the
desktop for Soduser, run the command
SD.adm_SetMateDesktop soduser piedition -a
This sets up soduser, and since the Ubuntu-Mate system was installed using soduser as the default user, this user
has full sudo priveleges already set up. Since soduser’s account was created by the Ubuntu-Mate install script, it
needs to have soduser’s shell changed from bash to zsh. You can do this by editing the value of the shell in the
/etc/passwd file, changing
soduser:x:1000:1000:soduser„„:/home/soduser:/bin/bash
to
soduser:x:1000:100:soduser„„:/home/soduser:/bin/zsh
The group for Soduser was also changed from group 1000 to group 100, i.e., to the users group, and because this
was changed, we also reset the files in Soduser’s account using,
sudo chown -R /home/Soduser
Continuing as user, soduser, you can configure your computer so that the /home and the /syshome directories
are symbolic links to named directories,
1.
The first step is to create a /home and /syshome directories. These will be symbolic links to the partitions
/HOST and /sysHOST, so that we need to move user /home/soduser and remove the existing /home directory.
We also need to create the entries in the /etc/fstab so that the new partitions are automounted on boot. To
accomplish all of these tasks,
Create the mount points for the partitions in the file system:
sudo mkdir /HOST
sudo mkdir /sysHOST
and mount the partitions these manually using (for example based on the example disk layout above):
sudo mount/dev/sda3 /HOST
sudo mount/dev/sda4 /sysHOST
Move /home/soduser to /HOST/soduser using:
sudo mv /home/soduser /HOST/soduser
Remove the empty directory /home that lies under the root partition using:
sudo rmdir /home
If it is not empty, then find out what other files it may contain and move or remove these, then attempt
the command again. You cannot do the symbolic linking in the next instruction until this directory has
been removed.
5 INSTALLING UBUNTU-MATE AND SD 31
Symbolically link /sysHOST to /syshome and /HOST to /home using:
sudo ln -s /sysHOST /syshome
sudo ln -s /HOST /home
These partitions, /HOST and /sysHOST can be added to the system for mounting on boot by adding
these to /etc/fstab. This can be accomplished using UUIDs by using the script:
sudo /syshome/src/u20.04/customize/bin/SD.adm_GetUUID
which provides the UUID of each partition and how it is mounted. Copy the missing partition information
to the /etc/fstab file to assure that the partitions are mounted on boot.
2.
If you need to add any new users, for example your user to the login list, you can use the two SD functions
that set up the user accounts for this purpose:
SD.adm_AddUser – adds a user and configures initial desktop files.
SD.adm_SetMateDesktop – updates the user’s desktop files.
For example, since user soduser was created as the first user on the system during the install with
userid=1000, we create your user with userid=1001,
SD.adm_AddUser MyUserName piedition 1001
This command runs the system command, useradd, to add the user to the /etc/passwd, /etc/shadow, and
/etc/group files. If after logging in, your find that your desktop has some configuration errors, then run
SD.adm_SetMateDesktop MyUserName piedition -a
to completely reset all configuration options. It is recommended that the -a option be used carefully since it
will reset most of the user’s hidden files and directories to the baseline values provided in /etc/skel_sod for the
skeleton file selected, e.g., in this case the file piedition. Use the -a option typically if this account is being
created for a new user. For updating an existing user’s account, the preferred option to force an update is
SD.adm_SetMateDesktop MyUserName piedition -r
If you examine the options for SD skeleton files that are installed in /etc/skel_sod you will find those with the
_uhd suffix and those without this suffix. The _uhd refers to the version that will load on a 4k monitor, i.e.,
one that is designed to display 3840
×
2160 pixels. In contrast the version without the suffix is designed for
monitors that are QHD, or less, i.e., designed to display 2560
×
1440 pixels. Note, for all SD utilities, use the
-h option to find help on how to use the command.
3.
Edit the /etc/shadow and /etc/passwd files adding any previous old users to the the system. Each line of the
old passwd and shadow files contains a description of each user on the old system. If you want that user to
be able to log in to your new system, you must add those lines to the new /etc/passwd and /etc/shadow files.
4.
Check that the other users have proper ownership of their files. To change file ownership for a user named
NEWUSER, do:
sudo chown NEWUSER.users -R /home/NEWUSER.
5.
Once the /etc/passwd file has been modified, verify that the password for root and soduser work by changing
to another tty using Control-Alt-F1 that you can log in to. Attempt to log in as root with the new password,
and then verify that soduser and your new user can log in and that the sudo account works.
WARNING: Do not copy over an existing /etc/passwd and /etc/shadow file from a previous installation. They
system ids and configurations change, and this may cause serious difficulties with your installation. Instead,
always merge the files adding only the users above user 1000 to the new password and shadow file.
6.
Add any users to sudoers list that you wish to give sudo access to. There are several ways to accomplish this,
however the most convenient to is to edit the file /etc/group, and add that user to same groups as the user
5 INSTALLING UBUNTU-MATE AND SD 32
soduser has been added to. This will give that user the same privileges and access as the first user on the
system has (on an Ubuntu-Mate install, the first user, i.e., the user you create when installing Ubuntu-Mate
has its access privileges properly configured to access system resources, e.g., the printer, usb devices, and
so on). You can also use the command:
sudo usermod -aG sudo NEWUSER
to add NEWUSER to the sudoers file. For greater control over access by users selected commands, consider
using the visudo command. The effects of changing a user’s sudo privileges does not take affect until the
user logs out and then logs back in again.
7.
Perform a preliminary lock down of your system using the /etc/hosts.deny file and the /etc/hosts.allow files, as
sshd will be activated in the install process for SD. You can view the details in http://www.linuxsv.org/training/
l31_linux_tcpwrappers.html. A template /etc/hosts.deny file that completely locks down your system for any
service using tcpwrapper can be found in /syshome/src/u20.04/usersetup/system_configs/lib/hosts.deny.
Copy this to your /etc/ directory using:
sudo cp /syshome/src/u20.04/usersetup/system_configs/lib/hosts.deny /etc/hosts.deny
then, examine the file /syshome/src/u20.04/usersetup/system_configs/lib/hosts.allow to open up the
network to a limited number of hosts that are allowed access to your computer. Modify your /etc/hosts.allow
file to provide this limited access so that only the computers that you give access to can use ssh to
access your computer.
2
To allow inbound ssh from computers that have a dynamic ip address, consider
adding the procdns service to allow for a dynamically changing ip address. The details are discussed in
/syshome/src/u20.04/usersetup/system_configs/README_procdns.
8.
Add ssh keys to your user and to root using the command: ssh-keygen (use man ssh-keygen to find out how
to use this and other system executable).
9.
Change the login name that appears on the lightdm login screen using lightdm-settings. This can also be
accessed using SD.pkg_ScreenSetup.
5.3 Post-install configuration
The install of SD only installs the software packages that are needed for your computer and your desktop. After you
have set up your desktop you will still need to fill in a significant number of configuration details. Most of these are
outlined in the Appendices. These are written up in a way that provides some information to the user about not only
how to make a suggested configuration change, but also attempts to detail the steps on the command line that are
needed to change the configuration.
These post-install modifications can also be accessed directly using the SD package, SD.pkg_SuggestedTweaks,
which can also be called using the short name tweaks. Basically, a good place to start this customization, as is also
suggested in the tweaks, is to use the Mate desktop tool, the Mate Control Panel. At the command line, this can be
called using, mate-control-panel, and it should also be accessible from the SD Desktop using the the small
hammer icon, on the top panel to provide convenient access to the mate-control-center. This is the seventh
icon from the left on the top panel.
2
Note, that if you are behind a modem/router, you will still need to open this up to allow for inbound ssh access through the
firewall that is typically configured for most home modems.
6 INSTRUCTIONS FOR MAINTAINING THE SD DEB PACKAGES 33
6 Instructions for maintaining the SD deb packages
The various repositories of deb packages routinely put out updates to their softwared. To update these, the user in a
Debian-based software package such as Ubuntu-Mate, can update these modified packages using:
sudo apt update to refresh the database
sudo apt update to refresh the database
sudo apt upgrade to install any updated deb packages
sudo apt full-upgrade to install updated packages and remove unneeded ones
apt sudo autoremove to remove any unneeded packages
The best way to maintain your system with the least effort is to obtain the latest copy of the SD package, and
then run
sudo freshen -f
which is a symbolic link to SD.adm_Freshen. This utility will update all of the packages that have changed since the
last installed edition of SD was run, and also apply any of the changes in the Ubuntu repositories and purge any
obsolete kernels. The version control is kept track of in the hidden file $BASE/.SD_version. Note that in SD the
automatic Ubuntu updates to the kernel are turned off. This allow a system administrator to test a kernel update on
one computer to find out if it breaks the system before installed these updates on the other computers. To find out
what kernel will be installed, you can use the SD command,
sudo SD.adm_SearchNewKernel lists last 5 newest kernels showing the currently installed kernel
This will show you the five latest kernels in the repository, and also show you the current kernel you have running on
your computer. For a complete list of all pending updates that are to be installed on your computer, use the SD utility,
sudo SD.pkg_Status -n
whic provides a complete list of pacakges (also highlighting any kernel update in red) and it shows the current
software status of the system.
The primary purpose of freshen is to assure that the deb packages that were installed are kept updated. Thus
freshen should be run routinely to assure that all security patches are applied in a timely manner. The database
used by freshen in the standard install is broken into two data files: selections_64 and selections_kernel_64
containing the deb files associated with installed kernel packages. Each of these files lists the deb package in the
first column, and its intended status in the second column, e.g. Install, hold, or delete. The location of these files is
determined by the file, /etc/SDpkg.db which sets the value of the database variable $BASEsel to the default value of
/syshome/src/$UVERS/pkgsetup/selections_library, where $UVERS is the current version of Ubuntu-Mate being
used, e.g., u20.04.
The complete list of deb packages is in the standard SD files, selections_64 and selections_kernel_64 and this
is fixed. The reason for keeping these lists separate is that the kernel list changes as each new kernel is added and
older kernels are retired and so removed from the list. In contrast the selections_64 list of deb packages is relatively
static, and is only changed when there are additions to the package list, or a need to remove a package that is not
needed or not functioning. These package lists are kept relative to the location of $SYSHOME specified in the file,
/etc/SDpkg.db. The standard value of $SYSHME is /syshome/src/u20.04 and the install lists are kept at,
$SYSHOME/pkgsetup/selections_library/selections_64
$SYSHOME/pkgsetup/selections_library/selections_kernel_64
It is also important that the package lists be consistent with any changes that sometimes enforced by the
Ubuntu-Mate repository, such as security updates that introduce new packages, and of course, changes in the
kernel of in hardware configuration files that are sometimes pushed through. If a change occurs, it must be added to
the appropriate package list. To obtain the a simulation of the packages that running SD.pkg_Freshen will install, do
7 SD PACKAGE MAINTENANCE SOFTWARE 34
SD.pkg_FreshenTest
Users wishing to implement additional packages that are not in the standard deb package database can add a
file /etc/selections_add that contains a list of additional deb packages to install. A sample list is contained in the file,
/syshome/src/u20.04/pkgsetup/selections_library/selections_add, and this can be modified and copied to /etc to
install the additional packages contained in this list. If instead a completely different selection of deb packages is
desired, then the user can install the file, /etc/selections_keep. If this file is present, then the standard deb listings in
the file selections_64 are not used, i.e., the list of deb packages in /etc/selections_keep is used instead.
Note that whether a replacement list, or a supplementary list of deb packages are provided, if these are not in
the enabled repositories, they will not be installed unless they are manually installed. For example, the deb package
powerpanel is listed in the example selection_add file. This a vendor provided package that was installed by dpkg
using the command
dpgk -iGE powerpanel_132_amd64.deb
It is also important to note that the complete list of packages must be listed in a at least one of the selections_* files
or it will be removed on the next call to freshen.
7 SD package maintenance software
There are several major components to the SD package maintenance. These are to: 1) maintain the deb packages;
2) maintain the source files, i.e., files installed from source, e.g., tar.gz files; 3) maintain customized scripts and user
desktop files typically kept in /usr/local/sod and /usr/local/bin; and, 4) maintain key and repository management.
The utility freshen also checks to find if there is a local repository in: /syshome/apt/u20.04_apt/archives_64,
depending on the version of u20.04 being used, and attempts to upgrade from the local repository first, then it
switches to a web based install. The purpose is to avoid pulling files from the network, and yet still have do a full
update if not all of the files have been loaded into the local repository.
To maintain your system using SD, there are a variety of utility packages that you can use that maintain the
consistency of the software installation base:
SD.pkg_Freshen SD deb package update tool = freshen
SD.pkg_FreshenTest Test tool to find out what a freshen will attempt to do
SD.pkg_UpkgMgr SD utility to install packages from the directories, ./custom, ./debfiles, and ./srcfiles
SD.pkg_CustomInstall Install pacakges from ./custom
SD.pkg_DebPkgInstall Install pacakges from ./debfiles
SD.pkg_SrcPkgInstall Install packages from ./srcfiles
SD.adm_SearchNewKernel Find which kernels are installed and latest 5 kernels
SD.adm_SearchKernel Obtain list of all kernels
SD.adm_PurgeObsKernels Purge obsolete kernels
SD.pkg_KeysInstall Install repository keys if any are not there
SD.pkg_ListDebPkgs Generates a list of installed pages
SD.pkg_SuggestedTweaks Utility for starting system configuration packages
Another point to emphasize in discussing these package management scripts is that they are organized by name,
i.e., SD.pkg_* so that they can easily be found using shell command completion: SD.pkg<TAB>. This type of file
name patterning is carried on throughout many of the utility scripts installed in /usr/local/bin. Note that freshen is
just a symbolic link to SD.pkg_Freshen and that several frequently used SD utilities have such aliases accessed
through symbolic links, such as upkgmgr for SD.pkg_UpkgMgr. In addition the package scripts for there are a range
of administrative scripts all starting with SD.adm_*.
7 SD PACKAGE MAINTENANCE SOFTWARE 35
7.1 Building skeleton files using: $BASE/matesetup
The SD package integrates with a standard Linux system configuration in which a template for the user’s home
directory is kept in /etc/skel, except that in SD, these files are stored in /etc/skel_sod. For SD, the directory
/etc/skel_sod/sod contains all of the dot and configuration files that fully specify a use’s desktop windowing
environment. These desktop configuration and setup files are built around mate2 instead of unity or other desktop
windowing systems such as kde. In addition to the standard, or recommended skeleton file, sod, there are several
additional files listed.
The system administrator can create a customized windowing environment for Ubuntu-Mate 20.04 using
the files in $BASE/matesetup. To create your own template in the $BASE/matesetup directory, use the script
$BASE/matesetup/buildskel. The default is to use the dot files, i.e., the configuration files owned by user, SodUser,
i.e., the first user that you created to build the skeleton. Having a dummy user provides the administrator the ability
to test out changes to the desktop configuration before exporting these to all users on the system. If you plan on
using a different user’s home directory as the basis for the new skeleton template files, change the default values of
the variables OLDPAT and NEWPAT in buildskel. To create the new skeleton, simply run: sudo ./buildskel. To export
the new skeleton to the /etc/skel_sod directory, use the command:
$BASE/matesetup/exportskel STYLE
where STYLE is the name you are giving the new skeleton template.
The SD package attempts to assure consistency by using its own internal icons and images. Setting icons in SD
mate is based on the icons kept in /usr/local/sod/sodicons/selecticons so that your desktop icons will always
remain the same, even if mate changes its icons. There is also a limited collection of background images in
/user/local/sod/sodimages/backgrounds. The current desktop background and browser background is:
/user/local/sod/sodimages/backgrounds/current-host.jpg
/user/local/sod/sodimages/backgrounds/current.jpg
7.2 Online documentation using: $BASE/docsetup
The packages $BASE/docsetup/makebinlist and $BASE/docsetup/makedescribe build the $BASE/Ubuntu_bin.html
and the $BASE/Ubuntu.html files which provide documentation on the installed packages. A copy of these is
generated for installation in the $BASE/customize packages. You do not need to run these scripts unless you
change the $BASE/pkgsetup/selections_library packages list by adding or removing packages, i.e, the scripts have
been run with the standard selections packages.
If you modify any of docsetup files, you will need to export these files from the base SD install directory to your
SD system using SD.pkg_CustomPkgInstall or use the more comprehensive install package SD.pkg_UpkgMgr
which is also symlinked to the command upkgmgr. This can be done by calling it with the customize option, i.e.,
upkgmgr -p customize.
A APPENDIX A: SYSTEM TWEAKS 36
A Appendix A: System tweaks
This appendix contains a list of system configuration changes that are in addition to those listed previously. Each of
these is a short summary of the actions needed to implement the recommended changes.
The contents of Appendix A are dynamically generated using ./documents/make_alldocs -d based on
the information contained in the SD directory, ./sys+user_configs/system_tweaks using the README_* files.
The contents of these files can also be accessed using the command, tweaks which is a link to the SD utility,
SD.pkg_SuggestedTweaks.
A.1 Setup
# ------------------------------------------------------------------------------
# These System tweaks need to be typically run as root, i.e., most of these
# command need to be executed with sudo. Please review these carefully.
# Most reconfigure your system to change a range of options that can be
# modified in a way that allows the systems administrator to change the
# settings back, if desired.
#
#
#
#
#
#
#
#
#
A.2 Setup 00security
# A minimal security lockdown that should always be implemented involves
# restricting access to your computer to only those hosts whose ip address
# or service is registered in the file
/etc/hosts.allow
# To do this, you must first make sure that all hosts and services are denied
# by adding a line to the file
/etc/hosts.deny
# containing the line
ALL:ALL
# Please review the README_procdns to provide access to hosts which do
# not have a static ip address, i.e., the /etc/hosts.allow file only accepts
# ip addresses, not domain names. The procdns service provides a means to
# assure that a dynamic ip address can be given acesss through the hosts.allow
# file.
#
# Note that ALL is a more restrictive setting than PARANOID, i.e.,
#
# The following wildcards may be used in the access control rules instead
# of using specific hosts or groups of hosts:
ALL — Matches every client with a service. To allow a client access to all
services, use the ALL in the daemons section.
PARANOID — Matches any host where the hostname does not match the host
address.
# So that in the /etc/hosts.deny, ALL excludes all clients from logging in
# unless they are explicitely listed in the /etc/hosts.allow file.
# A sample hosts.allow, hosts.deny, and dns.conf file is found in
./sys+user_configs/system_configs/lib/procdns
A APPENDIX A: SYSTEM TWEAKS 37
A.3 Setup altenatives
#...............................................................................
# Systemwide configuration of the symbolic links in /etc/alternatives
# can be done by the system administrator using the command
update-alternatives
# The purpose for doing this is to select among several versions of a package
# that is installed on your system. For example, there are several different
# versions of vim installed, all of which are slightly different in how they
# configure the user’s envornment and how they work. To select a preferred
# version, the update-alternatives provides a symbolic link from the usual
# name of the utility, e.g., vim, to the actual program running the editor.
#
# The quickest means to change the selection of programs uses is to bring up
# the the Mate Control Panel,
mate-control-panel
# and launch the
Alternatives Comfigurator.
# This can also be started directly using the command
galternatives
# To view the options for a particular package in a shell using the command
# line, do
update-alternatives --display PROGRAM
# For example, for gvim
update-alternative --display gvim
# which gives
gvim - auto mode
link best version is /usr/bin/vim.athena
link currently points to /usr/bin/vim.athena
link gvim is /usr/bin/gvim
/usr/bin/vim.athena - priority 50
/usr/bin/vim.gtk3 - priority 50
# To select vim.gtk3 instead of the default vim.athena, do
update-alternatives --config gvim
# This then provides these options for the user,
There are 2 choices for the alternative gvim (providing /usr/bin/gvim).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/vim.athena 50 auto mode
1 /usr/bin/vim.athena 50 manual mode
2 /usr/bin/vim.gtk3 50 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/gvim (gvim) in manual mode
# By entering the entry,
2
# the selection is changed to vim.gtk3.
#
# The vim.athena is inadequate as it uses xterm to provide the graphical
# interface.
# Suggested changes to be made,
vim = vim.gtk3
gvim = vim.gtk3
# Note that it is also possible to bring up gvim using the alias
alias gvim=’vim.gtk3 -g’
# The difficulty with this approach is that it works only in the shell,
A APPENDIX A: SYSTEM TWEAKS 38
# other programs calling gvim still use gvim linked to vim.athena if the
# alternative is not changed.
A.4 Setup aptpolicy
# To prvent automatic updates from being done on your SD system, i.e., the
# installation of deb packages and kernels, you can turn of this Ubuntu feature
# by using
SD.adm_SetAptPolicy
# This can also be done manually by editing the file
/etc/apt/apt.conf.d/20auto-upgrades
# and modify the value of
APT::Periodic::Unattended-Upgrade "1";
# to be a 1, i.e,. this should be set to
APT::Periodic::Unattended-Upgrade "0";
# This is the standard value set by SD when it is intalled.
A.5 Setup consolefonts
# The console fonts are often set to a size that is too small for large computer
# monitors. To select a more suitable set of fonts rquires configuringthe
# system to change to the selected fonts, and then setting these at the default
# in each tty that is used. A tty is accessed using CTRL-ALT-F1, CTRL-ALT-F2,
# CTRL-ALT-F3, CTRL-ALT-F4, CTRL-ALT-F5, and CTRL-ALT-F6, where CTRL is the
# control key held dowa at the same time as the alt key and the function keys
# F1 to F6.
# To use the standard SD console font setup, copy the directory,
./sys+user_configs/system_tweaks/lib/console-setup/
# to the directory
/etc/default/console-setup/
# using:
cd $SYSHOME/sys+user_configs/system_tweaks/lib
rsync avz --delete ./console-setup/ /etc/console-setup
# You can also use the script in
./sys+user+configs/system_tweaks/bin/consolefont_setup
# To use,
cd $SYSHOME/sys+user+configs/system_tweaks/
./bin/consolefont_setup
# You should be able to log into any of the consoles with the fonts displayed
# being sufficiently larger.
# To configure the console fonts, i.e., those in CTRL-ALT-F1, CTRL-ALT-F2,
# and so on, selecting different options than the ones in the standard
# SD file, ./lib/console_setup, do
sudo dpkg-reconfigure console-setup
# Select from each of the screens these options (these were used to configure
# the options for the standard setup):
# screen 1:
UTF-8
# screen 2:
Combine - Latin; Slavic Cyrillic; Greek
# screen 3:
TerminusBold
# screen 4:
12x24
# Then
# - Change to TTY using CNTL-ALT-F1
A APPENDIX A: SYSTEM TWEAKS 39
# - Log in as root
# - Run the command
setupcon
# doing the same for all other consoles.
# From
https://www.maketecheasier.com/change-console-fonts-in-ubuntu/
A.6 Setup convert-pdf
# Using imagemagick to convert an image file to pdf fails as the policy
# is to have this turned off in the file,
/etc/ImageMagick-6/policy.xml
# This is discussed at
https://www.linuxcompatible.org/story/ghostscript-security-update-for-ubuntu-1a
# The solution is to change this to comment out the section on ghostscript
# format types, i.e., change the policy.xml fil from,
#
.....................................................................
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
.....................................................................
# to,
.....................................................................
<!-- disable ghostscript format types -->
<!--
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
-->
.....................................................................
# This patch can be installed by using the SD script,
sudo SD.pkg_AddPatches
# which also adds support for pdf2htmlEX. This utilis is decribed more fully
# in the help file
README_patches
# listed in system_tweaks portion of the document.
A.7 Setup dbus-launch
# Several applications such as nm-applet, kazam fail, and hp-toolbox to dock
# in the system tray after be started. The workaround is to start them with
# dbus-launch
# e.g., to start kazam so that it docks in the system tray (needed to stop
# it during a recording session), do
dbus-launch kazam &
A APPENDIX A: SYSTEM TWEAKS 40
# To add it to the list of existing default applications, i.e., the apps that
# start with using the default_* launcher, such as in
default_videorecord
# or using
default_screenshot
in the top desktop panel, set the value in
$HOME/.IC_PANEL
# to
DEF_VIDEORECORD=’kazam_launch’
# The SD script, kazam-launch, starts kazam using dbus-launch. After it starts
# you should see a small icon in the lower panel for kazam. The center dot
# turns red when recording. The script can be found in
# u20.04/customize/bin/kazam_launch
#
# and in
# /usr/lcal/bin/kazam_launch
#
# after the SD package is installed. The SD script,
# hptoolbox
#
# also calls dbus-launch hb-toolbox to have the program rest in the system
# tray.
A.8 Setup dns-resolvconf
# To modify the domain name service (dns).
#
# The traditional means for setting up dns was to modify the file,
/etc/resolv.conf
https://www.dedunu.info/2020/05/24/ubuntu-20-04-server-change-dns-and-domain
# If you edit the file, it will revert back to its setting after a reboot.
# Instead, edit the file
/etc/systemd/resolvd.conf
# For example, you can change the blanked out entries,
#DNS=
#FallbackDNS=
#Domains=
# to have the values,
DNS=8.8.8.4
FallbackDNS=8.8.8.8
Domains=hsd1.nj.comcast.net
# where the ip address for the google name servers is:
nameserver 8.8.8.8
nameserver 8.8.8.4
# Based on
# https://www.dedunu.info/2020/05/24/ubuntu-20-04-server-change-dns-and-domain
A.9 Setup dropbox
#To start dropbox for a user even when they are not logged in, configure
# the script in
./sys+user_configs/system_configs/bin/dropboxs
# adding the users needed, and then adding the script to
/etc/init.d/dropboxs
# and doing
update-rc.d dropboxs defaults
A APPENDIX A: SYSTEM TWEAKS 41
A.10 Setup gmplayer
#...............................................................................
# There is an error in the image files associated with gmplayer in setting up
# the skins package. The problem seems to be with the outdated Ubuntu skins
# package:
mplayer-skins.deb
# It can be changed manually by doing, for each skin, e.g., default,
cd /usr/share/mplayer/skins/default
for FILE in *.png; do sudo convert $FILE -define png:format=png24 $FILE; done
# An alternative solution is to obtain a deb package with the right pngs,
wget https://launchpad.net/~mc3man/+archive/ubuntu/mplay-skins/+files/mplayer-skins_3.2.1~xenial_all.deb
# and install it.
dpkg -iGE mplayer-skins_3.2.1~xenial_all.deb
# This is done by SD whenever the utility
SD.pkg_DebPkgInstall
# is run as the utility installs mplayer-skins_3.2.1~xenial_all.deb as part
# of the deb packages that are installed from the SD directory,
./debfiles
# The config file for each user is in
$HOME/.mplayer
# The skin for gmplayer can be changed by changing the symbolic link in
$HOME/.mplayer/skins/default
# to point to any skin folder in
/usr/share/mplayer/skins/clearplayer/
# To change a symbolic link, remove the existing link and do, for example
cd $HOME/.mplayer/skins
ln -s /usr/share/mplayer/skins/clearplayer/ default
# and that skin will be used the next time you start gmplayer.
A.11 Setup grub
# Configure grub2
#
# Any changes made to grub2 have to be run through the program
update-grub
# Make sure that the output is consistent with expectations, otherwise
# the computer may fail to boot up.
# Always run update-grub after making any changes, and check that there
# are no errors generated. Configuration of grub2 is done by changing
# the files in
/etc/grub.d/
# To add an image file to grub2, add any image to
/boot/grub
# The script SD.adm_ScreenSetup will do this, providing a standard image.
# To eliminate the silent boot and provide a list of kernels from which
# to boot, modify,
/etc/default/grub,
# and change the value of
GRUB_HIDDEN_TIMEOUT_STYLE=hidden
# to
GRUB_HIDDEN_TIMEOUT_STYLE=menu
# and then change the
GRUB_TIMEOUT=0
A APPENDIX A: SYSTEM TWEAKS 42
# to a larger value, e.g.,
GRUB_TIMEOUT=10
# These changes are summarized in the sample grub file,
# ......................................................
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# ......................................................
#...............................................................................
# Configure grub2, setting up the display
#
# First check the possible output options you have for the vga display
# during the boot process. To do this, you must restart your computer.
# When you get the boot screen showing which kernels to load, type the
# commands
c
vbeinfo
# giving you a list of supported resolutions. To exit the screen, type
# ESC. When the computer has restarted, you can make changes to the
/etc/default/grub
# changing the value of
GRUB_GFXMODE=640x480
# to any value given by vbeinfo.
#...............................................................................
# Configure grub2, error recovery
#
# If after changing the grub parameters, the computer fails to boot, you
# can use the install CD to boot into a live session.
# This is a sequence of commands you can use (assuming disk = /dev/sda).
# You will need to mount the partition of your installed dis tribution. If it
# is a standard SD install, it will be at /dev/sda1. Assuming, that /
# and /boot are on /dev/sda1, bring up a terminal in your live session, and do:
sudo bash
mount /dev/sda1 /mnt/ grub-install --root-directory=/mnt /dev/sda
# Remount the rest of your devices using --bind option.
mount --bind /dev /mnt/dev
# Effectively, you now have a root system under mount. You can now
# change the root from your real one (/) to /mnt. This is done using the
# chroot command.
sudo chroot /mnt
# This means that command executed in this terminal will refer to
/mnt/
# Now, reconfigure the grub package:
dpkg-reconfigure grub-pc
# then restart. If it worked, it should boot as before. You can also
# edit the
/etc/default/grub
# and other files to change them if the failure to boot was due to an error.
A.12 Setup lightdm
A APPENDIX A: SYSTEM TWEAKS 43
# You can install the standard SD background for lightdm using
sudo SD.adm_Set-lightdm
# this will also start the lightdm configurator,
lightdm-seetings
# Make any changes, including setting the background for the login screen.
# Suggestions include:
Appearance:
Background /usr/local/sod/sodimages/backgrounds/Grey-JazzSD.jpg
Background color black
GTK theme BlackMATE
Icon theme HUmanity-Dark
Mouse cursor Oxygen Vibrant Orange (Tango)
Users
Allow manual login 1 (yes)
Hide the user list 1 (yes)
Settings
Hostname 1 (yes)
Accessibility options 1 (yes)
Battery power 1 (yes)
Keyboard layout 1 (yes)
Clock 1 (yes)
Quit menu 1 (yes)
# When the options have been selected, log out. You may need to log into a tty
# to restart lightdm, if the login screen is not refreshed, i.e., after you
# have logged into a console, do
sudo /etc/init.d/lightdm restart
# when you go back to CNTL-ALT-F7 you will have your midified lightdm
# login screen greeting you.
#
# You can manually install new backgrounds for lightdm in
/usr/share/background/ubuntu-mate-common
# The suggested background for SD u20.04 is
./sys+user/system_tweak/lib/Grey-JazzSD.jpg
# and you can copy this to the lightdm directory using,
cp ./sys+user/system_tweak/lib/Grey-JazzSD.jpg /usr/share/background/ubuntu-mate-common
# when this is done, configure lightdm using
sudo lightdm-settings
# and restart lightdm in a tty as described.
#...............................................................................
# Useful resources:
# https://www.addictivetips.com/ubuntu-linux-tips/set-up-lightdm-on-arch-linux/
# The configuration of these is in /etc/lightdm.conf. Be aware that each use
# is configured in
/var/lib/AccountsService/users
A.13 Setup minidlna
# A minidlna server allows your computer to serve files to a smart tv.
# To configure a minidlna server you need to configure a file,
/etc/minidlna.conf
# A sample minidlna.conf is included in
./sys+user_configs/lib/minidlna.conf
# Edit the file, and copy it to
/etc/minidlna.conf
A APPENDIX A: SYSTEM TWEAKS 44
# To start the minidlna server use,
sudo /etc/init.d/minidlna stop
sudo minidlnad -R
sudo /etc/init.d/minidlna restart
sudo service minidlna force-reload
# Online sources,
https://openwrt.org/docs/guide-user/services/media_server/minidlna
https://www.smarthomebeginner.com/install-and-setup-minidlna-on-ubuntu-1204/
# An alternative option is to configure rygel,
http://ubuntuhandbook.org/index.php/2020/04/home-media-server-ubuntu-2004/
# Additional web resources for configuring minidlna
https://ccm.net/faq/31334-connect-a-computer-to-a-samsung-smart-tv
http://www.linux-magazine.com/Online/Blogs/Productivity-Sauce/Set-up-a-DLNA-Server-in-a-Minute
https://sourceforge.net/projects/minidlna/
https://askubuntu.com/questions/817500/how-to-set-up-a-dlna-server-on-ubuntu-14-04/907574
https://unixblogger.com/dlna-server-raspberry-pi-linux/
https://play.google.com/store/apps/details?id=com.samsung.smartviewad
http://expresstricks.com/connect-pc-samaung-smart-tv-wirelessly
https://www.samsung.com/uk/support/tv-audio-video/what-is-screen-mirroring-and-how-do-i-use-it-with-my-samsung-tv-and-samsung-mobile-device/
# It works.
A.14 Setup motd
# The login message that is posted on the login screen of each shell is
# configured using the files in
/etc/update-motd.d
# The standard SD version of this which also takes up less vertical space than
# the standard ubuntu version can be configured using
SD.adm_Set-motd
# This copies over the files in
./sys+usr_configs/system_tweaks/lib/update-motd.d
# to the standard version in /etc/. A backup copy is kept in
./sys+usr_configs/system_tweaks/lib/update-motd.d_asbuilt.
A.15 Setup newhostname
# To change the HOSTNAME of your computer to NEWHOSTNAME, edit,
/etc/hostname
# changing the entry to,
NEWHOSTNAME
# THEN EDIT THE FILE
/etc/hosts
# changing the name of the entry for 127.0.0.1 to contain the new NEWHOSTNAME.
# For example,
127.0.0.1 localhost NEWHOSTNAME
# Do not neglect to change the name in lightdm, if this is enabled using,
sudo lightdm-settings
A.16 Setup nm-applet
# The network-manager applet may not start, even though it is enabled to start
# using the configuration tool for startup applications,
mate-session-properties
# If this is the case, then cp the nm-applet startup file to autostart, i.e.,
cp /usr/local/sod/defaults/dotfiles/config/autostart/nm-applet.desktop $HOME/.config/autostart
A APPENDIX A: SYSTEM TWEAKS 45
# Alternatively, copy the system autostart file autotart,
cp /etc/xdg/autostart/nm-applet.desktop $HOME/.config/autostart
# then edit the file
$HOME/.config/autostart
# changing,
Exec=nm-applet
# to
Exec=dbus-launch nm-applet
# The network manager up-down arrow icon should appear in your lower panel
# the next time to log in to your desktop.
#
#
A.17 Setup nvidia
# To install the nVidia drivers, first verify that you have an nvidia card
# using either
nvidia-detect
# or
nvidida-detector
# You can also find out about your graphics card using the commands,
sudo hwinfo --gfxcard --short
# or if you have more than one card, you can nquire which care is being used:
sudo prime-select query
# which has as its options,
Usage: /bin/prime-select nvidia|intel|on-demand|query
# Alternatively, you can use
sudo inxi -Gx
# To obtain a list of drivers for any nVida card, do
sudo ubuntu-drivers devices
# To install the nvidia drivers use
sudo apt install nvidia-driver-version-number
# as, for example,
sudo apt install nvidia-driver-430
# Then reboot your computer.
# Note that the prime-select command is part of the new Ubuntu deb package,
nvidia-prime
# To make sure that your updated packages are added to the selections file
# when SD.adm_Freshen, i.e., when freshen is called, add the new deb packages
# to the file
/etc/selections_add
# You can configure the location and name of this file in
/etc/SDpkg.db
# is sourced when freshen is called.
# The files for the deb package databaes used for for the standard SD install
# are kept at
/syshome/src/u20.04/pkgsetup/selections_library/
# and these do not include and of the deb packages required for any nVidia
# card install. Adding these nVidia deb packages to the
/etc/selections_add
# will avoid breaking freshen.
A APPENDIX A: SYSTEM TWEAKS 46
A.18 Setup patches
# The SD utility
SD.pkg_AddPatches
# is intended to simplify the task of patching the SD pacakge environment to
# include several utilities that are shipped borken, or are not installed
# in a standard ubuntu-mate install.
#...............................................................
# Patching ImageMagick Policy
# This is discussed at
https://www.linuxcompatible.org/story/ghostscript-security-update-for-ubuntu-1a
# In effect this patch modifes
/etc/ImageMagick-6/policy.xml
# so that Imagemagick is permitted to convert image files to pdf. This is
# discussed further in
./sys+user_configs/system_tweaks/README_convert-pdf.
# In addition, the limits on resource utilization are changed to avoid the
# warning,
convert-im6.q16: cache resources exhausted
# changing the limits from
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<policy domain="resource" name="area" value="128MB"/>
<policy domain="resource" name="disk" value="1GiB"/>
# to be,
<policy domain="resource" name="memory" value="4GiB"/>
<policy domain="resource" name="map" value="8GiB"/>
<policy domain="resource" name="width" value="128KP"/>
<policy domain="resource" name="height" value="128KP"/>
<policy domain="resource" name="area" value="1.0GB"/>
<policy domain="resource" name="disk" value="8GiB"/>
#...............................................................
# Patching pdf2htmlEX
#
# Using pdf2htmlEX broke with Ubuntu 20.04. While it may be possible to
# install using any of several options provided online, none have worked,
# and so a hacked solution is available by copying the required libraries
# from Ubuntu 16.04 over, and installing pdf2htmlEX in
/usr/local/bin/pdf2htmlEX
# so that it is conveniently accessible to users.
#...............................................................
# Patching sliderule
#
# The sliderule.py package broke with u20.04, the sliderule patch provides
# the additional libraries and modules from u16.04 to enable this package
# to work.
#
#...............................................................
# Patching pdf_quench
#
# The utility pdf_quence is installed using SD.pkg_DebPkgInstall using the
# deb package, pdf-quench_1.0.5_all.deb. After this is installed, the binary,
/bin/pdf_quench
# is modified by being overwritten by a copy of pdf_quench installed by
A APPENDIX A: SYSTEM TWEAKS 47
# SD.pkg_DebPkgInstall, i.e., the patch is automatically installed.
#...............................................................
# Patching photofilmstrip
# The deb file photofilmstrip is installed but it does not work.
Fixed:
Change in file,
/usr/lib/python3/dist-packages/photofilmstrip/action/ActionI18N.py
line 43,
lang.install(True)
to
lang.install()
This has been changed in the version of
ActionI18N.py
At this point, make the change only for version 3.7.2-1 of photofilmstrip
as later ones may have the patch installed.
# These patches are described in /syshome/src/u20.04/pkgsetup/patches,
# and all patches can be applied using the SD package,
SD.pkg_AddPatches
A.19 Setup procdns
# The utility procdns in /usr/local/bin/procdns is designed to be run under
# a root crontab every few minutes to update the file,
/etc/hosts.allow
# The procdns file adds a list of dynamic hosts that are allowed to log in
# remotely. Since these hosts have no fixed ip address, the intent is to
# use a dyanmic name service, such as dyndns or freedns, to obtain the ip
# address from the dynamically assigned hostnames listed in
/etc/procdns.conf/dns.conf
# The dns.conf file should contain a line with the dyanmically assigned host
# name for each computer that is allowed to log in with ssh to the host,
# e.g., as in the line,
mydynamichostname.dyndns.org # This is my computer at home.
# Note that comments are allowed.
# The program,
/usr/local/bin/procdns
# updates the /etc/hosts.allow file, putting in the ip addresses assocaited
# with the named dynamic hosts so that they can be given access to the
# local host using ssh. The program procdns can be run at routine intervals
# using an entry in root’s crontab file, e.g., do
sudo zsh
crontab -e
# then add an entry such as
*/30 * * * * /usr/local/bin/procdns
# to run procdns every 30 minutes. The update can be done more often, however be
# careful not to do it too often to avoid being cut off by your dynamic host
# server. These typically have some limit on the fequency of these calls.
# For procdns to be useful, it is necessary to restrict all access to
# the local host by adding a line to the file
/etc/hosts.deny
A APPENDIX A: SYSTEM TWEAKS 48
# containing the line
ALL:ALL
# Note that ALL is a more restrictive setting than PARANOID, i.e.,
#
# The following wildcards may be used in the access control rules instead
# of using specific hosts or groups of hosts:
ALL — Matches every client with a service. To allow a client access to all
services, use the ALL in the daemons section.
PARANOID — Matches any host where the hostname does not match the host
address.
# So that in the /etc/hosts.deny, ALL excludes all clients from logging in
# unless they are explicitely listed in the /etc/hosts.allow file.
# A sample hosts.allow, hosts.deny, and dns.conf file is found in
./sys+user_configs/system_configs/lib/procdns
A.20 Setup pulseaudio
# The sound system runs through pulseaudio which is layered atop alsa.
#
# The pulseaudio sound system is started on boot by systemd, and you can
# verity that it is running using the command,
systemctl --user status pulseaudio.service
# This will return something such as
- pulseaudio.service - Sound Service
Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor >
Active: active (running) since Fri 2020-07-24 21:18:12 EDT; 9h ago
TriggeredBy: - pulseaudio.socket
Main PID: 4973 (pulseaudio)
CGroup: /user.slice/user-1001.slice/user@1001.service/pulseaudio.service
- 4973 /usr/bin/pulseaudio --daemonize=no --log-target=journal
- 4994 /usr/libexec/pulse/gsettings-helper
Jul 24 21:18:12 lydia systemd[4966]: Starting Sound Service...
Jul 24 21:18:12 lydia systemd[4966]: Started Sound Service.
# The configuratin file in this case in
/usr/lib/systemd/user/pulseaudio.service
# contains the configuration options for starting pulseaudio.
#
# A full detailed list the sound configuration can be obtained from
pa-info
# A concise summary of the audio system installed including the particular sound
# driver, by using the command,
inxi -SMA
# You can also obtain a local copy of the
default.pa
# configuration file that is kept in
/etc/pulse/default.pa
# by doing
cp /etc/pulse/default.pa $HOME/.config/pulse/.
# For example, you can comment out all refences to *bluetooth* if you have
# no bluetooth support in your computer.
# There is a problem with the 10th gen intel sound system. If you have a
# case where there is no sound and pavucontrol shows no configurable device
# under Configuration: No cards available for configuration, and the
# mate-volume-control shows under Hardware shows: No devices, then to get
A APPENDIX A: SYSTEM TWEAKS 49
# sound to work, in the desktop do,
sudo alsa force-reload
# A recommended more substantial long term fix is to remove the deb file,
timidity-deamon.deb
# This can be uninstalled using
aptitutde purge timidity-deamon.deb
# The deb file has been found to confict with pulse audio on reboot. The
# deb file has been removed from the SD distribution for that reason.
# Alternatively, you can use the SD utility, paset
sudo paset -a
# If this works, you can add the alsa force reload command to the
/etc/crontab
# file by adding the line
@reboot root sleep 20; alsa force-reload; sleep 10; alsa force-reload
# This will run the command twice after the machine reboots.
# It may also be worthwhile adding your user, e.g., MyUser, to the
/etc/group
# file as,
sudo:x:27:MyUser
audio:x:29:pulse,timidity,MyUser
# Lastly, if pulse does not seem to start when you enter your desktop
# and pavucontrol only gives a message that it’s waiting, then try doing:
nohup pulseaudio --daemonize=no &
A.21 Setup SD-utilities
#...............................................................................
# In addition to the tweaks listed below, you can use these scripts to assist
# in configuring your system:
# You should use these scripts to configure users on your system so that the
# desktop they are using is the Mate SD desktop:
SD.adm_Adduser - create an account for an SD user.
USAGE: SD.adm_Adduser USER USERID
SD.adm_SetMateDesktop - configure or reconfigure the desktop.
USAGE: SD.adm_SetMateDesktop USER STYLE
SD.adm_SetAllUsers - configure or reconfigure all desktops.
for all users with id > = 1000.
SD.adm_GetUUID - outputs fstab file based on existing mounted drives.
# For SD.adm_SetMateDesktop, There may be several customized STYLE files
# available, the most current one is symbolically linked to the file:
/etc/skel_sod/recommended
#...............................................................................
# To maintain your system you can use the scripts
SD.pkg_AptConfig SD.pkg_CustomInstall SD.pkg_SearchKernel
SD.pkg_AptInstall SD.pkg_DebPkgInstall SD.pkg_SrcPkgInstall
SD.pkg_AptLogs SD.pkg_Freshen SD.pkg_Status
SD.pkg_AptLstInstall SD.pkg_KeysInstall SD.pkg_UpkgMgr
#...............................................................................
A APPENDIX A: SYSTEM TWEAKS 50
A.22 Setup setbackground
# The standard SD background image displayed fo the SD standard desktop is
# configured using the utility,
SD.adm_SetBackground
# This sets them computer’s host name to be in the upper left corner of the
# background image. The program attempts to place the name correctly and with
# the correct sized font, however if tweaking is required, this can be done
# through options provided and which are described when using the utility with
# the help option, i.e.,
SD.adm_SetBackground -h
A.23 Setup solaar
# The version of solaar that is loaded is from the repository,
https://launchpad.net/~solaar-unifying/+archive/ubuntu/ppa
# which is routine updated. The version that ships with the standard
# ubuntu-mate repository,
solaar_1.0.1+dfsg-3_all.deb
# will not launch. The ppa was not added, however the deb file
solaar_1.0.2+git1056-2d2e71d_ubuntu20.10.1_all.deb
# was installed from ./defiles using SD.pkg_DebInstall. This repository
# appears actively under development.
A.24 Setup sshroot
# You can allow root log in to your sever by editing the /etc/ssh/sshd_config
# file and changing
#PermitRootLogin prohibit-password
# to
PermitRootLogin prohibit-password
# or to
PermitRootLogin without-password
#Then restart ssh using
/etc/init.d/ssh restart
# There is no difference between ’prohibit-password’ and ‘without-password’.
# The prohibit-password was introduced to reduce the ambiguity of the other
# option, without-password. They are the same, i.e., they do not allow root
# to log in to a computer with a password. Login by root requires an ssh
# passkey.
A.25 Setup sudo
# To provide a user with full sudo priveleges, edit thefile
/etc/group
# and add the user to the sudo group, e.g., for user, soduser, we would have
sudo:x:27:soduser
# then save the file. The user soduser will have to log in again before the
# changes are implemented.
# The sudo command for ubuntu mate is compiled so that the root shell does
# not inherit the properties of the user’s shell. The user can invoke
# sudo using
sudo -s
# to get around this. Alternatively, edit file the
A APPENDIX A: SYSTEM TWEAKS 51
/etc/sudoers
# Changing:
Defaults env_reset
Defaults env_keep += "SHELL"
Defaults editor=/usr/bin/vim
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# to:
Defaults env_reset
Defaults env_keep += "SHELL"
Defaults editor=/usr/bin/vim
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# i.e., the second and third lines have been changed. This also allows the
# file to be edited using the command visudo using the vi editor. To save
# the file in vi if directly editing it, write the file using the
:w!
#command.
A.26 Setup tracker
#To stop tracker from starting for all users, add the line
Hidden=true
# as the last line in each file in
/etc/xdg/autostart/tracker-extract.desktop
/etc/xdg/autostart/tracker-miner-fs.desktop
/etc/xdg/autostart/tracker-store.desktop
# Each user should also make sure that there are no desktop tracker files in
./config/autostart
# The SD utilty killtracker can set up the tracker files in
/etc/xdg/autostart
# so that tracker is not started for any user. To do this use sudo, and then
# run the command
killtracker -t
# If all else fails and tracker still starts, then do
sudo chmod -x /usr/libexec/tracker-miner-fs
sudo chmod -x /usr/libexec/tracker-extract
sudo chmod -x /usr/libexec/tracker-store
A.27 Setup vendor
# Additional user specific packages cna be made part of the standard SD install
# if these are deb packages located in $DEB_VENDOR. The value of $DEB_VENDOR
# is set in
/etc/SDpgk.db
# A sample install script is provided in
./sys+user_configs/system_configs/lib/vendor_debinstall/install
# The deb files may be located anywhere you place them as long as
# they are accessbile through the user specified ./install script.
A.28 Setup x2go
# When installing x2g you will get the message,
For and X@GO/X11 desktop session to be accessible via X@Go Desktop
Sharing, the X2GO Desktop Sharing applet needs to be running. It
advertises the user’s X2GO/X11 session through an access controlled
socket to X2GO client applications.
The applet can be configured to start automatically on desktop session
A APPENDIX A: SYSTEM TWEAKS 52
startup, but for secruity reasons this is not the default.
Auto-start X2GO Desktop Sharing appling
<Yes> <No>
# If you need this feature, you will need to run
sudo dpkt-reconfigure x2go
A.29 Setup xflipdecorate
# The SD utility,
xflipdecorate
# that turns of window decoration, i.e., a window is borderless when this is
# turned on, requires the install of
python-gtk2_2.24.0-4ubuntu1_amd64.deb
# This deb file has been added to the SD software base and is installed
# automatically.
B APPENDIX B: USER TWEAKS 53
B Appendix B: User tweaks
This appendix contains a list of user configuration changes that are in addition to those listed previously. Make these
changes if any of the recommended actions are worthwhile in order to customize your desktop.
The contents of Appendix B are dynamically generated using ./documents/make_alldocs -d based on
the information contained in SD directory ./sys+user_configs/user_tweaks using the README.* files. The
contents of these files can also be accessed using the command, tweaks which is a link to the SD utility,
SD.pkg_SuggestedTweaks.
B.1 Setup
# ------------------------------------------------------------------------------
# These User tweaks can be run by any user on the system. They are intended to
# provide a checklist of some changes that may be useful to some users in
# configuring their desktop. Depending on your needs, some may not apply at
# all, or be of no interest, however they are intended as susggestion and as
# a checklist to make users aware of some of the options they have to
# personalize their desktop.
#
#
#
#
#
#
#
# The primary links to setting attributes of your user desktop enviornment is
# throug the Mate-Control-Center, and for the 3d desktop, through the Compiz
# configurator. These can be accessed through the top panel icon, by way of
# the sysmtem menu, or directly from the command line using
mate-control-center
# The values listed below each program is the equivalent identifyer that is
# listed on the Control Center pane of the mate-control-center along with the
# section of the Control Center where the application can be found.
# Mate Control Center Adminstration Panel
Alternatives Configurator = galternatives
Login Window = lightdm-settings
Printer = system-config-printer
Software & Updates = software-properties-gtk
Sofware Updater = update-manager
Startup Disk Creator = usb-creator-gtk
Users and Groups = users-admin
xdiagnose = sudo xdiagnose
# Mate Control Center Hardware Panel
Disks = gnome-disks
Displays = mate-display-properties (setup monitor)
Keyboard = mate-keyboard-properties (set keyboard properties)
Keyboard Shortcuts = mate-keybinding-properties (keyboard shortcuts XF86)
Mouse = mate-mouse-properties (set mouse properties)
B APPENDIX B: USER TWEAKS 54
Power Management = mate-power-preferences (set up UPS power actions)
Sound = mate-volume-control
Time and Date Manager = time-admin
USBView = sudo usbview
# Mate Control Center Internet and Network Panel
Advanced Network Configuration = nm-connections-editor
Network Proxy = mate-network-properties
# Mate Control Center Look and Feel Panel
Appearance = mate-appearance-properties (select theme, background, fonts)
Caja-Actions Configuration Tool = caja-actions-config-tool
CompizConfig Settings Manager = ccsm
File Manager Settings = thunar-settings
Emerald Theme Manager = emerald-theme-manager
KDE Connect Settings = kdeconnect-settings
KDE System Settings = systemsettings5 (configure kde system settings)
Main Menu = alacarte
Mate Tweak = mate-tweak
Popup Notifications = mate-notification-properties (set where notifications are placed)
Removable Drives and Media = thunar-volman-settings
Screensaver = mate-screensaver-preferences
xkeycaps = xkeycaps (brings up keyboard)
# Mate Control Center Personal Panel
About Me = mate-about-me
Assistive Technologies = mate-at-properties (assistive technologies)
Preferred Applications = mate-default-applications-properties (set preferred apps)
Startup Applications = mate-session-properties (select startup applications to run)
File Management = caja-file-management-properties (configure caja)
Onboard = onboard-seetings (control keyboard on desktop)
# Mate Control Center Other Panel
HPLIP Toolbox = hp-toolbox (master configuration gui)
# In addition to these configuration utilities, several others are also
# available that are not listed on the Mate Control Center panel, including
mate-about
mate-desktop-item-edit (edit .desktop files)
mate-panel-screenshot
B APPENDIX B: USER TWEAKS 55
mate-power-statistics
mate-screenshot
mate-search-tool
mate-system-monitor
mate-volume-control-applet
# In addition to these mate desktop configuration packages, there are several
# other useful desktop attrribute configuration packages accessible from the
# command line. These include
hp-info
hp-levels (onscreen display of inklevels)
hp-printsettings
caja-send (send by email)
# and include the following utilities requiring sudo access,
sudo mate-system-log
# The values listed below each program is the equivalent identifyer that is
# listed on the Control Center pane of the mate-control-center along with the
# section of the Control Center where the application can be found.
B.2 Setup caja
# Open caja and select,
Edit | Preferences
# This opens up the
File Management Preferences menu
# To select single click option if this has not been configured, go to the
# tab marked,
Behavior
# and select
Single click to open items
# To change zoom levels, in the
File Management Preferences menu,
# go to the tab on top marked as
Views
# View new folders using:
Compact View
# Under Icon View Defaults, select
Default zoom level 50%
# Under Compact View Defaults, select
Default zoom level 60%
# Under List View Defaults, select
Default zoom level 33%
B.3 Setup chrome-keyring
# Google chrome often gets caught in a loop attempting to sign in to the
# keyring. These are stored in
$HOME/.local/share/keyrings
# Suggestions for getting around this difficulty include entering an empty
# password several times, to using an alternative launch option, e.g., for
# google-chrome, start it using,
google-chrome --password-store=basic
# If you get the error
The password you use to login to your computer no longer matches that
of your login keyring
# you need to change the keyring password. You can do this using,
B APPENDIX B: USER TWEAKS 56
seahorse
# Right-clicking on "default keyring", and selecting "Change Password".
# You can remove "login.keyring" and "user.keystore" from
$HOME/.local/share/keyrings/
# This will permanently delete all saved keys. After removing the files,
# log out and log in again.
#
#
B.4 Setup claws-mail-plugins
# The claws-mail python.so plugin is not updated and none is available for use.
https://support.mozilla.org/en-US/questions/1157490
# The claws-mail fancy.so browser plugin is not updated,
https://www.viewsonic.com/us/catalog/product_datasheet/view/key/vx4380-4k.html
# The alternative is to use the dillo.so plugin which uses the dillo browser,
https://www.dillo.org/
# The browser is less capable than the one provided by fancy.so, however through
# the use of the dillo config file, it can be improved. The config file
# is located in
./sys+user_config/user_configs/lib/dillorc
# Copy the file to $HOOME/.dillo/dillorc and modify as needed.
B.5 Setup color
# The ls environment is set in the $HOME/.zprofile file using
alias ls="ls --color=yes -F -b --group-directories-first"
# Additional alias are defined to force the color to black and white, bold,
# 8-color and 256 color using the aliases:
alias bold="alias ls=’ls --color=yes -F -b --group-directories-first’;source $HOME/.COLORS_BW"
alias auto="alias ls=’ls --color=auto -F -b --group-directories-first’;source $HOME/.COLOR256"
alias bw="alias ls=’ls --color=no -F -b --group-directories-first’"
alias color8="alias ls=’ls --color=yes -F -b --group-directories-first’;source $HOME/.COLOR"
# The environment for these is defined using .COLOR_BW, .COLOR, and .COLOR256
# files, which can be generated and customized using the SD script
gen_ls_colors
# The colors associations that are generated are built on the template file
# $HOME/.COLOR256_template. Do
gen_ls_colors -h
# for examples and assistance in setting up a customized list of directory
# and file color associations.
B.6 Setup crontab
# The existing crontab configuration can be copied over using,
crontab -e
# by cutting and pasting from the file. Users can also save a copy of thier
# crontab files by using
SD.usr_bkupddotfiles -c
# which stores a copy in
$HOME/.mycrontab
# Alternatively, to save a copy manually, do
crontab -l > $HOME/.mycrontab
# Backing up the root crontab can be done with,
sudo zsh
B APPENDIX B: USER TWEAKS 57
crontab -l > $HOME/rootcrontab
# then save these files, noting that they are owned by root.
# To set up a crontab file, you will need the ability to edit crontab using
# the command,
crontab -e
# THe first time you invoke this, it requests that you specify the editor
# you will e using. If the choice you have from a previous install of
# linux is no longer valid, edit the file,
$HOME/,selected_editor
# then change the value of SELEcTED EDITOR, e.g.,change it to
SELECTED_EDITOR="/usr/bin/vim.gtk3"
# You can also delete the file and start the selection process over using
crontabe -e
# When you have gotten into crontab with the editor, add the following
# line after all of the comments in the file (lines beginning with a hash)
# to suppress mail messages to the user:
MAILTO=""
# To generate a new contab entry online, try using
# https://crontab-generator.org/
# https://crontab.guru/
# This can also be done manually by filling in the fields appropriately in
# the template
# Example of job definition:
.---------------- minute (0 - 59)
| .------------- hour (0 - 23)
| | .---------- day of month (1 - 31)
| | | .------- month (1 - 12) OR jan,feb,mar,apr ...
| | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
| | | | |
* * * * * user-name command to be executed
53 2 * * exec /bin/zsh /home/myuser/bin/allbkup -f
# Note that in crontab the usual shell variable $HOME is not defined.
#
B.7 Setup desktopupdate
# This version of u20.04 incorporates Mate 1.24. This version is consistent
# with the desktop version installed with u20.04. You may need to redefine
# Your desktop, when you run SD.adm_SetMateDesktop is set to run the 2d marco
# desktop. The reason for this is that the only way to update and configure
# the 3d compiz or 3d compiz-emerald desktop is to pull in the new configuration
# file manually as the user.
#
# To update your compiz settings, you will need to bring up the compiz
# configurator. You can do this from a shell using the command,
ccsm
# Alternatively, you can invole from the yellow circle icon with a hammer,
# which brings up the Mate-Contol-Panel. From there select the
CompizConfig Settings Manager
# When this has opened, in the CompizConfig Settings Manager panel, click on
# the link in the left toolbar to
Preferences
# that takes you to a panel marked as
Profile
# Change the Profile to
compizemerald2004
# In the select bar beneath the Profile and the current session (it may be
B APPENDIX B: USER TWEAKS 58
# Default), click on the link tab marked
Import
# This brings up a window to select a file to import. This should be the file
compizemerald2004.profile
# that was installed in your top level home directory using the utility
# SD.adm_SetMateDesktop. Import this file. It should now show up in your
# Profile as
compizemerald2004
# You can start the 3d desktop by doing
SD.usr_SwitchMyDesktop
# This utility allows you to toggle between the 2d and 3d desktops. To set your
# configuration to always start the 3d desktop, use
SD.usr_SwitchMyDesktop -d
# Alternatively, edit the hidden file
$HOME/.IC_DESKTOP
# changing the value of DEF_DESKTOP and DECORATOR as desired. For example
# to set your desktop to start with compiz as the window manager and emerald
# as the window decorator, select
#..............................................................
#DEF_DESKTOP=’marco’
DEF_DESKTOP=’compiz’
#
#Use DEF_TIME to define the wait time for launching the compiz desktop.
DEF_TIME=’2’
#Set the decorator
#DECORATOR=’compiz-decorator’
DECORATOR=’emerald’
#..............................................................
# You can also stay with the default compiz-decorator. When you log in
# the next time, these settings are used to start your selection of desktop.
# The files associated with the desktop configuration are listed below:
#
# A copy of your desktop configuration (excluding compiz/emerald):
$HOME/.mydconfuser
# The launchers that are installed in your top panel,
$HOME/.config/mate/panel2.d/default/launchers/default_startcedesktop.desktop
# The marco and compiz configuration
$HOME/.config/dconf/compizemerald.profile
$HOME/.config/user
$HOME/.config/.sd_desktop
# The emerald decorator files are save in
$HOME/.emerald
# To save a copy of your current desktop configuration, do
dconf dump / > mydesktop
# To load a particular desktop configuration, do
dconf load / < mydesktop
# These are the files that ae saved in
$HOME/.config/dconf/user
# A comprehensive list of desktop configuration files is given in
./sys+user_configs/user_configs/README.selectdefault_applications.
B APPENDIX B: USER TWEAKS 59
B.8 Setup dropbox
# The dropbox startup script and applicaitons should be turned off if you
# installed or updated your desktop using the SD install script,
SD.adm_SetMateDesktop
# If you wish to turn on Dropbox, pen a shell, i.e., a terminal and type,
dropbox autostart y
# and then start the Startup Applications Preferences dialog using
mate-session-properties
# and go to Startup Applications, and select
Caja-dropbox
Dropbox
#...............................................................................
# If you wish to not install dropbox and would prefer not to have the dropbox
# initialization attempt to set up or link to your account and it constinues
# to start each time you login to your account, open a shell, i.e., terminal
# and type
dropbox autostart n
# and then, start
mate-control-center
# and go to Startup Applications, and deselect
Caja-dropbox
Dropbox
# These options can also be accessed directly using the following command
# in a terminal to bring up the Startup Applications Preferences dialog,
mate-session-properties
# Log out, then log back in again. Dropbox should not be starting
# It is not recommended that you deleting the startup desktop packages in
$HOME/.config/autostart/dropbox.desktop
$HOME/.config/autostart/caja-dropbox.desktop
# as this would preclude you from starting thses and in most cases
# this does not work, i.e., the system preferences for starting dropbox then
# take priority.
#...............................................................................
# For starting a daemon on a computer restart to start your dropbox sync even if
# you are not logged in, use the file in
./sys+user+configs/system_configs/README_dropbox
# You can also start dropbox at restart by putting a line in you crontab file
@reboot ~/.dropbox-dist/dropboxd
B.9 Setup firefox
# Recommend modifications for Firefox:
# Plugins:
OpenH264 Video Codec provided by Cisco Systems, Inc.
Shockwave Flash
Widevine Content Decryption Module provided by Google Inc.
# Extensions:
AdblockPlus - Block YoutTube ad, pop-ups
B APPENDIX B: USER TWEAKS 60
Google Scholar Button
Panel for Google Scholar
Shorkeys (Custom Keyboard Shortcuts)
To Google Translate
User-Agent Swittcher and Manager
WIKI2.Wikipedia Republished
Zotero Connector
# Appearance:
Dark Carbon (Simple Dark Carbon Fiber Style)
# Adjusting fonts for 4K monitors:
Firefox is now respecting the pixel density you’ve set on a system level.
If you prefer to set the text size/pixel density in firefox different from
that of your system’s settings enter,
about:config
into the firefox address bar (confirm the info message in case it shows up)
and search for the preference,
layout.css.devPixelsPerPx
Double-click it and change its value to 1.0, or any other zoom factor that
fits your purpose. The value -1.0 is the default value to maintain the
the system settings.
B.10 Setup fontsdesktop
# Usable monospace fonts for terminals include:
Anonymous Pro
DejaVu Sans Mono
DejaVu Sans Condensed Bold
Droid Sans Mono
Inconsolato
Liberation Mono
Monospace
Trebuchet MS
Cantarell
# Additional quality desktop fonts include:
Ubunutu
Ubunutu Condensed
Ubunutu Light
# The terminator font preferences are typically set to:
Liberation Mono Regular 9
# and gnome-terminal are typically set to:
Monospace Regular 9
# The fonts for the Desktop are set to:
Application font : Ubuntu Light 9
Document font : Ubuntu Light 9
Desktop font : Ubuntu Regular 8
Window title font: DejaVu Sans Condensed Bold 10
Fixed witdth font: Monospace Regular 9
# For a 27" 2640x1440 display this corresponds to 109 dots per inch.
# Hinting is set to Slight, with Subpixel Order RGB.
#The fonts for Claws-Mail are set to:
Folder and Message Lists: Ubuntu Condensed 10
Message : Ubuntu Mono 10
Derive small and fold fonts from Folder and Message Lists font.
B.11 Setup getmail-procmail
# If you are using getmail and wish to process your mail throught procmail
# using your $HOME/.procmailrc file, you need to configure your getmailrc
# file to put the mail through procmail. This is done by changing the
# destination, and then ading a command to set procmail as the mail delivery
# agent. To do this modify your $HOME/getmail/.getmailrc file to include:
B APPENDIX B: USER TWEAKS 61
#
#...............................................................................
[destination]
type = MultiDestination
#destinations = ("/var/mail/USER", )
destinations = ("[procmail-as-USER]", )
[procmail-as-USER]
type = MDA_external
path = /usr/bin/procmail
arguments = (’~USER/.procmailrc’, ’-f’, ’%(sender)’)
unixfrom = true
user = USER
#...............................................................................
# where USER is the name of your user account.
#
# There is a sample .getmail forlder showing some configuration options in
/usr/local/sod/defaults/dotfiles/getmail
# Note that files in the /usr/local/sod/defaults/dotfiles folder are not hidden,
# i.e., the file .zprofile, for example, is shown as zprofile.
#
#...............................................................................
# Configure$HOME/.procmailrc and $HOME/.forward for a user, USER
# To process mail, each user needs a file,
$HOME/.forward
# and a file,
$HOME/.procmailrc
#The $HOME/.forward file should contain,
......................................................
|/usr/bin/procmail
......................................................
# and the $HOME/.procmailrc file,
......................................................
0fw
* < 256000
| /usr/bin/spamc
#
# spam folder for email identified as spam
#
:0:
* ^X-Spam-Status: Yes
$HOME/spam
# FORWARDING DONE THROUGH PROCMAIL
:0
! myuser@hostname.edu
......................................................
# Having a $HOME/.forward file for each user is also needed to route mail
# through the $HOME/.procmail file for each user. Another sample
# $HOME/.forward file which does not use the $HOME/.procmail file for
# forwarding is,
......................................................
|/usr/bin/procmail, myuser@host1.edu
......................................................
# This leaves a cpy on the server as well as sending a copy to the user,
# myuser@host1.edu. The forward in the $HOME/.procmailc file shown does
# not leave a copy on the server. Do not implment both methods.
B.12 Setup groups
# Added your $USER to group users in /etc/group based on the groups that the
B APPENDIX B: USER TWEAKS 62
# the first user created on the system has been added to. If you have more
# than one user on the system and you need to allocate them these priveleges,
# add them as well. Then make sure your account is owned by you, i.e., do:
chown -R $USER.users /home/$USER
B.13 Setup hplip
# To stop hplip from starting and creating the lock file in,
$HOME/.hplip/hp-systray.lock
# you can do,
rm $HOME/.config/autostart/hplip-systray.desktop
rm $HOME/.hplip/hp-systray.lock
# As an alternative, start mate-control-center and go to
Sartup Applications
# and deslect
HP System Tray Service
# If you have an hp printer, the hplip tools provide a convenient means for
# obtaining ink-levels and configuring some options on printing and scanning.
# The ink levels can be found from
hp-levels
# of from navigating the user interface,
hp-toolbox
B.14 Setup Iconfrc
# The SD configuration file,
$HOME/.Iconfrc
# configures the selection of programs that are execute by default, i.e.,
# it sets your preferred programs. Select the programs you prefer by
# uncomment any program in the list, and commenting out any you prefer not to
# use.
# The program also attempts to select the monitor size for your desktop
# if a
$HOME/.IC_MONITOR
# file is not available. You can set the size of your monitor in pixels
# using this file.
B.15 Setup ICPANEL
# The SD configuration file,
$HOME/.IC_PANEL
# configures the selection of programs that are execute when a top panel icon
# is pressed. There is an extensive list of options. Editing this file is
# an alternative to using the mouse to right click on a panel icon and select
Properties
# to change the action associated with the panel icon. The file also provides
# uses the ability to change the panel icon by specifying the file to use
# in the .IC_PANEL file.
# The advantage to using the .IC_PANEL file to modify panel actions is that
# the results can be exported to another computer running SD and the changes
# are immediately implemented, i.e., there is no need to manually set the
# panel icons on the new computer.
#
B APPENDIX B: USER TWEAKS 63
B.16 Setup imap
# If your computer is not connected to a mailserver that typically deliers
# mail to your computer, and so postfix and dovecot are not directly delivering
# your mail to /var/mail/USER, where USER is your user, you can set up an
# imap fetch to accomplish this mail delivery directly. There are two utilities
# that are typically used: fetchmail or getmail. Examples of configuring these
# are shown in your $HOME/.fetcmailrc and $HOME/.getmail/getmailrc file
# that are installed if you are using the SD desktop for your user.
# It is recommended that you set up getmail as this provided greater flexibility
# in fetching files, for example, it keeps track of files that have been
# fetched from a mail server using imap so that they do not need to be delete
# from the server to avoid having them fetched again when another fetch request
# is made.
B.17 Setup kde
# If your keyboard shortcuts do not seem to be working, it may be that some
# pre-installed KDE shortcuts are using these keys arleady. Typically, we have
# had these KDE utilities causing a conflict,
# Program Keyboard Shortcut
ibus-ui-emojier-plasma MOD+.
dolphin MOD+E
# Turn these off by using
systemsettings5
# or use the menu item under Look and Feel in the Mate Control Panel marked
KDE System Settings
# Then select
KDE System Settings | Workspace | Shortcuts
# turn of all keyboard shortcuts.
B.18 Setup mail
# The default configuration is for the claws-mail to be the mail utility
# that is invoked from the top Desktop panel icon. In addition, the default
# mail application is set to claws-mail using,
mate-default-application properties
# Users wishing to link to their gmail account or another online service
# need to modify the $HOME/.IC_PANEL to configure the settings so that
# an alternative option is selected. To configure, for example, gmail to
# be your mail too, Edit the file, .IC_PANEL, going to section 13,
# configuring the selections as shown,
#
#...............................................................................
# 13) Select mail tool.
# Provides: choice of email client (claws-mail).
# Action:
# DEF_MAILER=’claws-mail’
#DEF_MAILER=’evolution’
#DEF_MAILER=’thunderbird’
DEF_MAILER=’https://mail.google.com/mail/0/#inbox’
# Use www if you view your mail on the web using gmail.
#
# Icon:
DEF_MAILER_ICON=’/usr/local/sod/sodicons/selecticons/GMail.png’
#DEF_MAILER_ICON=’/usr/local/sod/sodicons/selecticons/kmail.png’
#DEF_MAILER_ICON=’/usr/local/sod/sodicons/selecticons/claws-mail.png’
#
#DEF_CMBROWSER=’min’
DEF_CMBROWSER=’firefox’
#DEF_CMBROWSER=’google-chrome’
#DEF_CMBROWSER=’brave-browser’
#...............................................................................
#
# The choice of browser to open to view your gmail account in the example
# is firefox. Of course, you need to be logged in to your gmail account for
# the links to work.
B APPENDIX B: USER TWEAKS 64
#
# In addition, to select gmail as the default mailer when you click on a
# mail icon in your browser, you will need to configure each browser you use
# to link your gmail account. To do this in firefox, for example, go to
Preferences | Home | Applications
# to change the choice of mailto from Claws Mail (default) to Gmail. This is
# done by clicking on the line using the mouse, then selecting the pulldown
# menu and then selectiong, ’Use Gamil’.
#
#
B.19 Setup marco-compiz
# When you login in to your account, the 3d compiz desktop is loaded by default.
# To select the 2d desktop during your session, you may use the script,
SD.usr_SwitchMyDesktop
# which allows you to toggle between the 2d and 3d desktops, or you can set
# marco as the 2d desktop permananty by using
SD.usr_SwitchMyDesktop -d
# This command cannot be executed across remotely. To change the default desktop
# that is launched, edit the file
$HOME/.IC_DESKTOP
# uncommenting the selection of
DEF_DESKTOP
# to be marco, i.e., selecting
DEF_DESKTOP=’marco’
# and commenting out the choice of compiz, i.e, setting this as
#DEF_DESKTOP=’compiz’
# A more convenient symbolic link to the SD.usr_SwtichMyDesktop command is,
compiz_marco-switch.
# You can also use the the compiz icon on the top desktop panel to start
# or restart the 3d compiz desktop. The caja icon will also restart caja
# should there be any need.
# ..............................................................................
# To save a copy of your desktop configuration, i.e., panel layout and other
# attributes, do
dconf dump / > FILE
# where FILE is the name of any file to which you are saving the configuration.
# To load the configuation, do
dconf load / < FILE
# To save a copy of your desktop configuration for compiz, bring up
ccsm
# selecting
Preferences
# and select
Export
# to export the compiz file.
# ..............................................................................
# If the compiz Desktop is misbehaving or crashes, try using the utility,
SD.usr_FixMyDesktop
# or more conveniently the symbolic link to this command,
compiz-fixup
# The utility attempts to restart the compiz compositor, using
B APPENDIX B: USER TWEAKS 65
nohup compiz --replace &
B.20 Setup octave
# The program octave no longer supports the gui
qtoctave
# however a gui is accessible if the use calls octave with the force-gui
# option, i.e.,
octave --force-gui
# The SD script
qtoctave
# is a dummy call that launches octave with the --force-gui option kept for
# compatibility. The
$HOME/.IC_PANEL
# contains these changes, however you may want to transition any other scripts
# you have containig a call to qtoctave to octave --force-gui.
B.21 Setup procmailrc
# The procmailrc file should start with:
#
#
#########################################################################
LOGFILE=$HOME/procmail_log
LOGABSTRACT=yes
VERBOSE=yes
#########################################################################
# spam filter
#########################################################################
:0fw
* < 256000
| /usr/bin/spamc
:0:
* ^X-Spam-Status: Yes
$HOME/spam
#:0:
#* ^X-Spam-Flag: YES
#$HOME/spam
#########################################################################
# end of spam filter
#########################################################################
#
# To test if a procmail forward is working, for example a forwarded message
# to janeunser at gmail.com, who is being sent a message from southernelectric,
# using the procmail forward,
#
:0Hc
* ^From.*@email.southernelectric.com
!janeuser@gmail.com
# Find the message from southern electric, e.g., the one in
$HOME/local/Mail/maildump/msg.Pgn0
# and use the command,
B APPENDIX B: USER TWEAKS 66
cat $HOME/local/Mail/maildump/msg.Pgn0 | formail -s procmail
# to send it through procmail. If the message is sent, you can verify it
# on gamil, however you can also examine the postfix queue using
sudo postqueue -p
# To find out if it has been sent or is in the queue with a status that
# prevents it from being sent.
B.22 Setup screensize
# You find out about your screen size and monitor, including dpi values, use
SD.usr_GetVideoInfo
# You can set the dpi for the monitor you are using by clicing on the
# mate-control panel, or in a shell using the command
mate-control-center
# Select the icon for
Appearances
# then select
Fonts | Details
# to select the screen showing the dpi setting. You can set the dpi values
# using the Details screen.
# The correct value is the dpi value of your display can be found manually
# using:
xrandr | grep -w connected
#then take the Xdots/Width_cm = dpi, and take Ydots/Height_cm = dpi, and use
#the smaller of these numbers. For example,
xrandr | grep -w connected
HDMI1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
2560/(59.7/2.54) = 108.9dpi
1440/(33.6/2.54) = 108.9dpi
# We use 109dpi. This is a typical value for a 27" QHD monitor.
# If instead we have a 32" UHD monitor, i.e., a 4K monitor,
xrandr | grep -w connected
DP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 708mm x 399mm
3840/(70.8/2.54) = 137.7dpi
2160/(39.9/2.54) = 137.5dpi
# We prefer a slightly smaller scaling of 133dpi along with a terminal size
# set in
$HOME/.Iconfrc
# to the value,
DEF_TERMINALSIZE=’802x475’
# With a 9 point Liberation Mono Regular font this fits into a terminator
# window with the usual 80 columns and 24 rows, as does the Monospace Regular 9
# font used in the mate-terminal.
B.23 Setup SD.usr-utilities
#...............................................................................
# Users can update their individual user desktop preferences using:
# Eliminates gnome screen lock on idle for user,
SD.usr_SetGnomeScreenLockOFF
# Sets special keys, e.g., caps lock, to values defined in $HOME/.zkeys,
SD.usr_SetKeys
B APPENDIX B: USER TWEAKS 67
# Set dot desktop configuration files,
SD.usr_SetDotfiles
# Update .z dot files, .Iconfrc, IC_* and .vim, .gvim .xinitrc, .xbindkeysrc,
# .Xdefaults standard,
SD.usr_UpdateDotFiles
# reset or delete gnome keyring login requirement. Note that seahorse can be
# used to configure your passwords, including those for pgp and the gnome
# keyring
SD.usr_GnomeKeyRing
# Sets the default browser. While this can be set directly using the gui,
# mate-default-applications-properties however the script allows for scripted
# changes to the setup.
SD.usr.SetDefaultBrowser
# Set the screen lock on or off remotely, i.e., it provides a means of
# remotely locking your desktop.
SD.usr_ScreenLockOnOff
#...............................................................................
# To maintain your system you can use the scripts
SD.pkg_AptConfig SD.pkg_CustomInstall SD.pkg_SearchKernel
SD.pkg_AptInstall SD.pkg_DebPkgInstall SD.pkg_SrcPkgInstall
SD.pkg_AptLogs SD.pkg_Freshen SD.pkg_Status
SD.pkg_AptLstInstall SD.pkg_KeysInstall SD.pkg_UpkgMgr
B.24 Setup selectdefaultapplications
#...............................................................................
# The default appplications can be selected using the mate-control panel
# which can be found in the main menu, or invoked in a terminal using the
# command,
mate-control-center
# Selecting the ’Preferred Applications’ allows the use to configure a preferred
Web Browser
Mail Reader
Image Viewer
Multimedia Player
Video Player
Text Editor
Terminal Emulator
File Manager
Visual
Mobility
# The MATE Tweaks icon also lets users select whch icons will appear on the
# Desktop, the appearand of windows (including the default desktop manager),
# and the interface.
# These setting can also be set in several configuration files in the
# users home directory, or can be set using commands. These include:
select-editor
select-default-ispell
# Systemwide configuration of the symbolic links in /etc/alternatives
# can be done by the system administrator using the command
update-alternatives
# This is discussed in detail in
./sys+user_configs/system_configs/README_alternatives
#...............................................................................
# The keyboard key mappings are explained using the ’keyboard’ icon on the
# bottom panel of the Desktop. Alternatively, a text copy of this file
# can be inoked using the command,
fastpaths
B APPENDIX B: USER TWEAKS 68
# The keyboard shortcuts are set by compiz and must be edited in compiz-fusion,
# however the keybord shortcuts controlled by xbindkey are set in your
$HOME/.xbindkeysrc file.
#...............................................................................
# To open any file in a shell, use the command,
o FILE
# i.e., the o command is an alias to xdg-open. If no argument is given, the
# command opens up the caja file browser.
# The setup of the directories such as
$HOME/Desktop
$HOME/documents
# is in
$HOME/.config/user-disrs.dirs
# Since
xdg-user-dirs
# will source the local configuration file to point to the appropriate user
# directories, it is therefore possible to specify custom folders. For example,
# if a custom folder for the
XDG_DOWNLOAD_DIR
# variable has named
$HOME/Internet
# in
~/.config/user-dirs.dirs
# any application that uses this variable will use this directory.
# Setting the directory
$HOME/Templates
# so that it is accessible by caja or nautilus is done by editing the file
$HOME/.config/user-dirs.dirs
# so that it contain the directory listing
XDG_TEMPLATES_DIR=$HOME/Templates
# The file
$HOME/.local/share/applications/mimeapps.list
# determines how filetypes are opened and by which application.
# Please note that claws-mails uses
/etc/mailcap
# or
$HOME/.mailcap to configure
# file opening actions. Try adding the file
$HOME/.mailcap
# with the contents:
ext/x-tex; gvim ’%s’
image/jpeg; eog ’%s’
application/pdf; atril ’%s’
application/msword; libreoffice ’%s’
application/vnd.ms-excel; libreoffice ’%s’
application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice ’%s’
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice ’%s’
application/vnd.ms-powerpoint; libreoffice %s
text/csv; libreoffice ’%s’
image/pdf; atril ’%s’
#...............................................................................
# To open up the compiled list of user commands along with help on these, use
commandnotes
B APPENDIX B: USER TWEAKS 69
#To open up the compiled list of SD system install instructions, use
installnotes
#...............................................................................
B.25 Setup solaar
# The version of solaar that is installed is from the git ppa (review the
# dtails in ./sys_user_configs/system_configs/README_solaar).
# It does not launch itself onto the system tray when invoked using
solaar
# To use solaar, if you have a Logitech unifying receiver associated with
# say a mouse and one with a keyboard, each running from their own unifying
# receiver and you wish to consolidate these, then start solaar in a shell,
# and remove one of the unifying receivers, say the one associated with the
# keyboard (since you will need the mouse to work the solaar gui). Then
# wait for solaar to find the receiver and the mouse. Click the button marked
Pair
# and follow the instructions to turn the other device, i.e., the keyboard
# on and then off. It should then find it and pair the keyboard with the
# mouse’s unifying receiver.
# The command line version,
solaar show
# provides a detailed review of the attributes of the usb plug in devices
# attached through Logitech unifying or nano recievers.
B.26 Setup sound
# Use the system utility
pavucontrol
# to manually adjust sound setting. In addition, it is important to verify
# that the volume settings are correct in
mate-volume-control
# as the two utilities may conflict for some applications.
# Use the SD script,
SD.usr_SetPulseAudio
# or call it by its alternative name,
paset
# to configure and save your sound settings which can be saved in the file
$HOME/.IC_PULSE
# The paset command runs
pacmd list-sinks | grep ’name:’
pacmd list-sources | grep ’name:’
# Most of the time this will correctly configure your source (microphone)
# and sink (speaker) settings.
# Other utilities for user access to the sound configuration are,
pulsemixer
# and
alsamixer
# If there are difficulties with the sound, it may requre root access to
# configure. Please review the documents in
./sys_user_configs/system_tweaks/README_pulseaudio
B APPENDIX B: USER TWEAKS 70
B.27 Setup sshforward
# In order for the top title bar to change when logging into a different
# host, the X11 Forwarding needes to be turned on on the server side and on
# the client side. This is the usual default on the server side as set in the
/etc/ssh/sshd_config
# file which contains the line
X11Forwarding yes
# however in the client side file,
/etc/ssh/ssh_config
# we typically have these hashed out, i.e., showing in the file as,
# ForwardX11 no
# ForwardX11Trusted yes
# This can be turned on using
ForwardX11 yes
# however this requires system root access. To do this as a user, you can
# either log in remotely using the -X option on ssh, i.e, to log into HOST, do
ssh -X HOST
# or you can set up forwarding in you .ssh/config file, by adding the line
Host *
ForwardX11 yes
# Note that you can turn it off for individual hosts using the command
ssh -x HOST
# given you full control of X11-Forwarding.
B.28 Setup sudo
# Before Ubuntu 19.10, sudo preserved $HOME by default. All future updates
# to sudo won’t change that. For example, 18.04 LTS will always have the
# old behavior, even in future point releases, however in u20.04, the
# behavior has changed. Using sudo now sets the home directory to /root.
# While there are several ways around this, the best solution if this is
# desired is to define an alias in your file,
$HOME/.zlocal
# that is called last in the sequence of .z* files if you are using the
# SD desktop. This alias is given by,
alias sudo="sudo --preserve-env=HOME"
# Then when sudo is invoked, root still preserves the value of $HOME to be
# /home/YOURUSER, instead of switchit it to /root. This is important if
# root is running any scripts in which you define $HOME exepecting it to
# point to your home directory.
#
# This is discussed in
https://askubuntu.com/questions/1186999/how-does-sudo-handle-home-differently-since-19-10
B.29 Setup synapse
# To start synapse, in a shell do,
synapse
# To modify the configuration of synapse, bring up synapse, this can always
# be done from within a shell using the command,
synapse
# then find an click on the button in the upper right corner and select
Preferences | General Essential
# The usual way to bring up synapse from the keyboard is to type,
CNTL-SPACE-SPACE
# Synapse uses zeitgeist to collect information about your deskto usage.
# It’s convenience lies in it’s ability to bring up files that you have
B APPENDIX B: USER TWEAKS 71
# recently viewed anywhere on your system. It very similar to fasd, however
# synapse runs through a graphical interface that some may find more convenient.
B.30 Setup usb-automount
# To get automounting of a usb drive to work, we needed to change the permission
# of the /media folder that is opened when $USER inserts a usb drive:
/media/$USER
# The error is that the folder cannot be opened. To get automounting to work
# change the ownership of the files from root to your user, i.e., do,
cd /media
chown -R $USER.users $USER
B.31 Setup video
# Errors on waking from sleep mode.
#
# If a monitor cannot wake up after blanking out, try doing:
CNTL-ALT-F1 then CNTL-ALT-F7
# Turning the monitor off, then on again
# If the monitor wakes up again, you may want to turn of the energy saving
# mode to prevent the monitor from blanking out and then not being able to
# wake up. The blanking is not due screensaver, which is turned off in SD,
# It is due to the the energy saving mode in X and this can be set using the
# old xset commands, i.e., just type
xset -dpms
# to disable Energy Star features. Then set the screensaver using the default
# blank black screen to turn the monitor off after 10 minutes instead.
# This will prevent monitor burn-in, and the monitor will wake when the keyboard
# is pressed or the mouse moved.
# To configure xset to the standard configuration,
xset fp default
xset rehash
# To configure xset to add standard unix server to font path,
xset fp+ unix/:7100
xset rehash
# To configure xset to add $PATH_TO_FONT to path,
xset fp+ /PATH_TO_FONT
xset fp rehash
# To configure xset to add remote font server on myhost.edu,
xset +fp tcp/myhost.edu:7100
xset fp rehash
# To keep the monitor awake during video call sessions or other activities
# where the keyboard and mouse are not touched but the monitor still needs
# to be working, you can of course manually turn of the monitor sleep
# and the screensaver, however it is less effort to invoke
automouse
# which toogles on or off at each invokation. When it is first called it
# turns on, when it is called again it turns off. The purpose of automouse
# is to move the mouse a pixed up and then down every few seconds to keep
# the monitor from going to sleep. If you are using the SD desktop, you
# can use the keys,
<CNTL><ALT>M
# To toggle automouse on and off each time you use those keys. This is set
# in your file,
$HOME/.xbindkeysrc
B APPENDIX B: USER TWEAKS 72
# To bind kesys, use
xbindkeys-config
xbindkeys
xbindkeys_show
# To examine keyboard events, you can use:
xev
# Other useful X utilities incude,
xrdb
xmodmap
#...............................................................................
# To test and verify 3d rendering, use these
glxdemo
glxgears
glxheads
glxinfo
# To inquire about frame buffering, do
fbset -s
# To set the frame buffer to 1024x768 with 24 bpp, do,
fbset -g 1024 768 1024 768 24
B.32 Setup vim-addons
# Suggested vim-addons include:
vim-addons install colors-sampler-pack
vim-addons install calendar
vim-addons install latex-suite
# Use as:
# For colors-sample-pack, the color choices are in $HOME/.vim/colors. Use as
:color spring
# For calendar, use as
:calendar
# For latex-suite, link to
http://vim-latex.sourceforge.net/documentation/latex-suite-quickstart/
# These have been included in the SD version of $HOME/.vim/colors if a user
# is using the SD desktop.
#
# The standard SD version of the vim configuration files is loaded in when
# your desktop is installed with the command,
SD.adm_Adduser
# or when it is updated or modified using the command,
SD.adm_SetMateDesktop
# This includes the following files,
$HOME/.vimrc
$HOME/.vim
$HOME/.gvimrc
# These files can also be pulled from
/usr/local/defaults/dotfiles
# which contains the ’undotted’ version of each hidden file, i.e., theses
# files are visible to the user. You can copy these using a command such as
cp /usr/local/defaults/dotfiles/vimrc $HOME/.vimrc
# or for a directory,
l2l /usr/local/defaults/dotfiles/vimrc $HOME/vim $HOME/.vim
# where l2l is the SD front end to rsync.
B APPENDIX B: USER TWEAKS 73
#...............................................................................
# In particular, the .vim directory has been updated to include all of the
# amsmath plugins in
$HOME/.vim/after/syntax/amsmath.vim
$HOME/.vim/after/syntax/array.vim
# These were obtained from,
http://www.drchip.org/astronaut/vim/index.html#LATEXPKGS
# To extract a vimbarll archive that has been downloaded from this source,
#open up the file in vim, .e.g.,
vim amsmath.vba
# and type,
:source %
# the vim editor then responsds with
amsmath.vba [vim] unix 1/185(0%)
Vimball Archive
extracted <after/syntax/tex/amsmath.vim>: 180 lines
wrote /phoebe/kolibal/.vim/after/syntax/tex/amsmath.vim
Press ENTER or type command to continue
#...............................................................................
# Local editing with vim.
#
# The SD version of
$HOME/.vimrc
# that is installed contains an option for allowing the sourcing of a local
.vimrc
# file. This is turned off. To enable it, go to the bottom of the file,
# and uncomment the lines,
" set exrc
" set secure
# i.e., remove the " marks. When this is enabled, it means that vim will
# also read in a local .vimrc file and use that file for editing along with
# the other attributes that were set in $HOME/.vimrc. This can be useful with
# some files, such as configring vim for use with latex, in particular, to
# turn of parenthesis, bracket and brace matching. To generate a local .vimrc
# that has these features, use
mklocalvimrc
# that generates a local .vimrc. Make sure that the set exrc and set secure
# are uncomment in $OME/.vimrc, and you can avoid constantly having vim
# attempt to match parentheses, brackets and braces.
B.33 Setup vim-alternatives
# To change the particular version of vim and gvim that you are running, use
update-alternatives
# or the graphical front-end,
sudo galternatives
# In the graphical interface, scroll down to vim and select
/usr/bin/vim.gtk3
# For vimdiff
/usr/bin/vim.gtk3
# For gvim
B APPENDIX B: USER TWEAKS 74
/usr/bin/gvim.gtk3
B.34 Setup workarounds
# These are problems and some workarounds that seem to work.
#
hp-toolbox
# Applications do not run, coming up larger than all workspaces together with
# no ability to resize. The problem exists for both compiz and marco.
# Workaround: ssh to your host and execute the command, e.g.,
ssh -X $HOST hp-toolbox
#
vlc
# Attempting to launch the preferences tool in vlc causes diffculties with the
# window coming up large and empty. Sometimes it works, however it mostly fails
# to come up properly.
# Workaround: ssh to your host and execute the command, e.g.,
ssh -X $HOST vlc
# As an alternative to remotely logging in, you can modiry your
# $HOME/.zshenv file to contain the following,
#
# Added to avoid errors in configuring:
# Gtk-CRITICAL **: 10:47:52.924: IA__gtk_widget_style_get: assertion ’GTK_IS_WIDGET (widget)’ failed
unset GTK2_MODULES
unset GTK_IM_MODULE
unset GTK_MODULES
unset GTK_OVERLAY_SCROLLING
# Using the GTK configuration variables avoids having some applications
# such as vlc and hp-toolbox from launching so that they are too large to
# display even across several desktops.
B.35 Setup xdg
# The configuraton of special directories is done using the file
$HOME/.config/user-dirs.dirs
# The directories listed in this file are the ones that show up on yuou
# desktop.
# For example, the file typically contains:
#...............................................................................
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you’re
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
#...............................................................................
B.36 Setup zotero
# The zotero bibliography package can be installed by a root user
# using the SD script,
zotero
# To install the zotero package, you must first download it from
B APPENDIX B: USER TWEAKS 75
https://www.zotero.org/download/
# You can save the latest tar.bz2 file in the standard SD directory for
# vendor supplied software, i.e., at
/syshome/src/vendor
# so that this package would be put into
/syshome/src/vendor/zotero
# or you can set the folder where zotero is to be installed by editing
# the value of
DEB_VENDOR
# in the file
/etc/SDpkg.db
# The other option is to just install from the present working directory,
# i.e., to use,
sudo zotero -U
# The package is installed in
/usr/local/Zotero_linux-x86_64
# and the binary files can be accessed using the SD package
/usr/local/bin/zotero
# Once zotero has been installed, all users on the system have access to it.
# Use
zotero -h
# To get additional help with using zotero. You should also configure
# your SD desktop configuration file,
$HOME/.IC_MYTEMPLATES
# so that the location of your zotero database is set, e.g., define
ZOTEROHOME=$HOME/content/docs/zotero
# A copy of a sample $HOME/.IC_MYTEMPLATES file is kept in
/usr/local/defaults/dotfiles/IC_MYTEMPLATES
# Note that if you are installing on a new computer, or have created a
# new account, you should remember to copy over your
$HOME/.zotero
# directory from the old computer or archive where you have saved it.
# This directory contains all of your information about your files that you
# have archived in zotero.
C APPENDIX C: SYSTEM CONFIGS 76
C Appendix C: System configs
This appendix contains a list of configuration changes that can be made to system utilities such as apache2 and
postfix, along with some other system utilities that are typically encountered in configuring a new setup. Make these
changes if any of the recommended actions are worthwhile in order to customize your desktop.
The contents of Appendix C are dynamically generated using ./documents/make_alldocs -d based on the
information contained in SD directory ./sys+user_configs/package_configs using the README.* files. The
contents of these files can also be accessed using the command, tweaks which is a link to the SD utility,
SD.pkg_SuggestedTweaks.
C.1 Setup
# ------------------------------------------------------------------------------
# These changes need to be typically run as root, i.e., most of these
# command need to be executed with sudo. Please review these carefully.
# These are different from the system tweaks in that they are intended to
# provide some basic instructions to configure some standard packages
# that you may wish to isntall such as:
# apache - for web servicee
# postfix - for mail service
# smtp - for outgoing gmail smtp
# mathjax - for math fonts
#
#
#
#
#
C.2 Setup apache2
# Apache2 setup
#
# The configuraton of apache2 is done using
/etc/apache2/sites-available/000-default.conf
# The 000-default.conf is a symlink to files in
/etc/apache2/sites-available
# To enable or disable a site hosted with Apache, you can use the ’a2ensite’
# and ’a2dissite’ commands, respectively. Both commands use the same syntax:
a2ensite <site>
a2dissite <site>
# where ’<site>’ is the name of your site’s Virtual Host configuration file,
# located in
/etc/apache2/sites-available/
# minus the ’.conf’ extension. For example, if your site’s Virtual Host
# configuration file is called ’example.com.conf’, then the command to enable
# the site is,
a2ensite example.com
# and the command to disable the site is,
a2dissite example.com
# The document root is set at
/var/www/
# or at,
/var/www/html
# Start apache2 using
/etc/init.d/apache2 restart
# or, alternatively, use
systemctl restart apache2
service apache2 restart
C APPENDIX C: SYSTEM CONFIGS 77
# The apache restart files are,
apache2ctl -t
apache2ctl restart
# The script apach2tcl is used to force apache2 to re-initialize its
# configuration files.
#..............................................................................
# Apache cgi access
# The file
./bin/cgi-apacheconf
# configures apache2 so that cgi scripts can be run by seting up the
# needed modules that have to be enabled.
# The script is from: # From http://ubuntuforums.org/showthread.php?t=2258746
# and the commands to run are:
sudo a2dismod mpm_event
sudo a2enmod mpm_prefork
sudo a2enmod cgi
sudo service apache2 restart
# Additional information on modifying apache2 headers is at
# https://serverfault.com/questions/214054/how-to-install-mod-headers
#..............................................................................
# Apache2 caching
# To modify the caching add, a file .htaccess to the root of the public_html,
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType appliation/pdf "access plus 10 seconds"
ExpiresByType image/gif "access plus 120 minutes"
ExpiresByType image/jpeg "access plus 120 minutes"
ExpiresByType image/png "access plus 120 minutes"
ExpiresByType text/css "access plus 60 minutes"
ExpiresByType text/javascript "access plus 60 minutes"
ExpiresByType application/x-javascript "access plus 60 minutes"
ExpiresByType text/xml "access plus 60 minutes"
</IfModule>
# From:
# https://www.howtoforge.com/make-browsers-cache-static-files-with-mod_expires-on-apache2-debian-squeeze
# The value of
mod_expires
# can be enabled as follows:
sudo a2enmod expires
# Then restart Apache afterwards:
/etc/init.d/apache2 restart
C.3 Setup apache2-mathjax
#MathJax is typicall installed at
/var/www/MathJax
# In addition, to allow server access to this copy of MathJax, we have put the
# file
/var/www//MathJax/fonts/HTML-CSS/TeX/otf/.htaccess
# Containing:
#........................................................................
<FilesMatch "\.(ttf|otf|eot)$">
C APPENDIX C: SYSTEM CONFIGS 78
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
#........................................................................
# To link to the fonts, use the following javascript in your html code
# in the header section:
#........................................................................
<script type="text/javascript" src="http://www.math.usm.edu/MathJax/MathJax.js">
MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {
inlineMath: [[’$’,’$’],["\\(","\\)"]],
processEscapes: true,
},
});
</script>
#........................................................................
C.4 Setup apache2-passwords
#...............................................................................
# Apache2 password
# Online documentation: http://httpd.apache.org/docs/2.4/howto/auth.html
#
# Note configurating passwords for a users with document root set at
/var/www/html
# and with symbolic link such as for the folder, department,
/var/www/html/janedoe/department/.htpasswd
# The file /var/www/html/kolibal/department/.htaccess contains:
#......................................................... SAMPLE FILE
AuthUserFile /var/www/html/janedoe/department/.htpasswd
AuthName "Authorization Required"
AuthType Basic
require valid-user
#......................................................... SAMPLE FILE
#
# and the password is added using the command,
htpasswd -c /var/www/html/janedoe/department/.htpasswd department
# where the username in this example is,
department
# This creates the file
/var/www/html/kolibal/department/.htpasswd
# For this to work requires that the following be added to the appropriated
# conf file # in /etc/apache2/sites-available. For example for the file
000.default.conf
# in
/etc/apache2/sites-available/000-default.conf
# These additional instructions must be added:
#.........................................................
<Directory /var/www/html/kolibal/department>
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
allow from all
</Directory>
#.........................................................
#
C APPENDIX C: SYSTEM CONFIGS 79
#
# then do,
apache2ctl -t
apache2ctl restart
/etc/init.d/apache2 reload
# To reload configuration files:
/etc/init.d/apache2 reload
C.5 Setup apache-cache
#..............................................................................
# Apache2 caching
# To modify the caching add, a file .htaccess to the root of the public_html,
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType appliation/pdf "access plus 10 seconds"
ExpiresByType image/gif "access plus 120 minutes"
ExpiresByType image/jpeg "access plus 120 minutes"
ExpiresByType image/png "access plus 120 minutes"
ExpiresByType text/css "access plus 60 minutes"
ExpiresByType text/javascript "access plus 60 minutes"
ExpiresByType application/x-javascript "access plus 60 minutes"
ExpiresByType text/xml "access plus 60 minutes"
</IfModule>
# From:
https://www.howtoforge.com/make-browsers-cache-static-files-with-mod_expires-on-apache2-debian-squeeze
# The value of
mod_expires
# can be enabled as follows:
sudo a2enmod expires
# Then restart Apache afterwards:
/etc/init.d/apache2 restart
C.6 Setup apache-cgi
#..............................................................................
# Apache cgi access is discussed in
https://httpd.apache.org/docs/2.4/howto/cgi.html#
# Make sure that you have configured cgi handling in the
/etc/apacahe2/sites-available/000-FILE.conf
# where 000-FILE.conf is the site that will have cgi enabled. It should contain
# a sections
#
#......................................................................
ScriptAlias /cgi-bin/ /usr/local/bin/
<Directory "/usr/local/bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
#......................................................................
# Then enable the appropriate apacahe2 modules using the SD script
./bin/cgi-apacheconf
# to configure apache2 so that cgi scripts can be used.
C APPENDIX C: SYSTEM CONFIGS 80
# The script is from: # From http://ubuntuforums.org/showthread.php?t=2258746
# and the commands to run are:
sudo a2dismod mpm_event
sudo a2enmod mpm_prefork
sudo a2enmod cgi
sudo service apache2 restart
C.7 Setup apache-headers
#...............................................................................
# To modify the caching add, a file .htaccess to the root of the public_html,
# however these require that the header modules are anabled:
a2enmod headers
service apache2 restart
# From:
https://serverfault.com/questions/214054/how-to-install-mod-headers
# The value of
mod_expires
# can be enabled as follows:
sudo a2enmod expires
# Then restart Apache afterwards:
/etc/init.d/apache2 restart
C.8 Setup certificates
# If there is a need to create a fresh certificate, you can run
sudo make-ssl-cert generate-default-snakeoil --force-overwrite
# The certificate can be read using:
openssl x509 -in /etc/ssl/certs/ssl-cert-snakeoil.pem -text
# To generate a self-signed certificate install the ssl-cert package:
apt-get install ssl-cert
# alternatively, to re-install certificates, do
aptitude reinstall ssl-cert
aptitude reinstall ca-certificates
aptitude reinstall ca-certificates-java
aptitude reinstall ca-certificates-mono
# To obtain a server’s certificate and fingerprint, use:
openssl s_client -connect $SERVER:$PORT -showcerts | openssl x509 -fingerprint -noout -md5
# for example,
openssl s_client -connect smtp.office365.com:993 -showcerts | openssl x509 -fingerprint -noout -md5
openssl s_client -connect imap.gmail.com:993
# To assure that access is not blocked, consider turning off iptables
# and ufw using,
iptables -F
service iptables stop
ufw disable
# Setting default filter policy
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
# Allow unlimited traffic on loopback
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# Allow ssh on Port 22
C APPENDIX C: SYSTEM CONFIGS 81
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
# To determine which ports are open, use,
sudo nmap -sS -P0 IP_ADDRESS_OF_COMPUTER
# From http://wiki.indie-it.com/wiki/Dovecot
# https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-20.04
# https://www.cyberciti.biz/tips/postfix-smtp-ssl-certificate-csr-installation-guide.html
# https://unix.stackexchange.com/questions/110018/ftp-and-iptables-connection-fails-but-ports-are-open
C.9 Setup dns-ipv6
# To modify the domain name service (dns).
#
# From: https://linuxaria.com/pills/how-to-convince-apt-get-not-to-use-ipv6
# In transitioning from ipv4 to ipv6 networking, it is possible to configure
# the system to give precedence to ipv4 network name service. This may be
# needed if difficulties arise in fetchmail, or apt-get, hanging or giving
# socket errors. This is due to the fact that
# A call to getaddrinfo(3) might return multiple answers. According to
# RFC 3484 these answers must be sorted so that the answer with the highest
# success rate is first in the list. The RFC provides an algorithm for the
# sorting. The static rules are not always adequate, though. For this reason
# the RFC also requires that system administrators get the chance to
# dynamically change the sorting. For the glibc implementation this can be
# achieved with the /etc/gai.conf file.
# To give preference to ipv4 name searches, edit the file
/etc/gai.conf
# and uncomment the line:
precedence ::ffff:0:0/96 100
# To test, use before the change:
nslookup imap.gmail.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
imap.gmail.com canonical name = gmail-imap.l.google.com.
Name: gmail-imap.l.google.com
Address: 173.194.206.108
Name: gmail-imap.l.google.com
Address: 173.194.206.109
# After the change,
nslookup imap.gmail.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: imap.gmail.com
Address: 173.194.205.108
C.10 Setup dns-resolvconf
# To modify the domain name service (dns).
#
# The traditional means for setting up dns was to modify the file,
/etc/resolv.conf
https://www.dedunu.info/2020/05/24/ubuntu-20-04-server-change-dns-and-domain
# If you edit the file, it will revert back to its setting after a reboot.
# Instead, edit the file
C APPENDIX C: SYSTEM CONFIGS 82
/etc/systemd/resolvd.conf
# For example, you can change the blanked out entries,
#DNS=
#FallbackDNS=
#Domains=
# to have the values,
DNS=8.8.8.4
FallbackDNS=8.8.8.8
Domains=hsd1.nj.comcast.net
# where the ip address for the google name servers is:
nameserver 8.8.8.8
nameserver 8.8.8.4
# Based on
# https://www.dedunu.info/2020/05/24/ubuntu-20-04-server-change-dns-and-domain
C.11 Setup gmailsmtp
# Configuring mail relay through a gmail account is valid for a
# single user so that they are enabled to send mail using unix mail, or other
# command line utilties. This configuration is also required if you want
# to have promail forward mail to other accounts if it relies on smtp relay
# to gmail.
#
# Other options for sending mail offsite through the command line include using
swaks
# and the SD utility
swaksend
# which uses swaks.
# You also need a Fully Qualified Domain Name pointed at your server. You can
# set one up for a dynamic ip address using dyndns or freedns. In this document,
# MYFULLLDNS_HOSTNAME is used as the FQD Name.
# An exmple main.cf file is found in,
./sys+user_configs/system_configs/lib/postfix/main.cf
#...............................................................................
# Pre-congfiguration setup:
# When installing the deb package for postfix, configure it to be an internet
# site. If you need change these settings, you can do so by typing:
sudo dpkg-reconfigure postfix
# To configure smtp to gmail, install the required packages:
sudo aptitude install postfix libsasl2 ca-certificate libsasl2-modules
# Obtain a snapshot of your current configuration, using the command
# postconf -n command, e.g.,
postconf -n > mysetupof_main.cf
# Configure dovecot:
#
# In the file,
/etc/dovecot/conf.d/10-master.conf
# change the hashed out values for, Postfix smtp-auth, to:
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
C APPENDIX C: SYSTEM CONFIGS 83
# In the file
/etc/dovecot/conf.d/10-auth.conf
# change the entry for auth_mechanism, to
auth_mechanisms = plain login
# Create the password file,
/etc/postfix/sasl/sasl_passwd
# and make sure that it is owned by root, and rw by only root,
sudo chown root:root /etc/postfix/sasl/sasl_passwd
sudo chmod 0600 /etc/postfix/sasl/sasl_passwd
# This file contains:
[smtp.gmail.com]:587 USER@gmail.com:MYPASSWORD
# where myuser is the account to open up for gmail access, and MYPASSWORD is
# the password for that gmail account. You then need to create the file
/etc/postfix/sasl/sasl_passwd.db
# by using the command,
sudo postmap /etc/postfix/sasl/sasl_passwd
# Create the tls policy file,
/etc/postfix/tls_policy
# that contains the line
[smtp.gmail.com]:587 encrypt
# You then need to create the file,
/etc/postfix/sasl/tls_policy.db
# by running the command,
sudo postmap /etc/postfix/tls_policy.db
#...............................................................................
# Some baisc commands for testing if your smtp configuration is working that
# you will need after configuring postifx include
# To view unsent messages in mail, do
sudo postqueue -p
# To delete mail that is queued:
sudo postsuper -d ALL deferred
# Remove particular mail queue id on running the command,
mailq
# then do,
sudo postsuper -d mail_queue_id
# Remove ALL mails from queue
postsuper -d ALL
# You can use the command to create a mail message by mail sent to your user
echo "Test Postfix Gmail SMTP Relay" | mail -s "Postfix Gmail SMTP Relay" MyUser@gmail.com
# where MyUser@gmail.com is the email address to which the test message is being
# sent.
# During testing it is worthwhile watching the maillog using the command,
tail -f /var/mail.log
#...............................................................................
# Configure Postfix for gmail by editing the /etc/postfix/main.cf file to
# contain the lines:
#
C APPENDIX C: SYSTEM CONFIGS 84
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = loopback-only
inet_protocols = all
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/10-mail.conf -m "${EXTENSION}"
mailbox_size_limit = 0
mydestination = MYFULLDNS_HOSTNAME, HOSTNAME, localhost.localdomain, localhost
myhostname = MYFULLDNS_HOSTNAME
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_tls_note_starttls_offer = yes
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
# where MYFULLLDNS_HOSTNAME, for example is math.myuniv.edu, and HOSTNAME
# is, math. You can also set the value of #inet_interfaces = loopback-only
# to inet_interfaces = all.
#
# The value of smtpd_relay_restrictions is set to defer_unauth_destination,
# as this will allow you to determine if a mail message is sent by examining
# the queue. If it contains an unsent message, then smtp to gmail is
# not working. The queue is examined using the, postqueue -p command.
# Then restart postfix
sudo systemctl restart postfix
# which replaces the older,
sudo /etc/init.d/postfix restart
# All eamils received will now be forwarded to gmail for the single user
USER@gmail.com
# The setup is only good for a postfix server that will be serving only a single
# user. You can now use unix mail on your computer, and gmail will serve as a
# relay agent. For example, you can type
mail anyone@anyplace.com
# and the message will be sent through gmail. The difficulty is that the
# reply-to address will be rewritten with your gmail address, however this can
# be gotten around by configuring yuur gmail account to use a different address
# as its default.
C APPENDIX C: SYSTEM CONFIGS 85
# From:
http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://ubuntu-tutorials.com/2008/11/11/relaying-postfix-smtp-via-smtpgmailcom/
http://productforums.google.com/forum/#!topic/gmail/7QWAO_aunhc
C.12 Setup mail
# Configure mail so that it is managed by postfix. This also requires setting
# a mail delivery agent which is dovecot. In addition, if your server is in a
# standalone environment where there is no relay from a mail server, it is
# recommended that you configure getmail for each user to be able to fetch
# mail using an imap fetch. There are advantages to getmail over fetchmail
# including its ability to recognize previously fetched messages from your
# mailbox in you remote mail account.
# To configure postfix, us the template file in
./lib/postfix/main.cf
# which contains several configuration options. If you select gmail as a relay
# host, please examine the instructions in C.11 Setup gmailsetup. These
# instructions can also be found in your u20.04 folder in
./sys+user_configs/system_tweaks/README_gmailsmtp
# It is recommended that you verify that the mail delivery in
/etc/dovecot/conf.d/10-mail.conf
# is correctly set if you are using dovecot as your mail delivery agent
# as discussed in gmailsetup.
# The utility getmail allows a used to do an imap fetch from their mail
# provider’s site, e.g., from gmail. The configuration is done for each
# user so that to configure
getmail
# read the instructions in user_configs for getmail in Appendix B of
# these instructions under the topic getmail-procmail, or in the u20.04 foler
# in,
./sys+user_configs/user_configs/README.getmail-procmail
# A sample getmailrc file is provided for use with imap which pipes the
# delivery through procmail (needed if spamassassin is used to filter mail),
getmailrc_procmail
# and one withou the call on procmail
getmailrc
# These files, along with all other use specified dot files can be found in
# a fully installed SD configuration in,
/usr/local/sod/defaults/dotfiles
# and can be copied to your $HOME/.getmail directory.
#
# ..............................................................................
# Useful configuration options for postfix
#
# If you are the sysadmin it is useful to have messages that are sent to
# services such a lp, gdm, adm, root, and so on, forwarded to your account.
# To accomplish this, create a file, /etc/postfix/virtual containing the
# virtual address and the forwarded address (an example file is in
# ./lib/postfix/virtual), then run
postmap /etc/postfix/virtual
# to create the file /etc/postfix/virtual.db.
# ..............................................................................
# Useful commands with postfix
#
# To obtain concise postfix confiuration information
postconf -n
C APPENDIX C: SYSTEM CONFIGS 86
#
# To set the message size limit in the main.cf file.
postconf -e "message_size_limit = 26214400"
#
# To query the mail delivery agent.
postconf mailbox_command
#
# ..............................................................................
# Working with procmail and formail.The utility formail can be used with
# procmail to process commands.
# To ppocess an mbox formatted mail file (containing a collection of email
# messages) contained in a user’s mailbox, e.g., SodUser, pipe each message
# through SodUser’s procmail using,
formail -s procmail < /var/mail/SodUser
# To test a user’s procmailrc file:
procmail -m VERBOSE=yes .procmailrc < /dev/null
# ..............................................................................
# Working with spamassassin using called by $HOME/.procmail in a pipe
# through /usr/lib/spamc. Make sure that the deamon spampd is running by
# having started spamassassin:
/etc/init.d/spamassassin start
#
# To test, pipe an existing spam message through the /usr/bin/spamc,
cat Mail/www-spam/36| /usr/bin/spamc
#
C.13 Setup mathjax
# This describes the install of MathJax 2.6. The newer MathJax 3.0 is
# should be viewed at
http://docs.mathjax.org/en/latest/web/hosting.html
# For the older install, the MathJax Directory is installed in
/var/www/html/MathJax
# Use the extensions:
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
# To assure that math is followed, use the file
MathJax/config/MathJax.js
# If you are using a virtual server or a remote server to which you have
# access to serve the MathJax fonts, you may need to add the file:
./MathJax/fonts/HTML-CSS/TeX/otf
# containing:
<FilesMatch ".(ttf|otf|eot)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
# Add these lines to the <head> </head> section an html file:
#...............................................................................
<!-- To allow the $math$ syntax: -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [[’$’,’$’], [’\\(’,’\\)’]]}
});
</script>
<script type="text/javascript" src="http://math.newhaven.edu/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!-- To allow the $math$ syntax -->
#...............................................................................
C APPENDIX C: SYSTEM CONFIGS 87
#
# If you are using an existing MathJax 3.0 server, add these lines to
# each web page with math fonts,
#...............................................................................
<script>
MathJax = {
tex: {
inlineMath: [[’$’, ’$’], [’\\(’, ’\\)’]]
}
};
</script>
<!-- JK FOR USING THE MathJax Server: -->
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
#...............................................................................
#
# These are different than the scripting text required to access the MathJax
# 2.6 server.
C.14 Setup postfix-virtual
# Postfix allows you to store virtual alias maps in a text file, which tell
# postfix how to route virtual email addresses to real users on the system.
# The setting and the file location is determined in the postfix configuration
# file
/etc/postfix/main.cf
# in the configuration command,
virtual_alias_maps = hash:/etc/postfix/virtual
# To create the database file, virtual.db, required by postfix from the
# virtual file, use
sudo postmap /etc/postfix/virtual
# An example file is provided in
./sys+user_configs/system_configs/lib/postfix/virtual