Access Chatty from your PC with GTK Broadway

I put together something simple that I have found useful and thought I’d share with you all.

I’m often at my PC during the day and have wanted an easy way to view and send/receive texts from my PC.
There already exist a few ways of doing this - mmcli does allow you to view and send texts.
There is also waypipe, which is similar to X11 forwarding with ssh -X. I did try this a while back but couldn’t get it working the way I wanted. (things may be different now)
I was also weighing the idea or writing some small web app to run on the phone that would let you access texts from a web browser.

I asked on Matrix and Guido pointed me to Broadway. This is pretty perfect for what I wanted and I was able to slap something together really easily to make it work.

To try it:

# Chatty must be killed twice. Once will stop the actual GUI app. The second kills the chatty daemon process that is always running in the background.
$ killall chatty && killall chatty
 
# Next, start broadwayd
$ broadwayd :5

# Finally, in another shell, start chatty while connecting it to :5 from broadwayd:
$ GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 chatty

You should now be able to access chatty from your web browser on another device by going to http://<your phone's hostname or IP address>:8085.
Example, if your phone’s name is pureos (the default on L5), you want http://pureos:8085. Running the command ip a on your phone will also help you get your phone’s IP address, if that helps.

Note that once you stop this, the chatty daemon chatty -d needs to be restarted or else you won’t receive texts properly.


I wrapped all of this into an “app” that if you are interested, can grab from here: chatty-web
I’ve been using it for a week or so now and it seems to work fine enough. But, there are some problems with this setup, and they are listed on the README.

I also created a Ferdium recipe since my ultimate goal was to use Chatty embedded in Ferdium. I’m not submitting that back to the Ferdium project since this is kind of niche. But, it’s available here in the unlikely case somebody wants that, too.

So… here is what it looks like for me:

  1. I get a “Chatty-Web” app in my app menu, separate from Chatty:
    image

  2. While running, it displays the following in a yad window. (yad must be installed for this to work):

    Note that voyager is my phones hostname. Yours will be something different so don’t use this :).

  3. And here is chatty running in Ferdium on my desktop:

So yeah, that’s pretty much it. If anyone finds this useful, great!
Broadway can easily be used on other GTK apps form my experimentation, so I hope this will at least get some ideas flowing in other people’s minds.

Cheers

9 Likes