Installing Fedora 32 on a mid-2009 Macbook Pro - Part Three, Applications

A series of posts documenting the installation of Fedora 32 onto a mid-2009 15" Macbook Pro. In three parts; Part One describes the initial installation of Fedora and necessary updates to detect the internal WiFi hardware, Part Two describes configuring the window manager i3wm, and Part Three details the installation of the applications that I use daily. As is usual with Linux installations, forewarned is forearmed. Prepare for the lack of internal WiFi capability in the base Fedora install. And, if you use the i3 Window Manager, there is additional work to allow the MacBook to return to active mode from standby when the lid is closed and subsequently re-opened.

Additional applications

  • Glances[1] looks interesting as a more detailed "htop", if a little heavy on CPU resources.

  • Midnight Commander.[2] Needs no introduction.

  • Polybar[3], as a replacement for i3status.

  • Weechat.[4] An IRC client.

  • PowerTOP.[5] When you really need each watt to count in your laptop battery. Also see here for alternatives to bloatware.[6]

  • Emacs

  • Doom Emacs

  • Latex

  • …​

Configuring Weechat (for IRCCloud)

  1. Install Weechat

    1
    
    $ sudo yum -y install weechat
    
  2. Run weechat,

  3. List the available scripts by typing /script and autoload at least autosort.py, multiline.py, highmon.py, colorize_nicks.py, and colorize_lines.py,

  4. Set some defaults,

    1
    2
    3
    
    /set irc.server_default.nicks "<nick>"
    /set irc.server_default.realname "<realname>"
    /set irc.server_default.username "<username>"
    
  5. I use IRCCloud[7], an "always on" IRC client and bouncer — requires a subscription to a paid tier. Retrieve the passwords for the IRC networks you wish to connect to.[8].

    1
    2
    3
    4
    5
    6
    
    /server add irccloud bnc.irccloud.com/6697
    /set irc.server.irccloud.ssl on
    /set irc.server.irccloud.autoconnect on
    /set irc.server.irccloud.password "bnc:xxxxx..."
    /set irc.server.irccloud.nicks "<nick>"
    /set irc.server.irccloud.username "<username>"
    
  6. I prefer a list of colorized nicks,

    1
    
    /set irc.look.color_nicks_in_nicklist on
    
  7. And a read marker that clearly indicates where I left off when returning to a channel,

    1
    2
    
    /set weechat.color.chat_read_marker "brown"
    /set weechat.look.read_marker_always_show "on"
    
  8. I’m willing to sacrifice some screen real estate to be able to read the full channel title. Some channels, for example the /script "channel", use the title bar to describe shortcuts and commands causing the title to be truncated when limited to a single line. Thankfully most channels don’t throw the kitchen sink into the title bar.

    1
    2
    
    /set weechat.bar.title.size 0
    /set weechat.bar.title.size_max 0
    
  9. If weechat disconnects, upon reconnect it will retrieve the last n lines from the Bouncer to provide some continuity.

    1
    2
    3
    4
    
    /set logger.look.backlog 999
    /set relay.color.text "default"
    /set relay.irc.backlog_max_minutes "1440"
    /set relay.irc.backlog_max_number "256"
    

Cycle through IRC channels using C-n and C-p.

Cache Git passwords

Taken from an article on Github.[9]

Enter the following in the terminal.
1
2
$ git config --global credential.helper cache
# Set git to use the credential memory cache
To change the default cache timeout.
1
2
$ git config --global credential.helper 'cache --timeout=3600'
# Set the cache to timeout after 1 hour (setting is in seconds)

H.264 Codec

Install the H.264 codec
1
sudo dnf install -y gstreamer1-libav

Connect an Additional Monitor

xrandr returns the list of available displays, and is used to configure and enable/disable displays.[10]

  • HVDS is the laptop internal display,

  • DP is the monitor connected via the Display Port.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
$ xrandr
Screen 0: minimum 8 x 8, current 3360 x 1200, maximum 8192 x 8192
LVDS-0 connected primary 1440x900+1920+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1440x900      59.90*+
DP-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    59.94    50.00    23.97    60.05    60.00    50.04
   1600x1200     60.00
   1280x1024     75.02    60.02
   1280x720      60.00    59.94    50.00
   1152x864      75.00
   1024x768      75.03    60.00
   800x600       75.00    60.32
   720x576       50.00    50.08
   720x480       59.94    60.05
   640x480       75.00    59.94    59.93
DP-1 disconnected (normal left inverted right x axis y axis)

Here, the external display on DP-0 is located physically to the left of the Macbook Pro so it makes sense that the desktop is extended in that direction. DP-0 is also made the primary display as, in this case, it is the larger monitor with a greater resolution.

1
xrandr --output DP-0 --auto --primary --left-of LVDS-0
xrandr reports that this Macbook Pro supports both DP-0 and DP-1 outputs. I think this is to support the 27-inch Mini DisplayPort Apple Cinema Display at a resolution of 2560x1440. Otherwise only one of these display ports is active.
Add this to the end of ~/.config/i3/config
1
exec --no-startup-id ~/bin/i3_monitor_reconfigure.sh
Create ~/bin/i3_monitor_reconfigure.sh
1
2
3
4
5
6
7
8
9
#!/bin/bash
intern=LVDS-0
extern=DP-0

if xrandr | grep "$extern disconnected"; then
    xrandr --output "$extern" --off --output "$intern" --auto
else
    xrandr --output "$intern" --primary --auto --output "$extern" --left-of "$intern" --auto
fi

Syncing Files

Syncthing[11] seems to work really well as a self hosted Dropbox/Google Drive alternative. It is relatively straighforward to set up and configure with a well thought-out web interface that can be reached at 127.0.0.1:8384.

Once running, Syncthing seems to discover the other machines on the network that are also running Syncthing, so sharing folders between machines is a snap.

The OSX app can be installed with two commands using homebrew. The Linux app requires some configuration - at least on i3wm.
Install Syncthing
1
$ sudo yum install -y syncthing

There are a couple ways to run Syncthing automatically. The first being to simply add it to ~/.config/i3/config, but this has the disadvantage that files are synced only when actually logged into i3wm.

Add this to the end of ~/.config/i3/config
1
exec --no-startup-id syncthing

If you tend to jump between window managers, or just want Syncthing to run on startup, then the system needs to be configured to run Syncthing on boot.[12]

Open the firewall to Syncthing using firewall-config, and remember to set this change as permanent and not only runtime.

Increase the inotify limit to get the filesystem watcher to work.[13]

  • Installation on a Raspberry Pi.[14]

  • Additional information on configuring with Systemd.[15]

  • Not sure if Rclone[16] is useful for syncing to the cloud.

Sharing Mouse and Keyboard

Barrier[17] seems to work well on both OSX and Fedora.

Barrier expects to communicate on port 24800 so remember to open this port in the firewall (firewall-config) and remember to set this change as permanent and not only runtime.

If clients cannot establish a connection to the server, and you see the following error in the server log then you have probably changed the server hostname to something other than localhost.localdomain.

1
2
3
4
5
6
[2020-09-13T15:25:19] INFO: starting server
[2020-09-13T15:25:19] INFO: config file: /tmp/Barrier.ZOdPus
[2020-09-13T15:25:19] INFO: log level: INFO
[2020-09-13T15:25:19] FATAL: unknown screen name `localhost.localdomain'
[2020-09-13T15:25:19] ERROR: process exited with error code: 1
[2020-09-13T15:25:19] INFO: detected process not running, auto restarting

This will need to be added as an Alias to the Server in the Barrier Configure Server…​ settings.

Once localhost.localdomain is added as an Alias and port 24800 is opened, clients should be able to connect.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[2020-09-13T15:25:20] INFO: starting server
[2020-09-13T15:25:20] INFO: config file: /tmp/Barrier.VyfYNu
[2020-09-13T15:25:20] INFO: log level: INFO
[2020-09-13T15:25:20] NOTE: started server (IPv4/IPv6), waiting for clients
[2020-09-13T15:25:21] INFO: OpenSSL 1.1.1g FIPS  21 Apr 2020
[2020-09-13T15:25:21] INFO: accepted secure socket
[2020-09-13T15:25:21] INFO: TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
[2020-09-13T15:25:21] NOTE: accepted client connection
[2020-09-13T15:25:23] INFO: stopping barrier desktop process
[2020-09-13T15:25:26] NOTE: stopped server
[2020-09-13T15:25:26] INFO: process exited normally

[2020-09-13T15:25:26] INFO: starting server
[2020-09-13T15:25:26] INFO: config file: /tmp/Barrier.rlCixH
[2020-09-13T15:25:26] INFO: log level: INFO
[2020-09-13T15:25:26] NOTE: started server (IPv4/IPv6), waiting for clients
[2020-09-13T15:25:31] INFO: OpenSSL 1.1.1g FIPS  21 Apr 2020
[2020-09-13T15:25:31] INFO: accepted secure socket
[2020-09-13T15:25:31] INFO: TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
[2020-09-13T15:25:31] NOTE: accepted client connection
[2020-09-13T15:25:31] NOTE: client "<<client-machine-hostname>>" has connected
[2020-09-13T15:25:34] INFO: switch from "macbook09.home" to "<<client-machine-name>>" at 1279,261
[2020-09-13T15:25:34] INFO: leaving screen

For clients, make sure the TDL, e.g. the .home in macbook09.home is also part of the client’s hostname. It seems that the barrier server requires this or clients are not allowed to connect.

LaTeX

Install LaTeX.[18]

PostgreSQL

Install PostgreSQL.[19]

Zathura PDF and Document Reader

Zathura[20] looks like a lightweight document reader.

1
sudo yum install zathura zathura-pdf-poppler zathura-ps zathura-cb zathura-djvu

Spelling

Install hunspell, or aspell with the dictionaries.

For example,
1
sudo yum install aspell aspell-en

Spotify Client

Installation instructions.[21]