Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD support #37

Open
pdf opened this issue Jul 22, 2020 · 10 comments
Open

FreeBSD support #37

pdf opened this issue Jul 22, 2020 · 10 comments

Comments

@pdf
Copy link
Owner

pdf commented Jul 22, 2020

I'm seeing this same issue with Firefox 78.0.2 with FreeBSD 12.1. My phone and computer can see each other, but the Firefox extension just has an Orange exclamation mark and if I click on it there are no devices listed. I did compile the kdeconnect-chrome-extension binary and ran kdeconnect-chrome-extension -install making sure to select "Firefox" from the list.

2020-07-22-191509_319x290_scrot

Originally posted by @vendion in #34 (comment)

@pdf
Copy link
Owner Author

pdf commented Jul 22, 2020

I've done zero testing on FreeBSD, but if KDE and DBUS function as expected, it might work (I'm not certain if the DBUS library supports FreeBSD correctly).

Please run:

kdeconnect-chrome-extesion -devices

from a terminal.

@vendion
Copy link

vendion commented Jul 22, 2020

It seems to give an error when I run it with that flag

[/u/h/vendion]─> kdeconnect-chrome-extension -devices
No such method 'devices' in any interface at object path '/modules/kdeconnect' (signature 'bb')
[/u/h/vendion]─> kdeconnect-chrome-extension -version
kdeconnect-chrome-extension version 0.1.3, built with go1.14.6

Although the version is reported as "0.1.3" I built it from commit f155e96 KDE connect does work and my phone and computer is paired

@pdf
Copy link
Owner Author

pdf commented Jul 23, 2020

So it appears to be connecting to DBUS okay, but it can't find the kdeconnect DBUS interfaces where they're expected to be. Please provide your kdeconnect version, and the output from:

qdbus org.kde.kdeconnect

OT: The version mismatch is an artefact of the crude version checking in the extension, I've separated the CLI version and protocol version to make troubleshooting easier in future, thanks for reminding me.

@vendion
Copy link

vendion commented Jul 23, 2020 via email

@pdf
Copy link
Owner Author

pdf commented Jul 30, 2020

Sorry for the delay, can you also please provide qdbus org.kde.kdeconnect /modules/kdeconnect - for some reason your system appears to be missing the expected filterable version of the devices() method, I'm curious what methods are available.

@vendion
Copy link

vendion commented Jul 30, 2020

Here is the output I get

[/u/h/vendion]─> qdbus org.kde.kdeconnect /modules/kdeconnect
property read bool org.kde.kdeconnect.daemon.isDiscoveringDevices
property read QStringList org.kde.kdeconnect.daemon.pairingRequests
signal void org.kde.kdeconnect.daemon.announcedNameChanged(QString announcedName)
signal void org.kde.kdeconnect.daemon.deviceAdded(QString id)
signal void org.kde.kdeconnect.daemon.deviceListChanged()
signal void org.kde.kdeconnect.daemon.deviceRemoved(QString id)
signal void org.kde.kdeconnect.daemon.deviceVisibilityChanged(QString id, bool isVisible)
signal void org.kde.kdeconnect.daemon.pairingRequestsChanged()
method void org.kde.kdeconnect.daemon.acquireDiscoveryMode(QString id)
method QString org.kde.kdeconnect.daemon.announcedName()
method QString org.kde.kdeconnect.daemon.deviceIdByName(QString name)
method QMap<QString,QString> org.kde.kdeconnect.daemon.deviceNames()
method QMap<QString,QString> org.kde.kdeconnect.daemon.deviceNames(bool onlyReachable)
method QMap<QString,QString> org.kde.kdeconnect.daemon.deviceNames(bool onlyReachable, bool onlyPaired)
method QStringList org.kde.kdeconnect.daemon.devices()
method QStringList org.kde.kdeconnect.daemon.devices(bool onlyReachable)
method QStringList org.kde.kdeconnect.daemon.devices(bool onlyReachable, bool onlyPaired)
method void org.kde.kdeconnect.daemon.forceOnNetworkChange()
method void org.kde.kdeconnect.daemon.releaseDiscoveryMode(QString id)
method QString org.kde.kdeconnect.daemon.selfId()
method void org.kde.kdeconnect.daemon.sendSimpleNotification(QString eventId, QString title, QString text, QString iconName)
method void org.kde.kdeconnect.daemon.setAnnouncedName(QString name)
property read bool org.kde.kdeconnect.daemon.isDiscoveringDevices
property read QStringList org.kde.kdeconnect.daemon.pairingRequests
signal void org.kde.kdeconnect.daemon.announcedNameChanged(QString announcedName)
signal void org.kde.kdeconnect.daemon.deviceAdded(QString id)
signal void org.kde.kdeconnect.daemon.deviceListChanged()
signal void org.kde.kdeconnect.daemon.deviceRemoved(QString id)
signal void org.kde.kdeconnect.daemon.deviceVisibilityChanged(QString id, bool isVisible)
signal void org.kde.kdeconnect.daemon.pairingRequestsChanged()
method void org.kde.kdeconnect.daemon.acquireDiscoveryMode(QString id)
method QString org.kde.kdeconnect.daemon.announcedName()
method QString org.kde.kdeconnect.daemon.deviceIdByName(QString name)
method QMap<QString,QString> org.kde.kdeconnect.daemon.deviceNames()
method QMap<QString,QString> org.kde.kdeconnect.daemon.deviceNames(bool onlyReachable)
method QMap<QString,QString> org.kde.kdeconnect.daemon.deviceNames(bool onlyReachable, bool onlyPaired)
method QStringList org.kde.kdeconnect.daemon.devices()
method QStringList org.kde.kdeconnect.daemon.devices(bool onlyReachable)
method QStringList org.kde.kdeconnect.daemon.devices(bool onlyReachable, bool onlyPaired)
method void org.kde.kdeconnect.daemon.forceOnNetworkChange()
method void org.kde.kdeconnect.daemon.releaseDiscoveryMode(QString id)
method QString org.kde.kdeconnect.daemon.selfId()
method void org.kde.kdeconnect.daemon.sendSimpleNotification(QString eventId, QString title, QString text, QString iconName)
method void org.kde.kdeconnect.daemon.setAnnouncedName(QString name)
signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties)
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()

@pdf
Copy link
Owner Author

pdf commented Jul 30, 2020

Well, now I'm very confused - the expected method appears to be available, but does not appear to be callable from our code. Just to confirm, please try: qdbus org.kde.kdeconnect /modules/kdeconnect devices false true

If that works though, I'm not really sure what to try next short of setting up a full FreeBSD + KDE env here to test on, and I'm not likely to have the time for that in the near future.

@vendion
Copy link

vendion commented Jul 31, 2020 via email

@pdf
Copy link
Owner Author

pdf commented Jul 31, 2020

Question does kdeconnect-chrome-extension interact with the kdeconnect daemon strictly through dbus calls or does in interact with the daemon directly for certain things?

Strictly through DBUS.

The error you posted earlier:

No such method 'devices' in any interface at object path '/modules/kdeconnect' (signature 'bb')

says that we couldn't find the devices method, that accepts 2 bools, but your result in your last post says that it does indeed exist, and functions as expected.

The only thing I can think is that there's a problem with the DBUS lib on FreeBSD, though I can't imagine how exactly - we appear to be connecting to the session bus okay, or it would error earlier. I can't think of a way to test beyond writing some Go DBUS code and running it on FreeBSD to probe where we're falling down, but that's going to be a little painful without a local system to test on.

@crynux
Copy link

crynux commented Aug 9, 2023

I've been working on getting kdeconnect up and running on FreeBSD 13.2; and managed to figure it out!

For one ... there are some errors in dependencies (or at least they're outdated), that required manual patching to create a build based on the most recent code for kdeconnect-chrome-extension.

Beyond that ... the error mentioned in this issue seems (at least for me) to be related to the setting of the DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID environment variables.

There does appear to be some code that attempts to set it in godbus/dbus ... but the parsing breaks (some error about authentication is printed alongside a dbus-launch like output that it tries to parse), and it can't set those variables correctly.

So ... if you have a FreeBSD build of the kdeconnect-chrome-extension binary, try setting those 2 env vars (based on dbus-launch output; I had to adapt mine to tcsh), and see if it works! On my end ... I'm able to discover, pair, and send links between devices just fine, with these set!

Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants