-
Notifications
You must be signed in to change notification settings - Fork 0
/
prerequisite_Yum.sh
27 lines (24 loc) · 1 KB
/
prerequisite_Yum.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F "=" '{ print $2 }' | sed 's/"//g' | awk -F "." '{ print $1 }')
set +e
sudo yum install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-${OS_VERSION}.noarch.rpm"
sudo yum install -y "https://download.fedoraproject.org/pub/epel/epel-release-latest-${OS_VERSION}.noarch.rpm"
set -e
sudo yum install xdotool -y
sudo yum install xrandr -y
echo $XDG_SESSION_TYPE
if [ "$XDG_SESSION_TYPE" = "x11" ]; then
echo 'Display type is correct.Will reset display size.'
CURRENT_DISPLAY=`xrandr | awk '/ connected/ && /[[:digit:]]x[[:digit:]].*+/{print $1}'`
xrandr --output $CURRENT_DISPLAY --mode 1440x900 --size 16:10
sleep 2
echo 'Good to go. Run Installer scripts'
else
echo 'Need to update display.'
echo '****** This will edit etc/gdm/custom.conf file & will restart display. ******'
echo 'Press any key to continue... '
read var
sudo sed -i '/WaylandEnable=/s/^#//g' /etc/gdm/custom.conf
sudo systemctl restart gdm
fi