Monday, November 28, 2011

California DMV Drive Permit written test

1. Preparation.
Official books http://dmv.ca.gov/pubs/pubs.htm

Good summary to read - http://www.theroadtosiliconvalley.com/transport/californian-drivers-license-dmv-techniques/

Official youtube for lazy - http://www.youtube.com/user/californiadmv

Good online test - http://driving-tests.org/california/california-permit-practice-test/
http://dmv.ca.gov/pubs/interactive/tdrive/exam.htm

Review latest examples of tests in youtube - http://www.youtube.com/watch?v=M5mh62xzw0E&feature=related

2. Make an appointment to DMV
http://dmv.ca.gov/foa/welcome.do?localeName=en

3. In DMV come to appointment desk(1), fill form return to (1), receive number and pay at (2), make a photo(3), go to exam boxes(4).
image created at here.

4. My Test:




Driver Instructor - Anatoliy Chechelnitskij  415 652 74 33. 2hours costed me 75$. I took 9 lessons + 1 lesson for exam 1st attempt + 1 lesson for 2nd exam attempt.
1st attempts - failure:

 2nd attempt - success:

Other variant:




Thursday, November 24, 2011

Review for Maven 3.0 Cook Book of PacktPublishing

http://www.packtpub.com/apache-maven-3-0-cookbook/book
review: of http://java.dzone.com/articles/apache-maven-3-cookbook

This book is targeted to people that are not familiar with maven at all.
Good start point, and nothing else for close to advanced user.

Smth that I found useful:
- shell command "tree -a" to show folder structure in terminal.
- few active profiles could be used in build "mvn install -P profile1, profile2"    or "mvn install !profile1, !profile2"
in maven2 I had problem with profiles to generate maven site, look like in maven3 it is fixed.

Attention. As usually right books appear after few useless:
Free good books from Sonatype - http://www.sonatype.com/Support/Books

Sunday, November 20, 2011

Fedora 16 Useful Extensions for Gnome 3.2

0. Pre step:
sudo yum install dconf-editor
sudo yum install gnome-tweak-tool
mkdir ~/.local/share/gnome-shell/extensions

1. Revome Accessibility menu:
source of wisdom:site1 site2. Perfect page for Russian Ubuntu users - read here.

- Download sources noa11y-X.X.tar.gz from http://www.fpmurphy.com/gnome-shell-extensions/.
- Unzip it to ~/.local/share/gnome-shell/extensions
- gnome-tweak-tool does not recognize it to install from UI. So do it from terminal:
gsettings get org.gnome.shell enabled-extensions
store exited extensions list in clip-board
gsettings set org.gnome.shell enabled-extensions "['noa11y@fpmurphy.com',<List from previous/copied extensions >]"
- Restart GNOME Shell ([Alt]+[F2], press "r", press [ENTER]) or logout/login.

2. Removable drives and 'Places' folders:
sudo yum install gnome-shell-extensions-places-menu
- Restart GNOME Shell ([Alt]+[F2], press "r", press [ENTER]) or logout/login.

3. Enhance ALT+TAB behaviour:
sudo yum install gnome-shell-extensions-alternate-tab

4. Power OFF from top menu
DOES NOT WORK without image for user, please assign image before activation:
sudo yum install gnome-shell-extensions-alternative-status-menu

5. In grid layout of all windows it is hard to find your application, make it more clear:
sudo yum install gnome-shell-extensions-native-window-placement

6. To manage properties of the extension use
Alt + F2 ,  "dconf-editor" , org > gnome > shell > extensions > "required extension"

7. Skype indicator to top panel, look here.

8. Pidgin indicator to top panel, look here.

9. Remove disabled bluetooth icon. does not work, due to bug link1.

10. TODO: convenient System Monitor for CPU and Memory.

11. TODO: Weather extension. try link,

12. TODO: Top panel autohide and overlay for windows images - link1,

13. TODO: remove Battery icon when on cable.

14. TODO: Is it possible to shorten length between icons in top panel ?

TODO:
http://www.webupd8.org/2011/06/move-icons-from-message-tray-to-top.html
http://www.webupd8.org/2011/10/gnome-shell-mediaplayer-extension.html
http://smashingweb.ge6.org/gnome-3-extensions-for-fedora-16/
IM Notifications for Gnome 3 http://www.webupd8.org/2011/11/never-miss-im-notifications-in-gnome.html

Saturday, November 19, 2011

Xmodmap and xbindkeys to disable Media buttons

Dell Vostro 1510 have weird problem with constant permanent media button - stop.

Here is log of my changes that I did on Fedora(I hope this will help fro Ubuntu too):
 To get code you can use "xev" or "xbindkeys -k", for my media button only second approach is working.


gedit ~/.xbindkeysrc
"NoCommand"
    m:0x0 + c:171
"NoCommand"
    m:0x0 + c:172
"NoCommand"
    m:0x0 + c:173
"NoCommand"
    m:0x0 + c:174
"NoCommand"
    m:0x0 + c:215
"NoCommand"
    m:0x0 + c:216
"NoCommand"
    m:0x0 + c:208
"NoCommand"
    m:0x0 + c:209
"NoCommand"
    m:0x0 + c:121
"NoCommand"
    m:0x0 + c:234


gedit ~/.Xmodmap


keycode 171 = NoSymbol
keycode 172 = NoSymbol
keycode 173 = NoSymbol
keycode 174 = NoSymbol
keycode 215 = NoSymbol
keycode 216 = NoSymbol
keycode 208 = NoSymbol
keycode 209 = NoSymbol
keycode 121 = NoSymbol
keycode 234 = NoSymbol

press Alt+F2
launch "gnome-session-properties"
add "usr/bin/xbindkeys"

Restart is required.


Results:
Looks like Stop button does not work, no sign is shown on the screen. Issue is not reproduced for now:
http://askubuntu.com/questions/76410/black-area-with-stroked-circle-on-the-screen

Sources:
http://www.nongnu.org/xbindkeys/
http://cweiske.de/howto/xmodmap/allinone.html
http://forums.opensuse.org/english/get-technical-help-here/laptop/406877-multimedia-keys-dell-vostro-1510-suse11-1-a.html
https://wiki.archlinux.org/index.php/Lenovo_Thinkpad_T61
https://wiki.archlinux.org/index.php/Xbindkeys

For ubuntu users could be helpful:
http://www.atunes.org/wiki/index.php?title=Use_multimedia_keys_with_aTunes_on_Linux

Feedback to KindleDX to Amazon

mail to: kindledx-feedback@amazon.com

1. No support for Non-Latin Characters in KindleDX - try to open linux.org.ru

2. No way to navigate pages when I read from kindle in its horozontall position.
My hands are keeping it from both sides and it will be convevient to navigate pages by keyboard.

3. Cannot understad why ordinary navigation buttons are missed on left side. I want to navigate by hand that is keping Kindle why always right hand should do it ?

Finally, thanks for Kindle DX, I hope you will resolve this issues in next version of KindleDX.

Wednesday, November 16, 2011

"Read it later" addon

"Read it later" useful addon for Firefox:
https://addons.mozilla.org/en-US/firefox/addon/read-it-later/

Brief description: http://readitlaterlist.com/firefox/

It useful for bookmarking and extremely useful for caching page content (without advertisements) at your android to read conveniently in offline or any time you have a minute.

Workflow: mark pages during day and read them from android during commuting in public transport.


Extension for Chrome: http://readitlaterlist.com/apps/chrome

Fedora 16 on Dell Vostro 1510


0. Install wget:
sudo yum install wget

Htop:
sudo yum install htop

1. Install Chromium:
http://www.if-not-true-then-false.com/2010/install-chromium-on-fedora-using-yum/

Install Libre Office:
sudo yum install libreoffice

2. Install Thunderbird:
sudo yum install thunderbird


3. sudo yum install nano


4. How to install skype:
<code>
sudo nano  /etc/yum.repos.d/skype.repo
</code>
Content:
[skype] 
name=Skype Repository
gpgcheck=0
baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/ gpgkey=


http://www.skype.com/products/skype/linux/rpm-public-key.asc


sudo yum install skype



sudo yum install nautilus-open-terminal


sudo yum install dconf-editor


Enable Delete: http://rusya7.blogspot.com/2011/11/fedora-16-installation-notes-part-3.html


Install Adobe flash player: http://fedoraproject.org/wiki/Flash


Install and use Ubuntu fonts : http://thedaneshproject.com/posts/install-ubuntu-fonts-on-fedora-16/

Install git: sudo yum install git-core git-gui

Install mercurial: sudo yum install mercurial subversion

sudo yum install maven

Install Krusader: sudo yum install krusader

Fonts settings: Launch "Advanced Settings", tab "Fonts", All fonts put in  Sans, size 10, "Window Title" = "Sans Bold" size is 10.

Add rpmfusion;:

sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

sudo nano /etc/yum.repos.d/rpmfusion-nonfree.repo
set in all rows: "gpgcheck=0"

Install Archive support packages:
sudo yum install unrar p7zip p7zip-plugins lha arj unace dpkg

Install font:
sudo yum install google-droid-sans-fonts

Fedora Extensions to ease using of Gnome3.

install Development File merge tool:
sudo yum install meld

In GEdit, Edit > Preferences , tab "Editor", "Create backup copy" = false

Gagim Jabber/XMPP client:
sudo yum install gajim

install Oracle server and sqldeveloper:
http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
sudo rpm -i oracle-xe-11.2.0-1.0.x86_64.rpm

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
after installation please launch it from shell to provide path to JDK, without this step launch will hangup.





Tuesday, November 15, 2011

Cut margins for PDF file to ease reading on Kindle DX

That works best for me is: pyPdf + custom script.

Description: just specify how much should be cropped. No huge difference in size of result PDF.
Install pyPdf module: "sudo yum install pyPdf"(Fedora) or "sudo apt-get install python-pyPdf"(Ubuntu)

Save scripts to "pdf_crop.py"
Usage:
"-m" mean  margin = "left top right bottom"
Examples:
python pdf_crop.py -m "25 30 7 25" -i progit.pdf
python pdf_crop.py -m "-5 0 -5 0" -i java_concurrency_in_practice.pdf


Consider also: calibre (in ubuntu repo), k2pdfopt, PaperCrop, and pdfread.

Pdfcop is useful tool by means of it I could easily read PDFs on it. It removes margins/borders of PDF.
This tool is not ideal - it always increase size of document in 2 till 100 times, even ones from 3Mb to 540Mb.

On Fedora:
sudo yum install texlive-utils
usage:
pdfcrop input.pdf output.pdf

Ubuntu users could try.

Also consider PDFEdit application
sudo yum install pdfedit
or
sudo apt-get install pdfedit

Example of cut is here , but I failed to use it.

Additional tools that could come in handy are here.

Saturday, November 12, 2011

Donation to opensource book about Debian

SevNTU Extension for Checkstyle recognized by community

Link to SevNTU checkstyle extension now become available from main site of Checkstyle http://checkstyle.sourceforge.net/ chapter "Related Tools".
And at Eclipce-cs plugin site.

Thanks to all participants.
Please join the project if you have intention to help and contribute to it.

Vertical panel in Ubuntu 10.04


0. Screen before, default ubunu view, as you can see that we have shortage of vertical space and plenty of  horizontal that is wasted and not used  - use vertical panel.

1. install DockbarX
http://gnome-look.org/content/show.php/DockbarX?content=101604

sudo add-apt-repository ppa:dockbar-main/ppa
sudo apt-get update && sudo apt-get install dockbarx
sudo apt-get install dockbarx-themes-extra

2. Make top Panel vertical: right click on it in context menu select "Properties", Orientation = Right.
Right is more preferable as usually users work at left side of screen, and all other should be far and not distracted. Additionally majority of users are right-handed and all tools and switchers should be placed right.

3. Add more laconic "Main menu" to panel, right click over panel, in context menu select "Add", in list select "Main menu". Remove old menu, that is not good for vertical layout(right click over it and "Remove from this panel"). Move new menu to the top, right click over it and select "Move".

4. Change width of panel to 44 pixels. 

5. Add to panel new applet "DockbarX", move it up  "Main menu" and lock it on panel.

6. Bottom panel could be deleted. 

7. Change theme to light. Main Menu -> System -> Preferences -> Appearance. Select "Clear look" theme but change icons to to Humanity in "Customize".

8. Remove "Indicator Applet Session" from right panel - its functional will appear in  Main menu.

9. Date-Time should be configured to show only time in "Preferences".

10. System monitor could be added to panel as applet. Background color should be changed to white and length to 20pixels.

11. Enjoy result,and full usage of vertical space of the screen:



Friday, November 11, 2011

Skype redeem voucher from Private24 Ukraine

https://secure.skype.com/account/intl/ru/voucher/redeem



Analogs of Linux and Windows applications in Russian


Analogs Linux vs Windows
http://www.linuxrsp.ru/win-lin-soft/table-rus.html

Useful options to switch off in MS Vista


switch off:
- UAC service
- system restore service
- Indexing of the home folder

Ubuntu and oracle setup and usage


===== Orcale open 8080 port to wetwork
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
http://192.168.0.99:8080/apex

Some useful Bash scripts for Oracle management:
http://www.akadia.com/services/ora_linux_install_10g.html

Run sqlplus on another server:
sqlplus det2/det2@'(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.102)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = xe)))'

Arrow keys on sqlplus!!!!!!!!!!!!!!! -> use gqlplus
http://gqlplus.sourceforge.net/
Download and copy binary file from folder Linux to $ORACLE_HOME/bin
or
http://sysdba.wordpress.com/2006/10/08/how-to-use-rlwrap-to-get-a-command-history-in-sqlplus/
sudo apt-get install rlwrap
alias sqlp='rlwrap sqlplus'

Extend amount of connectoins to DB:
http://naveenkanth.blogspot.com/2008/07/ora-12519-ora-12505.html
ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE
select name,value from v$parameter where name in('sessions','processes');

ubuntu PC to PC connection x2x, vnc, vino, X11vnc


------------- X2X
https://help.ubuntu.com/community/X2xHowto
Desktop: sudo aptitude install x2x openssh-server
ssh -XC romani@192.168.0.101  x2x -west -to :0.0

You can change '-east' to '-west', '-north' or '-south' to change which side of the workstation opens up to the laptop, depending on your setup.


----------------- VNC server
read http://ubuntuforums.org/showthread.php?t=122402
follow http://grumpymole.blogspot.com/2006/12/xubuntu-remote-desktop-with-vnc4server.html
and restard PCs after installaion.

On client: vncviewer 192.168.0.100:1
---------------- vino
sudo apt-get install vino
sudo vino-preferences
Read some details from: http://layer8problem.blogspot.com/2008/10/howto-remote-desktop-to-xubuntu-710.html

How to run server: sudo /usr/lib/vino/vino-server

------------------ X11vnc
On server:
sudo apt-get install x11vnc

#! /bin/bash
/usr/bin/x11vnc -display :0 -24to32 -usepw -forever -allow 192.168.0.101 -ncache 10

On client: vncviewer 192.168.0.100:0
to scroll - use right an dleft button click on scroller!!!

AutoRun http://www.karlrunge.com/x11vnc/#faq-display-manager and search for "Continuous"
http://ubuntuforums.org/showthread.php?t=1012606&goto=newpost

Cannon 2900 for Ubuntu


Cannon 2900 for Ubuntu 10.04 works fine:
http://rosinka.rosix.ru/index.php?topic=292.msg1385;boardseen#new

Nvidia HD video on ubuntu 10.04


!!!!!!!http://forum.ubuntu.ru/index.php?topic=125588.0

http://takeworld.blogspot.com/2009/09/vdpau-ubuntu.html

mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, -fps 48 20100901.m2ts

Nvidia Nvidia Tv-out (S-VIDEO)
http://rutube.ru/tracks/3387556.html?v=c016556493421df517071ea56166bdbe

Ubuntu 10.4 show icons in menu

launch in terminal:
gconftool-2 --type Boolean --set /desktop/gnome/interface/menus_have_icons True

Logout and loging.

Cool Fonts for Tcl\Tk in Ubuntu 10.04


sudo aptitude install tk8.5
sudo update-alternatives --config wish
and pick /usr/bin/wish8.5 from the list

How to remove Ubuntu Linux from dual boot


Source: http://www.raymond.cc/forum/linux/9367-how-to-remove-ubuntu-linux-from-dual-boot-%5Btutorial%5D.html

    Everyone who uses Ubuntu know how to remove Ubuntu when you installed it with wubi. But sometimes it's hard to remove (uninstall) Ubuntu when you installed it in separate partition (without wubi).

    Some people may ask "why not just delete Ubuntu partitions?". No we can't do like this because Ubuntu installs a boot loader called GRUB into the Master Boot Record (MBR), if you delete Ubuntu partitions all the data will be deleted but not GRUB! So when your restart your PC, GRUB will look for Ubuntu , when it does not find Ubuntu it show some error and you cannot even boot into windows. So here I'm going to show you two ways to safely remove Linux.

    -------------------------------

    First (Using MbrFix)

       1. Download mbfix from here. http://download.cnet.com/MbrFix/3000-2094_4-10485990.html
       2. Extract all files in mbrfix.zip to C:\.
       3. Open Command Prompt (start->run-> type cmd -> OK).
       4. Type cd \ and press enter.
       5. Then type mbrfix /drive 0 fixmbr /yes and press enter.
       6. Now you can delete Ubuntu partitions (/, swap etc) using Easeus Partition Manager or Windows Disk Management or other partition editor.
       7. Restart your PC.

    This will overwrite GRUB with Windows boot loader . So you will see Windows boot loader instead of GRUB.

    Second (Using Windows CD)

    XP Users:

       1. Boot your PC with Windows XP CD and select Repair.
       2. Then select the OS, once you are there you'll have a command line.
       3. Type Administrator password. If Admin password is blank, just press Enter.
       4. Type fixmbr, and then press Enter.
       5. Restart PC.
       6. Delete Ubuntu Partitions.

    Vista Users:

       1. Boot PC with Windows Vista installation disc.
       2. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
       3. Click Repair your computer.
       4. Click the operating system that you want to repair, and then click Next.
       5. In the System Recovery Options dialog box, click Command Prompt.
       6. Type Bootrec.exe, and then press Enter.
       7. Delete Ubuntu Partitions.

    This will also overwrite GRUB with Windows boot loader.

    Notes:

    (i) If you have any doubts about using Recovery Console read this and this.
http://support.microsoft.com/kb/307654
http://askbobrankin.com/fix_mbr.html

    (ii) It's always good to back up MBR. (Raymond had written an excellent article about that.)

Ubuntu 10.04 Remove keyboard and message indicator


UBUNTU 10.04 Remove keyboard indicator:

gconftool-2 -s /desktop/gnome/peripherals/keyboard/general/disable_indicator -t bool true

Remove messages indicator:
sudo aptitude remove indicator-messages

Indicator Applet management in Ubuntu 10.04


Indicator Applet management in Ubuntu 10.04

Thunderbird:
1. sudo echo "/usr/share/applications/thunderbird.desktop" > /usr/share/indicators/messages/applications/thunderbird
2. install in Thunderbird this:
bzr branch lp:~ruben-verweij/libnotify-mozilla/experimental
cd experimental
./build.sh
3. Logout

Pidgin:
http://forum.ubuntu.ru/index.php?topic=92923.msg735094#msg735094
Tools/Prefrences/Interface/Show in Trey = Never
Tools/Plugins/LibNotify select checkbox and in plugin configuration unselect all except for ".. blocked users .."

Remove Empathy/Evolition:
sudo rm -f /usr/share/indicators/messages/applications/empathy
sudo rm -f /usr/share/indicators/messages/applications/evolution
sudo rm -f /usr/share/indicators/messages/applications/gwibber

Flags for keyboard languages in Ubuntu 10.04



Flags for keyboard languages (works fine only for horizontal menu)

mkdir ~/.icons/flags
cd ~/.icons/flags
wget http://www.qdesnic.ru/uploads/deb/{ru,us}.png
gconftool-2 --type bool --set /desktop/gnome/peripherals/keyboard/indicator/showFlags true

Ubuntu services tools


Tool to manage services:
sudo aptitude install sysv-rc-conf

Use the update-rc.d command to install the script from /etc/init.d/virtualbox-deb-test to appropriate run levels:
sudo update-rc.d virtualbox-deb-test

Setup the default Java version


To setup the default Java version to java 6 just launch:

sudo update-java-alternatives -s java-6-sun

How to get to know who locked file in linux


Who locked that file -- lsof   (list open files)
lsof /home/romani/java/workspace/.metadata/.lock
lsof +d /home/romani/java/workspace/.metadata

x2x to Windows is Synergy2


http://synergy2.sourceforge.net/
1. Install in Ubuntu QuickSynergy
2. install in Windows synergy from SF.net (see above)
3. Launch QuickSynergy select "right" and change to "romani-laptop". Press "Start".
4. Launch Synergy on Windows. Put "romani-desktop" to server name. Press "Test".
5. If in log there is no errors - move you mouse freely.

Convert video to 3gp


sudo apt-get install winff
use 3g2 format for mobile, additional settings(Presets) could be taked from WinFF forum

nrg mounting and converting to iso


NRG mounting:
sudo mount -t udf,iso9660 -o loop,ro,offset=307200  CCAD.nrg /media/iso

Converting to ISO:
sudo aptitude install nrg2iso
nrg2iso NAME.nrg NAME.iso

ubuntu 10.04 Pidgin and plugins


Install pigin and plugins:
sudo apt-get install pidgin
sudo apt-get install pidgin-plugin-pack

Install spell checker for Russian language:
sudo apt-get install aspell-ru
Select "Switch Spell 2.4.0" in Tool\Plugins. After this In all chart windows you need to select language in menu "Spell Check"

Install "Extended Buddy List Sort Plugin”:
I do not understand what is going in heads of Pidgin developers but sorting of contacts they have awful and useless. 
sudo add-apt-repository ppa:konradgraefe/pidgin-plugins
sudo apt-get update
sudo apt-get install pidgin-extended-blist-sort
sources: http://freakazoid.teamblind.de/2008/12/13/pidgin-extended-buddy-list-sort-plugin/
https://launchpad.net/~konradgraefe/+archive/pidgin-plugins

Ubuntu how to install and setup Krusader for convenient work

Install krusader:
sudo apt-get install krusader

Launch krusader:
on first launch Krusader will offer to configure it or you can continue configuration in any time by
selecting menu Settings -> Configure Krusader.

For windows user I suggest select TotalCommander way of selection:  

specify gnome teminal: "gnome-terminal --geometry=150x30" or update default/unnamed profile in gnome-terminal settings
ATTENTION: in latest Krusader you need to put full path to executable - "/usr/bin/gnome-terminal"
Provide path to gnome sudo and diff tool. I use meld

 That is all. I recommend to open settings of internal editor and remove backups for file editing.
Select any text file in krusader panel, press F4. In window select menu "Settings->Configure Editor"



 Enjoy!

PS: for ubutnu 12.04 consider workaround to not uase backup-files on any file editing, page.
Search my blog for more Krusader related articles.

hot keys for mouse-less usage : http://www.krusader.org/documentation/key_bindings.html

sqlplus switch off all output for command line


Example of code, take a look for bold parts:

sqlplus -s $DATABASE_LOGON <<EOF
  set termout off
  set echo off  
  set trimspool on
  set feedback off
  set show off

  set linesize 200
  set pagesize 1000

  spool $OUTPUT_FILE
  @$JOB__SQL_FILE_NAME.sql
  spool off
  exit;
EOF

Thursday, November 10, 2011

Java References: Soft, Phantom, Weak

Theory: http://weblogs.java.net/blog/2006/05/04/understanding-weak-references
Practice example: http://www.javareference.com/jrexamples/viewexample.jsp?id=115

Wednesday, November 9, 2011

Ubuntu: Set week start on Monday in calendar


Set week start on monday

sudo gedit /usr/share/i18n/locales/en_US
set "first_weekday  2"

sudo locale-gen

logout/login

Krusader crashes on startup if cound not found active folder



Krusader crashes on startup if cound not found active folder:

gedit ~/.kde/share/config/krusaderrc

Remove all content in [startup] area

Resolve problem with Windows encoding in gedit


Gedit encoding

for Ubuntu 10.04:
sudo apt-get install gconf-editor

launch:     gconf-editor

select in tree: apps -> gedit-2 -> preferences -> encodings

set:    auto-detected = at the top "windows-1251"

For Ubuntu 12.04:

gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'WINDOWS-1251', 'CURRENT', 'ISO-8859-15', 'UTF-16']"

Time chart for linux loading


boot chart :
sudo apt-get install bootchart

Logs at /var/log/bootchart

source: http://www.webupd8.org/2009/04/ubuntu-boot-chart-make-graph-with-your.html

SKIN for Audacious/XMMS


SKIN for Audacious/XMMS

http://gnome-look.org/index.php?xcontentmode=130
Just download the archive and drag and drop it in Audacios/Preference/SkinnedInterface/ list of skins
or copy to ~/.local/share/audacious/Skins
for more details - "man audacious"

Encoding for playlist in preferences:
Fallback encoding = "cp-1251 koi8-r"

Windows7 theme for ubuntu


I tied and I understood that Windows7 theme is not convenient, but ....
http://ubuntu.sun.ac.za/index.php?title=W7_Theme
http://gnome-look.org/content/show.php/Win2-7+Pack+Lucid+Lynx+Edition?content=122044

CentOS php ftp installation


CentOS
yum install nano
yum install php

-- restart Apache!!!!
apachectl graceful
apachectl restart

echo "<?php phpinfo(); ?>" > /var/www/html/1.php

put in borowser 209.25.133.14/1.php

FTP: http://www.centos.org/modules/newbb/viewtopic.php?topic_id=4740.
yum install vsftpd
/etc/init.d/vsftpd restart
chkconfig vsftpd on
service vsftpd status

nano /etc/vsftpd/user_list
>> add "dev" user
>> comment all other users

userlist_deny=NO

anonymous_enable=NO

chroot_list_enable=YES
chroot_local_user=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list

ftpd_banner=Welcome to Maritime FTP service.

Create Document Templates for Nautilus/Thunar



Create Document Templates for Nautilus/Thunar

http://brainstorm.ubuntu.com/ideatorrent/idea/1850
http://helloalan.com/projects/templates/

Virtualbox OSE guest addon installation


install on Ubutnu host Guest addons FOR OSE ONLY !!!!
sudo apt-get install virtualbox-guest-additions

PHP Debug in NetBeans


PHP Debug in NetBeans

http://blogs.sun.com/netbeansphp/entry/ubuntu_php_netbeans_part_iii
http://blogs.sun.com/netbeansphp/entry/ubuntu_php_netbeans
http://blogs.sun.com/netbeansphp/entry/ubuntu_php_netbeans_part_ii

How to fix Amaroc in Ubuntu


Amaroc + Ubuntu 9.10.
It does not play music by default :). We need to install  additional library:

sudo apt-get install libxine1-ffmpeg

Add cut/copy/paste icons to nautilus toolbar


adding cut/copy/paste icons to nautilus toolbar
http://ubuntuforums.org/showpost.php?p=170641&postcount=2

$ sudo gedit /usr/share/nautilus/ui/nautilus-navigation-window-ui.xml
<toolbar name="Toolbar">
<toolitem name="Back" action="Back"/>
<toolitem name="Forward" action="Forward"/>

<toolitem name="Up" action="Up"/>
<toolitem name="Stop" action="Stop"/>
<toolitem name="Reload" action="Reload"/>
<separator/>
<toolitem name="Home" action="Home"/>
<toolitem name="Computer" action="Go to Computer"/>
<separator/>
<toolitem name="Cut" action="Cut"/>
<toolitem name="Copy" action="Copy"/>
<toolitem name="Paste" action="Paste"/>

<placeholder name="Extra Buttons Placeholder">
<placeholder name="Extension Actions"/>
</placeholder>
</toolbar>

Meld + Nautilus



Meld + Nautilus:
http://javaconfessions.com/2008/12/meld-open-source-diff-and-merge-tool.html

ubuntu tweaks with disk commands


================
Format to NTFS / FAT

sudo aptitude install ntfsprogs ntfs-3g gparted
Then use Gparted and run the check from there.


get free space on disks:
df -h

show size only for folders:
du -sh /home/*

ext3 file system, get back the space:
tune2fs -m 0 /dev/hda1

Info:
tune2fs -l /dev/sda1
or:
dumpe2fs -h /dev/hd1

How to Make a clone of virtualbox VDI


make a clone of virtualbox VDI
Example, commands:
cp debian5.vdi debian5_oracle.vdi
VBoxManage internalcommands sethduuid debian5_oracle.vdi

Ubuntu: Set teminal window size


Set teminal window size:
add this in shortcut for terminal
"gnome-terminal --geometry=150x30"

Hide Removable Drive Icons from Your Ubuntu Desktop


gconf-editor into the Alt+F2
Follow this tree:
Apps -> Nautilus -> Desktop
Uncheck the option "Volumes Visible"

Remove The 60sec Shutdown/Reboot Timer


In Karmic Koala:
gconftool-2 -s '/apps/indicator-session/suppress_logout_restart_shutdown' --type bool true

How to make iso file from CD in terminal


sudo cat /dev/scd0 > CD.iso

Arvhive list for ubuntu

sudo apt-get install rar unrar unace arj lha rpm bzip2 gzip p7zip-full

FF 3.5 remove newTab Button



rename /home/romani/.mozilla/firefox/u3p8un3p.default/chrome/userChrome-example.css
to //home/romani/.mozilla/firefox/u3p8un3p.default/chrome/userChrome.css

add ".tabs-newtab-button { display : none };"
after "@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */"

If no such file "../chrome/userChrome.css" - create it and put:
.tabs-newtab-button { display : none };

vertical/horizontal scrolling


==========
In 10.04: Sytesm -> Preference -> Mouse  - check "Enable horizontal scrolling"

before 10.04:
gksu mousepad /etc/hal/fdi/policy/shmconfig.fdi
add the xml configuration
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.SHMConfig" type="string">True</merge>
   <merge key="input.x11_options.VertEdgeScroll" type="string">1</merge>
   <merge key="input.x11_options.HorizEdgeScroll" type="string">1</merge>
  </match>
 </device>
</deviceinfo>

REBOOT: sudo init 6

Punto Switcher for Linux

http://xneur.ru/

Open Office installation and turning


OPEN OFFICE

Numbers for Pages - Writer - http://myooo.ru/usercontent/extentions/Pager.oxt (from http://myooo.ru/content/view/120/43/)
It is necessary to restar OS to make it work. More info on http://myooo.ru/content/view/106/48/.
http://extensions.services.openoffice.org/project/pdfimport
http://extensions.services.openoffice.org/project/NotesAnchor
http://extensions.services.openoffice.org/project/AltSearch
http://extensions.services.openoffice.org/project/pagination
http://extensions.services.openoffice.org/project/dict_ru_RU

Russian lang packs:
sudo apt-get install openoffice.org-l10n-ru

Thumbnails for ODT documents:
sudo apt-get install ooo-thumbnailer


Configure Open Office to work in MS Office 2000 compatibility mode

    * Start OpenOffice Word Process: Applications -> Office -> OpenOffice.org Word Processor -> tools -> options ->
    expand "Load/Save" -> select "general" ->
      For document type = "Text document", set Always save as "Microsoft Word 97/2000/XP"
      (instead of "ODF text document"); For Document type = "Spreadsheet", set
      Always save as "Microsoft Excel 97/2000/XP"; For Document type = "Presentation",
      set Always save as "Microsoft PowerPoint 97/2000/XP" -> then click "OK".

    * Then tools -> options -> OpenOffice.org Writer -> compatibility ->
    tick "Use printer metrics for document formatting",
    tick "Do not add leading (extra space) between lines of text", and
    tick "Consider wrapping style when positioning objects".
  Then go: Use as Default -> Yes -> OK.




Openoffice .doc formulas won't work
copy C:\Windows\Fonts into

.openoffice.org/3/user/fonts

HiDE Printers in Win network


------
http://ubuntuforums.org/showthread.php?p=6339435

sudo gedit /etc/samba/smb.conf

wins support = no
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700
   available = no
   public = no

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = no
   read only = yes
   guest ok = no
   #available = no
   #public = no


============ printer restart
sudo /etc/init.d/ccpd restart

turn off PC speaker in Ubuntu


To turn off PC speaker
Add this to the end of /etc/modprobe.d/blacklist:
Code:
blacklist pcspkr

Restore grub after windows instillation with existing ubuntu


============== Resotre Grub loader:
http://ubuntuforums.org/showthread.php?t=224351&highlight=grub
Commands:
suod grub
find /boot/grub/stage1
---- it returns smth like "(hd0,5)"
root (hd0,5) // put here returned values
setup (hd0) // put here returned values
quit

Tuesday, November 8, 2011

ubuntu 10.04 installation and turning

1.Ubuntu Software Center (UCS):
in UCS menu Edit -> Software sources. Open tab "Other Software" select "partner" repository.
Install from following applications:
htop
gnote
chromium
gnome do
goldendict and mplayer
thunderbird
krusader
gimp
gajim
stelarium
mscorefonts
pidgin
pidgin plugin pack
k3b
oggconvert
Abobe flash plugin


Launch  System->Administration->"Synaptic package manager" (SPM)
Press "Reload" in SPM
search mark for installation  by right click and apply/install:
rar
arj
unace
rpm
lha
p7zip-full
alien
nautilus-open-terminal
ooo-thumbnailer

Remove OOO or install Libreoffice and adjust it.
http://www.ubuntugeek.com/install-libreoffice-in-ubuntu-11-0410-1010-04-using-ppa.html

Install DockbarX for vertical panel and adjust it.


Firefox.
install latest FF:

sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get install firefox
FF preferences:
in menu Edit -> Preferences, on General tab in Downloads group select "Always ask where to save files"
FF Addons:
- "Adblock Plus"
- "Download statusbar"
- "Compact menu" (after installation remove applicaton button from toolbar)
- "Tab mix plus" (after installation setup multirow for tabs Addon Prferences -> Display -> TabBar -> When Tab don't fit width = "Multi-row", Events -> Tab Closing -> Closing current tab: When closing current tab, focus = Last selected Tab)
- "Locationbar" (in preferences - Lincfication = "on bottom"; "breadcrumb for" = "each segment")
Result:


and Thunderbird and adjust them

Chromium:
in Preferences
on tab "Basics" select " Reopen the pages that were open last"
on tab "Under the Hood" in Download part select "Ask where to save each file before downloading".
Install Extensions: adblock plus


Development environment from USC:
meld - Compare and merge your files
regexxer - Search and replace using regular expressions
kodos - Visual regular expression editor
xmlcopyeditor - cool xml viewer and editor for Linux

install packages from SPM:
maven2
subversion

git-core
git-gui
giggle

sun-java6-jdk
sun-java6-source
sun-java6-javadoc
sun-java6-plugin

Mercurial from ppa, lauch in terminal:
sudo sudo add-apt-repository ppa:mercurial-ppa/releases
sudo apt-get update
sudo apt-get install mercurial



Monday, November 7, 2011

How to remove all table from schema

Oracle DB:

Approach1:
select 'Drop table MY_SCHEMA.' ||  TABLE_NAME || ';'
from ALL_TABLES where OWNER = 'MY_SCHEMA';

Approach2:
<TO_DO>

Sunday, November 6, 2011

Ubuntu 11.10 for Dell Vostro 1510

Dell Vostro 1510 with Ubuntu 11.10.

Critical problem that make may laptop unusable: http://askubuntu.com/questions/76410/black-area-with-stroked-circle-on-the-screen due to hardware problem, the same problem on Windows.
http://ubuntuforums.org/showthread.php?p=11454188#post11454188
tried to resolve problem by disassembling and switching off media keyboard, unfortunately media and power use the same power cable.

Quick installation of applications from
http://blog.sudobits.com/2011/10/30/best-applications-and-tweaks-for-ubuntu-11-10/

Good link for set-up and adjustments:
http://www.webupd8.org/2011/10/things-to-tweak-after-installing-ubuntu.html


Additional packages:
synaptic (I need it because 'ubuntu software center' badly search for packages)
goldendict
goldendict-wordnet
mplayer (required for goldendict sound pronunciation)
htop
meld
chromium-browser
k3b
vlc

krusader (configure)

skype (failed to increase volume level for microphone, without "auto-adjust by Skype" in preferences I do not hear myself in test call, but work fine)

qutim (could not be activated from systray)
Registered by me against 0.3b:
"systray icon blinking always" - https://bugs.launchpad.net/qutim/+bug/886920
"system tray please provide "Activate" in menu" - https://bugs.launchpad.net/qutim/+bug/886919

libreoffice menu as global:
lo-menubar (to put menu in top panel)

empathy(alwas show contact in groups by account - very inconvenient pl ease vote for issues
(https://bugs.launchpad.net/empathy/+bug/622221
https://bugzilla.gnome.org/show_bug.cgi?id=627658 )

gnote (put in "Startup Applications" as command "gnote --systray" to not show main menu on launch http://askubuntu.com/questions/49378/how-do-i-start-gnote-minimized)

goldendict
Download Russian/English Vocabulary

enruen-content-1.1.tar.bz2
WordNet3.0_1.0.zip

upzip it to /home/<USERNAME>/.goldendict/dic
download morphology from the same site (en_US_1.0.zip, ru_RU_1.0.zip) and unzip pit to /home/<USERNAME>/.goldendict/morph
). And register it in  "Dictionaries" in tab Morphology.
Setup it to launch at StartUp Applications "/usr/bin/goldendict"
In Goldendict preferences select "start to system tray".
Setup pathes to dictionaries and morphology at Edit > Dictionaries menu.

GnomeDo (become not necessary as key Win/Super open menu and smart lookup is provided like in GnomeDo)

Thunderbird (plugins does not work from previous installation)
List of must have plugins:
Attention: Previous version a located at addon page at the bottom Group "Version information", link "See complete version history".

For Thunderbird 7 you need manually download appropriate addons:
https://addons.mozilla.org/thunderbird/downloads/file/132694/lightning-1.0b7-tb+sm-linux.xpi
https://addons.mozilla.org/thunderbird/downloads/file/124637/provider_for_google_calendar-0.8-sm+tb.xpi
https://addons.mozilla.org/en-US/thunderbird/addon/addressbooktab
https://addons.mozilla.org/en-US/thunderbird/addon/google-contacts
https://addons.mozilla.org/en-US/thunderbird/addon/no-message-pane-sort-by-mouse
https://addons.mozilla.org/en-US/thunderbird/addon/smarttemplate4
https://addons.mozilla.org/en-US/thunderbird/addon/Filter_Copy/
https://addons.mozilla.org/en-US/thunderbird/addon/thunderbird-message-filter-imp
or https://addons.mozilla.org/en-US/thunderbird/addon/tb-import-export-wind-li-port
https://addons.mozilla.org/en-US/thunderbird/addon/send-filter is good for making mail as not read in Sent folder to tread it like not answered.

Synaptic (still required as in Software Center is impossible to find nautilus extensions "nautilus-open-terminal", "nautilus-image-converter", "ooo-thumbnailer",.... without logout "nautilus -q")

gajim (allow be in system tray:::
gsettings set com.canonical.Unity.Panel systray-whitelist "['Skype', 'gnote', 'gajim']"
to get existing list of allowed applications:
gsettings get com.canonical.Unity.Panel systray-whitelist
after this do logout)

How to view CPU and memory in Systray:
http://askubuntu.com/questions/30334/list-of-application-indicators

How to remove user indicator in top panel:
http://askubuntu.com/questions/62092/how-do-i-remove-the-me-user-indicator-from-the-panel

How to show icons in main/context menu:
sudo apt-get install gnome-tweak-tool
Launch "Advanced Settings", Theme group, "Menu Have Items" = "ON"
http://askubuntu.com/questions/49093/no-app-icons-in-menus/78721

How to change shortcut for changing keyboard layout to Capslock:
Right click over language icon on top panel "Keyboard Preferences", "Options....", "Keys to change layout" = Capslock


Top panel - how to show menu always:
bug: https://bugs.launchpad.net/ubuntu/+source/indicator-appmenu/+bug/879110
discussion: http://askubuntu.com/questions/25785/can-auto-hide-for-the-application-menu-be-turned-off-in-unity


Development environment from Synaptic:
meld - Compare and merge your files
regexxer - Search and replace using regular expressions
kodos - Visual regular expression editor
xmlcopyeditor - cool xml viewer and editor for Linux

install packages from SPM:
maven2
subversion

git-core
git-gui
giggle


Java - OpenJDK:
openjdk-6-jdk
openjdk-6-doc
openjdk-6-source

Still Problems:

Why Software Center can not open/launch application just after installation???!!!!
http://askubuntu.com/questions/79014/ubuntu-software-center-add-option-to-launch-application-after-installation

Problem with showing time in different locations. in 10.04 it was possible to show time in different locations. in 11.10 is possible too BUT by click over this time your change your location and time - occasional click and your time is changed.


Install Lzma to CentOS

http://wiki.centos.org/AdditionalResources/Repositories/RPMForge#head-5aabf02717d5b6b12d47edbc5811404998926a1b

sudo yum install lzma