Reply
Thread Tools
meShell's Avatar
Posts: 60 | Thanked: 104 times | Joined on Dec 2009
#1
Soooo my first day with the SailfishOS SDK + Emulator ... tried something funny what mabye can be integrated + advanced in future.

Access your QT-App remotly with RDP

Simply add this plugin to your QT-Plugin-Folder and without any change to the sourcecode of your application run it like this:
Code:
./myqtapp -platform freerdp


I was told that for now or longer there will be no QTQuick2-Apps / OpenGL support possible, as "Qt guys have dropped the raster
backend for QtQuick"

But you CAN code SailfishOS QT-Apps WITHOUT QTQuick.
I successfully commented out the lines and had to restructure some elements as they now are not available any longer.

But slidemenu etc still working.

#in files .cpp
//#include <QtQuick>

#in files .qml
//import QtQuick 2.0




Greeter -platform wayland-egl




Greeter -platform freerdp




Test with QT Browser QupZilla (Ubuntu)





2 simultaneous connections to the same QupZilla






About

This is a QT platform plugin that allows QT-Applications to run headless and listening on RDP-Port for incoming RDP-Connections.

All one has to do would be to deploy the rquired libraries and the single QT-Platform-Plugin "libqfreerdp.so" to the Plugins dir.

Then one can call QT-Application like this without any change to the sourcecode of your application:
Code:
./myqtapp -platform freerdp

Requirements to build
(build tools: cmake, gcc, make, ...)



Would be great to get RDP-QT-Remote-App-Support in future!


I was in contact with the author of the plugin and he was so kind to fix some problems that made it harder to get it compiled, fixed the distorted output (resizing) and added improvements already (thank you very much for that!).



Videos

See more advanced and working examples here:

http://www.youtube.com/watch?v=EI0dUL1SzI4


http://www.youtube.com/channel/UCNMm...?feature=watch


VirtualBox Portable + SailfishOS SDK Setup

I am running a portable version of VirtualBox v4.3.6 and in the past the SailfishOS SDK was searching for a regpath to VirtualBox, so I added the following on my Windows x64

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oracle\VirtualBox]
"InstallDir"="P:\\VirtualBox\\app64"


VirtualBox + SailfishOS SDK + Proxy

I had some trouble because I am behind a proxy.

For me it helped to install packages with zypper, but isn't installed by default.


File: /etc/sysconfig/proxy

Code:
PROXY_ENABLED="yes"
HTTP_PROXY="http://proxy.server.com:8080"
HTTPS_PROXY="http://proxy.server.com:8080"
FTP_PROXY="http://proxy.server.com:8080"
GOPHER_PROXY=""
NO_PROXY="localhost, 127.0.0.1/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8


File: /etc/profile:

Code:
sudo vim /etc/profile

#append these lines
export http_proxy="http://proxyuser:proxypwd@proxy.server.com:8080"
export https_proxy="http://proxyuser:proxypwd@proxy.server.com:8080"
export ftp_proxy="http://proxyuser:proxypwd@proxy.server.com:8080"

reboot

Reboot


Then manually download the RPMs for zypper and augeas-libs (example Repo) by using

Code:
curl -O http://releases.sailfishos.org/sdk/0.20130731/jolla/i486/core/i486/zypper-1.8.3-1.1.3.i486.rpm

curl -O http://releases.sailfishos.org/sdk/0.20130731/jolla/i486/core/i486/augeas-libs-1.0.0-1.1.1.i486.rpm

pkcon install-local zypper-1.8.3-1.1.3.i486.rpm augeas-1.0.0-1.1.1.i486.rpm

zypper refresh

zypper install git

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080


VirtualBox + MerSDK + Shared Folder + Symlink = Protocol Error

I had a problem compiling FreeRDP on my Windows 8.1 because I got an Error about symlinks. Then tried to create one on my own, it failed.

My short workaround:
I copied the directories ".ssh" + ".scratchbox2" then made the shared folder unavailable so that I had the Linux home folder of the MerSDK-VM, copied back the folders.



There is mentioned some ways to fix this, but all of it didn't work for me.

Link1
Link2

Code:
  # On Windows 7/8 execute the following from an elevated (Admin!, UAC!) command prompt to make it work:
  # fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
  # If you normally work with an non-admin, you additionally have to do this:
  # Run “secpol.msc” as Admin and navigate to “Local Policies-User Rights Assignments” (
  # "Locale Richtlinien-Zuweisen von Benutzerrechten") and add your user to “Create symbolic links” 
  # ("Erstellen symbolischer Verknüpfungen"). Will work at next log on of the user 
  # RUN THE CONSOLE AND VIRTUALBOX AS ADMIN TO EXECUTE VAGRANT!!!!!!
  #
  # Allow VirtualBox to create symlinks in the shared folder.


  
  #VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1
   VBoxManage setextradata MerSDK VBoxInternal2/SharedFoldersEnableSymlinksCreate/home 1
   VBoxManage setextradata MerSDK VBoxInternal2/SharedFoldersEnableSymlinksCreate/target 1

  #Verify by running:

  #VBoxManage getextradata YOURVMNAME enumerate
  VBoxManage getextradata MerSDK enumerate
 
 
Run VirtualBox AND QTCreator as ADMIN! If staring the merSDK-VM from QTCreator, you will see it in the VirtualBox-Folder if both are running as admin.



SailfishOS SDK + Putty + Public Private KeyAuth

Download and run PuttyGen


Generate Keypair: SSH-2 RSA 2048 bit

Save the private key to file
Save public key to file

APPEND (Copy&paste) the public key (displayed in the upper textarea in PuttyGen)
to the authorized_key files of SailfishOS SDK:

SailfishOS\mersdk\ssh\root\authorized_keys
SailfishOS\mersdk\ssh\mersdk\authorized_keys
SailfishOS\emulator\1\ssh\nemo\authorized_keys
SailfishOS\emulator\1\ssh\root\authorized_keys

Last edited by meShell; 2014-01-29 at 08:45. Reason: SailfishOS SDK + Putty + Public Private KeyAuth
 

The Following 7 Users Say Thank You to meShell For This Useful Post:
meShell's Avatar
Posts: 60 | Thanked: 104 times | Joined on Dec 2009
#2
Developer Infos

I will try to write some information so if someone wants to try to build for arm.

Code:
pkcon install zypper
zypper install cmake gcc gcc-c++

pkcon install qtchooser

Download Sources

Code:
mkdir ~/git
cd ~/git

git clone https://github.com/awakecoding/FreeRDP/

git clone https://github.com/hardening/qfreerdp_platform


Prepare and build

For now I needed to build FreeRDP-Libs two times, once monolithic and once without, as the other sources currently search from both.


"-DARM_FP_ABI=hard" is only needed on arm.

FreeRDP

Code:
#first build monolithic

cd ~/git/FreeRDP
cmake -DCMAKE_INSTALL_PREFIX="~/freerdp" -DCMAKE_BUILD_TYPE=Release -DSTATIC_CHANNELS=on -DWITH_SERVER=ON -DWITH_X11=OFF -DMONOLITHIC_BUILD=ON -DARM_FP_ABI=hard

make
make install


#second build
make clean
rm CMakeCache.txt

cmake -DCMAKE_INSTALL_PREFIX="~/freerdp" -DCMAKE_BUILD_TYPE=Release -DSTATIC_CHANNELS=on -DWITH_SERVER=ON -DWITH_X11=OFF -DARM_FP_ABI=hard

make


QT-Plugin


old first try: cannot be built on the phone shows conflicts...

Code:
pkcon install qt5-qmake libxkbcommon-devel glib2-devel qt5-qtgui qt5-qtcore qt5-qtdbus-devel



zypper install qt5-qtplatformsupport-devel

Problem: qt5-qtplatformsupport-devel-5.1.0+git28-1.10.2.armv7hl requires pkgconfig(Qt5Gui), but this requirement cannot be provided
  uninstallable providers: qt5-qtgui-devel-5.1.0+git28-1.10.2.armv7hl[jolla]
 Solution 1: Following actions will be done:
  deinstallation of libhybris-sbj-0.0.0.33-10.8.1.jolla.armv7hl
  deinstallation of libhybris-sbj-libEGL-0.0.0.33-10.8.1.jolla.armv7hl
  deinstallation of libhybris-sbj-libGLESv2-0.0.0.33-10.8.1.jolla.armv7hl
  deinstallation of libhybris-sbj-libhardware-0.0.0.33-10.8.1.jolla.armv7hl
  deinstallation of libhybris-sbj-libnfc-0.0.0.33-10.8.1.jolla.armv7hl
  deinstallation of libhybris-sbj-libwayland-egl-0.0.0.33-10.8.1.jolla.armv7hl
  deinstallation of pulseaudio-modules-droid-sbj-4.0.10-10.8.1.jolla.armv7hl
  deinstallation of hybris-libsensorfw-qt5-0.7.3.31-10.8.1.jolla.armv7hl
  deinstallation of gstreamer0.10-omx-0.0.20131205.0-10.6.1.jolla.armv7hl
  deinstallation of gstreamer0.10-colorconv-0.0.20131121.0-10.1.1.jolla.armv7hl
  deinstallation of libgstreamer0.10-nativebuffer-0.0.20131118.0-10.6.2.jolla.armv7hl
  deinstallation of libgstreamer0.10-gralloc-0.0.20131118.0-10.6.2.jolla.armv7hl
  deinstallation of gstreamer0.10-droideglsink-0.0.20131118.0-10.6.2.jolla.armv7hl
  deinstallation of gstreamer0.10-droidcamsrc-0.0.20131210.0-10.9.1.jolla.armv7hl
  deinstallation of geoclue-provider-hybris-0.0.14-10.5.1.jolla.armv7hl
  deinstallation of qt5-eglfs-qcom-hwcomposer-plugin-5.1.0+git15-10.4.14.jolla.armv7hl
  deinstallation of mce-plugin-libhybris-1.1.2-10.3.1.jolla.armv7hl
  deinstallation of tohd-plugin-nfc-nxp-1.0.0-10.1.1.jolla.armv7hl
  deinstallation of sbj-pulseaudio-settings-0.5.9-10.14.5.jolla.armv7hl
  deinstallation of hybris-libsensorfw-qt5-configs-0.7.3.31-10.8.1.jolla.noarch
  deinstallation of sbj-version-0.0.3-10.3.1.jolla.armv7hl
 Solution 2: do not install qt5-qtplatformsupport-devel-5.1.0+git28-1.10.2.armv7hl
 Solution 3: break qt5-qtplatformsupport-devel-5.1.0+git28-1.10.2.armv7hl by ignoring some of its dependencies


#as info

The following packages have to be installed:

glib2-devel-2.32.4-1.2.1.armv7hl       A library of handy utility functions
 pcre-devel-8.31-1.1.1.armv7hl  Development files for pcre
 python-2.7.5-1.1.1.armv7hl     An interpreted, interactive, object-oriented programming language
 python-libs-2.7.5-1.1.1.armv7hl        Runtime libraries for Python


Code:
cd ~/git/qfreerdp_platform

export INSTALL_PATH=$HOME/freerdp
export PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/:$INSTALL_PATH/share/pkgconfig/

qtchooser --qt=5 -run-tool=qmake
make



Updateing Sources from GIT

For completeness.

Code:
cd ~/git/FreeRDP
git pull

cd ~/git/qfreerdp_platform
git pull

Last edited by meShell; 2014-01-17 at 08:45. Reason: compiled successfully for armv7hl
 

The Following 2 Users Say Thank You to meShell For This Useful Post:
meShell's Avatar
Posts: 60 | Thanked: 104 times | Joined on Dec 2009
#3
QT-Plugin


Update 2014-01-15

I succesfully compiled FreeRDP + qfreerdp on the SailfishOS SDK VM for armv7hl


Next step:
Now is the question how to get the missing QT-Libs onto the phone together with the app.


... work in progress ... would be happy about any help!



Compile on MerSDK-VM

I documented nearly every step what I did, so there may be more than nessesary, if: tell me.

I connected directly to the MerSDK-VM with putty after generating my own keys like descriped earlier.

mersdk@127.0.0.1
Port: 2222
use private key file




Code:
## GIT

sudo zypper install git

## QT5 qtchooser

sudo zypper install qtchooser qt5-qmake libxkbcommon-devel glib2-devel qt5-qtgui qt5-qtcore

## CMAKE make

sudo zypper install cmake make

## QT5-qtplatformsupport-devel

sudo zypper install qt5-qtplatformsupport-devel


## download sources

cd ~
mkdir git
cd git

git clone https://github.com/awakecoding/FreeRDP/
git clone https://github.com/hardening/qfreerdp_platform


sb2 -t SailfishOS-armv7hl -R sudo zypper install libxkbcommon-devel glib2-devel
sb2 -t SailfishOS-armv7hl -R zypper install cmake
sb2 -t SailfishOS-armv7hl -R zypper install openssl-devel

## compile FreeRDP

cd FreeRDP

sb2 -t SailfishOS-armv7hl -R cmake -DCMAKE_INSTALL_PREFIX="~/freerdp" -DCMAKE_BUILD_TYPE=Release -DSTATIC_CHANNELS=on -DWITH_SERVER=ON -DWITH_X11=OFF -DMONOLITHIC_BUILD=ON -DARM_FP_ABI=hard
sb2 -t SailfishOS-armv7hl -R make
sb2 -t SailfishOS-armv7hl -R make install

sb2 -t SailfishOS-armv7hl -R make clean
sb2 -t SailfishOS-armv7hl -R rm CMakeCache.txt
sb2 -t SailfishOS-armv7hl -R cmake -DCMAKE_INSTALL_PREFIX="~/freerdp" -DCMAKE_BUILD_TYPE=Release -DSTATIC_CHANNELS=on -DWITH_SERVER=ON -DWITH_X11=OFF -DARM_FP_ABI=hard
sb2 -t SailfishOS-armv7hl -R make
sb2 -t SailfishOS-armv7hl -R make install


## QT Plugin

cd ~/git/qfreerdp_platform

sudo zypper install pcre-devel glib2-devel libxkbcommon libxkbcommon-devel

sb2 -t SailfishOS-armv7hl -R zypper install libxkbcommon-devel libxkbcommon glib2-devel pcre-devel

sb2 -t SailfishOS-armv7hl -R zypper install qt5-qttools-qtuitools-devel



export INSTALL_PATH=$HOME/freerdp
export PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/:$INSTALL_PATH/share/pkgconfig/

sb2 -t SailfishOS-armv7hl -R qtchooser --qt=5 -run-tool=qmake
sb2 -t SailfishOS-armv7hl -R make

export QT_PLUGIN_PATH=$(pwd)/plugins

#or later copy to qt plugins path: /usr/lib/qt5/plugins/platforms/


Running on the Jolla Phone

Now how to get it running on the phone, what is missing ...



Static build possible?

Maybe it would be possible to build the plugin as static, but that may require to recompile QT.

Code:
#### EXPERIMENTAL #####

## try to build static #######
vi /srv/mer/targets/SailfishOS-armv7hl/usr/share/qt5/mkspecs/common/gcc-base-unix.conf

#QMAKE_LFLAGS_SHLIB     += -shared
QMAKE_LFLAGS_SHLIB     += -static

#copy arm-compiled-freerdp-libs

cp -R /home/mersdk/freerdp/lib/* /srv/mer/targets/SailfishOS-armv7hl/lib/freerdp/

#add ld-config
vi /srv/mer/targets/SailfishOS-armv7hl/etc/ld.so.conf.d/freerdp.conf

/srv/mer/targets/SailfishOS-armv7hl/lib/freerdp/

sb2 -t SailfishOS-armv7hl -R ldconfig


#######################

Last edited by meShell; 2014-01-28 at 08:44.
 

The Following 2 Users Say Thank You to meShell For This Useful Post:
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#4
A static build of Qt won't work, at least not out of the box. You could static link your dependencies into the plugin you're building (but keep in mind that you have three license choices for Qt when thinking about redistribution of your plugin).

If your plugin has dependencies, you can statically link those into the plugin if that's an option. Alternatively, you need to deploy all libraries it depends on as well as the plugin itself.

To view dependencies at link time, take a look around google for 'ldd'.
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 

The Following 2 Users Say Thank You to w00t For This Useful Post:
meShell's Avatar
Posts: 60 | Thanked: 104 times | Joined on Dec 2009
#5
thank you very much for your quick answer. yes I read about the license problem, and as qt is completely new for me it is vefy difficult to find workarounds.

so if I underdtand, I would have to extract everything that conflicts and put in in place manually and hope to get it working.
 

The Following User Says Thank You to meShell For This Useful Post:
meShell's Avatar
Posts: 60 | Thanked: 104 times | Joined on Dec 2009
#6
RDP integrated into Tizen by default?

https://lists.tizen.org/pipermail/iv...il/002167.html


Theay are able to run GL-Applications over RDP:

https://lists.tizen.org/pipermail/iv...il/002241.html
https://www.youtube.com/watch?v=WA0esHzOnOk

Last edited by meShell; 2014-05-22 at 09:24.
 

The Following User Says Thank You to meShell For This Useful Post:
Reply

Tags
freerdp, freerds, jolla, qt remote apps


 
Forum Jump


All times are GMT. The time now is 01:24.