Setting up Dicaffeine on Xubuntu


Setting up Dicaffeine on Xubuntu

Installation

Install a copy of Xubuntu Desktop using the standard desktop setup image. I used Xubuntu 22.04.4 Desktop (xubuntu-22.04.4-desktop-amd64.iso).

Download Xubuntu here: https://xubuntu.org/download/

Install it using the included setup wizard, I chose the minimal installation to reduce bloatware.
You can enable autologin for your new user, however it is best to still manually check the lightdm config is correct as I found sometimes it was a bit unreliable with the default autologin configuration.

Configuration

Autologin

  1. Put the following in /etc/lightdm/lightdm.conf
[Seat:*]
autologin-guest=false
autologin-session=xubuntu
autologin-user=owner
autologin-user-timeout=1
  1. Add user to no password group: sudo usermod -aG nopasswdlogin owner

Disable Screensaver

  1. Open Screensaver
  2. Disable Activate screensaver when computer is idle
  3. Disable Screensaver
  4. Disable Lock Screen
  5. Open Power Manager
  6. When power button is pressed: Shut Down
  7. In the Display tab set the following:
    • Blank after: Never
    • Put to sleep after: Never
    • Switch off after: Never
  8. Then Disable Display Power Management

Hide panel

https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/785

  1. Open Panel
  2. Automatically Hide the panel Intelligently
  3. Put the following in ~/.config/gtk-3.0/gtk.css
.xfce4-panel#XfcePanelWindowHidden {
  background: rgba(0,0,0,0);
}
  1. Run xfce4-panel -r

System Information Widget

Conky is used to display various system information about the computer on a desktop widget, this is visible when Dicaffeine is not playing anything, and show's useful information such as network information and system temperatures. Depending on your install, you may want to omit this step if you do not want this shown.

conky panel

https://www.splitbrain.org/blog/2016-11/20-simple_conky_setup

  1. sudo apt install conky-all
  2. Put the following in ~/.conkyrc
conky.config = {
    use_xft = true,
    xftalpha = 0.8,
    update_interval = 1.0,
    total_run_times = 0,
    own_window = true,
    own_window_transparent = true,
    own_window_argb_visual = true,
    own_window_type = 'normal',
    own_window_class = 'conky-semi',
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    background = false,
    double_buffer = true,
    imlib_cache_size = 0,
    no_buffers = true,
    uppercase = false,
    cpu_avg_samples = 2,
    override_utf8_locale = true,
 
    -- placement
    alignment = 'top_right',
    gap_x = 40,
    gap_y = 60,
 
    -- default drawing
    draw_shades = false,
    draw_outline = false,
    draw_borders = false,
    draw_graph_borders = true,
    default_bar_width = 150, default_bar_height = 5,
    default_graph_width = 150, default_graph_height = 12,
    default_gauge_width = 20, default_gauge_height = 20,
 
    -- colors
    font = 'Liberation Mono:size=10',
    default_color = 'EEEEEE',
    color1 = 'AABBFF',
    color2 = 'FF993D',
    color3 = 'AAAAAA',
 
    -- layouting
    template0 = [[${font Liberation Sans:bold:size=11}${color2}\1 ${color3}${hr 2}${font}]],
    template1 = [[${color1}\1]],
    template2 = [[${goto 100}${color}]],
    template3 = [[${goto 180}${color}${alignr}]],
};
 
conky.text = [[
${template0 Info}
${template1 Date}                                                           ${template3}${color3}${time %a,}${color}${time %e %B %G}
${template1 Time}                                                           ${template3}${time %T}
 
${template0 System}
${template1 Hostname}                                                       ${template3}${nodename}
${template1 ${sysname}}                                                     ${template3}${kernel}-${machine}
${template1 Uptime}                                                         ${template3}${uptime_short}
${template1 CPU}                                                            ${template3}${freq_g}GHz
${template1 CPU\ Temperature}                                               ${template3}${acpitemp}°C
${template1 HDD\ Temperature}                                               ${template3}${hddtemp /dev/sda}°C
 
${template0 Processors}
${template1 Load}               ${template2}${loadavg 1}                    ${template3}${loadgraph}
${template1 Core\ 1}            ${template2}${cpu cpu1}%                    ${template3}${cpubar cpu1}
${template1 Core\ 2}            ${template2}${cpu cpu2}%                    ${template3}${cpubar cpu2}
${template1 Core\ 3}            ${template2}${cpu cpu3}%                    ${template3}${cpubar cpu3}
${template1 Core\ 4}            ${template2}${cpu cpu4}%                    ${template3}${cpubar cpu4}
${template1 Top}                ${template2}${top name 1}                   ${template3}${top cpu 1}
 
${template0 Memory}
${template1 Memory}             ${template2}${memperc}% used                ${template3}${mem} / ${memmax}
                                                                            ${template3}${membar}
${template1 Top}                ${template2}${top_mem name 1}               ${template3}${top_mem mem_vsize 1}
 
${template0 Filesystem}
${template1 /}                  ${template2}${fs_free /} free               ${template3}${fs_used /} / ${fs_size /}
                                                                            ${template3}${fs_bar /}
${template1 IO\ Read}           ${template2}${diskio_read}                  ${template3}${diskiograph_read}
${template1 IO\ Write}          ${template2}$diskio_write                   ${template3}$diskiograph_write
${template1 Top}                ${template2}${top_io name 1}                ${template3}${top_io io_perc 1}%
 
${template0 Networking}
${if_existing /proc/net/route wlan0}\
${template1 IP}                                                             ${template3}${addr wlan0}
${template1 AP}                                                             ${template3}${wireless_essid wlan0}
${template1 Signal}             ${template2}${wireless_link_qual_perc wlan0} ${template3}${wireless_link_bar wlan0}
${template1 Download}           ${template2}${downspeed wlan0}              ${template3}${downspeedgraph wlan0}
${template1 Upload}             ${template2}${upspeed wlan0}                ${template3}${upspeedgraph wlan0}
${template1 Total Down/Up}                                                  ${template3}${totaldown wlan0}↓ / {totalup wlan0}↑
${else}${if_existing /proc/net/route eth0}\
${template1 Ip}                                                             ${template3}${addr eth0}
${template1 Download}           ${template2}${downspeed eth0}               ${template3}${downspeedgraph eth0}
${template1 Upload}             ${template2}${upspeed eth0}                 ${template3}${upspeedgraph eth0}
${template1 Total Down/Up}                                                  ${template3}${totaldown eth0}↓ / ${totalup eth0}↑
${endif}${endif}\
 
 
]];
  1. Replace eth0 and wlan0 with interface names from ip a
  2. mkdir ~/.config/autostart
  3. Put the following in ~/.config/autostart/conky.desktop
[Desktop Entry]
Categories=System;Monitor;
Exec=conky --daemonize --pause=1
Icon=conky-logomark-violet
Name=conky
StartupNotify=false
Terminal=false
Type=Application
  1. Open Session and Startup
  2. Confirm conky is there

Dicaffeine

Follow the installation steps at https://dicaffeine.com/ubuntu

Conclusion

Most of the setup time was spent configuring xubuntu's screensaver settings and setting up the system information widget. It would be nice to make an ansible script or something to automate this process at some point.

You may also want to go into the bios to configure power settings, such as configuring it to Turn On after AC Power Loss (so you don't have to press the power button).

Most USB HDMI Capture dongles should work out of the box, however, depending on what you have you may need to install drivers. I managed to get a cheap 4k30 USB3.0 capture dongle working from aliexpress, however after an hour or so it does freeze until the transmit stream is restarted. I also tested with an Elgato Cam Link 4k, which worked perfectly out of the box with no freezing.