some fixes

This commit is contained in:
Shihaam Abdul Rahman 2022-11-10 08:52:53 +05:00
parent 3d660fa797
commit 729f2ea8ea
Signed by: shihaam
GPG Key ID: 3B007D22E5584980

View File

@ -16,6 +16,7 @@ read -p 'Enter client heigh: ' CLEINT_HEIGHT
read -p 'Enter client refresh rate: ' REFRESH_RATE read -p 'Enter client refresh rate: ' REFRESH_RATE
MODELINE=$(gtf $CLIENT_WIDTH $CLEINT_HEIGHT $REFRESH_RATE | grep Modeline | sed 's/Modeline//') #resolution of client machine (width, height, refreshrate) MODELINE=$(gtf $CLIENT_WIDTH $CLEINT_HEIGHT $REFRESH_RATE | grep Modeline | sed 's/Modeline//') #resolution of client machine (width, height, refreshrate)
RESOLUTION=$(echo $MODELINE | awk '{print $1}')
echo "---------------" echo "---------------"
echo $MODELINE echo $MODELINE
echo "---------------" echo "---------------"
@ -28,14 +29,14 @@ xrandr | grep disconnected | awk '{print $1}'
echo "---------------" echo "---------------"
read -p 'Enter one of the ports to be used for VNC: ' PORT read -p 'Enter one of the ports to be used for VNC: ' PORT
xrandr --addmode $PORT ${CLIENT_WIDTH}x${CLEINT_HEIGHT}_${REFRESH_RATE}.00 xrandr --addmode $PORT $RESOLUTION
sleep 10 sleep 2
xrandr --output $PORT --mode ${CLIENT_WIDTH}x${CLEINT_HEIGHT}_${REFRESH_RATE}.00 xrandr --output $PORT --mode $RESOLUTION
echo Configure the new diplay where you want echo Configure the new diplay where you want
sleep 3 sleep 3
arandr >> /dev/null arandr >> /dev/null
GEO=$(xrandr | grep HDMI-A-3 | awk '{print $3}') GEO=$(xrandr | grep $PORT | awk '{print $3}')
echo Starting VNC Server echo Starting VNC Server
sleep 3 sleep 3
x11vnc -clip $GEO x11vnc -clip $GEO