🧔 Hello World

My name is Emil. I am a programmer, passionate by coding, music, video and photography

How To Run Ubuntu 15.04 Screen on Samsung Galaxy2

I'm sure that many of us (Android Fans) have somewhere in house an (unused or not so used) Samsung Galaxy Tablet. The good news is that we can use this device as a second display for Ubuntu screens. Is not that feeling when using a second real Display/Monitor having 21.5" inch or bigger because these tiny tablets are having only 12.2" Zoll/inch. But still, the maximum size of Galaxy can be adapted to 1280x768 pixels and is quite good. Disadvantages are two: Galaxy battery has to be charged because not everytime the battery charging works using USB from Notebook. Second disadvantage is that is impossible to drag the Screens from VNC Session to Ubuntu and Back. Screen control has to be made using VNC Viewer.







Step1: Install VNC Server on Ubuntu




#----------------------------------------------------
# install vnc server on ubuntu 15.04
#----------------------------------------------------
sudo apt-get update
sudo apt-get install vnc4server

vncserver #start service
vncserver -kill :1 #stop service

#----------------------------------------------------
# Do configuration backup
#----------------------------------------------------

cp ~/.vnc/xstartup ~/.vnc/xstartup.backup

#----------------------------------------------------
# Modify xstartup script
#----------------------------------------------------

----------start script---------
#!/bin/sh
def
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

#unset SESSION_MANAGER
#unset DBUS_SESSION_BUS_ADDRESS
## exec /etc/X11/xinit/xinitrc
#gnome-session --session=ubuntu-2d &
##gnome-session --session=gnome-classic &

#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot --solid grey
#vncconfig --iconic &
----------end script---------



#----------------------------------------------------
# Start firewall port for vnc
#----------------------------------------------------
sudo ufw status
sudo ufw allow 5901


#----------------------------------------------------
# Start a vncserver session
#----------------------------------------------------
vncserver -geometry 1280x768 -depth 16



#----------------------------------------------------
# Install & start ubuntu vncviewer for screen control
#----------------------------------------------------
sudo apt-get install xtightvncviewer
xtightvncviewer
vncviewer 192.168.1.25:5901






Step2: Install VNC Viewer on Android
https://play.google.com/store/apps/details?id=com.realvnc.viewer.android&hl=de

After install create VNC connection and set the ip from Ubuntu machine, which can be something like 192.168.1.25:5901

You can find this ip on Ubuntu Terminal using ifconfig.