Desktop Application Notes
Quick notes about software packages and desktop settings.
Maintain monitor layout when waking from sleep
When using multiple monitors and they go into power-saving mode, sometimes the desktop manager will change from side-by-side to mirrored layout or some other change that is undesired. My guess is that this happens because one monitor powers-down before the other. In any case, here is a way I found to maintain the layout (from here) and modified for use with Endeavour (Arch) Linux using XFCE.
- Show/Hide
-
Find out the name of the monitors and your DISPLAY variable:
$ echo $DISPLAY :0.0 $ xrandr|grep ' connected'|awk '{print $1}' HDMI-1 HDMI-2
Create the following script named
/usr/local/sbin/wake-monitor
. Replace values on highlighted lines with the ones you got in the above step.#!/bin/bash export DISPLAY=:0.0 if [[ $1 =~ resume|thaw|post ]] then xrandr --output HDMI-2 --primary --auto --right-of HDMI-1 # sleep 3s in case the monitor is not powered-up until getting the first (above) command. sleep 3 xrandr --output HDMI-2 --primary --auto --right-of HDMI-1 fi
Create
/etc/systemd/system/wake-monitor.service
:[Unit] Description=Correct monitor configuration upon wake from sleep and also when entering a display manager After=sleep.target display-manager.service StopWhenUnneeded=yes [Service] User=ab Type=oneshot RemainAfterExit=no ExecStart=/usr/local/sbin/wake-monitor resume [Install] WantedBy=sleep.target display-manager.service
Test the script by running it.
/usr/local/sbin/wake-monitor resume
Nothing should change. If the monitors change to an undesired layout, adjust thexrandr
parameters until it works as expected.Enable the service.
sudo systemctl daemon-reload sudo systemctl enable wake-monitor.service
Test it by putting the computer to sleep and then waking it up again.
Replace dhcpcd with dhclient
I have noticed that dhcpcd will misbehave in situations where dhclient does not. On a Raspberry Pi 3, for example, dhcpcd will take down the Ethernet port (i.e., it loses the IP address), even though ps
shows that it is still running.
- Show/Hide
-
Here are the steps to replace dhcpcd with dhclient on a systemd Linux, such as Raspberry Pi:
- Open a local terminal that does not rely on SSH
- Stop dhcpcd.
systemctl disable --now dhcpcd
- Create a systemd unit file for dhclient, e.g.:
[Unit] Description=dhclient on eth0 Wants=network.target Before=network.target [Service] Type=forking PIDFile=/run/dhclient.pid ExecStart=/sbin/dhclient -4 eth0 ExecStop=/sbin/dhclient -x [Install] WantedBy=multi-user.target
- Install and start the new service.
systemctl enable --now dhclient
Thunderbird double-click text selection of IP addresses
Unlike Evolution, by default Thunderbird will stop at a period/dot/full-stop when you try to double-click an IP address. To make it behave like Evolution:
- Show/Hide
-
- Edit
- Settings
- Config Editor
- Type word_select
- Double-click layout.word_select.stop_at_punctuation to set it to false.
The only drawback I find to this is that if you select a word that has a period or comma following it, you will get the punctuation selected.
XFCE displays keep waking up
If you are using XFCE and you find that your displays wake back up seconds after going to sleep, the reason may be XFCE's display auto-detection. When it detects a change in displays it pops-up a message, which then wakes the displays back up.
- Show/Hide
-
Open the Settings → Display panel and go to the Advanced tab where you will see this:
Change the Show dialogue setting in the pull-down men to say Do nothing:
Your monitors should now stay asleep.
Openshot will not import videos
If you are getting the error message “not a valid video, audio, or image file” when you try to open any kind of video try this:
- Show/Hide
-
- Go to Edit → Preferences
- Go to the Performance tab
- Set Hardware Decoder Mode to CPU No acceleration
- Restart Openshot
If that fixed it, then to regain video acceleration benefit you will need to install the appropriate video driver for your card. For me, using an Intel NUC with Intel built-in GPU, I searched for vaapi and from the search results installed intel-media-driver. On my desktop using a Radeon 580 card I installed vulkan-radeon. In both cases I was then able to set the hardware decoder to Linux VA-API.