пятница, 25 ноября 2011 г.

Gentoo emerge: "Digest verification failed"

Linux moon 2.6.39-gentoo-r3 #4 SMP Wed Aug 31 17:44:51 EEST 2011 i686 AMD Athlon(tm) XP 2000+ AuthenticAMD GNU/Linux

I have this error when trying emerge some applications

Calculating dependencies |  * Digest verification failed:
 * /usr/portage/dev-python/pygobject/pygobject-2.28.6.ebuild
 * Reason: Filesize does not match recorded size
 * Got: 3824
 * Expected: 3826
... done!

> emerge --sync
> ebuild /usr/portage/dev-python/pygobject/pygobject-2.28.6.ebuild digest
> emerge --sync

But if you have a bulk of this warning, or you have also this warning:
A file is not listed in the Manifest '<package_ebuild>'
Then read this solution http://uommo.blogspot.com/2011/12/gentoo-emerge-file-is-not-listed-in.html

понедельник, 14 ноября 2011 г.

LDOCE5 no sound solution.

Linux solar 2.6.38-gentoo-r6 #21 SMP Wed Nov 9 21:29:55 EET 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux
You must had installed and configured 'alsa-oss'

No sound in LDOCE5 application.

Add 'aoss' to exec ldoce5 command.
Desktop link:
Edit desktop file ldoce5.desktop. Add 'aoss' in the command on Exec line
Exec=aoss '/<path_to_ldoce5_install_dir>/ldoce5//ldoce5'

Also you can create command in user '~/.bashrc' file. Add this line in your .bashrc file
alias ldoce5="aoss /<path_to_ldoce5_install_dir>/ldoce5/ldoce5"
And after reboot you can use 'ldoce5' command to execute application with fixed sound.

May be you have "aoss32" instead "aoss", it also working, trying.

вторник, 1 ноября 2011 г.

PHP sendmail, save mails in local filesystem folder

OS: Gentoo
Language: PHP 5.3.8

Save mails sended from PHP script in local filesystem folder.
View them by KMail

Make all changes relative to your distro.
1) Create script fakesendmail.sh

if [ ! -f $numPath/num ]; then
    echo "0" > $numPath/num
num=`cat $numPath/num`
num=$(($num + 1))
echo $num > $numPath/num 
while read line
     echo $line >> $name
chmod 777 $name


I saved it in folder /home/<my_username>/Applications/

Don't forget set appropriate pathes in script.

2) Make this script executable: console> chmod +x fakesendmail.sh

3) Create folders for mails: 

console> mkdir 

console> mkdir 

console> mkdir 

console> mkdir 

4) Change folder properties: console> chmod 777 -R 

5) Make changes in php.ini file (on gentoo: /etc/php/apache2-php5.3/php.ini)

Change path to sendmail script to our new script:

sendmail_path = /home/<my_username>/Applications/fakesendmail.sh
6) Open KMail and create new incoming account.
Kontact->Settings->Configure KMail->Accounts->Add Account
In opened window choose "Maildir mailbox" and set appropriate folder "