Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

extending ubuntu screen to android

#Laptop with Ubuntu 18.04, Intel HD graphics


#1. Get some information
#--------------------------

#In your computer install
#a VNC server (as for example x11vnc)

 sudo apt install x11vnc
 
#In Your android device install, freebVNC from Google store

#back in ubuntu terminal, put the following command, 

 xrandr
 
#This shows you the available displays. For example the output from above command
#shows that the current display is eDP-1  with a resolution of 1366x768 with 60.00Hz
#reflesh rate. HDMI-1, DP-1 and HDMI-2 are avaible for extending the display, as shown 
#in the ouput below:  


Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1366x768      60.00*+  48.00  
 .
 .
 .
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)

#2. make a new virtual monitor
#-----------------------------

#First you must know the resolution of your android device,
#if you not sure what the resultion, you can use can visit 
#this website:
#https://whatismyandroidversion.com/
#In this case it was for example 1024x768. 
#after you get the resolution, type the following command,

gtf 1024 768 60

#Where 60 is the refresh rate, this created something called
#"modeline" which set the resolution for your android device.
#The output of the command above is:

1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
Modeline "1024x768.00_60"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync

#From above output, copy everything after Modeline, that is:

"1024x768.00_60"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync

#Create a new mode from the line above, like in the following,

xrandr --newmode "1024x768_60.00"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync

#Add this new mode to an unused output port. HDMI-1(since HDMI-1 is one of unused port) 
#in this case,

xrandr --addmode HDMI-1 1024x768_60.00

#after the above step, let’s enable HDMI-1 and
#move it to the right(or left) of the default display (eDP-1),

xrandr --output HDMI-1 --mode 1024x768_60.00 --right-of eDP-1

#alternatively you can move it left,

xrandr --output HDMI-1 --mode 1024x768_60.00 --left-of eDP-1

#lastly start the VNC server:

x11vnc -clip 1024x768+0+0

# You ready to extend your screen to android,

3. Extending the screen to android,
----------------------------------

#from unbuntu terminal get ip address of your PC, using the following

ip a

#The output will be something like:

 inet 127.0.0.1/8 scope host lo
 ...
 
#if you using hotspot without internet.
#Now lunch freebVNC you download from google store.
#then enter the address:127.0.0.1 and port 5900(defalt port for x11vnc)
#save and click the created in display in freebVNC to connect.
 
 
Comment

PREVIOUS NEXT
Code Example
Shell :: webgl server 
Shell :: separate a file by pattern 
Shell :: ufr reader raspberry pi shield 
Shell :: using timeshift to make system snapshot like in windows & mac 
Shell :: Turn on bluetooth in kali linux / soft unblock 
Shell :: flash non détecté par linux aprés formatage 
Shell :: install Postfix to send notification emails 
Shell :: heroku cli container select context folder 
Shell :: mirror image via command line 
Shell :: virtiual Machine setup for QEMU in linux 
Shell :: mongodb shell list more than 20 
Shell :: put all folders with specific name in git ignore 
Shell :: check powershell profile create if not exists 
Shell :: cocoapods "iphoneos" cannot be located 
Shell :: where are snap files installed in ubuntu 
Shell :: best practices, build multi stage docker image securely 
Shell :: how mint nft works 
Shell :: git commit id 7 characters 
Shell :: to run index.html using parcel server 
Shell :: How to install florence 
Shell :: mana toolkit install 
Shell :: ssh_askpass: posix_spawnp: Unknown error 
Shell :: uninstall minikube ubuntu 20.04 
Shell :: git soundforest 
Shell :: how-to-remove-show-applications-icon-from-the-dock-in-ubuntu-20-04 
Shell :: download m3u8 ts files as mp4 
Shell :: powershell profile takes a long time to load 
Shell :: Script to Install Brave Browser On Debian Linux 
Shell :: install mavros on ubuntu/debian 
Shell :: command line filters 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =