DEV Community

Spencer Krum
Spencer Krum

Posted on

xtrlock

Part of the devrel life is the booth. When I'm boothing, I like to have my laptop there and open to a cool project or demo. If I'm lucky, there will be a TV or monitor for me to connect to as well.

Folks will come up and talk to me and ask me questions. That's great and literally what I am there for. But I get squeamish about being a step or two away from my unlocked computer. I also don't want to close or lock my computer. A lock screen looks weird in a booth. If my laptop is closed it is annoying to tell someone 'let me show you!' then we both wait around for an agonizing few seconds while I reconnect to wifi/ssh/whatever.

Enter xtrlock(1). This utility has existed since at least 1993 and is part of a wonderful ecosystem of old Unix/X11 tools that have been largely forgotten.

From the man page: Lock X display until password supplied, leaving windows visible. This locks the screen for input, but leaves whatever I had open visible. That means slides, terminals, or demos are still being displayed and I have peace of mind that I'm not being compromised.

Pratically, xtrlock takes effect immediately and has no option for a delay. So what I actually do is type sleep 5; xtrlock and use the five second sleep to hide/minimize whatever terminal that command was written in.

I show various things, but one thing I'm trying to do is have terminal based demo scripts that can be run without my interaction. Unlike videos, they are running against real infrastructure, and I can ^C the script and dig in deeper to the demo with an attendee if I need to. That repo is here

Top comments (7)

Collapse
 
maxart2501 profile image
Massimo Artizzu

Enter xtrlock(1).

My question is a bit off-topic. What's that (1), or more in general (#) that comes right after the name of a command?

I've seen it on multiple times about *nix command line tools, but growing with a Windows background I've never got the grasp of it πŸ˜…

Collapse
 
lesha profile image
lesha πŸŸ¨β¬›οΈ

Short answer: manpages
Long answer: superuser.com/questions/297702/wha...

Collapse
 
maxart2501 profile image
Massimo Artizzu

So it's essentially a way to tell what kind of command we're talking about, is it?

Thread Thread
 
lesha profile image
lesha πŸŸ¨β¬›οΈ

I guess it just answers the question "are we talking about a program or a function in a C library" in case they have the same name and have direct relationship with each other.

The example is there, mkdir(1) is a program that creates directories. This program's primary objective is to use mkdir(2), a function in sys/stat.h

Collapse
 
peter profile image
Peter Kim Frank

Enter xtrlock(1). This utility has existed since at least 1993 and is part of a wonderful ecosystem of old Unix/X11 tools that have been largely forgotten.

This is fascinating. In brief, any other old Unix/X11 tools worth mentioning?

Collapse
 
omarcham96 profile image
Omar Chammaa

That's cool! I'll keep it in mind if I ever find myself holding a booth for my company. I'm currently interning for a startup, but I'm only one of two on the tech team, so it's best to keep an open mind about what responsibilities I can expect to have; literally anything can be asked of you. Thanks again.

Collapse
 
nibalizer profile image
Spencer Krum

Check out a modern rewrite: github.com/leonnnn/pyxtrlock