• 7 Posts
  • 15 Comments
Joined 3 years ago
cake
Cake day: July 18th, 2023

help-circle




  • I don’t know how you add a call to an API that doesn’t exist

    As far as I know, these messages are passed to the portal using dbus. So the app could just fire the correct dbus message with correct parameters (you can find the correct values in the Wayland specs). The portal, used by the compositor, then takes the message and runs the requested action or returns something like not implemented or unknown method.

    The trickier part is testing when no portal supports the API calls.

    But yeah, interoperability between systems can be a pain in the ass.

    The process is analogous to sending an http request. Your app sets up the httpclient and points it to a URI and after sending the request you get back either the content with 200 status or 404. If you get 404 you can show the user a message like “this website doesnt support feature xyz”


  • not a single one of those compositors implement the entire API surface you need.

    Aegis has requested that those of us who wish to not see Talon on Linux die out do the following:

    • Do not, for any reason, discuss Wayland support with him;
    • As a community, gather together, and successfully implement the entire API surface needed for Talon on GNOME, KDE, and wlroots,

    At which point a new Wayland backend will be considered for Talon.

    I agree that it’s not up to Talon to implement the missing APIs in the compositors. However, I think the dev is doing a disservice to the users of Talon by not adding wayland support (ie making the calls to the APIs Talon needs to function). If Talon used those wayland protocols, users could point to the software and say it’s “not working on compositor because the compositor is missing wayland protocols”.

    IMO its a much easier sell to the compositor people when they know a useful piece of software is actively trying to target those APIs.

    That being said, I sure hope the situation improves. The state of accessibility on wayland is pitiful.














  • If you are looking to do something like Github’s Personal Access Tokens (PAT) then it is easiest to just think about it like a password:

    • Create a high entropy (secure) string
    • Store the hash of the string in a database table
    • Store the permissions and other metadata with the PAT’s hash
    • Validate the PAT (permissions, revoke status, etc) on each request to the server

    Storing the hash of the token, like you do with passwords, is a good practice in case your db is ever compromised as it wont leave the tokens accessible and reusable without a lot of effort.




  • Have you tried setting a breakpoint and seeing if it hits? Assuming the app you are debugging is just a Console.WriteLine("Hello World"); and no breakpoints are set, the app will execute, output hello world, and terminate. Which means you wouldn’t see anything happen in VS Code.

    If you are super new to all this, I would suggest you look for videos/articles on how to debug using visual studio code as they may provide some insights or concepts you may not already know.