axolotl-chat / axolotl

A Signal compatible cross plattform client written in Go, Rust and Vuejs
https://axolotl.chat
GNU General Public License v3.0
326 stars 52 forks source link

Running textsecure-qml on Desktop and pureOS/librem5 #64

Closed pparent76 closed 3 years ago

pparent76 commented 5 years ago

Hi,

Just a quick question do you think this could be compiled to run on desktop Debian, and/or on librem5 /pureOS (which is pretty much equivalent.)

Thank's

nanu-c commented 5 years ago

i had a official letter forth and back with librem and they don't ship qt. One task for the librem would be to get qt running there but then they could use ubuntu touch. The ut community has still no dev board I think. Nevertheless the app is divided in a background process and a gui and the gui could be rewritten. It's partly written with uitk/https://github.com/ubports/ubuntu-ui-toolkit which is ubuntu touch specific. It could be partly rewritten in qqc2 and then shipped to debian/librem5. Are you willing to join development? ;)

pparent76 commented 5 years ago

Ok sounds pretty strange to me that they don't ship qt, as plasma-mobile (which is based on qt) is running on their device ( https://www.youtube.com/watch?v=q_rU1WbJq-M https://developer.puri.sm/Librem5/Development_Environment/Boards/HowTo/Install_Plasma_Mobile.html#devkit-howto-install-plasma-mobile ) and a buch of qt-based apps like VLC , and their system is based on Debian (so it should have pretty much all packages Debian has, including qt).

Yes I might spend time trying to port this app, but not before I receive the phone.

nanu-c commented 5 years ago

Are you getting your phone? the axolotl branch uses either electron or basic webengineview, so making a package is easy now

pparent76 commented 5 years ago

I signed in for Chestnut batch, so I should receive my phone in december. I will look at it then.

Thank's a lot!

prog-amateur commented 5 years ago

Hi, there is a discussion in Purism forum about Signal/Silence, and you have been mentioned. It's like you are a hope to make it work because it sadly seems that Silence & Purism are leaving the request unanswered.

nanu-c commented 4 years ago

@pparent76 You can try now, i think it should work. if you want, i can upload a binary

pparent76 commented 4 years ago

I have a Pinephone with postmarketOS + phosh. I can try, but i'm afraid that alpine linux does not have all the depedencies pre-compiled (starting with golang).

Unfortunatly I still don't have a Librem5

pparent76 commented 4 years ago

I will try find time to see if I can add it to pmos, withing the next 2 weeks of confinement, and also if I can compile it for my desktop debian (amd64).

nanu-c commented 4 years ago

This is for debian/ubuntu

For building

nanu-c commented 4 years ago

Also, i have a pinephone, i can test also things, but at the moment i am working mostly on stability

bjoern-tantau commented 4 years ago

I successfully compiled and ran axolotl and the web interface on my pinephone with Debian Phosh (almost the same as pureOS). I could access it perfectly fine with my browser. I did not try registering a number yet, as I'm not sure if this will remain my daily driver.

In the end I think I might just put it on my server and connect over the web through some browser on my phone. Just have to think of a way to secure it.

bjoern-tantau commented 4 years ago

Hmph, now it doesn't start for some reason. It wants to start electron, but can't find it.

debian@pinephone:~/go/src/github.com/nanu-c/axolotl$ go run .
INFO[0000] [axolotl] Starting Signal for Ubuntu version 0.8.1
INFO[0000] [axolotl] Setup completed
INFO[0000] [axolotl] Start electron
DEBU[0000] [axolotl] Run Backend
INFO[0000] astikit: starting worker...
DEBU[0000] [axolotl] openDb: /home/debian/.local/share/textsecure.nanuc/db
DEBU[0000] [axolotl] NewDataStore
INFO[0000] [axolotl] Axolotl server started
INFO[0000] [axolotl] Starting axolotl ws
DEBU[0000] [axoltol] axoltol-web path ./axolotl-web/dist
DEBU[0000] main: starting astilectron failed: provisioning failed: provisioning electron failed: unzipping /home/debian/.config/textsecure.nanuc/electron/vendor/electron-linux-arm64-v7.1.7.zip into /home/debian/.config/textsecure.nanuc/electron/vendor/electron-linux-arm64 failed: unzipping /home/debian/.config/textsecure.nanuc/electron/vendor/electron-linux-arm64-v7.1.7.zip into /home/debian/.config/textsecure.nanuc/electron/vendor/electron-linux-arm64 failed: astikit: opening overall zip reader on /home/debian/.config/textsecure.nanuc/electron/vendor/electron-linux-arm64-v7.1.7.zip failed: zip: not a valid zip file
DEBU[0000] [axolotl] NewDataStore finished
INFO[0000] [axolotl] Loading Chats
INFO[0000] [axolotl] Db setup finished
DEBU[0000] [axolotl] Start Session after Decryption
DEBU[0000] [axolotl] starting Signal connection
DEBU[0000] [axolotl] config path:  /home/debian/.config/textsecure.nanuc
DEBU[2020/05/06 12:54:17] [axoltol] Opening Dialog: getPhoneNumber
DEBU[2020/05/06 12:54:17] [axolotl-ws] send request getPhoneNumber
INFO[0000] astikit: stopping worker...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x72adec]

goroutine 21 [running]:
github.com/asticode/go-astilectron.(*writer).write(0x0, 0xb873b4, 0x11, 0xb96aa2, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/debian/go/pkg/mod/github.com/asticode/go-astilectron@v0.14.0/writer.go:39 +0x1a4
github.com/asticode/go-astilectron.synchronousEvent.func1(0x400014e180, 0xb90797)
        /home/debian/go/pkg/mod/github.com/asticode/go-astilectron@v0.14.0/helper.go:145 +0x6c
github.com/asticode/go-astilectron.synchronousFunc(0xd25fe0, 0x400014e280, 0xd17aa0, 0x4000140000, 0x4000587700, 0xb90797, 0x1c, 0x0, 0x0, 0xffffffffffffffff, ...)
        /home/debian/go/pkg/mod/github.com/asticode/go-astilectron@v0.14.0/helper.go:133 +0x168
github.com/asticode/go-astilectron.synchronousEvent(0xd25fe0, 0x400014e280, 0xd17aa0, 0x4000140000, 0x0, 0xb873b4, 0x11, 0xb96aa2, 0x1, 0x0, ...)
        /home/debian/go/pkg/mod/github.com/asticode/go-astilectron@v0.14.0/helper.go:144 +0x9c
github.com/asticode/go-astilectron.(*Window).Create(0x4000140000, 0xb8a307, 0x15)
        /home/debian/go/pkg/mod/github.com/asticode/go-astilectron@v0.14.0/window.go:304 +0x140
main.runElectron()
        /home/debian/go/src/github.com/nanu-c/axolotl/main.go:111 +0x36c
main.runUI(0x0, 0x0)
        /home/debian/go/src/github.com/nanu-c/axolotl/main.go:59 +0x88
created by main.main
        /home/debian/go/src/github.com/nanu-c/axolotl/main.go:140 +0xc4
exit status 2
bjoern-tantau commented 4 years ago

I think startup just took too long on my first try that I killed the server before getting the error. The node server seems to serve a page even if it can't connect to the backend.

nanu-c commented 4 years ago

There are different modes for running axolotl. The standard one is using electron which is used in the snap package and is downloading electron on the first start. Bad idea, but yeah it works. Second Possibility which uses ubuntu touch is running qmlscene which uses qt's webengineview (textsecure -e ut). This should work maybe. If there is a use case to "just" start the server without a frontend, then this mode can be added easily :)

pparent76 commented 4 years ago

I think with phosh + ephany you can easilly add an html5 app to the system just with an URL so I think there is indeed a use case for that.

nanu-c commented 4 years ago

There you go https://github.com/nanu-c/axolotl/commit/66e47c10d08dc4227be2996354003e3ec693956f if run with -e server no frontend will be started

bjoern-tantau commented 4 years ago

Nice, thanks, it works! The server is available over the network, though. Wouldn't that enable anyone to read the messages?

Should I open a new ticket for that?

Edit: I opened the PR #138 to fix that.

bjoern-tantau commented 4 years ago

I tried to run the qml version with -e ut.

I was able to install some of the dependencies in Debian:

sudo apt install qml-module-qtquick-controls2 qml-module-qtwebsockets qml-module-qtwebengine qml-module-qtmultimedia

But it's still missing the modules Ubuntu.Content, QtQuick.Controls.Suru, Ubuntu.Components, Ubuntu.Components.Popups. I'll see if I can get them from Ubports.

nanu-c commented 4 years ago

We should make a more simple version for phosh because phosh isn't using the filesharing between apps which is Ubuntu.Content andUbuntu.Components, QtQuick.Controls.Suru is the ut theme and Ubuntu.Components.Popups used for the Copy/Paste of the Signal Desktop address. It's this file https://github.com/nanu-c/axolotl/blob/master/guis/qml/ut/MainUt.qml

nanu-c commented 4 years ago

Not to forget the resizeing of the window, when the on screen keyboard pops up

BradyDale commented 4 years ago

So what's the latest on this effort? Sounds like progress has been made but it isn't quite nailed down yet

nanu-c commented 4 years ago

I need someone who helps me with debian packaging, either in a live session or by a merge request, the snap package already works...

joshbowyer commented 4 years ago

I tried to run the qml version with -e ut.

I was able to install some of the dependencies in Debian:

sudo apt install qml-module-qtquick-controls2 qml-module-qtwebsockets qml-module-qtwebengine qml-module-qtmultimedia

But it's still missing the modules Ubuntu.Content, QtQuick.Controls.Suru, Ubuntu.Components, Ubuntu.Components.Popups. I'll see if I can get them from Ubports.

Were you ever able to get it working @bjoern-tantau ? Even the flatpak doesnt work for me on Mobian, as electron dies with exit code 7, and somebody said the same issue is present in the Snap release... the QML method may be what we need to use and I see you were working on that

bjoern-tantau commented 4 years ago

I tried to run the qml version with -e ut. I was able to install some of the dependencies in Debian: sudo apt install qml-module-qtquick-controls2 qml-module-qtwebsockets qml-module-qtwebengine qml-module-qtmultimedia But it's still missing the modules Ubuntu.Content, QtQuick.Controls.Suru, Ubuntu.Components, Ubuntu.Components.Popups. I'll see if I can get them from Ubports.

Were you ever able to get it working @bjoern-tantau ? Even the flatpak doesnt work for me on Mobian, as electron dies with exit code 7, and somebody said the same issue is present in the Snap release... the QML method may be what we need to use and I see you were working on that

No, I just ran the server and accessed the frontend via browser. But my parents were complaining, that I wasn't reachable through calls so I went back to Android for now.

My longterm Mobian goal would be to get libpurple-signald running with Chatty.

stephen304 commented 3 years ago

I got my L5 a couple weeks ago if you need anybody to test, it's running PureOS Byzantium currently - did you get as far as having a prototype for a native ui? (as opposed to using a browser)

nanu-c commented 3 years ago

I would say, the deb version or the flatpack version can be used now, see https://github.com/nanu-c/axolotl#installation

pparent76 commented 3 years ago

Yes tested it works.