Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] Deploying to a headless Raspberry Pi
Forum Update on Monday, May 27th 2025

[SOLVED] Deploying to a headless Raspberry Pi

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 3 Posters 5.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dplamp
    wrote on 10 Sept 2014, 08:15 last edited by
    #1

    Hi,

    I successfully compiled Qt5 and I can deploy a simple program to the RPi : Qt Creator uploads the executable to the RPi and runs it. The widget shows up full-screen on a HDMI attached monitor. So far, so good.

    2 questions :

    I'd like to run my app on the RPi and display it on my desktop. How do I do that ?

    How do I run my app, not full-screen ? i.e. like a normal X11 program ?

    Thanks.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dasRicardo
      wrote on 10 Sept 2014, 12:05 last edited by
      #2

      It's simple, first and second resolve with the same answer. Build your app as desktop application on a Linux Machine. So you can test it on desktop and the executable is ready for X11 if you mean X11 = Linux Machine with desktop like KDE or Gnome or Xfce you named :)

      **Sorry for my english :)

      PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dplamp
        wrote on 10 Sept 2014, 12:18 last edited by
        #3

        Yeah, that's what I'm doing right now, But that only works as long as your app is not hardware dependent...

        Also, my ultimate goal, in production mode, is to run the RPi without a monitor and connect via VNC from time to time to check it.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dasRicardo
          wrote on 10 Sept 2014, 12:40 last edited by
          #4

          i don't know what you mean with hardware dependent? Install any lightweight desktop, remove all unused programs and install the vnc server. Start your program with autostart you are done. The hard way, start your own X11 session and start your program and the vnc server.

          **Sorry for my english :)

          PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dplamp
            wrote on 10 Sept 2014, 12:56 last edited by
            #5

            Well, perhaps I misunderstood your previous message. If so, I'm sorry.

            I can compile and test on my laptop. I can cross-compile and run on the RPi, but I can only see the widget full-screen on a HDMI monitor, whether I typed "startx" or not. As a consequence, I can't see my app via VNC, which I configured successfully.

            Before I compiled, I used the following config. Could it be because of the -opengl option ?

            @
            configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/USERNAME/opt/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /mnt/rpi -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5pi -no-pch -qt-xcb
            @

            And the config.summary file contents :
            @
            Configure summary

            Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
            Building for: devices/linux-rasp-pi-g++ (arm, CPU features:)
            Platform notes:

                    - Also available for Linux: linux-kcc linux-icc linux-cxx
            

            Build options:
            Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile egl eglfs evdev eventfd freetype full-config getaddrinfo getifaddrs iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis no-harfbuzz opengl opengles2 pcre png posix_fallocate qpa qpa reduce_exports release rpath shared small-config system-zlib xcb xcb-plugin xcb-qt xkbcommon-qt xlib
            Build parts ............ libs
            Mode ................... release
            Using C++11 ............ yes
            Using PCH .............. no
            Target compiler supports:
            iWMMXt/Neon .......... no/auto

            Qt modules and options:
            Qt D-Bus ............... no
            Qt Concurrent .......... yes
            Qt GUI ................. yes
            Qt Widgets ............. yes
            Large File ............. yes
            QML debugging .......... yes
            Use system proxies ..... no

            Support enabled for:
            Accessibility .......... yes
            ALSA ................... no
            CUPS ................... no
            Evdev .................. yes
            FontConfig ............. no
            FreeType ............... yes (bundled copy)
            Glib ................... no
            GTK theme .............. no
            HarfBuzz ............... no
            Iconv .................. yes
            ICU .................... no
            Image formats:
            GIF .................. yes (plugin, using bundled copy)
            JPEG ................. yes (plugin, using bundled copy)
            PNG .................. yes (in QtGui, using bundled copy)
            journald ............... no
            mtdev .................. no
            Networking:
            getaddrinfo .......... yes
            getifaddrs ........... yes
            IPv6 ifname .......... yes
            OpenSSL .............. no
            NIS .................... yes
            OpenGL / OpenVG:
            EGL .................. yes
            OpenGL ............... yes (OpenGL ES 2.x)
            OpenVG ............... no
            PCRE ................... yes (bundled copy)
            pkg-config ............. yes
            PulseAudio ............. no
            QPA backends:
            DirectFB ............. no
            EGLFS ................ yes
            KMS .................. no
            LinuxFB .............. yes
            XCB .................. yes (bundled copy)
            EGL on X ........... no
            GLX ................ no
            MIT-SHM ............ yes
            Xcb-Xlib ........... no
            Xcursor ............ yes (loaded at runtime)
            Xfixes ............. yes (loaded at runtime)
            Xi ................. yes (loaded at runtime)
            Xi2 ................ no
            Xinerama ........... yes (loaded at runtime)
            Xrandr ............. yes (loaded at runtime)
            Xrender ............ no
            XKB ................ yes
            XShape ............. yes
            XSync .............. yes
            XVideo ............. yes
            Session management ..... yes
            SQL drivers:
            DB2 .................. no
            InterBase ............ no
            MySQL ................ no
            OCI .................. no
            ODBC ................. no
            PostgreSQL ........... no
            SQLite 2 ............. no
            SQLite ............... yes (plugin, using bundled copy)
            TDS .................. no
            udev ................... no
            xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
            zlib ................... yes (system library)

            NOTE: libxkbcommon and libxkbcommon-x11 0.4.1 or higher not found on the system, will use
            the bundled version from 3rd party directory.
            NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
            Configure with '-qreal float' to create a build that is binary compatible with 5.1.
            @

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dasRicardo
              wrote on 10 Sept 2014, 13:08 last edited by
              #6

              VNC is designed to remote control a desktop, you have no desktop so nothing happens. An alternative way is ssh x11 forwarding.

              **Sorry for my english :)

              PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dplamp
                wrote on 10 Sept 2014, 13:26 last edited by
                #7

                What do you mean by "have no desktop" ? If I launch startx and the VNC server on the RPi, I can connect with a VNC client, and I can see the default Raspian LXDE desktop.

                Do you mean "ssh -X pi@xxx.xxx.xxx.xxx" ? It doesn't work either. It shows up on the HDMI monitor all the same. Doesn't work either if the monitor is physically disconnected.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  creasser
                  wrote on 10 Sept 2014, 17:07 last edited by
                  #8
                  1. locally on raspi in X:
                    @./program -platform xcb@
                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dplamp
                    wrote on 11 Sept 2014, 07:05 last edited by
                    #9

                    Excellent, it works ! Thanks a lot.

                    1 Reply Last reply
                    0

                    1/9

                    10 Sept 2014, 08:15

                    • Login

                    • Login or register to search.
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved