Wednesday, December 28, 2011

My favorite bach command prompt PS1

cd ~
nano .profile
add following line at the end
PS1="[\u@\h \W]$ "
export PS1


easy to read link for more.

Friday, December 23, 2011

GoldenDict is not starting due to "Another GoldenDict copy started already."

smth happen...
Golden dict could not be started. Launch from menu will not open anything.
Launch from terminal:
rivanov@rivanov-desktop:~$ goldendict
Another GoldenDict copy started already.

There is no goldendict process.

rm -f ~/.goldendict/pid

Sunday, December 4, 2011

Bash/Shell if conditions are lazy for '&&'(AND) expressions

This script is showing that &&(AND) conditions are optimized in Bash/Shell to not calculate rest of condition if first part is already FALSE.


#if  [ "x$IS_HOLIDAY" = "xY" ]  && [ "x$RUN_DAYOFF" != "xY" ]; then
if  [ "x$IS_HOLIDAY" = "xY" ]  && [ echo 'sdfs' ]; then
    echo "Skipping unit , today is dayoff"
      echo "DO unit , today is dayoff"
echo "finished."

Monday, November 28, 2011

California DMV Drive Permit written test

1. Preparation.
Official books

Good summary to read -

Official youtube for lazy -

Good online test -

Review latest examples of tests in youtube -

2. Make an appointment to DMV

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
review: of

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 -

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
- 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 enabled-extensions
store exited extensions list in clip-board
gsettings set enabled-extensions "['',<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 ?

IM Notifications for Gnome 3

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
    m:0x0 + c:171
    m:0x0 + c:172
    m:0x0 + c:173
    m:0x0 + c:174
    m:0x0 + c:215
    m:0x0 + c:216
    m:0x0 + c:208
    m:0x0 + c:209
    m:0x0 + c:121
    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.

Looks like Stop button does not work, no sign is shown on the screen. Issue is not reproduced for now:


For ubuntu users could be helpful:

Feedback to KindleDX to Amazon

mail to:

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

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:

Brief description:

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:

Fedora 16 on Dell Vostro 1510

0. Install wget:
sudo yum install wget

sudo yum install htop

1. Install Chromium:

Install Libre Office:
sudo yum install libreoffice

2. Install Thunderbird:
sudo yum install thunderbird

3. sudo yum install nano

4. How to install skype:
sudo nano  /etc/yum.repos.d/skype.repo
name=Skype Repository
baseurl= gpgkey=

sudo yum install skype

sudo yum install nautilus-open-terminal

sudo yum install dconf-editor

Enable Delete:

Install Adobe flash player:

Install and use Ubuntu fonts :

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

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:
sudo rpm -i oracle-xe-11.2.0-1.0.x86_64.rpm
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 ""
"-m" mean  margin = "left top right bottom"
python -m "25 30 7 25" -i progit.pdf
python -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
pdfcrop input.pdf output.pdf

Ubuntu users could try.

Also consider PDFEdit application
sudo yum install pdfedit
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 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

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

Analogs of Linux and Windows applications in Russian

Analogs Linux vs Windows

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

Some useful Bash scripts for Oracle management:

Run sqlplus on another server:

Arrow keys on sqlplus!!!!!!!!!!!!!!! -> use gqlplus
Download and copy binary file from folder Linux to $ORACLE_HOME/bin
sudo apt-get install rlwrap
alias sqlp='rlwrap sqlplus'

Extend amount of connectoins to DB:
select name,value from v$parameter where name in('sessions','processes');

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

------------- X2X
Desktop: sudo aptitude install x2x openssh-server
ssh -XC romani@  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
and restard PCs after installaion.

On client: vncviewer
---------------- vino
sudo apt-get install vino
sudo vino-preferences
Read some details from:

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 -ncache 10

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

AutoRun and search for "Continuous"

Cannon 2900 for Ubuntu

Cannon 2900 for Ubuntu 10.04 works fine:;boardseen#new

Nvidia HD video on ubuntu 10.04


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

Nvidia Nvidia Tv-out (S-VIDEO)

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


    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.
       2. Extract all files in 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.


    (i) If you have any doubts about using Recovery Console read this and this.

    (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

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
3. Logout

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
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
1. Install in Ubuntu QuickSynergy
2. install in Windows synergy from (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

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"


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 :

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
  spool off

Thursday, November 10, 2011

Java References: Soft, Phantom, Weak

Practice example:

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


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


SKIN for Audacious/XMMS

SKIN for Audacious/XMMS
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 ....

CentOS php ftp installation

yum install nano
yum install php

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

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

put in borowser

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



# (default follows)

ftpd_banner=Welcome to Maritime FTP service.

Create Document Templates for Nautilus/Thunar

Create Document Templates for Nautilus/Thunar

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

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

$ 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"/>
<toolitem name="Home" action="Home"/>
<toolitem name="Computer" action="Go to Computer"/>
<toolitem name="Cut" action="Cut"/>
<toolitem name="Copy" action="Copy"/>
<toolitem name="Paste" action="Paste"/>

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

Meld + Nautilus

Meld + Nautilus:

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

tune2fs -l /dev/sda1
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(""); /* 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">
  <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>

REBOOT: sudo init 6

Punto Switcher for Linux

Open Office installation and turning


Numbers for Pages - Writer - (from
It is necessary to restar OS to make it work. More info on

Russian lang packs:
sudo apt-get install

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 -> 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 -> 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

HiDE Printers in Win network


sudo gedit /etc/samba/smb.conf

wins support = no
   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
   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:
blacklist pcspkr

Restore grub after windows instillation with existing ubuntu

============== Resotre Grub loader:
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

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:
gnome do
goldendict and mplayer
pidgin plugin pack
Abobe flash plugin

Launch  System->Administration->"Synaptic package manager" (SPM)
Press "Reload" in SPM
search mark for installation  by right click and apply/install:

Remove OOO or install Libreoffice and adjust it.

Install DockbarX for vertical panel and adjust it.

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")

and Thunderbird and adjust them

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:



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:

select 'Drop table MY_SCHEMA.' ||  TABLE_NAME || ';'


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: due to hardware problem, the same problem on Windows.
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

Good link for set-up and adjustments:

Additional packages:
synaptic (I need it because 'ubuntu software center' badly search for packages)
mplayer (required for goldendict sound pronunciation)

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" -
"system tray please provide "Activate" in menu" -

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
( )

gnote (put in "Startup Applications" as command "gnote --systray" to not show main menu on launch

Download Russian/English Vocabulary


upzip it to /home/<USERNAME>/.goldendict/dic
download morphology from the same site (, 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:
or 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:

How to remove user indicator in top 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"

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:

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:


Java - OpenJDK:

Still Problems:

Why Software Center can not open/launch application just 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

sudo yum install lzma

Sunday, October 30, 2011

Jabber for mobile phone

There is good project for jabber client for ordinary phones(non smartphones, androids) works fine on nokia 6500s.

this project is fork for

Thursday, October 20, 2011

Setup maven from scratch on Ubuntu

sudo apt-get install maven2
copy settungs.xml to ~/.m2

Edit .bashrc, add few lines:
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-
export PATH=$JAVA_HOME/bin:$PATH
export M2_HOME=/usr/share/maven2
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

Setup sqlplus for Oracle XE


Edit your .bashrc file to include the lines:
export PATH

To apply changes:
. ~/.bashrc

Wednesday, October 19, 2011

Svn merge latest changes from trunk to branch

Command is simple, just log it for further reference:
svn log | more

List of latest merged versions could be printed by:
svn propget svn:mergeinfo .

from output you need to get latest revision of you previous merge from trunk or initial coping to branch. For example: 1001.

svn merge -r 1001:HEAD .

Tuesday, October 18, 2011

Source for future checkstyle checks

After discussion on Habr, about our new release of checkstyle good link was found - list of all inspections in Intellij Idea -
This will be good source of tasks for students for their practice.

Or may be it reasonable to direct them to update PMD/Findbug if necessary?

Saturday, October 15, 2011

Blog of the friend

Ruslan Diachenko introduced his tech blog -

SevNTU Checkstyle new release 1.0.4

New checks in release 1.0.4:
Update site for Eclipse (EclipseCS plugin is required):

ForbidAnnotationCheck - Forbid specific annotation for field/method, e.g. forbid @Autowired annotation for private field. Done by Victor Hidoyatov. (issue).

AvoidConstantsInInterfacesCheck - avoid declaration of constants in interfaces. Done by Vladimir Svikhunov. (Issue) .

AvoidHidingCauseExceptionCheck - hiding Cause exception in throwing new exception. Done by Daniil Yaroslavtsev. (issue).

AvoidNotShortCircuitOperatorsForBooleanCheck - Forbid to use "|", "|=", "&" for boolean/Boolean variables, and force to use "||", .... , explanation link. Example: "boolean b |= returnBoolean()". Done by Daniil Yaroslavtsev.  (issue) .

IllegalCatchCheck - Options to ignore 1) exact re-throw after logging 2) creation and throw of other Exception base on current exception. Done by Daniil Yroslavtsev. (issue).

OverridableMethodInConstructorCheck - Do not use protected/public method in C-tor. Use only private and final. Check all call hierarchy from c-tor to avoid: c-tor -> private -> public/protected. Done by Daniil Yaroslavtsev. (issue).

ReturnBooleanFromTernary - It is a bad practice to return boolean values from ternary operations. Just use the value inside branch instead. Done by Ivan Sopov.

ReturnNullInsteadOfBoolean - Arguably it is the matter of style to use Boolean for ternary logic or enum. And since all the information is in the single file and even in the single method, I think that checkstyle is capable of doing this. Done by Ivan Sopov. (issue)

VariableDeclarationUsageDistanceCheck - check distance between declaration of variable and its first usage of it. Options: Allowed distance (in rows); Ignore variable names (regexp). Done by Ruslan Diachenko. (issue).

AbbreviationAsWordInNameCheck - XMLReader should be names like XmlReader. Checks names for fields, methods , ....... . Few ignore options. Done by Roman Ivanov. (issue).

Monday, October 10, 2011

Meetups at SF

The Silicon Valley Spring User Group -
Eclipse user group -
Jenkins -

Nano editor cheat sheet

Select: ALT + M + A
Copy: ALT + 6
Paste: CTRL + U

Saturday, October 8, 2011

I joined San Francisco Java User Group on Meetup

I joined The San Francisco Java User Group on Meetup. You should too!

Friday, October 7, 2011

Make an branch for code that was already changed in svn

SVN. You have changed code and need to make a quick backup of it to branch

1. create destination folder on svn
2. in source_folder "svn add [files that are new for svn]"
3. svn copy source_folder

All changes will be copied and committed to branch, trunk will not be changed,
just do on source_folder "svn revert -R ."

Monday, October 3, 2011

Vi and jump to certain line number

Problem message from ssh:

Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:41
RSA host key for has changed and you have requested strict checking.
Host key verification failed.
We need to quickly remove 41 line.

Example to jump for certain line (41th):
 vi +41 /home/rivanov/.ssh/known_hosts
Press key d twice to remove current line.

Just for further information:
Vim keys -

Saturday, October 1, 2011

Ubuntu, Thunderbird 3.1.15, Lightning, Google calendar

After update on my Ubuntu 10.04, Thunderbird version was updated and Lightning extension become incompatible. Official extension site provide Lightning for Thunderbird 7 only. No link to "Older version" :).

I used this builds for Lighting and Google calendar provider:
you can investigate for more stable versions.

just for logs, here instructions how to setup lightning and google calendar:

Install Lightning addon first from Tool>Addons menu item. For 64 bit use this link.

Please switch off Autoupdate for Plugins: Edit -Preferences-Advanced-"Automatically check for updates", update will brake the compatibility.

Thursday, September 29, 2011

Hello to all of you

this blog will be completely in English, because I create it only for Computer related issues, for my personal live tracking please find me at