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

Fix DBUS interface for recent KDE Connect versions #56

Open
pdf opened this issue Oct 1, 2023 · 12 comments · May be fixed by #58
Open

Fix DBUS interface for recent KDE Connect versions #56

pdf opened this issue Oct 1, 2023 · 12 comments · May be fixed by #58
Assignees
Labels

Comments

@pdf
Copy link
Owner

pdf commented Oct 1, 2023

Looks like KDE Connect have removed the old *Trusted properties/signals, and now uses *PairState need to update the DBUS interfaces and UI logic to use the new properties if they exist.

@albertvaka
Copy link

Sorry for breaking this. "isTrusted" is called "isPaired" now.

@pdf
Copy link
Owner Author

pdf commented Oct 10, 2023

Yeah, I have the DBUS side sorted, just need to plumb it through the NativeHost interface to the UI, and have ended up down a rabbit hole of extension manifest v3, serviceworkers and general refactoring.

@hemanti0503
Copy link

Hey @pdf, what's the status on this? I too see my devices in Firefox, but also the red exclamation mark and can't send, unfortunately.

@pdf
Copy link
Owner Author

pdf commented Oct 30, 2023

Sorry for the delay, IRL stuff has had me out of town and time-poor the last couple of weeks.

@hemanti0503
Copy link

Thanks for the update! It's great seeing you still working on this. Thank you for all your work!

@sudoshindo
Copy link

Subscribing to this issue, waiting for fix.

@carnager
Copy link

until (if) this gets fixed, one can use the external application addon, which lets you chose an external binary with arguments and custom icon.

@carnager
Copy link

carnager commented Feb 11, 2024

I don't know if external links are ok here... but in worst case it gets deleted:
https://addons.mozilla.org/de/firefox/addon/external-application/
https://chromewebstore.google.com/detail/external-application-laun/bifmfjgpgndemajpeeoiopbeilbaifdo?pli=1

Steps to make this work:

  1. Get your device ID: kdeconnect-cli -l
  2. Open Extensions Preferences
  3. Fill in title
  4. Fill in path to kdeconnect-cli
  5. for arguments use: -d ID --share [HREF]
  6. Enable toolbar Icon option and choose Page, Link, Image and Tab (or a subset of your desire)
  7. Choose an Icon
  8. Select "Surround Arguments with Quote characters"
  9. Hit "Add Application"

Now you should have a new icon in your extensions button menu. Once you click this it opens a page with the link for the native application. Download this, extract it, run ./install.sh

Multiple Devices

You don't get a menu with all your devices. For each device you need to add a separate "Application". Fill in the same details and just change the ID in arguments to match your other devices. Also change the title of the Application.
When you rightclick the extension icon you can then switch your "Applications"

If this seems cumbersome to you, don't call kdeconnect-cli directly, but use your own custom script, which lists all devices using dmenu/rofi/etc and then sends the url to it.

Here is a custom script that uses rofi. the only argument this script needs is [HREF]

#!/bin/bash

_files=( "$@" )

_id=$(kdeconnect-cli -a --id-name-only 2>&1 | rofi -dmenu -p '> ' -mesg "Choose Device")
if [[ -z "${_id}" ]]; then
    exit
else
    _id=$(awk '{ print $1 }' <<< "${_id}")
fi

for x in "${_files[@]}"; do
    kdeconnect-cli -d "${_id}" --share "${x}"
done

Screenshot-2024-02-11-105030

Using this approach has another advantage: You can actually see if the device is available. calling kdeconnect-cli directly you will never know if the device was ready to receive data.

@carnager
Copy link

Ok, added Instructions to make this work.

@sudoshindo
Copy link

@carnager Got it all setup, thanks.

One important thing to note is that the install script provided by the extension creates folders to put the native messaging hosts in even though the corresponding browser isn't installed.

@zunjack
Copy link

zunjack commented Jul 13, 2024

@pdf

@sudoshindo
Copy link

Someone please maintain this repo.

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

Successfully merging a pull request may close this issue.

6 participants