Skip to content

Ubuntu Linux GUI Sample Quick Start

LordVader edited this page Jan 25, 2023 · 14 revisions

This is guide for installing NUGU SDK and NUGU Extension on Ubuntu Linux Desktop where GUI development is possible and running NUGU GUI Sample Application developed based on Qt.

Requirement

  • Ubuntu Linux 18.04 / 20.04 / 22.04 Desktop
  • qt5

Build

  • cmake

Procedure

It is written based on Ubuntu Linux 20.04 (focal) Desktop, NUGU SDK/Extension stable version.

1) Install NUGU SDK

add-apt-repository ppa:nugulinux/sdk
apt-get update
apt-get install libnugu-dev libnugu-examples

2) Install NUGU Extension

// Create a /etc/apt/sources.list.d/nugu-extension.list file with following content.
deb [trusted=yes] https://nugulinux.github.io/nugu-extension/ubuntu/ focal main

apt-get install libnugu-extension-dev

3) Install qt5

apt-get install qt5-default
apt-get install qml-module-qtwebengine
apt-get install qml-module-qtwebchannel

4) Download NUGU GUI Sample

git clone https://github.com/nugulinux/nugu-examples.git

5) Build NUGU GUI Sample

build

mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j4

install

make install
 
// check whether application binary installed correctly
ls /usr/bin/nugu_gui_sample
/usr/bin/nugu_gui_sample
 
// check whether config files installed correctly
ls /var/lib/nugu/storage/
nugu-gui-config.json  nugu-template-config.json

6) NUGU Authentication

The Authentication is possible using the OAuth2 Sample provided as an example of the NUGU SDK or NUGU Auth Sample.

  • Requires auth_server, client_id, client_secret, device_type_code, poc_id information issued through the partnership process.

Configure nugu-gui-config.json file based on authentication information.

{
    "auth_server": "https://*****.sktnugu.com/",
    "auth": {
        "access_token" : ".....",
        "refresh_token" : ".....",
        "scope" : ".....",
        "token_type" : ".....",
        "jti" : ".....",
        "expires_in" : .....,
        "expired_time" : .....
    },
    "device": {
        "client_id" : "speaker.*****",
        "client_secret" : "4d67cb52-*****",
        "serial_number" : "nugu_gui_sample",
        "device_type_code" : "DVC_*****",
        "poc_id" : "speaker.*****"
    }
}

7) Template Configuration

Configure nugu-template-config.json file to use the display template provided by NUGU.

  • Check templateServer, deviceTypeCode information when proceeding the partnership process.
{
    "templateServer": "http://*****.aicloud.kr/view",
    "deviceTypeCode": "DVC_*****",
    "clientInfo": {
        "firmwareVersion": "0.0",
        "nuguSdkVersion": "1.7.3",
        "nuguAppVersion": "0.14.0",
        "modelNumber": "nugu_gui_sample",
        "displayInterfaceVersion": "1.9"
    }
}

8) Run NUGU GUI Sample

nugu_gui_sample

Demo