Difference between revisions of "Ubuntu 18 04 modifications"
(→Graphics drivers) |
(→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 | + | sed -i -e 's/\"1\"/\"0\"/g' /etc/apt/apt.conf.d/10periodic |
</pre> | </pre> | ||
Revision as of 10:33, 11 June 2019
Contents
Graphics drivers
add-apt-repository ppa:oibaf/graphics-drivers apt-get update apt-get upgrade
Disable unattened upgrades
sed -i -e 's/\"1\"/\"0\"/g' /etc/apt/apt.conf.d/10periodic
Mirror displays
There are four situations to take care of
- No external display connected
- VGA display connected
- HDMI display connected
- 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