Monday, October 21, 2013

BUILDING AN ANDROID COMPANION DISPLAY

BUILDING AN ANDROID COMPANION 

DISPLAY

Having a second monitor isn’t exactly
uncommon today, when even the
cheapest graphics cards can drive
multiple displays, but it is
BUILDING AN ANDROID COMPANION DISPLAY
n’t always
convenient. My desk, as the perfect
example, doesn’t have room for two
monitors in addition to the old TFT I keep
around for testing equipment. But there’s
an alternative: a companion monitor.
A companion monitor isn’t a true
second monitor; it acts as a secondary
display, and is typically smaller than the
main display.
They can be quite expensive
commercially, so I had a look around the
office for something I could use instead
and turned up an outdated Android 2.3
tablet I’d long since outgrown. If you have
a tablet lying around – or if you fancy
buying one cheaply on second-hand –
you can follow this handy guide to add a
secondary display to your main machine

1 - INSTALL A VNC SERVER:

Typically, a VNC server is used to
share what’s currently visible on your
screen with a remote device. When using
Linux, however, it’s possible to set it up in
a way that creates a whole new desktop,
which operates independently. To install a
package for doing just that, simply drop to
a terminal and type:
sudo apt-get install vnc4server
There are similar packages for Mac OS
and Windows, although the latter may
require a little digging. Once installed,
launch the server with the following
command:
vncserver -geometry WxH
(Where W and H are the width and
height of your tablet’s screen in pixels.)

2- INSTALL A VNC VIEWER :

The server is one half of the
puzzle; you’ll also need a way to see it on
the tablet. Thankfully, Android has plenty
of free VNC server apps available in
Google Play, and my favourite is bVNC.
Install the app, and then try connecting to your 
desktop using the port
number 5901 – one higher than is
usual for VNC. If all has gone well,
you should see a rather spartan
desktop appear with a small menu
and a terminal. This gives you
control over apps on your desktop,
but it’s not exactly comfortable
having to take your hand off the
keyboard and mouse to do so.

3 - INSTALL SYNERGY :

That’s where Synergy
comes in. A client-server
application for sharing a single
keyboard and mouse across
multiple networked machines, it’s
the secret sauce that turns the
tablet into a true companion
display. Install the software on
your desktop’s terminal:
sudo apt-get install
synergy
You’ll need to create a config file
for the display before launching
the software. Using your favourite
text editor, create a file called .
synergy.conf in your home
directory with the following contents:
section: screens
desktop:
right:
end
section: links
desktop:
right = right
right:
left = desktop
end

In this case, desktop is the hostname of
your machine. Finally, launch the synergy
server by typing:
synergys 

 4 - ACTIVATE SYNERGY:
 Using the tablet’s VNC session, type
the following command into the terminal:
synergyc -n right localhost
You can then use your desktop’s mouse 
and keyboard in the VNC session: just move
your mouse cursor past the right-hand edge
of your monitor and it will appear on the tablet;
move it past the left-hand edge of the tablet,
and it will return to the main monitor.

5 - L AUNCH YOUR APPS:
  
  The secondary monitor gets its
images through the network over the VNC
protocol, which isn’t terribly speedy. As a
result, it isn’t ideal for video, but it works
great for text editing, viewing PDFs and web
browsing. I use it for viewing reference
materials while working on the main
monitor, or keeping a cheat-sheet of keys
handy when playing a full-screen game. It’s
also perfect for tracking your playlist when
listening to music.

6 - MOUNT THE TABLET:
 For the true companion-screen
experience, it’s best to mount the tablet to the
side of the monitor. Luckily, my tablet was
almost exactly the same height as the
distance from the top of the monitor to the
top of the speaker, meaning I could use the
speaker to hold the weight. Applying some
BUILDING AN ANDROID COMPANION DISPLAY
Make sure your Synergy configuration file is accurate, or the server won’t launch

Once Synergy has launched on the tablet’s VNC session,
you can use your desktop’s keyboard and mouse
  
In vertical orientation, the companion monitor is
great for a terminal session …
 
… but it’s also at home with tasks such as web
browsing or viewing reference PDFs, without
taking up room on the main displa

Sugru – moldable putty that sets into a
rubber-like substance – to the side of the
tablet enabled me to fix it to the monitor so
that it won’t fall, but I can still remove it in the
future with a sharp knife and a steady hand.
There are drawbacks to this type of dual-display setup,
 though, in particular with
regard to running applications: unlike a true
secondary monitor, you can’t drag an
application from one screen to the other.
Synergy does, however, provide a shared
clipboard – meaning it’s possible to copy text
on one screen and paste it on the other.

 
 

Labels: , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home