Difference between revisions of "Ubuntu 18 04 modifications"

From RobotinoWiki
(Change Lid Close Action)
(Disable unattened upgrades)
Line 8: Line 8:
 
==Disable unattened upgrades==
 
==Disable unattened upgrades==
 
<pre>
 
<pre>
sed -i -e 's/\"1\"/\"0\"/g' /etc/apt/apt.conf.d/10periodic
+
apt-get remove unattended-upgrades
 
</pre>
 
</pre>
  

Revision as of 09:41, 30 January 2020

Graphics drivers

add-apt-repository ppa:oibaf/graphics-drivers
apt-get update
apt-get upgrade

Disable unattened upgrades

apt-get remove unattended-upgrades

Disable Software Updater

apt-get remove update-notifier

Disable animations

apt-get install gnome-tweak-tool 

Mirror displays

There are four situations to take care of

  1. No external display connected
  2. VGA display connected
  3. HDMI display connected
  4. VGA and HDMI display connected

If no external display is connected only the internal display eDP-1 is in use. You can see eDP-1 when connecting via VNC.

If the VGA display is connected eDP-1 and DP-3 are in use. To mirror the content of eDP-1 to DP-3 run the VGA.sh script.

If the HDMI display is connected eDP-1 and HDMI-1 are in use. To mirror the content of eDP-1 to HDMI-1 run the HDMI.sh script.

If the VGA and HDMI displays are connected, eDP-1, DP-3 and HDMI-1 are in use. To mirror the content of eDP-1 to DP-3 and HDMI-1 run the VGA-HDMI.sh script.

Script to check which display is connected. If VGA is connected make it the primary display and disable the others. If HDMI-1 is connected make it the primary display and disable the others. If non is connected use the internal display.

Add it to Startup Applications Alt+F2 and run the gnome-session-properties

#!/bin/bash

VGAprev=0
HDMIprev=0

for (( ; ; ))
do

xrandrout=$(xrandr)

VGA=0
HDMI=0

if [[ $xrandrout == *"DP-3 connected"* ]] ; then
  VGA=1
fi

if [[ $xrandrout == *"HDMI-1 connected"* ]] ; then
  HDMI=1
fi

if (( VGAprev != VGA || HDMIprev != HDMI )) ; then
  VGAprev=$VGA
  HDMIprev=$HDMI

  if (( VGA == 1 && HDMI == 1 )) ; then
    echo VGA and HDMI
    /home/robotino/.screenlayout/VGA-HDMI.sh
  elif (( VGA == 1 )) ; then
    echo VGA only
    /home/robotino/.screenlayout/VGA.sh
  elif (( HDMI == 1 )) ; then
    echo HDMI only
    /home/robotino/.screenlayout/HDMI.sh
  fi
fi

sleep 5
done

VGA.sh

#!/bin/sh
xrandr --output eDP-1 --primary --mode 1600x1200 --pos 0x0 --rotate normal --output HDMI-3 --off --output HDMI-2 --off --output HDMI-1 --off --output DP-3 --mode 1600x1200 --pos 0x0 --rotate normal --output DP-2 --off --output DP-1 --off

HDMI.sh

#!/bin/sh
xrandr --output eDP-1 --primary --mode 1600x1200 --pos 0x0 --rotate normal --output HDMI-3 --off --output HDMI-2 --off --output HDMI-1 --mode 1600x1200 --pos 0x0 --rotate normal --output DP-3 --off --output DP-2 --off --output DP-1 --off

VGA-HDMI.sh

#!/bin/sh
xrandr --output eDP-1 --primary --mode 1600x1200 --pos 0x0 --rotate normal --output HDMI-3 --off --output HDMI-2 --off --output HDMI-1 --mode 1600x1200 --pos 0x0 --rotate normal --output DP-3 --mode 1600x1200 --pos 0x0 --rotate normal --output DP-2 --off --output DP-1 --off

Vino

apt-get install vino
gsettings set org.gnome.Vino require-encryption false

Realsense

sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u

sudo apt-get install librealsense2-utils
sudo apt-get install librealsense2-dev

optinal

sudo apt-get install librealsense2-dbg

Disable Bug reporting

sed -i -e 's/enabled=1/enabled=0/g' /etc/default/apport

/etc/apt/sources.list

deb http://de.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

deb http://de.archive.ubuntu.com/ubuntu/ bionic universe
deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates universe

deb http://de.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

deb http://de.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main

Change Lid Close Action

echo "HandleLidSwitch=ignore" >> /etc/systemd/logind.conf
systemctl restart systemd-logind.service

open62541 libraries

add-apt-repository ppa:open62541-team/ppa

Journal gateway

apt-get install systemd-journal-remote
systemctl enable systemd-journal-gatewayd.service