Παιδιόθεν μου αρεζαν τα βατομουρα...
Tag Archives: linux
framebuffer for Gentoo
Τελικα δεν αντεξα και ενεργοποιησα το framebuffer για το Gentoo. Ε, αλλος αερας... Χωρος, πολυς χωρος!
Για τα ελληνικα σε κονσολα (και σκετη, και σε framebuffer):
- εχω στο .bash_profile τα εξης:
unicode_start
export LANG=en_US.UTF-8
setfont /usr/share/consolefonts/LatGrkCyr-8x16.psfu.gz
- το Vim ειναι μεταφρασμενο με υποστηριξη multi byte. Ενεργοποιω ενα keymap, π.χ.
set keymap=greek
και αυτο ηταν!
Επιπλεον στο framebuffer εχουμε τα εξης ωραια:
* πολυ χωρο για κειμενο
* εμφανιση εικονων με το προγραμμα fbi του πακετου fbida
* παιξιμο αρχειων βιντεο με mplayer -vo fbdev
Οποτε γιατι να εκαταστησουμε τα Xorg; 😉
Πως ενεργοποιησα το framebuffer. Τσεκαρα πρωτα οτι ο πυρηνας του gentoo υποστηριζει framebuffer, αλλιως θα επρεπε να το φορτωσω. Κατω απο τη γραμμη που φορτωνει την πυρηνα στο grub (απο το Arch) προσθεσα την εξης γραμμη:
set gfxpayload="1366x768x32"
και επαναφορτωσα τον boot loader. Την αναλυση αν δεν την ξερουμε, την βρισκουμε με την εντολη vbeinfo στο μενου του grub.
OS Installation Marathon
Since last week I have started an OS installation marathon. I am trying several operating systems on my disk or on Virtualbox. I will write in one of the next posts about the several experiences. Until now I have installed next to my primary Arch Linux installation: on Disk (extra partitions): Gentoo, OpenSuSE, Debian, Fedora, Mint; on Virtualbox: Haiku, OpenIndiana. Pending: Slackware.
--Edited with Vim through w3m on Gentoo.
absorbing states in the software I use
Absorbing states in Markov chains are states, that cannot be left once entered. As in physics of black holes, a "point of no return".
There are many such states in my life with respect to software. After working on this and that, I found a programme that attracted me for ever (at least until now). For example:
Mail User Agent: I went through Outlook Express, Netscape, kmail until I got to know mutt.
Editor: notepad → kwrite → emacs → vim/gvim.
Internet Browser: internet explorer → netscape → seamonkey → opera → mozilla firefox.
OS I have worked on: DOS → NeXT → SG → Windows 98 → Mac → Windows XP → Linux.
Now I feel that something similar happens with the Linux Distribution I got to know. After wandering with SuSE → Debian → SuSE → Gentoo → SuSE, I landed on Arch. And I think that I will never leave.
The reason for these states being absorbing is not only that they enhanced my existing tools, but that they revealed and keep revealing to me possibilities, that I couldn't even think of.
voice mail from the command line
With this script I can record a message from the command line and send it to a recipient.
arecord -D hw:1,0 -f cd -c 1 -t wav voicemail.wav
oggenc -q 6 voicemail.wav
echo "" | mutt -s "Your subject" -a voicemail.ogg -- someone@somewhere.net
For determining the microphone used by arecord, this was very useful.
beeps again
I changed the structure of the beep fortune cookie. I use now the Audio::Beep which permits lilypond syntax and I used the idea from the best answer from this post to select a random perl beep file. Now my beep fortune works like this:
1) Have all beep perl files in a directory, e.g. ~/beep/
2) Run this bash script:
#!/bin/bash
files=(/home/alex/scripts/beep/*.pl)
/usr/bin/perl `printf "%s\n" "${files[RANDOM % ${#files[@]}]}"`
Now, every time my computer starts, I listen to a random selected beep melody. It's awesome! Every day I will write a new melody mainly from the classical repertory and put it in my beep repository (but also from medieval and folk music). After I will have many of them (only music allowing free reproduction), I will publish them for download.
Maybe I will write some original compositions as well! Well, that's interesting!...
And for the fans of the internal speaker, here is my beep of the week:
use Audio::Beep;
my $beeper = Audio::Beep->new();
print "J.S.Bach: Concert for Harspichord and Strings in d minor\n";
my $music = << 'EOS';
\tempo80
d16 e f8 e d a' d4 a8
bes g16 e a8 f16 d g8 e16 cis a8 bes'4
g16 e a,8 cis'4 bes16 g a,8 e''4 cis16 a bes g a f g e f d
e cis d b cis a b cis d e f g a bes c8
c16 d es8 fis, g cis, d gis, r a r d, r
EOS
$beeper->play( $music );
fortune cookie with internal pc speaker
If you have the programmes strfile
, fortune
and beep
, you can have fortune cookies with music coming out of your pc speaker!
Here is how it goes.
1) Create a file, say MyMusicCookies,
with some beep melodies, separated by %, see for example one previous post here.
2) run
strfile MyMusicCookies MyMusicCookies.dat
3) enjoy a random music piece with
fortune MyMusicCookies | bash
You can also make a mixed file with text and beep music and let yourself be surprised!
Have fun!
UPDATE: And if you use Arch Linux, then you can activate your fortune-music player on boot by writing a file as
/etc/systemd/system/boot-music.service
with a content like
[Unit]
Description=Set boot music
[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/usr/bin/fortune /directory/to/MyMusicCookies | /bin/bash
[Install]
WantedBy=multi-user.target
and activating it with
systemctl enable boot-music
😉
ενημέρωση arch: φοβερή μετάφραση!
Χα χα, καλα, ο πακμαν εγραψε σημερα (τελευταία σειρα: Η μεταφραση!):
# pacman -Syu
:: Συγχρονισμός βάσης πακέτων...
core ενημερωμένο
extra ενημερωμένο
community ενημερωμένο
multilib ενημερωμένο
:: Έναρξη πλήρους αναβάθμισης συστήματος...
ουδέν πρακτέον
#
play random music files recursively
find . -name "*.ogg" -or -name "*.mp3" | shuf | mplayer -playlist -
arch log #2
Installed slrn, rdesktop, beep (I love the PC speaker!)
Here is a melody I wrote quickly to test it:
#!/bin/bash
note(){
case $1 in
"C" ) freq=261.6;;
"Cis") freq=277.2;;
"D" ) freq=293.7;;
"Dis") freq=311.1;;
"Es") freq=311.1;;
"E" ) freq=329.6;;
"F" ) freq=349.2;;
"Fis") freq=370.0;;
"G" ) freq=392.0;;
"Gis") freq=415.3;;
"A" ) freq=440.0;;
"Ais") freq=466.2;;
"B") freq=466.2;;
"H" ) freq=493.9;;
"c" ) freq=523.2;;
*) freq=1;;
esac
if [ "$2" != "" ]; then dur=$2; else dur=250; fi
beep -f $freq -l $dur
}
note 0 500
note Es
note D
note D 500
note Es
note D
note D 500
note Es
note D
note D 500
note B 500
note 0 500
note B
note A
note G 500
note G
note F
note Es 500
note Es
note D
note C 500
note C 500