User Tools

Site Tools


raspberry_phoscon

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
raspberry_phoscon [2020/12/06 12:42] herwarthraspberry_phoscon [2020/12/13 09:50] (current) herwarth
Line 7: Line 7:
 Use Etcher or whatever to install the downloaded zip on a SD card. Use Etcher or whatever to install the downloaded zip on a SD card.
  
-==== Initial settings to enable remote configuration ====+==== Initial settings  ====
 Use raspi-config to set network and change password of the pi user and change the hostname: Use raspi-config to set network and change password of the pi user and change the hostname:
 <code> <code>
Line 16: Line 16:
 systemctl start ssh.service systemctl start ssh.service
 </code> </code>
 +Disable swap
 +<code>
 +dphys-swapfile swapoff
 +dphys-swapfile uninstall
 +systemctl disable dphys-swapfile
 +</code>
 +Set time
 <code - /etc/systemd/timesyncd.conf> <code - /etc/systemd/timesyncd.conf>
 [Time] [Time]
Line 26: Line 33:
 ====Install VNC server==== ====Install VNC server====
 <code> <code>
-    apt install \ +apt install \ 
-        curl \ +  curl \ 
-        kmod \ +  kmod \ 
-        libcap2-bin \ +  libcap2-bin \ 
-        libqt5core5a \ +  libqt5core5a \ 
-        libqt5gui5 \ +  libqt5gui5 \ 
-        libqt5network5 \ +  libqt5network5 \ 
-        libqt5serialport5 \ +  libqt5serialport5 \ 
-        libqt5sql5 \ +  libqt5sql5 \ 
-        libqt5websockets5 \ +  libqt5websockets5 \ 
-        libqt5widgets5 \ +  libqt5widgets5 \ 
-        lsof \ +  lsof \ 
-        sqlite3 \ +  sqlite3 \ 
-        tigervnc-standalone-server \ +  tigervnc-standalone-server \ 
-        tigervnc-common \ +  tigervnc-common \ 
-        wmii \ +  wmii \ 
-        xfonts-base \ +  xfonts-base \ 
-        xfonts-scalable+  xfonts-scalable 
 +</code> 
 +===Configure VNC=== 
 +<code - /etc/systemd/system/vncserver@:0.service> 
 +# Vncserver service file for Debian or Ubuntu with systemd 
 +
 +# 1. Copy this file to /etc/systemd/system/vncserver@:1.service 
 +# 2. Edit User= 
 +#    e.g "User=paul" 
 +# 3. Edit the vncserver parameters appropriately in the ExecStart= line! 
 +#    e.g. the -localhost option only allows connections from localhost (or via ssh tunnels) 
 +# 4. Run `systemctl daemon-reload` 
 +# 5. Run `systemctl enable vncserver@:<display>.service` 
 +
 + 
 +[Unit] 
 +Description=Remote desktop service (VNC) 
 +After=syslog.target network.target 
 + 
 +[Service] 
 +Type=forking 
 +User=pi 
 + 
 +# Clean any existing files in /tmp/.X11-unix environment 
 +ExecStartPre=/bin/sh -c '/usr/bin/tigervncserver -kill %i > /dev/null 2>&1 || :' 
 +ExecStart=/usr/bin/tigervncserver -SecurityTypes VncAuth,TLSVnc %i 
 +ExecStop=/usr/bin/tigervncserver -kill %i 
 + 
 +[Install] 
 +WantedBy=multi-user.target 
 +</code> 
 +<code - /etc/X11/Xvnc-session> 
 +
 +
 +-- vncconfig -iconic & 
 +++ vncconfig -nowin & 
 +
 +
 +</code> 
 +As user pi 
 +<code> 
 +tigervncpasswd 
 +</code> 
 +This creates a .vnc directory in the homedir of user pi with a passwd file in it. This is mandatory for the daemon to load. 
 +<code> 
 +systemctl daemon-reload 
 +systemctl start vncserver@\:0.service 
 +systemctl enable vncserver@\:0.service 
 +</code> 
 +Check with a VNC client if you can connect to the VNC server. 
 + 
 +====Install Phoscon (DeCONZ) software==== 
 +===Import key=== 
 +<code> 
 +wget -O - http://phoscon.de/apt/deconz.pub.key | \ 
 +  apt-key add - 
 +</code> 
 + 
 +===Install software=== 
 +<code> 
 +sh -c "echo 'deb http://phoscon.de/apt/deconz \ 
 +  $(lsb_release -cs) main' > \ 
 +  /etc/apt/sources.list.d/deconz.list" 
 +</code> 
 +<code> 
 +apt update 
 +apt install deconz 
 +</code> 
 +===Enable DeCONZ GUI=== 
 +<code> 
 +systemctl enable deconz-gui 
 +systemctl start deconz-gui 
 +</code> 
 +====Unattended upgrades==== 
 +I do not want to update manually. 
 +<code> 
 +apt install unattended-upgrades apt-listchanges 
 +</code> 
 +<code> 
 +cp /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/52unattended-upgrades 
 +</code> 
 +<code - /etc/apt/apt.conf.d/52unattended-upgrades> 
 +
 +
 +Unattended-Upgrade::Origins-Pattern { 
 +        // Codename based matching: 
 +        // This will follow the migration of a release through different 
 +        // archives (e.g. from testing to stable and later oldstable). 
 +        // Software will be the latest available for the named release, 
 +        // but the Debian release itself will not be automatically upgraded. 
 +        "${distro_id}:${distro_codename}"; 
 + 
 +        // Archive or Suite based matching: 
 +        // Note that this will silently match a different release after 
 +        // migration to the specified archive (e.g. testing becomes the 
 +        // new stable). 
 +//      "o=Debian,a=stable"; 
 +//      "o=Debian,a=stable-updates"; 
 +//      "o=Debian,a=proposed-updates"; 
 +//      "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; 
 +}; 
 +
 +
 +
 +// Remove unused automatically installed kernel-related packages 
 +// (kernel images, kernel headers and kernel version locked tools). 
 +Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; 
 + 
 +// Do automatic removal of newly unused dependencies after the upgrade 
 +Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; 
 + 
 +// Do automatic removal of unused packages after the upgrade 
 +// (equivalent to apt-get autoremove) 
 +Unattended-Upgrade::Remove-Unused-Dependencies "true"; 
 + 
 +// Automatically reboot *WITHOUT CONFIRMATION* if 
 +//  the file /var/run/reboot-required is found after the upgrade 
 +Unattended-Upgrade::Automatic-Reboot "true"; 
 + 
 +// Automatically reboot even if there are users currently logged in 
 +// when Unattended-Upgrade::Automatic-Reboot is set to true 
 +Unattended-Upgrade::Automatic-Reboot-WithUsers "true"; 
 + 
 +// If automatic reboot is enabled and needed, reboot at the specific 
 +// time instead of immediately 
 +//  Default: "now" 
 +Unattended-Upgrade::Automatic-Reboot-Time "02:00"; 
 +
 +
 +</code> 
 +Test 
 +<code> 
 +unattended-upgrades -d 
 +</code> 
 +This should not give any error 
 +<code> 
 +dpkg-reconfigure -plow unattended-upgrades
 </code> </code>
 +
 +
 {{tag>linux}} {{tag>linux}}
raspberry_phoscon.1607258547.txt.gz · Last modified: by herwarth