Hacker News new | past | comments | ask | show | jobs | submit login
Cool, but Obscure X11 Tools (dabamos.de)
269 points by todsacerdoti on Dec 25, 2021 | hide | past | favorite | 128 comments



- xtrlock

Allows locking your screen without hiding its contents (i.e. just disables input/interaction.) Nice for when you want to keep some stats, top, or just a plain message visible on your screen.

- sm

"screen message". Goes fullscreen and just gives you an editable text field to type a message into. Great to combine with xtrlock mentioned above to put something like "brb, grabbing coffee" on your screen for your colleagues or so :) (Technically a Gtk app I think, but fits the pattern.)

- [ed.] Xephyr

Open another X server as a window in your current X server. Great as a "canvas" for a screenshare if you want to share multiple windows but not your entire desktop. Batteries not included, you need to know how to juggle xauth & a WM (metacity for me) to make the new X server actually do something.


As for sm:

What a blast from the past feeling. I've never used this specific tool but I think there is/was something in Windows to do this? Through college in the late 90's and into my first few jobs in software engineering, there was a minor zeitgeist across my first few companies to diligently leave a description behind on your screen if you were going to be away for a while. It was a scene full of personality and power.

'Find me in the kitchen' was a courteous thing to do. 'Bob left his machine unlocked, bozo!' built camaraderie. Not seeing a message, combined with long absence, was a sense of dread. You could publicly wrap a middle finger in a heart: 'Canned. But I still love you all!'. Like a Post-It note, it said something about the person whose machine it was on. But its magnitude, beaming out of a miraculous cathode ray tube, was meant for and captured the attention of everyone walking by. You could reach and influence an audience you otherwise weren't welcome to speak so candidly to. I may have built crucial favor and long term work relationships from a silly quip. I couldn't possibly say for sure.

Now having worked mostly remote for half a decade, I miss it. This interesting slice of subculture has decomposed into messenger apps thanks to common availability of satellite-enabled-computers-in-pockets. And @here is a painfully poor substitute.


I suppose editing the marquee screensaver would have worked?


If you're like me and you think xtrlock sounds really useful, it's worth taking a moment to google how to unlock your computer again before running it.


Xephyr is also fantastic for testing a new wm or a new configuration without leaving the comfort of your existing setup.


I didn't know about Xephyr. That's super useful


Got a link for sm? I can't find it.


I think it's this one https://github.com/nomeata/screen-message

There's probably lots of such programs. I know suckless sent for example.


Can we please not promote neo-Nazis (s*ckless) or their software on HN?


Has this been proven in any sort of way? As far as I know, some suckless developers like to pretend to be "software nazis" (similar to "grammar nazi" but regarding software) and hence joke about that, but I don't think the conclusion is that they are actually nazis. Happy to be proven wrong though, haven't looked into the matter more than that and wouldn't be the first time I would be wrong.


Given how we witnessed ironic edgelord racism on places like 4chan metamorphose into open, actual, earnest racism in like a decade or less, I'd say no, s*ckless do NOT get a pass on this.

Besides, they tend to rant about SJWs a lot -- red flag #1 that they are for reals far right.


> Given how we witnessed ironic edgelord racism on places like 4chan metamorphose into open, actual, earnest racism in like a decade or less, I'd say no, s*ckless do NOT get a pass on this.

Did some quick searches and couldn't find anything racist posted by suckless developers, but hard to search for. Got any links handy so one could form their own opinion?

> Besides, they tend to rant about SJWs a lot -- red flag #1 that they are for reals far right.

Yeah, sometimes that is true, but I prefer to see hard evidence before reaching any conclusion, especially when people start advocating to stop mentioning software because of it.


> Given how we witnessed ironic edgelord racism on places like 4chan metamorphose ...

From suckless developers? Or from others? I don't understand how this is related to your argument.


This concept is new to me… any chance you could offer a quick summary? Is there like a fascist movement within software development called “suckless”, or what’s up with this?


I don't know where the neo-nazism stuff comes from, but I do know about suckless.

Suckless is a organization that describes itself as "focus on simplicity, clarity and frugality", and "philosophy is about keeping things simple, minimal and usable", from https://suckless.org/philosophy/

I think they are most famous for dwm, but have written a lot of other good software as well.


One of my most-used X utilities is not even really a graphical one.

xclip allows putting stuff in the X clipboard for subsequent pasting into any application. I use it to “copy” canned email responses which I keep in a folder as .txt files and then paste them in the browser for sending by email. No need to bother with browser extensions or built-in crappy functionality (gmail canned responses used to just lose my responses every once in a while).


I make frequent use of xcip as well, with an alias to `xclip -selection clipboard`, which puts its stdin into the clipboard for convenient pasting into GUI programs such as browsers.


Inspired by MacOS pbcopy:

    alias xpaste='xclip -out -sel clipboard'
    alias xcopy='xclip -in -sel clipboard'


Same here. In bashrc:

    alias clip='xclip -selection clipboard'
Then you can do things like:

    cat foo.txt | clip
To copy the file into your clipboard.


MacOS has pbcopy which serves the same function and is an amazingly useful way to work.


I use xsel for the same purpose. And clip.exe on Windows/WSL.


Set-Clipboard in PowerShell works as well, if you're in to that sort of thing.


Xfig is missing. A vector graphics editor for X, 36 years old and still maintained. https://en.m.wikipedia.org/wiki/Xfig


Tgif [0] is interesting too, Prolog-based, with Hyper-Structured-Graphics [1]

[0] https://en.wikipedia.org/wiki/Tgif_(program)

[1] http://bourbon.usc.edu/tgif/hgviewer.html


And apparently there is at least one guy using it to draw illustrations[1] and explain how to use it with a tutorial[0].

Sadly the site seems to have been moved from another location and the obj files (the files tgif uses) did not survive the move. Only one file was transferred from another tutorial (in Japanese) about using Tgif with Gimp, most likely because it had a "wrong" extension (.html). It does open fine in a build of Tgif i just did though[2].

[0] http://plaza.harmonix.ne.jp/~onizuka/HowToTgifE.html

[1] http://plaza.harmonix.ne.jp/~onizuka/galgaE.html

[2] https://i.imgur.com/Rs5eG3M.png


Well found ;) I remember crossing this multiple times since the 90s while looking for Tgif-related info, but always in Japanese I think... and every time with marvel for his technique applied with both excellent software.


"Hyper-Structured Graphics" --

This was new to me, thanks!

Essentially, hyperlinks for shapes; any graphic element can be linked to another, including other drawings (documents) or sections of a document.

I suppose that's obvious these days. Hyperlinks are expected.

I know that Visio (Windows) and OmniGraffle (MacOS) can do this. I would build active computer network diagrams, dashboards: you could click on a computer's graphic and get an SNMP report.

SNMP: https://en.m.wikipedia.org/wiki/Simple_Network_Management_Pr...

https://www.omnigroup.com/omnigraffle

https://www.microsoft.com/en-us/microsoft-365/visio/flowchar...

I think MacDraw did links, too. HyperCard, sure.


Great, thanks for the info! I used Tgif for exactly that, designing SNMP monitoring with network maps/dashboard like pages. Forgot exactly which combinations I implemented, but it envolved Tgif, Tkined [0], Scotty [1], Big Brother [2] and later Netsaint [3] (now known as Nagios).

[0] https://www.ibr.cs.tu-bs.de/projects/nm/tkined/welcome.html.... [1] https://www.ibr.cs.tu-bs.de/projects/nm/scotty/tcl+snmp.html [2] https://www.linuxjournal.com/article/2225 [3] http://netsaint.sourceforge.net/


And significantly used, too. I still smile every time I recognize Xfig art in articles/ papers these days.


Just curious: How do you recognize it?


This is speculation but after you use it for a while it has a very distinct look that I've never seen elsewhere. I mean if you use the stock template items.


I use these X11 tools daily:

- xterm

- xmessage

- xlockmore

- xkill

- xfontsel

- xev

- xcalc

- xchm

- glxgears

For example *xte rm(1)* can is one of the most compatible terminal emulator out there and its nice to have it started each time with random color theme:

- https://vermaden.files.wordpress.com/2021/05/xterm.random.pn...

- https://vermaden.wordpress.com/2021/05/19/freebsd-desktop-pa...

With some theming in *~/.Xdefaults* both *xmessage(1)* and *xcalc(1)* look really well:

- https://vermaden.files.wordpress.com/2018/07/openbox-alt-tab...

- https://i.imgur.com/gl1Q63H.png

I still use *xfontsel(1)* to select bitmap fonts.

I lock screen with *xlock(1)* (package name *xlockmore*) to lock the screen:

- https://vermaden.files.wordpress.com/2018/06/xlock-user-pass...

- https://vermaden.wordpress.com/2018/06/23/freebsd-desktop-pa...

I also use *xkill(1)* when some X11 window misbehaves.

Hope that helps.

Regards.


+1 for xterm. I also enable VT240 graphics (sometimes called SIXEL graphics) so that I can easily put up a graph or other graphical representation even when I'm ssh'd over to a machine somewhere on the east coast.


I'm very curious what necessitates using glxgears daily.


Um, everyone uses glxgears daily.

Right?

It's the desktop background. The X root Window.

If you finish all your work, all your windows closed, you get to see them gears!


Well, maybe not daily but everytime I configure graphics to see how hardware acceleration is doing :)


Same for xchm and xev.


> xchm

Some materials (like old HP-UX training or documentation) is available as CHM files. You can convert them to something else but it the looks like sh*t ... this using xchm(1) helps here. Yes, nowadays it also does not happen that often.

Besides xchm(1) does not look that bad:

- https://www.dedoimedo.com/images/computers/2009/xchm-another...

> xev

I use that to test what keys what codes have. For example with ThinkPad W520 the keys to the left and right of the ARROW keys are 'NEXT' and 'PREV' - I always map them to Page Up and Page Down keys with ~/.xmodmaprc file:

    ! PAGE UP/PAGE DOWN
      keycode 167 = Next NoSymbol Next
      keycode 166 = Prior NoSymbol Prior
... and I use xev(1) in that process first to check what codes are before xmodmap(1) does the job and second time when the new xmodmap(1) config is loaded.

Its not daily but I also do not use nc(1) or traceroute(1) or dig(1) daily but I of course use these tools when needed.

Hope that helps.


Has the meaning of tool changed? I wouldn’t call 3D Pong and quite a few others on this list tools. They’re programs that use X11.

Also expected tools for managing X11 (e.g. a sane font selector, or ways to make X settings understandable), but that’s minor.


I'm missing x11vnc (a VNC server that shares an existing X screen) and xclip (not xclipboard). There are also a lot of games in that list, but I did not see xkoules or xrick. There are so many nice little gems that seems to be on the brink of being forgotten, it's great to see them listed here!


It's interesting that looking at all these, the HP calculator apps, mimicking the look of physical HP calculators, don't seem to have aged as much as the others (I mean: the calculators themselves certainly do look oldschool, but the app doesn't).

The one X11 app I still use to troubleshoot issues or when I set up a new Debian system is "xeyes" (just two eyes which look/track the direction of the mouse pointer). As long as it's shipped with Debian, I'll be making sure xeyes is installed.


What kind of issues does "xeyes" help you troubleshoot?


It's a program with no blocking I/O, so if the eyes stop moving, you know you're looking at a certain kind of connectivity issue. If some more complicated app stops responding, the problem space of where to start troubleshooting is much larger.

If you miiiiight have a flaky network, leaving xeyes open in the corner can be a real headache-saver.


I use xeyes as a kind of "is remote X working" test. Quick way to test that X forwarding through ssh is functional and fast enough.


I use it to check if an app uses xwayland when I use sway


>don't seem to have aged as much as the others

Just an artifact of the whole UI being pixel mapped graphics onto buttons/labels/canvas mimicking the calculator. I imagine Tk, Xaw, or Motif is under there, you just can't see it. The TiEmu one appears to be GTK.


Although Free42 is much better on iPhone, simply because it’s always handy. Also, real HP42 was almost exactly the same size as the phone, and the fake tactile feedback is really nice.


Free42 also on Android.

Actually launches faster for me that some of the "native" calculators, which I find very strange.

I just checked: although I have Free42 on my Kindle Fire tablet, it's via Google Play Store. I don't see it on Amazon's App Store.


Back in my college days, the HP 48sx was an extension of my soul.


I use a GX and feel the same way—something about the HP 48 is just really charming and I wish for a modern alternative. Software emulation isn't enough! Leaves me longing.


Good old Nedit. I used that for two or three years over ssh with an X11 server running in Windows to do most of my development.

Nedit was very fast, had a familiar user interface (to a person raised on dos/windows) and still had a ton of functionality.


I still use NEdit when I develop code. I don't like 1GB+ RAM IDEs like Eclipse or VSCode when I can get things done in a smaller text editor and a command line. I'll use vi for small edit jobs or quick text. NEdit comes out when I need to move code blocks around or need to compare.

Some of my co-workers said it was weird that I used it because the other editors will do instant linting and suggest code for Ansible YAML. I've found that not using VSCode or Eclipse forced me to learn more about the language and I am now the local subject matter expert on Ansible.


Moving blocks of text in NEdit is its best feature. Try doing the same in vim. That is an exercise in frustration.

I first learned NEdit at Fermi where it was developed. Been using it for 28 years now. Carrying a dependency on Motif for all that time has been sort of a drag, though.


In Vim? If I'm at the end of the block it's v?foo^Md/bar^Mp, which takes about a second. Emacs is similar, ^Rfoo^X^X^W^Sbar^M^Y, 10 keystrokes instead of 8, not counting the isearch strings, and more awkward chording in exchange for being less modal. Either is significantly faster than pointing at the block with the mouse, especially if part of it goes off the screen. Vim is the opposite extreme from being an exercise in frustration.


> v?foo^Md/bar^Mp ... the opposite extreme from being an exercise in frustration.

Master class in Unix user interface design right there.


You can't do that in vi. Vim is from the Amiga, not Unix. In vi you have to say d?foo^M/bar^Mp, and though that's less keystrokes, it's harder because you don't have the continuous feedback of v mode or incremental search. Isearch isn't from Unix either; it's from ITS Emacs and wasn't in vim. It was Jef Raskin who did the research to justify centering it as a navigational method by quantitatively demonstrating its superiority to the mouse.

Of course if you don't have Vim in your brain none of this text will make any sense to you; it's almost like reading a list of (x,y) coordinates if mouse clicks. So you won't have any idea about the UI feedback I'm talking about, and you're likely to make clueless sarcastic comments like the one I'm responding to. But you can easily remedy that ignorance by running Vim or Emacs on an appropriate file and typing the recommended keystroke sequences.


of mouse clicks


and wasn't in vi


Nedit lets you use the X secondary selection to do dual block operations.


You can do it with vim registers.

vim has a register for every letter. I.e., register a, register b, ...


So you can swap two non-adjacent blocks? When is that most convenient?


Emacs too. IIRC, you right click and drag.


Same here — found it in college in the mid-90s and it became my code editor of choice for years. I brought it back recently on some test machines just out of convenience and nostalgia.


GVim is obscure?

And on xscreensavers, are they not the default/only screensavers on distros anymore?


> And on xscreensavers, are they not the default/only screensavers on distros anymore?

At least GNOME, and I think some others, have their own implementations. Quality varies.


XLennart "XLennart is a modification of the arcade game XBill. An evil and unpopular computer hacker named “Lennart” tries to install his malicious init system on various BSD and Linux systems. Like in XBill, the player has to hit him and restore infected machines."

hahah this go me!!!


Take a look on AzPainter[0] and other X11 apps & tools by Azel ('azelpg').[1,2]

[0] https://git.io/azpainter

[1] http://azsky2.html.xdomain.jp/

[2] https://gitlab.com/users/azelpg/projects


Still use xv for image viewing and editing all the time. Great for using on remote / headless cloud instances. The power of X11 is to run app remotely and display locally.


My fingers are so used to typing xv to view an image I had to alias it:

alias xv='echo You should use qiv or xli now.'


I'm using "feh" since a very long time now. Don't know if it's still up to date or now. I'll check qiv and xli.


According to https://github.com/derf/feh/commits/master, it is still maintained. I use feh as well. How to view gif or webp though? If either of those two support gif and webp, then I will switch.


Why fight your muscle memory? Do `alias xv=qiv`


> XmGrace

I used it for quite some time during my time as a PhD student and found it rather easy to use compared to gnuplot. Used it to make all my plots for my publications.


We use grace to provide graphs of resource usage for our end users. We wrote a tool that pulls together acct and other data sources to provide a graph of usage over time. It made it very easy for them to tell us that at 0300, 0442, 0529, the resource usage spiked, which makes looking through application logs much easier.


From the title I expected to find x2x.


Same. That was _the_ tool I used for "multiple desktops" after I discovered `ssh -X`.


and x2vnc, which fits in the same category of tools.


How is XEvil not mentioned? That game was always severely underrated. I kept waiting for someone to come up with a modern remake.


Yes, and Crossfire [1] too. Can’t believe how much of my PhD time was spent playing that and Xemp [2], though it got to the point that I could glance at a terminal-client map and run with it.

I recall the crystallography dept getting excited thinking there was some new research going on, because of the way I lay out my empire maps, and me leaving a printout or two lying around, back in the day :)

[1] http://www.crossfireatlas.net/world.html

[2] http://www.wolfpackempire.com/


The Motif window frames really bring back memories. And don't forget xlander - my favorite classic DECStation game.

Update: Thought xlander was extinct in the wild, but Slackware still has it in their xgames package. Runs fine on Mint 20.2.


It might bring you some joy - or not:) - to find that CDE is still actively available and maintained as well


xpilot (http://www.xpilot.org/)

Back in the day (about 1993/4?) we had what we'd now call LAN parties playing this game in the computer labs at university. To the point where the admins banned any use before a certain time in the evening because it overloaded the shared 10Mbps ethernet.

Also there was a great Breakout game for X11 at around the same time that I cannot find anything about now.


How about xdotool: X11 automation

xmodmap: Modify which keysyms pressing a given button produces

xcape: Make modifiers do double duty as regular keys when pressed and released without other keys.


Is X11 going away? what will replace it ? If you are going to make a graphics based Linux program today, what technology should you chose ?


If you're making a program today, you should be using some higher level framework or API than raw X11. If you program for Gtk or Qt, or make an OpenGL or Vulkan program, you mostly don't care about X11 or Wayland because i.e. Qt supports both.

You could use Xlib to program a client in pure X11, but that approach would have been outdated even 15 years ago. There's no good reason to do so today, even embedded systems often use Qt and there's good support for building embedded/Qt in Yocto. Most embedded devices that have any UI at all are likely powerful enough to run Qt, so I suspect there aren't many cases these days where you need to limit yourself to Xlib because of performance.


> You could use Xlib to program a client in pure X11

Xlib is actually not very pure X11; Xlib makes a lot of things synchronous whereas X11 is really an asynchronous messaging distributed systems protocol that happens to output to the screen as a side effect. Xcb is a much closer to the actual protocol library.

IMHO, a lot of early hate for X11 was really hate at Xlib; but as Xlib was the official library, it was understandable to get them confused.


XCB is missing support for some important extensions, though. Such as Xft, so you can't display modern anti-aliased fonts (unless you somehow use Xlib at the same as XCB, I think?).


Tje Xft library is all about rendering the fonts on client side - it does use the Render extension but that's supported by xcb.


Ah, I guess I was thinking of libxft. There doesn't seem to be an equivalent for XCB, so you'd have to connect all the parts on your own.


Recently I ported a xlib game to SDL. Another option to add to that list.


Whatever comes after X11 will also go away, probably before X11 has actually gone away.


After X11 shall come X12. But, as the song says, we are living on a planet that's revolving and evolving...


X11 is not going away explicitly, but, Just... Afaik maintaining it is huge pain.

Things are slowly shifting to Wayland.


I suspect Wayland will be as ipv6.

Never fully used by all, old hardware around for decades without it, and likely require something else, such as X11 now supports wayland!

Just as I suspect ipv8 will make ipv6 disappear!

ipv8 is identical to ipv4, it just has another 256 in front of it. 5 octlets. A 6th octlet for planet designation...


Wayland looks like the impaired child of X. They promise some security and they are reinventing the wheel.


X11 is becoming a legend in both good and bad sense.


OpenGL [0], or Gtk/Qt based frameworks basically.

Very few would bother to do X11 graphics directly with Xlib, we aren't in the 1980's.

[0] - Some would say Vulkan I rather spare myself the burden.


It will go away in '22.

2122 of course.


Except for a colony planet of Modern Amish, which refuse to embrace brain implants, age extension tech, and X11 replacements.

X11 forever!


Huh, I remember xearth. It would move the stars every time it redrew itself. I wanted to have it update every second for some reason, and that was distracting, so I patched it to add an option to not do that. Then I couldn't find a maintainer to send it to, so I didn't share it.


I se up xearth to approximate the view from the ISS, at the appropriate orbital velocity. But with a decent refresh rate, what a CPU hog it was.


I always use x2x. It allows sharing of the keyboard and mouse between several machines.


I love xneko, it's adorable.


I first saw Necko on the Mac.

Originally on the NEC-PC (Necko is Japanese for "cat"), it has been ported or re-implemented all over the place (Wikipedia is my only brain).

https://en.m.wikipedia.org/wiki/Neko_(software)


That reminds me of xteddy (because it is also adorable, but alas not animated in any way).


xev is indeed very useful to debug issues with input devices and keymaps.


Back in the 90s, I has a fun pool/snooker game in 2D for x11. My encounter was in the default install of the ARM port of RedHat 3.0.3.

I've asked on these sorts of threads before, but can anyone remember what it was? I seem to have lost all trace -- source code, screenshots, anything. I thought it was "xpool" but that didn't turn up much.


One candidate to consider is https://www.freshports.org/games/flying/ - "Flying is pool, snooker, carrom, hockey + curling with nice animated spinning balls for pool". I'm not sure about redhat, but it seems to have been present in debian from 1998 through 2010.


Thanks for this. Sounds promising. "flying" is a hard search online for screenshots or other info, so I'll follow the lead from the URL when I'm back at my Linux workstation.


xmelt was always a favorite before everyone locked their display down.


Takes me back to end of the fall semester and running XSnow, NCSA Mosaic, Nedit, and many of these tools, furiously coding in C or lisp on my projects, on an Xterm in the computer lab.


Xspringies and substrate screensaver should be preserved forever


xroach ftw!


Great as a practical joke on colleagues when they stepped out of the room!


Back in the day there was also a huge security hole which could be exploited with the xwd command. If you knew the dns name of a terminal you could get a screendump from it. It was not secured at all.


An xwd story...

I worked on a Java program that was a point of sales terminal. All the registers were reasonably beefy linux machines that ran a Java Web Start application and it worked well... except when it didn't.

Sometimes it had threading deadlocks and that was a pain to debug. In particular, we didn't know where it came from. So we installed a handler on ctl-alt-delete that would find the Java process running and do a thread dump from that (so we could find the methods that were locked) and also did a xwd to capture the screen to see what was happening. Sometimes we were able to pick out "this modal alert window spawned 100x copies of itself" by recognizing an unnaturally thick border around it. Just seeing what the state that the register was in was useful too.

The xwd and thread dumps where then stored in a folder that was sent back as part of nightly reports back to the central office where we'd look at them the next morning.

On one hand it was a bit clunky, on the other hand it really beat trying to get a bug report from cashiers working the registers in a timely manner - they just had to remember to do a ctl-alt-delete rather than power cycling the machine and we'd get it reported back to us automatically.


Interesting... Xwpe is still on Ubuntu repositories.


Nedit is still my go to text editor for programming


open source simcity clone! What a gift



Don Hopkins, NeWS, Tcl/Tk, ...! Excellent ideas all around.

http://www.art.net/~hopkins/Don/simcity/


It compiles and runs! You need to set the SIMHOME environment variable to point at the root of the repo. It also generates a ton of warnings on a modern compiler, but in the end it pops out a running executable.

As an added bonus it runs perfectly well over the network, as a good X app should. You don't need a fast or low latency connection, it runs perfectly well over even mediocre connectivity.


Not even a clone, it's the original code that was released by EA and ported for the OLPC project


Reaaly cool site. Editres is my favourite X tool.


Seems to be missing `phoon` (or was it `xphoon`?)


What, no xconq?


Nobody mentioned Xdmx!


xxdiff. best difftool ever. Thank you blais!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: