Raspberry Pi/Projects/Wallboards
(→Set Resolution to 1080p) |
|||
Line 133: | Line 133: | ||
Starting applications specified in /root/.vnc/xstartup | Starting applications specified in /root/.vnc/xstartup | ||
Log file is /root/.vnc/raspberrypi:1.log | Log file is /root/.vnc/raspberrypi:1.log | ||
+ | |||
+ | ====Install x11vnc server==== | ||
+ | This package will allow you to VNC into the raspberry pi WHILE you already have an existing desktop session setup. If you try using vncserver, this will simply launch another instance of the desktop, not the existing one. In my case when I tried to use vncserver while the raspbian desktop was already running I would only get a black and grey screen, along with a black X of a mouse cursor. | ||
+ | ~$ sudo apt-get install x11vnc | ||
+ | =====create passwd===== | ||
+ | Now we need to create the passwd file needed to vnc into this raspberry pi | ||
+ | ~$ x11vnc -storepasswd | ||
+ | Enter VNC password: | ||
+ | Verify password: | ||
+ | Write password to /home/pi/.vnc/passwd? [y]/n y | ||
+ | Password written to: /home/pi/.vnc/passwd | ||
+ | =====configure autostart===== | ||
+ | Create the folder for the desktop config | ||
+ | ~$ mkdir /home/pi/.config/autostart | ||
+ | Create the desktop config | ||
+ | ~$ nano /home/pi/.config/autostart/x11vnc.desktop | ||
+ | Populate the config file | ||
+ | [Desktop Entry] | ||
+ | Encoding=UTF-8 | ||
+ | Type=Application | ||
+ | Name=X11VNC | ||
+ | Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer | ||
+ | StartupNotify=false | ||
+ | Terminal=false | ||
+ | Hidden=false | ||
+ | =====reboot and test===== | ||
+ | ~$ sudo reboot | ||
+ | Once the RPI2 reboots try from another computer to VNC into it by IP and the password that you defined. |
Revision as of 23:34, 19 March 2015
Contents
|
Overview
Project was tasked to create a replacement solution for a grid of 6x1 100" projector screens displaying a shoretel call center queue and details.
New office space does not have a NOC, only an 8ft ceiling, and the call center cubicles are surrounded by a glass wall to the outside, allowing lots of sunlight. This would prevent projectors from being used.
The cubicles are setup in cubes, with the desks facing the center of the cube. This makes it so that analysts are facing different directions.
The shoretel application on runs on Windows.
It was thought that the shoretel API may be able to be utilized, but unfortunately it alone does not provide enough access to information and direct calls against the SQL Database would be needed. With this discovered, it was decided the development work would be too great.
Requirement
Create 4 clusters of 6 monitors, 3 facing one way and 3 facing the other, that hang from the ceiling using mounts (similar to an airport or trader setup) above 4 cubicles all facing towards the analysts. On the walls, mount (4) large LCD screens.
The 6 monitor clusters would be close to the analysts and provide detailed information about specific call queues while the large LCD screens would provide a graphical representation of the total queue count in graph format.
The outside monitors of each row display the same information while the middle ones display different information.
Problem
The classical method of sending signals to these monitors would be to utilize 5 strand RGB cables to each monitor and run them back to repeaters to duplicate signals. This has the drawbacks of an excess of cabling needed, signal repeaters which can be unreliable, and no way to individually customize each screen if desired.
Solution
Use a raspberry pi 2 for each monitor, driving the signal from the hdmi out. The raspberry pi would then VNC into a windows VM running the required software and displaying the call center information.
Configuring the Raspberry Pi 2
At the time of this writing, the OS choices for the raspberry pi 2 were limited to noobs, raspbian, and ubuntu.
- Noobs - wasn't considered
- Ubuntu - was command line only unless you wanted to install a GUI yourself following unofficial instructions
- Rasbian - the best choice as it had the groundwork needs, was very well supported, and ran smoothly on the RPI2
Installing Rasbian
Unfortunately using the linux/mac way of writing the image with dd did not work. The image wrote, but the pi would not read and card or boot. Instead I used the Windows method.
- Format the card using the SD Association's Formatting tool. Select the correct drive letter, change "Format Size Adjustment" option to ON so that the entire size is formatted and utilized.
- Download the distribution image desired from the raspberrypi.org downloads page
- Extract the .img file from the compressed .zip
- Using the Win32DiskImager select the .img and drive letter of the SD card, then click write.
First boot
You'll be prompted to select a few options on first boot. Make sure you select these:
- Use full SD card space
- Change desktop to default load
- Set timezone
- Set keyboard layout, I chose Microsoft Internet Keyboard and English (US) and it successfully mapped all the keys, even problem ones like | and #.
update
~$ sudo apt-get update && sudo apt-get upgrade -y
set date&time
Check to see what is setup
~$ date Mon Feb 16 09:18:15 EST 2015
Depending on the outcome, pick what you need to fix it from below:
Set time zone
run the following then just follow the prompts
~$ sudo dpkg-reconfigure tzdata
Set the date&time
~$ sudo date newdatetimestring
newdatetimestring is in this format: nnddhhmmyyyy.ss
- nn= month (01 -12)
- dd= day (01-31)
- hh= hour (00-23)
- mm= minute (00-59)
- yyyy= year (2XXX)
- ss= seconds (00-59)
Example - set to March 19, 2014 @ 20:49 ~$ sudo date 031920492015.00
Remove black borders
By default the Raspbian image places black borders around the display, so if you are running a 1080p monitor, this is not ideal as you don't have access to all the desktop space.
Remove them by editting /boot/config.txt
~$ sudo nano /boot/config.txt Find #disable_overscan=1 and remove the pound (#). If disable_overscan=0, change it to 1
Now reboot the device to apply.
~$ sudo reboot
Set Resolution to 1080p
Make sure you have the pi hooked up via hdmi to a screen that supports 1920x1080, preferably as a native resolution. We used HP 24uh (#K5A38-60001).
From a remote ssh session (not on the raspberry pi directly) do the following:
First check to see what you're running. You may already be running the desired resolution:
~$ tvservice -s state 0x12001a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive
If not, discover the modes the screen is reporting supported
~$ tvservice -m CEA Group CEA has 9 modes: mode 1: 640x480 @ 60Hz 4:3, clock:25MHz progressive mode 2: 720x480 @ 60Hz 4:3, clock:27MHz progressive mode 3: 720x480 @ 60Hz 16:9, clock:27MHz progressive mode 4: 1280x720 @ 60Hz 16:9, clock:74MHz progressive (prefer) mode 16: 1920x1080 @ 60Hz 16:9, clock:148MHz progressive mode 17: 720x576 @ 50Hz 4:3, clock:27MHz progressive mode 18: 720x576 @ 50Hz 16:9, clock:27MHz progressive mode 19: 1280x720 @ 50Hz 16:9, clock:74MHz progressive mode 31: 1920x1080 @ 50Hz 16:9, clock:148MHz progressive
Set the pi to use the preferred 1080p resolution (most monitors support 50-60hz - UK/Europe uses 50hz, US uses 60hz)
~$ tvservice -e "CEA 16" Powering on HDMI with explicit settings (CEA mode 16)
This is where you must be remoted into the pi via ssh. If you are not, you'll get a black screen and be unable to do anything else.
Check to see what you're running now.
~$ tvservice -s state 0x12001a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive
Reset the overlays.
~$ fbset -depth 8 && fbset -depth 16
Install vncserver
~$ sudo apt-get install tightvncserver -y
Create passwd file
Since we want the raspberry pis to automatically boot into a VNC session, we need to create a passwd file that contains the password for the VNC session. If you don't want to specify a password for clients connecting to the VNC server you can configure it that way, but the risk should be obvious. I also am not using user accounts, just a password.
~$ vncpasswd Using password file /home/pi/.vnc/passwd VNC directory /home/pi/.vnc does not exist, creating. Password: Verify: Would you like to enter a view-only password (y/n)? n
Install xtightvncviewer
Looks like the viewer is not bundled with the vncserver repo, so we need to install it.
~$ sudo apt-get install xtightvncviewer -y
Launch vncviewer
As a test, launch the viewer. You'll need to type this in directly on the pi for it to launch, I haven't figure out how to remotely do it through ssh, but it is possible.
vncviewer [options] [host] [passwd file location] example: ~$ vncviewer -shared -fullscreen -noraiseonbeep 10.45.9.157 -p /home/pi/.vnc/passwd
Since we used full screen and I cant figure out how from the pi, to kill this process, from a remote ssh session
~$ killall -v vncviewer
Config vncserver on the pi
If you need to access the desktop of the pi remotely, you may want to configure the vncserver.
Setup a password:
~$ sudo vncserver :1 You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? n xauth: file /root/.Xauthority does not exist New 'X' desktop is raspberrypi:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/raspberrypi:1.log
Install x11vnc server
This package will allow you to VNC into the raspberry pi WHILE you already have an existing desktop session setup. If you try using vncserver, this will simply launch another instance of the desktop, not the existing one. In my case when I tried to use vncserver while the raspbian desktop was already running I would only get a black and grey screen, along with a black X of a mouse cursor.
~$ sudo apt-get install x11vnc
create passwd
Now we need to create the passwd file needed to vnc into this raspberry pi
~$ x11vnc -storepasswd Enter VNC password: Verify password: Write password to /home/pi/.vnc/passwd? [y]/n y Password written to: /home/pi/.vnc/passwd
configure autostart
Create the folder for the desktop config
~$ mkdir /home/pi/.config/autostart
Create the desktop config
~$ nano /home/pi/.config/autostart/x11vnc.desktop
Populate the config file
[Desktop Entry] Encoding=UTF-8 Type=Application Name=X11VNC Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer StartupNotify=false Terminal=false Hidden=false
reboot and test
~$ sudo reboot
Once the RPI2 reboots try from another computer to VNC into it by IP and the password that you defined.