UNIX Diary - Psychology, Philosophy, and Licenses
z3bra
Hi Nixers !

A few weeks ago, Venam proposed some ideas for the forum (link). One of them was the Unix Diary, which is a forum thread where everybody can write a story related to UNIX he lived. It can be anything: How you restored a backup from an old copy, how you found a bug in a package and sent a patch to the maintainer, what your first experience with Linux was, etc...

Before posting, be sure that your respect the 6 rules of the UNIX diary:

rule 1
Never talk about the UNIX diary

rule 2
Never talk about the UNIX diary

rule 3
Start your stories by "Dear UNIX diary,"

rule 4
Provide a quick explanation as the first sentence (eg: Today, I installed FreeBSD), then start writing.

rule 5
Do not hesitate !
There is no obligation in the lenght, so do not hesitate to post even if your story can be told in only 6 or 7 lines.

I'll write the first one. Let's make this thread live !



Dear UNIX diary,

This morning, I fixed my broken mail box.

The day was just starting, and a was a bit tired because of the lack of sleep. After having turned my laptop on, I connected to my home server, performed a quick update of the packages installed and fired up mutt to read the mails I received last week. There was a mail of my future employer asking for my exact address. I typed 'r' to reply to this mail and fired up vim to write down the answer. When finished, a quick 'ZZ' brought me to the sending page, where I pressed 'y' to send the mail.

And here comes the problem:

gpg: command not found

What's going on here ?! Anyway, I just wanted to sign the mail, so I decided to toggle PGP of this time, and to fix it later. 'p', 'c', 'y' to send the mail in clear text, and then comes a new error message:

"msmtp: Not compiled with TLS".

What the hell is that ? What happened ? A few `cd` later, I'm in $HOME/usr/aports/msmtp. A quick "grep" shows that the flag "--with-ssl=gnutls" is used by "./configure" in the APKBUILD.

Anyway, Let's rebuild it and see if it works...Mutt still doesn't want to know anything. "msmtp: Not compiled with TLS". Ok, let's try to reinstall gnutls then...

I fired up mutt a third time, and now.. MIRACLE ! It works ! It seems that the previous update of gnutls missed, and msmtp failed to link to it at compilation time. But I'll never be sure...

Now the mail is sent. But I still need to understand the first message: "gpg: command not found". It was installed before I left last week...

Code:
─ g ── ls /usr/bin/ | grep gpg
hgpg-agent
gpg-connect-agent
gpg-error
gpg2
gpgconf
gpgkey2ssh
gpgparsemail
gpgsm
gpgsm-gencert.sh
gpgv2

"gpg2" ? What's that ?! After searching the package database, I found that there was two packages: "gnupg" and "gnupg1"... And guess which one was installed diary ? "gnupg", right !

I decided to modify my mutt script to changes occurences of "gpg" to "gpg2", instead of using gnupg1 (for security purpose).

I tried to send a signed mail after that, and now everything is back to normal. How fun it was !
BANGARANG, MOTHERFUCKER
venam
Dear unix diary,
I had fun trying what was in this article on HN about unix wildcard.(http://www.defensecode.com/public/Defens...e_Wild.txt)
I customized the shell script z3bra wrote for notifications using bar and realized that when you give "*" has the argument, it prints out files.
It was weird at first, because I thought using quotes would remove the globing effect.
After reading the article, I found out that the flag "--" would stop interpreting what's after it as arguments.
I tried that but it didn't solve the problem.
The simple solution was to pipe into sed to replace "*" by "\\*".
cjm
Dear Unix Diary,

Today I have been trying to reorganize my music library with a bash script. Personally my experience with bash isn't the greatest, so I havn't be able to do it effectively. Though I am learning!
----
blog: c-jm.github.io
twitter: https://www.twitter.com/_c_jm
My ambition in life is to be a graybeard by the time I am 65.
----
venam
goPhir, that's a script that will create and move musics from an artist to a dir.
$1 is the artist and $2 is the dir.
Code:
mp3info -p "%f -- %a\n" *.mp3 |grep -E "$1" | sed 's/ -- .*//' | sed 's/^/"/;s/$/"/'| xargs mv -t "$2"
It's not a very smart one but it works.
cjm
Thanks venam!
----
blog: c-jm.github.io
twitter: https://www.twitter.com/_c_jm
My ambition in life is to be a graybeard by the time I am 65.
----
venam
Dear Unix Diary,
My Arch box froze in the morning for some unknown reasons.
I tried to safely reboot it (SysRq R.E.I.S.U.B) but it didn't respond so
I had to turn it off manually (as in pressing the power button).
After rebooting I entered my usual captcha (pam_captcha library for anyone
wondering) and logged in to my system.
I typed "sudo systemctl start network" and got a nice systemd error that it
couldn't start the interface.
That was unexpected (ironically)!
I checked online if anything major had changed for the network module.
Whatever, I rewrote it with the *new* (for me) special "@" argument so I can start it
in this fashion:
"sudo systemctl start network-wireless@wlan0.service"
...and I got the same error.
I looked down on my keyboard and saw the light wireless button. It was red!
I pressed it and voila everything works again.

Way to go Unix :)
>implying systemd is Unix... (。-_-。)
z3bra
Story of my life.
pizzaroll1
Dear Unix Diary,

I finally managed to get another 16 MB stick of RAM for my laptop. It now has 32 MB and I can finally boot the latest OpenBSD release without any issues. 5.5 is still as speedy as 3.2 was (yeah, I sort of gave up with the upgrading until I got more RAM) in the text console at least. X.Org isn't too bad, either, but XFree86 was faster (or at least it felt faster on my old as shit Thinkpad 760 EL). I might try NetBSD, too. Most GNU/Linux distros are, obviously, too bloated for my machine to handle.

Tiny Core Linux needs 48 MB, and their smaller version (Micro Core) needs 28 MB, but isn't exactly a mainstream OS with lots of packages. Even FreeBSD 9 and 10 need 64 MB or more of RAM. NetBSD and OpenBSD are my only two options, and OpenBSD is the only one that comes on a single floppy.

Despite my lack of options, I'm very happy with what I have - it runs elinks, mutt, procmail, OpenSMTPD, vim, emacs, gcc and all of the other programs I use. It's not like I'm being forced to use OpenBSD either, I use it on both my laptops, I dual boot with Windows on my desktop (boo! non-free software! but games are games, and I can only play so much Dota 2 before wanting something that's only on Windows), and it runs my server.

Basically, Theo de Raadt is Jesus and I don't know how it's possible to fit all those network drivers, package signing, a kernel with support for a good amount of hardware, and god knows what else onto a single 1.44 MB floppy. Supernatural powers are the only explanation.
my website: kaashif.co.uk
vompatti
Dear Unix Diary,

I finally have free hands at school so they gave me this old laptop where I installed Arch Linux and replicated my enviroment from home. I'm working on project which has been in my mind more than a year now and I got started with it last summer holidays but didn't have that much time to work on it after all.

The project is replacement for Skype and all the other programs which goes to that gatecory. Right now, I have raw version of the server written in Python and it is written so that it is easy to expand. I have very (very) basic fifo client (also written in Python) and earlier to day, I wrote very stupid (but in theory, working) audio communication utilitys for it. It almost worked, but since it just loops over recording and sending-, receiving and playing audio, the PyAudio's backed (PortAudio) overflowed. The audio (and in future the video) cummunication is done with p2p (udp)connection but it might need to be done with client-server-client fallback connection too (muh firewalls).

I'll have about 3 months to work on this project at school and I'm planing to learn Go on my spear time and then rewrite it all in Go.

P.S. I'm jelly for pizzaroll1's 32MB laptop.
P.S.S. I'm still not sure if systemd is good or bad thing for linux and it's future.
pizzaroll1
(19-08-2014, 04:20 PM)vompatti Wrote: P.S.S. I'm still not sure if systemd is good or bad thing for linux and it's future.

As long as the OpenBSD GSoC project to implement all of the systemd APIs ends well, I'd say systemd was a good wake-up call and a good thing for everyone, solving tons of problems. If systemd's APIs stay Linux-only, it's cancer/the devil/as bad as Windows/etc. Although I'm really not sure it matters for me, since the systemd /bin/init replacement binary (you know, /bin/systemd or whatever it is) is probably too big to fit on a floppy, so I'll never be able to use it.

Also, your project sounds very cool and ambitious. Good luck with it, I hope you put it up somewhere for us to look at when you think it's presentable. I've never done anything like that, it'd be nice to get a look at something that isn't super bloated and written in C (maybe necessary for speed, but horrible to work with).
my website: kaashif.co.uk




Members  |  Stats  |  Night Mode  |  Help