Difference between revisions of "FriendlyDesktop 18.04 for RK3399"

From FriendlyARM WiKi
Jump to: navigation, search
(Created page with "查看中文")
 
Line 1: Line 1:
 
[[FriendlyDesktop 18.04 for RK3399/zh|查看中文]]
 
[[FriendlyDesktop 18.04 for RK3399/zh|查看中文]]
 +
 +
==Introduction==
 +
[[File:friendlydesktop-home.png|600px]]<br />
 +
[[File:friendlydesktop-arduino.png|thumb|Arduino]]
 +
[[File:friendlydesktop-firefox.png|thumb|Firefox]]
 +
[[File:friendlydesktop-scratch.png|thumb|Scratch]]
 +
 +
'''FriendlyDesktop''' is a light-weighted Ubuntu desktop system. It is based on LXDE and has the following features:<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Latest Version''' - Based on Ubuntu 18.04 64<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Various Development Utilities''' - It is compatible with FriendlyCore and has integrated an optimized Qt5.10, QtCreator and Arduino IDE.<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Light-weighted''' -  it consumes relatively less CPU resources than a common desktop system. When a system's RAM is sufficient it can achieve much better performance.<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Less Power Consumption''' - it consumes relatively less power or resources than a common desktop system to achieve the same performance.<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Compact and Neat''' - its desktop is based on GTK+ 2 and it supports multiple languages.<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Easy to Use''' - its GUI looks similar to MS Windows'.<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Customizable''' - Users can customize LXDE's GUI.<br />
 +
&nbsp;&nbsp;&nbsp;&nbsp;'''Compatible''' - it is compatible with freedesktop.org.<br />
 +
FriendlyELEC has optimized support for Mali GPU and VPU in FriendlyDesktop for RK3399 and integrated drivers for X.org. FriendlyDesktop supports Hardware Cursor, OpenGL graphic acceleration, 4K video playing with hardware decoding.<br />
 +
 +
===System Features===
 +
{| class="wikitable"
 +
|-
 +
  | Board Models
 +
  | Version
 +
  | OpenGL ES
 +
  | Hardware accelerated video decoding
 +
  | Kernel Version
 +
|-
 +
  | NanoPC T4
 +
  | Ubuntu 18.04 64bit
 +
  | Yes
 +
  | gstreamer 1.0
 +
  | 4.x
 +
|}
 +
 +
===Image Download===
 +
You can click on [http://download.friendlyarm.com/nanopct4 this link] to download its image files.
 +
 +
==Settings & Applications==
 +
 +
===Account & Password===
 +
Regular Account:
 +
    User Name: pi
 +
    Password: pi
 +
 +
Root:
 +
    User Name: root
 +
    Password: fa
 +
 +
===WiFi Connection===
 +
Click on the icon on the top right in the FriendlyDesktop's main window, select your wanted WiFi hotspot and proceed with prompts
 +
 +
===HDMI/DP LCD Resolution===
 +
Open the system's menu and go to Perferences -> Monitor Settings to customize your settings.<br />
 +
Recommended resolution: 1920x1080@60Hz
 +
 +
===eDP LCD Display Rotation===
 +
If you want to rotate an eDP LCD's display you can do it by commanding "xrotate.sh" to rotate its display to 90/180/270 degrees.
 +
You can rotate display clockwise by 90 degrees by running the following command as root. This command calls lightdm to make your change effective immediately:
 +
<syntaxhighlight lang="bash">
 +
sudo xrotate.sh -m CW -r
 +
</syntaxhighlight>
 +
For more details about its options you can run "xrotate -h".<br/>
 +
Note: this command doesn't support HDMI display's rotation. If you want to rorate an HDMI's display you need to refer to X11's tech documents and make changes in "/etc/X11/xorg.conf".
 +
 +
'''Note: when you play a video with hardware decoding your player's display window doesn't rotate with your LCD's display'''
 +
 +
===Test OpenGL ES===
 +
You can test it by clicking on the Terminator icon to start a commandline utility in the System Tools and run the following commands:
 +
<syntaxhighlight lang="bash">
 +
taskset -c 4-5 glmark2-es2
 +
</syntaxhighlight>
 +
[[File:Friendlydesktop-glmark-es.png|400px]]<br />
 +
[[File:Friendlydesktop-glmark-es2-score.jpg|400px]]<br />
 +
 +
===4K Video Playing===
 +
====Play with Qt Player with Hardware Decoding====
 +
FriendlyDesktop has integrated a Qt5-VideoPlayer utility. This utility has support for Rockchip's gstreamer plug-in and supports 4K video playing with hardware decoding. You can start it by following the steps below:
 +
On FriendlyDesktop's main window open "Sound & Video" and click on "Qt5-VideoPlayer".<br />
 +
<br />
 +
On the player's main window click on the bottom left's "Open" button to load a video file and double-click on its name on the file list to start video playing. Here is how it looks like. You can set the display window to full screen and adjust the volume:<br />
 +
[[File:Friendlydesktop-player.jpg|frameless|480px]]<br />
 +
 +
====Play with Linux Command====
 +
You can play it by running the following command in a commandline utility:
 +
<syntaxhighlight lang="bash">
 +
gst-player.sh
 +
</syntaxhighlight>
 +
By default its voice will be output to audio jack. You can locate this script by commanding "which gst-player.sh". You can customize its behavior by making changes in this script.
 +
 +
===Work with USB Camera===
 +
Connect a USB camera e.g. Logitech C270/C920 to a board that runs FriendlyDesktop. After your system is booted click on the "Other" menu option in the main window to start "xawtv" and you will be able to preview with this camera.
 +
 +
===File Transfer with Bluetooth===
 +
Click on the "Preferences" in the main window's menu to start Bluetooth Manager and click on "Search" to search surrounding Bluetooth devices. Click on your wanted device, pair the device with your board and you will be able to do file transfer, here is how it looks like:<br />
 +
[[File:Friendlydesktop-ble-sendfile.jpg|500px]]<br />
 +
 +
===Install OpenCV===
 +
On FriendlyDesktop's main window click on System Tools -> Terminator to open a commandline utility and run the following commands to install OpenCV 3.4:
 +
<syntaxhighlight lang="bash">
 +
su -
 +
cd /root/
 +
git clone https://github.com/friendlyarm/install-opencv-on-friendlycore
 +
cd install-opencv-on-friendlycore
 +
./install-opencv.sh
 +
cp examples/cv-env.sh /usr/bin/
 +
</syntaxhighlight>
 +
After installation is done compile it and test it by running a facial recognition test case:
 +
<syntaxhighlight lang="bash">
 +
su -
 +
cd /usr/local/share/OpenCV/samples/cpp
 +
g++ -ggdb facedetect.cpp -o facedetect `pkg-config --cflags --libs /usr/local/lib/pkgconfig/opencv.pc`
 +
. setqt5env
 +
./facedetect --cascade="/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="/usr/local/share/OpenCV/haarcascades/haarcascade_eye.xml" --scale=1.3 /usr/local/share/OpenCV/samples/data/data/lena.jpg
 +
</syntaxhighlight>
 +
Here is how it looks like:<br />
 +
[[File:Friendlydesktop-opencv.png|frameless|480px]]
 +
 +
===Develop Qt Applications===
 +
FriendlyDesktop has a Qt 5.10.0 which supports RK3399's OpenGL ES and Gstreamer 1.0 hardware acceleration and a QtCreator IDE which is ready  and can be used to compile and run applications. Here is how it looks like:<br />
 +
[[File:friendlydesktop-qtcreator.png|500px]]<br />
 +
 +
<!--
 +
===取消自动登录===
 +
TODO
 +
===性能相关设置===
 +
TODO
 +
===电源管理===
 +
TODO
 +
===定时开关机===
 +
TODO
 +
===串口助手===
 +
TODO
 +
===使用NVME SSD固态硬盘===
 +
TODO
 +
===WIFI AP===
 +
TODO
 +
===蓝牙键盘===
 +
TODO
 +
===4G网络===
 +
TODO
 +
===USB WIFI===
 +
TODO
 +
===USB摄像头===
 +
TODO
 +
-->

Revision as of 01:03, 23 August 2018

查看中文

1 Introduction

Friendlydesktop-home.png

Arduino
Firefox
Scratch

FriendlyDesktop is a light-weighted Ubuntu desktop system. It is based on LXDE and has the following features:
    Latest Version - Based on Ubuntu 18.04 64
    Various Development Utilities - It is compatible with FriendlyCore and has integrated an optimized Qt5.10, QtCreator and Arduino IDE.
    Light-weighted - it consumes relatively less CPU resources than a common desktop system. When a system's RAM is sufficient it can achieve much better performance.
    Less Power Consumption - it consumes relatively less power or resources than a common desktop system to achieve the same performance.
    Compact and Neat - its desktop is based on GTK+ 2 and it supports multiple languages.
    Easy to Use - its GUI looks similar to MS Windows'.
    Customizable - Users can customize LXDE's GUI.
    Compatible - it is compatible with freedesktop.org.
FriendlyELEC has optimized support for Mali GPU and VPU in FriendlyDesktop for RK3399 and integrated drivers for X.org. FriendlyDesktop supports Hardware Cursor, OpenGL graphic acceleration, 4K video playing with hardware decoding.

1.1 System Features

Board Models Version OpenGL ES Hardware accelerated video decoding Kernel Version
NanoPC T4 Ubuntu 18.04 64bit Yes gstreamer 1.0 4.x

1.2 Image Download

You can click on this link to download its image files.

2 Settings & Applications

2.1 Account & Password

Regular Account:

   User Name: pi
   Password: pi

Root:

   User Name: root
   Password: fa

2.2 WiFi Connection

Click on the icon on the top right in the FriendlyDesktop's main window, select your wanted WiFi hotspot and proceed with prompts

2.3 HDMI/DP LCD Resolution

Open the system's menu and go to Perferences -> Monitor Settings to customize your settings.
Recommended resolution: 1920x1080@60Hz

2.4 eDP LCD Display Rotation

If you want to rotate an eDP LCD's display you can do it by commanding "xrotate.sh" to rotate its display to 90/180/270 degrees. You can rotate display clockwise by 90 degrees by running the following command as root. This command calls lightdm to make your change effective immediately:

sudo xrotate.sh -m CW -r

For more details about its options you can run "xrotate -h".
Note: this command doesn't support HDMI display's rotation. If you want to rorate an HDMI's display you need to refer to X11's tech documents and make changes in "/etc/X11/xorg.conf".

Note: when you play a video with hardware decoding your player's display window doesn't rotate with your LCD's display

2.5 Test OpenGL ES

You can test it by clicking on the Terminator icon to start a commandline utility in the System Tools and run the following commands:

taskset -c 4-5 glmark2-es2

Friendlydesktop-glmark-es.png
Friendlydesktop-glmark-es2-score.jpg

2.6 4K Video Playing

2.6.1 Play with Qt Player with Hardware Decoding

FriendlyDesktop has integrated a Qt5-VideoPlayer utility. This utility has support for Rockchip's gstreamer plug-in and supports 4K video playing with hardware decoding. You can start it by following the steps below: On FriendlyDesktop's main window open "Sound & Video" and click on "Qt5-VideoPlayer".

On the player's main window click on the bottom left's "Open" button to load a video file and double-click on its name on the file list to start video playing. Here is how it looks like. You can set the display window to full screen and adjust the volume:
Friendlydesktop-player.jpg

2.6.2 Play with Linux Command

You can play it by running the following command in a commandline utility:

gst-player.sh

By default its voice will be output to audio jack. You can locate this script by commanding "which gst-player.sh". You can customize its behavior by making changes in this script.

2.7 Work with USB Camera

Connect a USB camera e.g. Logitech C270/C920 to a board that runs FriendlyDesktop. After your system is booted click on the "Other" menu option in the main window to start "xawtv" and you will be able to preview with this camera.

2.8 File Transfer with Bluetooth

Click on the "Preferences" in the main window's menu to start Bluetooth Manager and click on "Search" to search surrounding Bluetooth devices. Click on your wanted device, pair the device with your board and you will be able to do file transfer, here is how it looks like:
Friendlydesktop-ble-sendfile.jpg

2.9 Install OpenCV

On FriendlyDesktop's main window click on System Tools -> Terminator to open a commandline utility and run the following commands to install OpenCV 3.4:

su -
cd /root/
git clone https://github.com/friendlyarm/install-opencv-on-friendlycore
cd install-opencv-on-friendlycore
./install-opencv.sh
cp examples/cv-env.sh /usr/bin/

After installation is done compile it and test it by running a facial recognition test case:

su -
cd /usr/local/share/OpenCV/samples/cpp
g++ -ggdb facedetect.cpp -o facedetect `pkg-config --cflags --libs /usr/local/lib/pkgconfig/opencv.pc`
. setqt5env
./facedetect --cascade="/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="/usr/local/share/OpenCV/haarcascades/haarcascade_eye.xml" --scale=1.3 /usr/local/share/OpenCV/samples/data/data/lena.jpg

Here is how it looks like:
Friendlydesktop-opencv.png

2.10 Develop Qt Applications

FriendlyDesktop has a Qt 5.10.0 which supports RK3399's OpenGL ES and Gstreamer 1.0 hardware acceleration and a QtCreator IDE which is ready and can be used to compile and run applications. Here is how it looks like:
Friendlydesktop-qtcreator.png