View previous topic :: View next topic |
Author |
Message |
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Tue Dec 01, 2025 12:07 am Post subject: |
|
|
How about the magic cookie?
This might actually be of some use, so I'll keep it in mind.
mcookie
NAME
mcookie - generate magic cookies for xauth
SYNOPSIS
mcookie [-v] [-f filename ]
DESCRIPTION
mcookie generates a 128-bit random hexadecimal number for use with the
X authority system. Typical usage:
xauth add :0 . `mcookie`
The "random" number generated is actually the output of the MD5 message
digest fed with various piece of random information: the current time,
the process id, the parent process id, the contents of an input file
(if -f is specified), and several bytes of information from the first
of the following devices which is present: /dev/random, /dev/urandom,
files in /proc, /dev/audio.
BUGS
The entropy in the generated 128-bit is probably quite small (and,
therefore, vulnerable to attack) unless a non-pseudorandom number gen-
erator is used (e.g., /dev/random under Linux).
It is assumed that none of the devices opened will block.
FILES
/dev/random
/dev/urandom
/dev/audio
/proc/stat
/proc/loadavg
SEE ALSO
X(1), xauth(1), md5sum(1)
AVAILABILITY
The mcookie command is part of the util-linux-ng package and is avail-
able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
Lord.DragonFly.of.Dawn Advanced Member

Joined: 18 Jul 2025 Posts: 607 Location: South Portland, Maine, USA, Earth, Sol System
|
Posted: Tue Dec 01, 2025 4:33 am Post subject: |
|
|
not everyday no... but i have used it before.
twas for a video remastering project i did. forget what exactly i needed it for.
_________________ ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)
PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
|
|
Back to top |
|
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Wed Dec 02, 2025 11:26 pm Post subject: |
|
|
I thought the mcookie might be useful,
I've needed random (or pseudo random) numbers many times in the past.
Now here is a super simple command, which may not be too obscure.
I wonder if this command is where Arch Linux gets it's name???
arch
NAME
arch - print machine hardware name (same as uname -m)
SYNOPSIS
arch [OPTION]...
DESCRIPTION
Print machine architecture.
--help display this help and exit
--version
output version information and exit
AUTHOR
Written by David MacKenzie and Karel Zak.
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
Lord.DragonFly.of.Dawn Advanced Member

Joined: 18 Jul 2025 Posts: 607 Location: South Portland, Maine, USA, Earth, Sol System
|
Posted: Thu Dec 03, 2025 4:40 am Post subject: |
|
|
webbot
did you know you have a spider installed in your system already?
_________________ ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)
PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
|
|
Back to top |
|
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Fri Dec 04, 2025 9:56 pm Post subject: |
|
|
no I didn't know of that one.
This one can be useful at times,
maybe not obscure, but definitely unique
uniq
NAME
uniq - report or omit repeated lines
SYNOPSIS
uniq [OPTION]... [INPUT [OUTPUT]]
DESCRIPTION
Filter adjacent matching lines from INPUT (or standard input), writing
to OUTPUT (or standard output).
With no options, matching lines are merged to the first occurrence.
Mandatory arguments to long options are mandatory for short options
too.
-c, --count
prefix lines by the number of occurrences
-d, --repeated
only print duplicate lines
-D, --all-repeated[=delimit-method]
print all duplicate lines
delimit-method={none(default),prepend,separate} Delimiting is
done with blank lines.
-f, --skip-fields=N
avoid comparing the first N fields
-i, --ignore-case
ignore differences in case when comparing
-s, --skip-chars=N
avoid comparing the first N characters
-u, --unique
only print unique lines
-z, --zero-terminated
end lines with 0 byte, not newline
-w, --check-chars=N
compare no more than N characters in lines
--help display this help and exit
--version
output version information and exit
A field is a run of blanks (usually spaces and/or TABs), then non-blank
characters. Fields are skipped before chars.
Note: 'uniq' does not detect repeated lines unless they are adjacent.
You may want to sort the input first, or use `sort -u' without `uniq'.
Also, comparisons honor the rules specified by `LC_COLLATE'.
AUTHOR
Written by Richard M. Stallman and David MacKenzie.
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
Lord.DragonFly.of.Dawn Advanced Member

Joined: 18 Jul 2025 Posts: 607 Location: South Portland, Maine, USA, Earth, Sol System
|
Posted: Fri Dec 04, 2025 10:59 pm Post subject: |
|
|
since i almost always want to sort too when i need unique things `sort -u` does it for me.
-edit-
which is mentioned in the manpage of uniq.... interesting.
_________________ ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)
PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
|
|
Back to top |
|
exiled Jr. Member

Joined: 24 Nov 2025 Posts: 51 Location: ~/
|
Posted: Sun Dec 06, 2025 1:24 am Post subject: |
|
|
still going...
How about pamoil, yes a linux oil painting
pamoil
NAME
pamoil - turn a PAM image into an oil painting
SYNOPSIS
pamoil [-n N] [pamfile]
DESCRIPTION
Reads a Netpbm image as input. Does an "oil transfer", and writes the
same type of Netpbm image as output.
The oil transfer is described in "Beyond Photography" by Holzmann,
chapter 4, photo 7. It's a sort of localized smearing.
The smearing works like this: First, assume a grayscale image. For
each pixel in the image, pamoil looks at a square neighborhood around
it. pamoil determines what is the most common pixel intensity in the
neighborhood, and puts a pixel of that intensity into the output in the
same position as the input pixel.
For color images, or any arbitrary multi-channel image, pamoil computes
each channel (e.g. red, green, and blue) separately the same way as the
grayscale case above.
At the edges of the image, where the regular neighborhood would run off
the edge of the image, pamoil uses a clipped neighborhood.
OPTIONS
-n size
This is the size of the neighborhood used in the smearing. The
neighborhood is this many pixels in all four directions.
The default is 3.
SEE ALSO
pgmbentley(1), ppmrelief(1), ppm(5)
_________________ Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
|
|
Back to top |
|
|