Introduction
This page describes how Alexis Huxley configures his XFCE desktop environment; it is a list of points he often forgets are necessary.
Session setup
Under XFCE 4.12, I often found that ~/.dmrc got deleted or reverted to xfce4-session, which was not what I wanted. Under XFCE 4.16, I have yet to see a reoccurence of the same problem. So this section is just a placeholder in case it should reoccur.
Environment variable configuration
- How various environment variables are configured (e.g. BROWSER, EDITOR, PATH) is a personal matter. However, this is the moment in time to ensure these are set up during your X login (e.g. by ~/.xsession or a file it sources) and propogated through to non-login terminals (e.g. xfce4-terminal).
Settings Manager
This section relates directly to the settings which are configurable by the Settings Manager. The values presented here are just a reminder to myself of how I want things. Everybody else should skip this section.
- Open the Settings Manager.
- Appearance–>Style: raleigh-reloaded
- Appearance–>Icons: elementary Xfce
- halusky: Appearance–>Fonts–>Default Font: Sans Regular: 11
- halusky: Appearance–>Fonts–>Default Monospace Font: Monospace Regular: 11
- Desktop–>Background–>Style: None
- Desktop–>Background–>First Colour: Black
- Desktop–>Menus–>Desktop Menu–>Include applications menu on desktop right click: NO
- Desktop–>Menus–>Window List Menu–>Show window list menu on desktop middle click: NO
- Desktop–>Icons–>Icon Type: None
- Notifications–>General–>Appearance–>Default position: Bottom right
- Notifications–>General–>Appearance–>Disappear after: 5
- Notifications–>General–>Animations–>Fade out: NO
- Panel–>Panel 2: Remove
- Panel–>Panel 1–>Display–>General–>Lock panel: NO (using the grip, move the panel to the bottom of the screen, then …–>Lock panel: YES
- sugo, ragu, halusky, cercis & delguine: Panel–>Panel 1–>Display–>Measurements–>Row size: 30
- sugo, ragu, halusky, cercis & delguine: Panel–>Panel 1–>Appearance–>Icons–>Adjust size automatically: YES (without this the launcher’s terminal icon will be horizontally squashed)
- halusky: Panel–>Panel 1–>Items: remove all then add: Launcher; Window Buttons; Separator; Battery Monitor; Status Tray Plugin (needed for nm-applet); PulseAudio Plugin; Workspace Switcher; Clock
- cercis: Panel–>Panel 1–>Items–>Launcher–>General: add: Chess, Log Out, Screenshot, Chess, File Manager, Firefox, Geeqie, GIMP, LibreOffice, Media Player, Pidgin, Terminal, Chess, Settings
- not halusky and cercis: Panel–>Panel 1–>Items–>Launcher–>General: add: Xfce Terminal; Log Out; Screenshot; Screensaver; Chess; Audacious; Chromium Web Browser; Geeqie; GNU Image Manipulation Program; LibreOffice; Thunar File Manager; Chess; Settings Manager
- Panel–>Panel 1–>Items–>Launcher–>General–>Launcher–>Xfce Terminal: Command:
xfce4-terminal --maximize
- not cercis: Panel–>Panel 1–>Items–>Launcher–>General–>Launcher–>Screensaver: Name: Lock Screen; Command: xscreensaver-command -lock; Icon: Status Icons–>Locked
- close Launcher window
- In a terminal run:
for F in $(grep -il chess ~/.config/xfce4/panel/launcher-1/*); do echo -e "[Desktop Entry]\nName=\\ \nVersion=1.0\nExec=true\nIcon=$HOME/etc/pics-essential/transparent-1x1.png" > $F done
and then verify that the items on the launcher are grouped
- Panel–>Panel 1–>Items–>Launcher–>General–>Launcher–>Chromium Web Browser: Name: Web Browser; Command:
sensible-browser %U
; Icon: Web Browser - Panel–>Panel 1–>Items–>Launcher–>General–>Launcher–>GNU Image Manipulation Program: Name: GIMP
- Panel–>Panel 1–>Items–>Launcher–>General–>Launcher–>Thunar File Manager: Name:File Browser
- Panel–>Panel 1–>Items–>Launcher–>General–>Launcher–>Settings Manager: Name: Settings
- Panel–>Panel 1–>Items–>Window Buttons–>Appearance–>Show handle: NO
- Panel–>Panel 1–>Items–>Window Buttons–>Appearance–>Sorting order: None
- Panel–>Panel 1–>Items–>Separator–>Appearance–>Style: Transparent
- Panel–>Panel 1–>Items–>Separator–>Appearance–>Expand: YES
- halusky & delguine: Panel–>Panel 1–>Items–>Battery Monitor–>Display–>Display percentage: NO
- Panel–>Panel 1–>Items–>Clock–>Clock Options–>Format: HH:MM:SS
- Screensaver–>Display Modes–>Mode: Blank Screen Only
- Screensaver–>Display Modes–>Blank After: 3
- Screensaver–>Advanced–>Display Power Management–>Power Management Enabled: YES
- Screensaver–>Advanced–>Display Power Management–>Quick Power-off in Blank Only Mode: YES
- Screensaver–>Advanced–>Fading and Colormaps–>Fade to Black when Blanking: NO
- Window Manager–>Style–>Theme: Biz
- halusky: Window Manager–>Style–>Title Font: Sans Bold 11
- Window Manager–>Style–>Button Layout–Shade Button: Hidden
- Window Manager–>Focus–>Focus Model: Focus follows mouse
- Window Manager–>Advanced–>Window snapping–>To other windows: YES
- Window Manager–>Advanced–>Wrap workspaces when reaching the screen edge–>With a dragged window: NO
- halusky, cercis & delguine: Workspaces–>General–>Layout–>Number of workspaces: 2
- not halusky, cercis & delguine: Workspaces–>General–>Layout–>Number of workspaces: 5
- not cercis: Default Applications–>Internet–>Web Browser: Debian Sensible Browser (requires BROWSER set)
- cercis: Default Applications–>Internet–>Web Browser: Mozilla Firefox
- Default Applications–>Utilities–>Terminal Emulator: Xfce Terminal
- Sessions and Startup–>Application Autostart–>New: Name:x11vnc; Command: x11vnc -shared -forever -localhost -quiet -nopw (this is to allow connection to the desktop environment)
- cercis: Sessions and Startup–>Application Autostart–>New: Name:Pidgin; Command: pidgin
- not laptops: Sessions and Startup–>Application Autostart–>Power Management: OFF
Configuring Chromium
Sync no longer works on Chromium, so I have reverted to Firefox.
Configuring Firefox
Even on cercis this makes sense.
- Alexis only: To support per-host profiles do the following:
- save the firefox-wrapper script somewhere in your $PATH
- export BROWSER=firefox-wrapper in your dot files
- always call sensible-browser
- Create a Firefox profile as follows:
- Run
firefox -profileManager
- configure a profile named <hostname> and with profile directory ~/.firefox/<hostname>
- Be aware that ~/.firefox is not a directory normally used by Firefox.
- exit Firefox
- Run
- Run
sensible-browser
.
- From the hamburger menu, choose Settings and make the following changes:
- Sync–>Sync–>Take Your Web With You–>Sign into Sync: enter credentials
- Sync–>Sync–>Device name–>Change Device Name: <hostname>
- Sync–>Sync–>Syncing–>Change: Bookmarks; Add-ons; Settings
- General–>General–>Startup–>Always check if Firefox is your default browser: OFF (yes, that is General twice)
- General–>Files and Applications–>Downloads–>Always ask you where to save files: ON
- General–>Browsing–>Recommend extensions as you browse: OFF
- General–>Browsing–>Recommend features as you browse: OFF
- Home–>Home–>New Windows and Tabs–>Homepage and new windows: Blank page
- Home–>Home–>New Windows and Tabs–>New tabs: Blank page
- Search–>Search–>Default Search Engine: DuckDuckGo
- Search–>Search–>Search Suggestions–>Provide search suggestions: OFF
- Search–>Search–>Search Shortcuts: disable all of them
- Privacy & Security–>Browser Privacy–>Enhanced Tracking Protection: Strict
- Privacy & Security–>Browser Privacy–>Do not track: Always
- Privacy & Security–>Firefox Data Collection and Use–>Allow Firefox to send technical and interaction data to Mozilla: OFF
- Privacy & Security–>Firefox Data Collection and Use–>Allow Firefox to install and run studies: OFF
- if I want to start again (e.g. after starting Firefox for the first time in years) then delete and recreate the sync account
- From the hamburger menu, choose Add-ons and themes and install the following:
- Adblock Plus by Adblock Plus
- Foxyproxy Standard by Erik H. Jung
- Google Analytics Opt-out
- uBlock Origin by Raymond Hill
- Stylebot
- Print Friendly & PDF
- URL to QR code by Saeed
- Video DownloadHelper by mig
- Geo URI Handler by Andrew67 Software
and then adjust the settings (particular ad blacklists and proxies).
- Beware that Adblock Plus’s ‘Block social media icons tracking’ option will prevent Nextcloud’s Poll app from correctly displaying its ‘Sharing’ tab! (More info here and here.)
- Go to about:config and set:
- browser.tabs.closeWindowWithLastTab: false (this prevents closing the last tab)
- reader.
parse-on-load. enabled: false (this prevents the ‘Reader View’ button from appearing) - extensions.pocket.api: api.getpocket-disabled.com (disable Pocket)
- extensions.pocket.enabled: false (disable Pocket)
- extensions.pocket.site: getpocket-disabled.com (disable Pocket)
- toolkit.legacyUserProfileCustomizations.stylesheets: true (enable userChrome.css)
- widget.non-native-theme.scrollbar.size: 24 (widen scrollbar)
- Customise the toolbar (remove flexible space, downloads, etc).
- Initialise userChrome.css by running:
PROFILE=<profile-name> mkdir -p ~/.firefox/$PROFILE/chrome echo -e '@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");' > ~/.firefox/$PROFILE/chrome/userChrome.css
(Note the profile directory is usually under ~/.mozilla/firefox but I change that above.)
- Visit this page and look at the fonts; are they ‘blocky’? If yes then complete this sub-procedure:
- Identify the font (right click on some blocky texty; select Inspect; select Fonts; note the font name; in my case it was Helvetica)
- Solution #1 (best): add the following to /etc/fonts/local.conf:
<match target="pattern"> <test qual="any" name="family"> <string>Helvetica</string> </test> <edit name="family" mode="assign" binding="strong"> <string>Arial</string> </edit> </match>
and then log out and log in again (so that X gets restarted).
- Solution #2 (worst): go to about:preferences; then Fonts and Colours; then Advanced; disable ‘Allow pages to choose their own fonts, instead of your selections above’.
- Move the cache (? or everything) to /scratch/$USER/.
Configuring xfce4-terminal
- Press ALT-F2 and run:
xfce4-terminal
- Right-click to bring up the menu and select Preferences.
- General–>Dynamically-set title: Replaces initial title
- General–>Scrolling–>Scroll on output: NO
- General–>Scrolling–>Scrollbar is: Disabled
- General–>Scrolling–>Scrollback: 100000
- General–>Cursor–>Cursor blinks: YES
- Alexis: General–>Clipboard–>Show unsafe paste dialogue: NO
- halusky, sugo, damson: Appearance–>Font–>Font: Monospace Bold 16
- cercis: Appearance–>Font–>Font: Monospace Regular 15
- Appearance–>Opening New Windows–>Display menubar in new windows: NO
- Colours–>General–>Text colour: darkest yellow
- Advanced–>Double Click: remove ‘:’
- As a workaround for a Xfce4-terminal bug do the following:
- Run xfce4-settings-editor.
- In the left panel, choose channel ‘xsettings’.
- Click ‘Add’.
- Add a property called ‘/Gtk/CursorBlinkTimeout’ of type ‘Int’ and value ‘1999999999’ (i.e. 1 less than 2 billion).
- Click ‘Close’ and quit the program.
- Run xfce4-terminal and validate that the cursor blinks for more than 10s.
- As a workaround for is XFCE bug 10314, which is also Debian BTS#1013958, do the following:
- Edit ~/.local/share/applications/exo-launch.desktop to contain:
[Desktop Entry] Name=Exo Launcher Type=Application Icon=gtk-open Categories=Desktop; Comment=A try to force 'xfce4-terminal' to use the preferred application(s) GenericName=Exo Launcher Exec=exo-open %u MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;application/x-mimearchive; Terminal=false OnlyShowIn=XFCE;
- Edit ~/.local/share/applications/defaults.list and add:
... [Default Applications] ... x-scheme-handler/http=exo-launch.desktop; x-scheme-handler/https=exo-launch.desktop; x-scheme-handler/ftp=exo-launch.desktop;
(Also add the
[Default Applications]
header if it is not already present.) - Test.
(Credit to ‘runkharr’ for this solution!)
- Edit ~/.local/share/applications/exo-launch.desktop to contain:
GIMP
- Make the following settings changes:
- Edit–>Preferences–>Interface–>Theme: System
- Edit–>Preferences–>Interface–>Icon Theme: Legacy
- Edit–>Preferences–>Interface–>Toolbox–>Appearance–>Show GIMP logo: OFF
- Edit–>Preferences–>Interface–>Toolbox–>Appearance–>Use tool groups: OFF
- Windows–>Single-Window Mode: OFF
- Configure the contents of the toolbox window to be:
- the tools
- Layers dialog
- Tool Options dialog
- Fonts dialog
Sound
- Play a video on youtube and check that sound comes out of the speakers.
Printers
This is only for cercis.
- Ensure LPDEST is set in ~/.profile and the current environment (e.g. ENVY_5000).
- Use Firefox to verify that the printer is listed and can print.
- Run:
date | lp
Scanning
This is only for cercis.
- Check the scanner works using GIMP: File–>Create–>Xsane–>hpaio*–>…
- Click Acquire Preview.
- Ensure that a colour document gets a colour preview; if not then this can be changed in one of the windows already open.
Installing Dropbox (normal mode)
This is only to be done on delguine and cercis.
- Clean up any previous installation by running:
killall dropbox dropboxd mv ~/Dropbox ~/Dropbox.delete-soon rm -fr ~/.drop* rm <any-symlinks-you're-using-for-dropbox>
- Download the 64-bit Dropbox .deb file from here.
- Install it by running the following as root:
dpkg -i <path-to-the-deb-file-you-downloaded> apt-get -y -f install
- Run dropbox as yourself:
dropbox start
but note that it takes quite a long time to start first time (it will open a new tab in the browser to authenticate) and to synchronise.
- Remove the downloaded .deb file; you no longer need it.
- Verify that Dropbox starts at login-time.
- PCMS will complain that the Dropbox respository is not signed. Fix this by running:
rm /etc/apt/sources.list.d/dropbox.list
Skype
delguine only
- Download skype from here.
- Optionally put it in the package archive.
- Install it as follows:
apt -y install skype
Unison
This section is no longer needed but I keep it here in case I ever sync between different distros or distro versions and Unison complains about Unison version mismatches. The official Unison pages link to Norbert Preining’s pages, which lead to his OBS page.
- On Debian 10 run:
cd /tmp wget http://download.opensuse.org/repositories/home:/npreining:/debian-unison/Debian_10/amd64/unison-2.51+4.11.1_2.51.4-1~np2_amd64.deb dpkg -i --force-all *.deb cd <where-to-stash-new-unison> cp /usr/bin/unison-2.51+4.11.1 . ln -s unison-2.51+4.11.1 unison dpkg --purge unison-2.51+4.11.1
- On Debian 11 run:
cd /tmp wget http://download.opensuse.org/repositories/home:/npreining:/debian-unison/Debian_11/amd64/unison-2.51+4.11.1_2.51.4-1~np2_amd64.deb dpkg -i --force-all *.deb cd <where-to-stash-new-unison> cp /usr/bin/unison-2.51+4.11.1 . ln -s unison-2.51+4.11.1 unison dpkg --purge unison-2.51+4.11.1
Use of siteid scripts and site-specific versions of some directories
This is only for Alexis.
- To allow several systems to use identical startup files (e.g. .profile, .bashrc, etc) do the following:
- Somewhere in $PATH create a simple script that should just run
cat ~/.siteid
or display an error message if that file is not found. - Create ~/.siteid containing an suitable site name; ideally this should be a single word (e.g. ‘
home
‘, ‘work
‘, etc). - Modify the startup files to use the siteid command to tailor the environment (e.g.
SITEID=$(siteid); [ $SITEID = home ] && nexcloud &
)
- Somewhere in $PATH create a simple script that should just run
- To allow home synchronisation scripts to exclude arbitrary subdirectories:
- Create directory .site-$SITEID.
- Move to-be-excluded directories into there and symlink them (e.g.
mv ~/.cache ~/.site-home/.cache; ln -sr ~/.site-home/.cache ~
) - Note that the ~./.siteid should definitely be relocated in this manner.
- Beware that, by default, obexd does not like ~/.cache being a symlink. Use this workaround, which is taken from here:
mkdir -p ~/.config/systemd/user/obex.service.d/ { echo "[Service]" # Remove previous definition echo "ExecStart=" # ExecStart won't expand env vars so wrap in bash echo "ExecStart=/bin/bash -c 'exec /usr/libexec/bluetooth/obexd --symlinks --auto-accept --root=\"\$HOME\"'" } > ~/.config/systemd/user/obex.service.d/10-symlink.conf systemctl --user daemon-reload killall obexd systemctl --user start obex
- Home synchronisation scripts should assemble a list of exclusions based on running something like
find ~ -type d -name '.site-*' -prune -o -print
.