Live data from Hacker News

Show HN: X11 desktop widget that shows location of your network peers on a map

github.com

41–50 of 90 posts

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#41
OpenBSD devs did the same with either XPlanet or Xearth, can't rememeber. Now they use a GeoJson format.

Then you can import it under geo/viking port:

     doas pkg_add viking
Open Viking and just load the geo.json file from

        /usr/local/share/markers/OpenBSD.geojson

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#45
post #43

What's a network peer?

Yeah from an extremely quick read of the code, I agree with atworkc. It's showing any IP address you have an established network connection to.

  void refreshConnections() {
    ssOutput =
        popen("ss -atun4 | grep ESTAB | awk '{print $6}' | cut -f1 -d\":\"", "r");

    if (ssOutput == NULL) {
      printf("Failed to run ss command\n");
      exit(1);
    }
  }
edit: ssOutput is a global variable which is read elsewhere.

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#46
post #17

Earlier quoted context omitted.

Those 3 dots are your peers, the other end of the TCP connection :) So you basically have some apps running in the background (or foreground) that are making those connections.

Okay, got it, thanks. I suppose it could also be the FIOS router itself making those connections, or any of the other systems on my local network.

It's only showing connections directly initiated by your computer. Not anything "upstream" of you like the FIOS router. It would also show any connections TO your computer, but being behind NAT on a normal home network, that would likely be nothing unless you've intentionally punched holes.

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#47
post #17

Forgive my ignorance, but I'm not sure what this is showing me. I'm running it on my home linux system, which is connected to the Internet via Verizon FIOS. The map shows three red dots, none of which are near me.

Those 3 dots are your peers, the other end of the TCP connection :) So you basically have some apps running in the background (or foreground) that are making those connections.

I'm colorblind and had to change the dots color. Might be a nice config option.

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#49
post #23

This seems like it belonged on freshmeat ca. Y2K.

What's that? Webarchive/google don't return much of anything.

http://freshmeat.net was a directory of open source software back in the 90's and noughts. It was one of the main ways to discover software.

But what is X11? Is that like Wayland? ;-)

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#50

This is some old school style bare bones C. popen with a big old pipe chain is pretty quick n dirty. I’d have gone digging around in proc for the active connections. Cool stuff though. I like that it’s so straightforward to read.

> This is some old school style bare bones C.

Which has now become some kind of meta-ironic fashion statement. It's 2025's going to the coffee shop with a typewriter.

Post reply on HN