I'm a Christian, a husband, a puzzle enthusiast, and a Software Engineer with Six3 Systems.
... for what it's worth
UPDATE: forgot to put MY WIFE
In the spirit of "count your blessings", these are a few of my favorite things... ♫ off the top of my head:
Hobo 1.3
when, at the start of spring, every day brings a little more greenery
UPDATE: OneThingWell.org had a post today about a project called "wemux" that makes the following dead-simple. Comes complete with a homebrew recipe.
Today I worked out how to allow "untrusted" people to observe my tmux sessions over ssh. Anyone I want can ssh to the "observer" account on my machine and are forced into a read-only version of my tmux session. They are forcibly logged out on detach. Alternatively, more trusted users of my machine that already have an account just need to be added to group "observer".
First create an "observer" user (and an "observer" group, if this isn't done automatically on your distro), however this is done on your machine.
Next, create a special directory for tmux sessions with the setgid bit, owned by the "observer" group, so that tmux sockets put here will also be owned by that group:
sudo mkdir -p /var/tmux
sudo chmod g+ws /var/tmux
Now tell the ssh daemon to restrict the "observer" user and force it to run tmux in read-only mode on our special socket by adding the following lines to the end of /etc/ssh/sshd_config:
# configuration for a tmux read-only observer
Match user observer
X11Forwarding no
AllowTcpForwarding no
ForceCommand /home/observer/tmux-observer.sh
(Don't forget to restart the ssh daemon!)
As you can see, we now need to fill /home/observer/tmux-observer.sh. Do so with the following:
#!/bin/sh
tmux -S /var/tmux/observable attach -r
To be sure that observers cannot mess with each other, let's just let root own everything in their home directory, but ensure that they can run our little script:
sudo chown -R root:root /home/observer
sudo chown root:observer /home/observer/tmux-observer.sh
sudo chmod g+rx-w /home/observer/tmux-observer.sh
That should do it for the observers. We can now start a shared tmux session:
tmux -S /var/tmux/observable
For convenience, I have a "sharetmux" alias in my ~/.bash_aliases:
alias sharetmux="tmux -S /var/tmux/observable"
So now I make a shared session with "sharetmux", and if I detach, I can easily get back there with "sharetmux attach".
Do "sharetmux", open a new terminal window, and ssh into observer@localhost. You should see the tmux session, but not be able to do anything but watch. If you detached or the owner kills the tmux session, you'll be logged out.
UPDATE: I've made a couple improvements since writing this post:
I've changed my aliases (originally "sharetmux") to make two sessions, "observable" and "staging", and connect me to "observable". New connecting observers connect to "staging", however, so they need my permission to spy on me.
I've also changed the observer's connect script so i get a message in my tmux session informing me that an observer just connected.
Here's the new /home/observer/tmux-observer.sh:
#!/bin/sh
tmux -S /var/tmux/observable display-message "observer connected"
tmux -S /var/tmux/observable attach-session -t "staging" -r
And here are my two new aliases (the "observable" alias is for when I detach and want to reattach or manipulate the observable tmux session from the outside):
alias start_observable="tmux -S /var/tmux/observable new-session -d -s observable ; tmux -S /var/tmux/observable new-session -d -s staging ; tmux -S /var/tmux/observable attach-session -t observable"
alias observable="tmux -S /var/tmux/observable"
Now when I see "observer connected", I can let them in by getting their client path with "list-clients" and "switch-client -c /dev/pts/whatever -t observable".
I've been quietly busy this past month.
In no particular order, I...
Early on in my Christian life I heard these catchy definitions of grace and mercy:
This is my public key, on keyserver.ubuntu.com as "Daniel Patrick Cox" <danielpcox ET gmail DAWT com>:
-----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.0.10 mQENBE6XLaUBCADA/TP7ecC4i7HmTQ+22Wewk3UD9uEZGW7gFFKwmZkWFpzy5OI0l+3zbwvl nPYv0YMoRS/kg9kKGKT7fSK0UJlKSYhX9og9U9JGXJirQsgd0ede3gktkX16cVCYbh2h9vBj XvKPEfHL48bEXxBSw2/vI4Ce8tPNgQDtU8UjpbDn3wa6UweSi9RdKeXM5Vj6QxB9DrUH9GfZ YgTtUopLwLZbQfC6vkYX9euSwD7sSl7Y54UbVwNAjCmCKyvs32LLUe7kliSP5Jje+3q++kC/ TKfJgr9HJC0+OJ5xFwR/6xD5pDww9kNS/hyOYhUNfebWZRlRB76AaIyunEeM0mV1CpSHABEB AAG0KURhbmllbCBQYXRyaWNrIENveCA8ZGFuaWVscGNveEBnbWFpbC5jb20+iQE4BBMBAgAi BQJOly2lAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDON0TDobrNYGUdCACJ0jps ssAFTQlAxC8RM4HPbE5hJMp4WHYtADhhf6v90nBMm/Dtg1nAaH7ZNi2Y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