After getting a whole new motherboard and screen for Alice, I installed a fresh copy of Lucid Lynx. So here's what has to be done to restore her old self:
- Change the MAC address for the registered one
- Java for Firefox
- Xournal, Gimp
- RSYNC the stuff back
- Nautilus Scripts
- Firefox Preferences, etc.
- Gnome themes, background, etc.
This time I installed a Total Commander like program called DoubleCommander. I'll see where I'll get with it.
This is a tutorial for HP-Compaq TC4400 Users on Ubuntu. Note, that I'm a total beginner with Linux, so this page will contain everything I did with my Notebook called Alice :-)
2011. március 9.
2011. március 1.
Change networking hwaddress under Mac OS X
to be able to use sudo:
to see detailed networking information:
to change ethernet hardwer address:
$ su MYUSERto see detailed networking information:
$ ifconfigto change ethernet hardwer address:
$ sudo ifconfig en0 ether MY:MA:CA:DD:RE:SS
2011. január 6.
SED in text editing.
Sorry guys for the comments are in Hungarian language, but it was so complicated and I spent the whole day doing it.
The project was about: matching two lines within a file, within a single text file. Actually, it was matching the beginning of following two lines and comparing them. It was a dictionary having separate lines for all the meanings and the point was to put all the meanings in a single line.
The SED MANUAL was a huge help, thank you!
The project was about: matching two lines within a file, within a single text file. Actually, it was matching the beginning of following two lines and comparing them. It was a dictionary having separate lines for all the meanings and the point was to put all the meanings in a single line.
# szótárunkban minden szócikk minden jelentése külön sorban volt.
# egy szócikk és egy jelentés kettő darab space karakterrel volt szeparálva, sehol máshol nem volt két space a fájlban.
# feladatunk, hogy egy szócikk összes jelentését egy sorba tegyük, pontosvesszővel elválasztva.
# ez végül így sikerült:
# sed -n 'x; s/\(.*\n\)\(.*$\)/\2/; G; s/\(.* \)\(.*\)\n\1\(.*\)/\1\2\; \3/; h; s/\(.*\n\)\(.*$\)\|\(^.*\)\(; .*$\)/\2\4/w output.txt' input.txt
# mindezek után még ki kellett törölni a felesleges sortöréseket geditben.
# a parancsok kifejtése alább.
sed -n ' # csendes üzemmód.
x; # a pattern-space-be behívott sort felcseréli a hold space-szel
s/\(.*\n\)\(.*$\)/\2/; # az előző cycle-ből megmaradt hold-space-es anyagból leszedi az első sort, ha van, ha nincs, nem csinál semmit.
G; # hozzáírja a most hold-sp-ben levő új sort a most pattern-sp-ben levő régihez egy sortörés után
s/\(.* \)\(.*\)\n\1\(.*\)/\1\2\; \3/; # ha a p-sp-ben levő 2 sor eleje karakterre megyegyezik, akkor a második sorból törli a szócikket és hozzávezeti a jelentéseket az első sorhoz egy pontosvessző és egy space kíséretében. ha nem egyezik meg, akkor marad a 2 sor, nincs törlés.
h; # felülírja a h-space-t az új 1 vagy 2 sorunkkal.
s/\(.*\n\)\(.*$\)\|\(^.*\)\(; .*$\)/\2\4/w output.txt # ha két sor van, a másodikat, ha egy sor van, az utolsó szót pontosvesszűstül és szpészestül belevezeti a megadott text fileban egy új sorba.
' input.txt # ezt a fájlt dolgozzuk fel.The SED MANUAL was a huge help, thank you!
2010. november 18.
OGM to AVI with hardcoded subtitles
I was trying to hardcode a subtitle while "-ovc copy". How silly of me. It is only possible to hardcode a subtitle if mencoder has to process the video file frame by frame, as it modifies the pictures when hardcoding.
For whatever reason MEncoder didn't want to work for me recoding a Vorbis audio stream to mp3 with Lame, so two steps were added in between.
#1. Demuxing OGM to separate stream-files
#2. Converting audio track to mp3
#3. Muxing video, audio and subtitle into an avi
#1-3. Of course at the end I managed to do steps 1-3 in a single step:
I guess to achieve the all inclusive #1-3, I had to install some stuff and make mplayer for myself...
But of course I don't know what exactly did the trick.
For a better quality it's possible to use extra options, like
To get needed value of vbitrate do a
Sources:
Gentoo Forums
MemoryLeak
For whatever reason MEncoder didn't want to work for me recoding a Vorbis audio stream to mp3 with Lame, so two steps were added in between.
#1. Demuxing OGM to separate stream-files
ogmdemux input.ogm#2. Converting audio track to mp3
soundconverter -b -m audio/mpeg -s .mp3 input.ogm-a1.ogg#3. Muxing video, audio and subtitle into an avi
mencoder input.ogm-v1.avi -o output.avi -audiofile input.ogm-a1.mp3 -oac copy -ovc lavc -lavcopts vcodec=mpeg4 -sub input.ogm-t1.str#1-3. Of course at the end I managed to do steps 1-3 in a single step:
mencoder input.ogm -aid 1 -sub input.srt -o output.avi -oac mp3lame -lameopts cbr=128 -ovc lavc -lavcopts vcodec=mpeg4
I guess to achieve the all inclusive #1-3, I had to install some stuff and make mplayer for myself...
sudo apt-get install libasound2-dev libfreetype6-dev zlib1g-dev libmp3lame-dev libfontconfig1-dev libexpat1-dev ogmtools./configure --enable-theora --enable-libdv --enable-mp3lame --enable-mp3lame-lavc --enable-mp3lib --enable-debugBut of course I don't know what exactly did the trick.
For a better quality it's possible to use extra options, like
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:mbd=2:trellTo get needed value of vbitrate do a
mencoder -ovc frameno -o frameno.avi -oac copy input.avi and read your value in the terminal window.Sources:
Gentoo Forums
MemoryLeak
2010. november 14.
ImageMagick BMP compression
To make uncompressed BMP files, or to decompress BMP files in ImageMagick, use the
To make less then 24-bit BMP files in ImageMagick, use the
Use these settings to be able to import scores into Neuratron PhotoScore.
-compress none option.To make less then 24-bit BMP files in ImageMagick, use the
-colors 256 option, which would make a 8-bit BMP file.Use these settings to be able to import scores into Neuratron PhotoScore.
2010. november 13.
image to pdf
I really can't handle ImageMagick when it comes to pdf files. It creates such huge files they are completely useless.
I tried out another way: pbm -> ps -> pdf:
first I ImageMagick convert pbm-s:
then put them into ps2pdf:
and bind them:
It worked brilliantly. This way my pdf is 8 times smaller then my original pdf, and it's only 1.5 times bigger then the djvu I made from the same images.
Djvu was made directly from pbm files, converted with cjb2 and binded with djvm. No special option was used.
I tried out another way: pbm -> ps -> pdf:
first I ImageMagick convert pbm-s:
mogrify -format ps -density 300x300 *.pbmthen put them into ps2pdf:
#!/bin/bash
lista=(`find -iname '*.ps' | sort`)
for i in "${lista[@]}"
do
ps2pdf -r300 -g1880x2688 $i $i.pdf
doneand bind them:
pdfjoin *.pdf --outfile output.pdfIt worked brilliantly. This way my pdf is 8 times smaller then my original pdf, and it's only 1.5 times bigger then the djvu I made from the same images.
Djvu was made directly from pbm files, converted with cjb2 and binded with djvm. No special option was used.
2010. november 7.
Image INFO through ImageMagick
identify -verbose image.jpgTo get only what you want to see you can use GREP like this:
identify -verbose image.ps | egrep "Resolution|Geometry"This will return you the lines with Resolution and Geometry. Just what I need to make good compressed pdf files with ps2pdf.
Feliratkozás:
Bejegyzések (Atom)
