Configuration Xbmcbuntu: Difference between revisions

From miki
Jump to navigation Jump to search
(Created page with '== Linux == * Add '''noatime''' and '''data=writeback''' option to ''ext4'' partitions: # / was on /dev/sda1 during installation UUID=f81e706a-06de-4339-a9bf-2f0b0be6a243 / …')
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
;Zotac ID-42
== Linux ==
* [http://techreport.com/review/24298/zotac-zbox-id42-plus-nettop-reviewed Review on techreport.com]

== Configuration ==
=== Upgrade to U18.04 ===
* Netbooting with [[Ubuntu|Ubuntu Bionic Beaver 18.04 LTS]].
* Enable ''automatic security update installation''.
* Metapackage choice: '''Xubuntu desktop''' (lightweight, but better performance/modernity than Lubuntu [http://www.linuxandubuntu.com/home/lubuntu-vs-xubuntu]).

=== General ===
* Add '''noatime''' and '''data=writeback''' option to ''ext4'' partitions:
* Add '''noatime''' and '''data=writeback''' option to ''ext4'' partitions:
# / was on /dev/sda1 during installation
# / was on /dev/sda1 during installation
Line 5: Line 14:
# /home was on /dev/sda3 during installation
# /home was on /dev/sda3 during installation
UUID=c69172c1-966b-4a4e-9252-85e572a2a974 /home ext4 noatime,data=writeback,acl 0 2
UUID=c69172c1-966b-4a4e-9252-85e572a2a974 /home ext4 noatime,data=writeback,acl 0 2
* Install {{deb|blueman}}, alternate bluetooth manager
* Share bluetooth keyboard with Windows, see [[Windows 7]]
* Configure ''xterm''. First edit {{file|~/.Xresources}}:
<source lang=text>
XTerm*foreground: rgb:00/00/00
XTerm*background: rgb:ff/ff/dd
Xterm*saveLines: 4096
xterm*faceName: DejaVu Sans Mono:size=12
xterm*VT100.geometry: 132x40
</source>
:... then '''update''' X resource database:
<source lang=bash>
xrdb ~/.Xresources
</source>
* Bluetooth keyboard has wrong layout if started after X. Add a {{file|.desktop}} file on desktop to fix that manually ({{file|~/Desktop/kbdbe.desktop}}):
<pre>
[Desktop Entry]
Version=1.0
Name=Set Belgian Keyboard
GenericName=Utility
Comment=Set your layout to 'be'
Exec=/usr/bin/setxkbmap be
Icon=keyboard
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;

Actions=Fullscreen;Standalone;

[Desktop Action Fullscreen]
Name=Open in fullscreen
Exec=/usr/bin/setxkbmap be
OnlyShowIn=Unity;

[Desktop Action Standalone]
Name=Open in standalone mode
Exec=/usr/bin/setxkbmap be
OnlyShowIn=Unity;
</pre>

=== Fix small fonts ===
Edit {{/etc/X11/xorg.conf}}, and add the line <code>Option "DPI" "120x120"</code>. For instance:
<source lang=bash>
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
Option "DPI" "120x120"
EndSection
</source>

=== Upgrade to Trusty ===
Done by running twice the following commands:
<source lang=bash>
sudo apt-get update
sudo apt-get install update-manager-core
sudo do-release-upgrade
</source>

Had several issues:
* I had to edit {{/etc/fstab}} because the swap partition uuid changed.
* lightdm was broken. Fix it with:
<source lang=bash>
sudo apt-get purge lightdm && sudo apt-get install lightdm
</source>
Then edit {{file|/etc/lightdm/lightdm.conf}}, and change the line [http://forum.kodi.tv/showthread.php?tid=202142]:
<source lang=diff>
-greeter-session=
+greeter-session=lightdm-gtk-greeter
</source>

* Must restore auto-login, {{file|/etc/lightdm/lightdm.conf}} must contain the 3 lines:
<source lang=diff>
autologin-user=xbmc
autologin-user-timeout=0
pam-service=lightdm-autologin
</source>

* Restore the {{file|xorg.conf}} file (in particular for the dpi setting), which I restore with ''etckeeper''. Current content of {{file|/etc/X11/xorg.conf}}:
<pre>
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 304.43 (buildmeister@swio-display-x86-rhel47-02.nvidia.com) Sun Aug 19 21:28:54 PDT 2012

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Keyboard0" "CoreKeyboard"
# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
# # generated from default
# Identifier "Mouse0"
# Driver "mouse"
# Option "Protocol" "auto"
# Option "Device" "/dev/psaux"
# Option "Emulate3Buttons" "no"
# Option "ZAxisMapping" "4 5"
#EndSection

# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
# # generated from default
# Identifier "Keyboard0"
# Driver "kbd"
# Option "XkbLayout" "be"
#EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
Option "DPI" "120x120"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection

Section "Screen"
Option "HWCursor" "Off"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "True"
Option "DynamicTwinView" "False"
Option "FlatPanelProperties" "Scaling = Native"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Section "Extensions"
Option "Composite" "Disable"
EndSection
</pre>

=== Desktop environment ===
If using ''openbox'', install {{deb|menu}} package to add some menu entries (right-click).

Currently I run {{deb|lxde}}.
<source lang=bash>
sudo apt-get install lxde
</source>

=== XBMC / Kodi ===
To install / upgrade xbmc:
<source lang=bash>
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install --install-suggests kodi
sudo apt-get autoremove --purge
</source>

Latest revision as of 10:53, 13 April 2019

Zotac ID-42

Configuration

Upgrade to U18.04

  • Netbooting with Ubuntu Bionic Beaver 18.04 LTS.
  • Enable automatic security update installation.
  • Metapackage choice: Xubuntu desktop (lightweight, but better performance/modernity than Lubuntu [1]).

General

  • Add noatime and data=writeback option to ext4 partitions:
# / was on /dev/sda1 during installation
UUID=f81e706a-06de-4339-a9bf-2f0b0be6a243 /               ext4    errors=remount-ro,noatime,acl 0       1
# /home was on /dev/sda3 during installation
UUID=c69172c1-966b-4a4e-9252-85e572a2a974 /home           ext4    noatime,data=writeback,acl   0   2
  • Install blueman, alternate bluetooth manager
  • Share bluetooth keyboard with Windows, see Windows 7
  • Configure xterm. First edit ~/.Xresources:
XTerm*foreground: rgb:00/00/00
XTerm*background: rgb:ff/ff/dd
Xterm*saveLines: 4096
xterm*faceName: DejaVu Sans Mono:size=12
xterm*VT100.geometry: 132x40
... then update X resource database:
xrdb ~/.Xresources
  • Bluetooth keyboard has wrong layout if started after X. Add a .desktop file on desktop to fix that manually (~/Desktop/kbdbe.desktop):
[Desktop Entry]
Version=1.0
Name=Set Belgian Keyboard
GenericName=Utility
Comment=Set your layout to 'be'
Exec=/usr/bin/setxkbmap be
Icon=keyboard
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;

Actions=Fullscreen;Standalone;

[Desktop Action Fullscreen]
Name=Open in fullscreen
Exec=/usr/bin/setxkbmap be
OnlyShowIn=Unity;

[Desktop Action Standalone]
Name=Open in standalone mode
Exec=/usr/bin/setxkbmap be
OnlyShowIn=Unity;

Fix small fonts

Edit Template:/etc/X11/xorg.conf, and add the line Option "DPI" "120x120". For instance:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
    Option         "DPI" "120x120"
EndSection

Upgrade to Trusty

Done by running twice the following commands:

sudo apt-get update
sudo apt-get install update-manager-core
sudo do-release-upgrade

Had several issues:

  • I had to edit Template:/etc/fstab because the swap partition uuid changed.
  • lightdm was broken. Fix it with:
sudo apt-get purge lightdm && sudo apt-get install lightdm

Then edit /etc/lightdm/lightdm.conf, and change the line [2]:

-greeter-session=
+greeter-session=lightdm-gtk-greeter
  • Must restore auto-login, /etc/lightdm/lightdm.conf must contain the 3 lines:
autologin-user=xbmc
autologin-user-timeout=0
pam-service=lightdm-autologin
  • Restore the xorg.conf file (in particular for the dpi setting), which I restore with etckeeper. Current content of /etc/X11/xorg.conf:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 304.43  (buildmeister@swio-display-x86-rhel47-02.nvidia.com)  Sun Aug 19 21:28:54 PDT 2012

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#    InputDevice    "Keyboard0" "CoreKeyboard"
# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
#    # generated from default
#    Identifier     "Mouse0"
#    Driver         "mouse"
#    Option         "Protocol" "auto"
#    Option         "Device" "/dev/psaux"
#    Option         "Emulate3Buttons" "no"
#    Option         "ZAxisMapping" "4 5"
#EndSection

# commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
#    # generated from default
#    Identifier     "Keyboard0"
#    Driver         "kbd"
#    Option         "XkbLayout" "be"
#EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
    Option         "DPI" "120x120"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Option      "HWCursor" "Off"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    Option         "DynamicTwinView" "False"
    Option         "FlatPanelProperties" "Scaling = Native"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Disable"
EndSection

Desktop environment

If using openbox, install menu package to add some menu entries (right-click).

Currently I run lxde.

sudo apt-get install lxde

XBMC / Kodi

To install / upgrade xbmc:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install --install-suggests kodi
sudo apt-get autoremove --purge