Показаны сообщения с ярлыком Linux. Показать все сообщения
Показаны сообщения с ярлыком Linux. Показать все сообщения

среда, 26 сентября 2012 г.

bash, colored output

Params:
Linux A230512 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Qt: 4.8.1

KDE Development Platform: 4.8.5 (4.8.5)
Yakuake: 2.9.8


Problem:
Need colored bash output.

Solution:
Edit your ~/.bashrc configuration file.
Find this parameter force_color_prompt and set it to yes.
force_color_prompt=yes

четверг, 23 февраля 2012 г.

Gentoo install libgtk-x11-2.0.so.0

Params:
OS: Linux solar 3.1.6-gentoo #16 SMP Thu Jan 5 14:49:10 GMT 2012 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

Problem:
I trying to run LDOCE5 and have this error:
Error while loading shared libraries: libgtk-x11-2.0.so.0
32bit applications need 32bit libraries, but I have 64bit system.

Solution: 
Many 32bit libraries on 64bit gentoo you can install with package app-emulation/emul-linux-x86-gtklibs. Also this package has needed libgtk-x11-2.0.so.0
> emerge app-emulation/emul-linux-x86-gtklibs  -av

понедельник, 9 января 2012 г.

Configure Zend Debugger

Params:
Linux Gentoo 3.1.6
PHP 5.3.8-pl0-gentoo
Apache 2.2.21-r1

Problem:
Need to configure Zend Debugger.

Solution:
1) Download Zend Debugger from site zend.com
2) Unpack archive to the temporary folder.
3) Find ZendDebugger.so file with version compatibale to your PHP version
For example, I have PHP version 5.3.8 so my ZendDebugger.so file located in 5.3.x folder.
4) Copy ZendDebugger.so to the folder accesibale by apache.
For example: /home/<user_name>/Applications/ZendDebugger/ZendDebugger.so
5) Edit php.ini. Location of php.ini depends by system. For Gentoo is here: /etc/php/apache2-php5.3/php.ini
6) Add following lines to the end of php.ini:

[Zend]
zend_extension=/home/<user_name>/Applications/ZendDebugger/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
About this and additional options you can read in internet.
7) Restart the apache. In gentoo just execute /etc/init.d/apache2 restart
8) Check debugger. Look to the phpinfo() if all "ok!" you will see section "Zend Debugger" with config options.
9) Fix errors. If you can't see "Zend Debugger" section look to the apache error log file and fix the errors.
Log file in Gentoo: /var/log/apache2/error_log
In my case I have this errors:
* Failed loading /home/<user_name>/Applications/ZendDebugger/ZendDebugger.so:  libssl.so.0.9.8: cannot open shared object file: No such file or directory
* Failed loading /home/<user_name>/Applications/ZendDebugger/ZendDebugger.so:  libcrypto.so.0.9.8: cannot open shared object file: No such file or directory
So I create soft links to the existing libs "libssl.so.1.0.0" and "libcrypto.so.1.0.0"
> ln -s /usr/lib/libssl.so.1.0.0 /home/<user_name>/Applications/ZendDebugger/
> ln -s /usr/lib/libcrypto.so.1.0.0 /home/<user_name>/Applications/ZendDebugger/
links must be in the same folder with ZendDebugger.so

That's all.

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

LDOCE5 no sound solution.

Params:
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'

Problem:
No sound in LDOCE5 application.

Solution:
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.

воскресенье, 18 сентября 2011 г.

Midnight Commander file association and execution

Set KDE file association in mc for all users.
Edit config file "/etc/mc/mc.ext"

For example we set association for video files:
**************************************************
### Video ###
........

include/video                                                                                                      
<------>Open=(kfmclient exec %f >/dev/null 2>&1 &)
**************************************************
Use this string for other application if need.

Examples for other ENV:
# for XFCE
Open=(exo-open %f >/dev/null 2>&1 &)
#for Gnome
Open=(gnome-open %f >/dev/null 2>&1 &)