Archive for the ‘Linux’ Category

OpenPGP key generation for GnuTLS

  • Create key pair. Write down the key number.
gpg --gen-key
  • Edit the key with the command below.
gpg --edit-key 1F8D4A4C
  • In gpg prompt enter passwd and specify empty password, type quit.
gpg --armor --export 1F8D4A4C> public.key
gpg --armor --export-secret-keys 1F8D4A4C> secret.key
  • Delete keys from keyrings if required.
gpg --delete-secret-keys 1F8D4A4C
gpg --delete-keys 1F8D4A4C

Subversion repository part migration

svnadmin dump /srv/svn/old-repo | svndumpfilter include --drop-empty-revs --renumber-revs /directory-name > directory.svndump
svnadmin load /srv/svn/new-repo < directory.svndump

Please note, that if directory structure needs to be changed (for example, from /old-repo/projects/dir to /new-repo/dir) manual edit of dump file will not help. Instead, sed must be combined with svndumpfilter. Additional info regarding this topic can be found here.

Virtualbox 3.1.x Linux guest dead keyboard fix

After new release of Virtualbox was installed and my virtual machine with OpenSUSE on-board had started, I’ve ended up with a dead keyboard. It worked fine on host Windows XP, but OpenSUSE VM was acting like there is no keyboard at all. Couple of minutes of brain activity and finger work I’ve found that /etc/X11/xorg.conf was replaced during Virtualbox Guest Additions update. Comparing xorg.conf between two latest VB releases, I was able to get the keyboard working. Here is a fix:

  1. Restore old xorg.conf : cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf
  2. Add Option "CoreKeyboard" to InputDevice section of Keyboard[0]
  3. Add Option "CorePointer" to InputDevice section of Mouse[1]
  4. Add Option "SendCoreEvents" to InputDevice section of Mouse[2]
  5. Rename Device option from InputDevice section of Mouse[2] from /dev/vboxadd to /dev/vboxguest






A screenshot for your pleasure!

How to set up library paths for configure

env CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" ./configure

How to remove absolute path in svn+ssh

As you may or may not know there is a path difference between svn and svn+ssh links in case if subversion server is configured with default root directory:

/etc/sysconfig/svnserve:

SVNSERVE_OPTIONS="-d -R -r /path-to-repos"

This way repository can be checked out using following commands (consider ssh is set up and working):

svn co svn://server.com/repository directory

or

svn co svn+ssh://server.com/path-to-repos/repository directory

Read the rest of this entry »

How to ARM Linux

During last few years I’ve never found a good excessive topic covering most of the areas to get Linux runnnig from scratch. I remember myself doing a lot of investigation about correct building of a [crosscompiler][crosscompiler], studying [bootloader][bootloader] internals, and so on… I’m definitely sure – if I had a person that could point me in right direction, then all the development should finish much earlier.

Consider this article as my personal note and feel free using it your own way.

Read the rest of this entry »

AntiSPAM postfix setup

Recently I’ve had discussion with one of my colleagues about postfix/sendmail comparison and it’s antispam mechanisms. I will not tell much about sendmail as I’m not so competent in it, few years ago all my servers migrated to postfix, after my ex-coworker have send me his postfix setup claiming it’s real-spam-proof.
Postfix configuration is more understandable (well, for me at least), and I can fine-tune it better than sendmail. In result, my colleague was really surprised when I had show him my postfix logs with 100% spam filtration (for at least last 2 weeks there was no single spam mail that where able to breach through) and asked me to mail him my setup or post the configuration somewhere.

Read the rest of this entry »

Mingw on Linux

I’m using mingw for years, but never tried to use it on linux machine as crosscompiler. Today I’ve had first experience. First thing I’ve noticed is how actually easy to install such environment – there is fully automated build script, available from mingw site. Pros: – Speed. Native environment vs MSys is much faster. Cons: – Building Windows things from Linux means to transfer them from one machine to another.

Fixing OpenSUSE Home/End keys

Comment lines 135-136 in /etc/inputrc :

#"e[1~":       history-search-backward
#"e[4~":       set-mark