Monday, February 14, 2011

Question #1882 : Questions : “” package : Ubuntu

To use Arial font in OpenOffice You need to enable the 'multiverse' repository in Synaptic and then install the msttcorefonts package. That has all the Arial (and variants) and Times New Roman fonts."

Thursday, February 3, 2011

Remove ^M

Sometimes window's guru edited oracle tnsnames.ora file and left there some brilliant artefacts:

      (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))^M

Remove ^M:

to remove ^M, give the command :
sed -e 's/^M//g' file
first press control-V then control-M

or the same in vi: :%s/control-Vcontrol-M//

this will show correct control-M in sed's command line.

Have a nice day Unix user:)

Thursday, January 6, 2011

Simple request to check web server response.

Sometimes I need to get response not only from web client. For example, now I am in Australia and I suppose that blocked all networks outside of Russia to avoid indexing by servers abroad. So I need to get return code. The best way, as  I think, is to call telnet:

Here is a simple bash script( 

echo 'GET / HTTP/1.1';echo 'Host: '$1;echo;echo; sleep 2 ) | telnet $1 $2

How to call it:
#./ 80

Connected to
Escape character is '^]'.
HTTP/1.1 403 Forbidden
Server: nginx
Date: Thu, 06 Jan 2011 12:15:03 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive

<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
Connection closed by foreign host.

Friday, December 31, 2010

% in crontab

if you would like to use construction like this `date '+%a'` in crontab, you need to backslash the % sign.

1 1 * * * touch /tmp/`date '+\%a'`.touch

It works in Linux but in Solaris does not. It creates file names where is a slash before a week name.

In Solaris the ' sign should not be used.

1 1 * * * touch /tmp/`date +\%a`.touch

W: GPG error: maverick Release: The following signatures couldn't be verified because the public key is not available:

After some paranoiac permission setting in my home folder I wanted to update repository and received error:
root@zzz:~# aptitude update

Hit maverick-updates/multiverse amd64 Packages
Fetched 2,952B in 17s (167B/s)
W: GPG error: maverick Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0EE1BF5F3C8E2A7F

Monday, December 27, 2010

kvm, failed to start network default in virsh

xxx@yyy:~$ virsh net-start default
error: Failed to start network default
error: internal error '/sbin/iptables --table filter --delete INPUT --in-interface virbr0 --protocol udp --destination-port 69 --jump ACCEPT' exited with non-zero status 1 and signal 0: iptables: Bad rule (does a matching rule exist in that chain?).

in messages:
Dec 27 23:15:39 yyy libvirtd: 23:15:39.512: warning : networkAddIptablesRules:850 : Could not add rule to fixup DHCP response checksums on network 'default'.
Dec 27 23:15:39 yyy libvirtd: 23:15:39.512: warning : networkAddIptablesRules:851 : May need to update iptables package & kernel to support CHECKSUM rule.

and there is no virbr0 interface.

Tuesday, December 21, 2010

Virtualization, KVM hypervisor

I started to explore KVM as full virtualization solution for Linux. The mail idea to sturdy different Oracle option on different platforms and emulate failure events to work out backup and recovery. Configuration and tuning is important part as well. So, I chosed KVM under KUbuntu 10.10. and started different installations. As I expected later there is a problem to communicate two virtual machines to each other. I asked google but didn't get definite answer. Accidentally I've found a solution lies in the plane of IP filters.