Archive for the ‘linux’ Category

Creating a bootable live USB Drive in Linux

Sunday, August 12th, 2012

First, you need to download the LiveCD iso image of your choice. After inserting your USB stick, you can find out what device it is

~> su
# grep -Ff <(hwinfo --disk --short) <(hwinfo --usb --short)

Finally, once you’ve found your block device, write the image to it. Point ‘dd’ to the full path such as ‘/home/user/Downloads/openSUSE-12.1-KDE-LiveCD-x86_64.iso’ or change directory (example: cd ./Downloads) to where the image is contained.

# umount /dev/sdX
# dd if=/path/to/downloaded.iso of=/dev/sdX

 

Installing FreeNX on openSuSE 11.1 servers

Saturday, April 28th, 2012

You need to add below repository to your system and install using zypper as following, as root :

zypper ar http://download.opensuse.org/repositories/home:/frispete:/RemoteDesktop/openSUSE_11.1/home:frispete:RemoteDesktop.repo

zypper in NX

zypper in FreeNX

Also find this quick user guide in pdf format : FreeNX Quick User Guide

PS. The user guide was obtained from http://mail.kde.org/pipermail/freenx-knx/2008-May/007059.html

Error Exporting from OpenERP GTK Client 5.0.16

Friday, April 6th, 2012

Recently, I have been unable to export Customer Invoices list from the GTK client 5.0.16. But I could export supplier invoices and all other forms just as easy. I can also export customer invoices using the web interface and using NanTic Koo KDE client.

I usually get this error while trying to export customer invoices list :

Traceback (most recent call last):
File “/home/user/openERP/openerp-client-5.0.16/bin/modules/gui/main.py”, line 1334, in _sig_child_call
res = wid.handlers[button_name]()
File “/home/user/openERP/openerp-client-5.0.16/bin/modules/gui/window/form.py”, line 281, in sig_save_as
win = win_export.win_export(self.model, self.screen.ids_get(), self.screen.fields, fields, parent=self.window, context=self.context)
File “/home/user/openERP/openerp-client-5.0.16/bin/modules/gui/window/win_export.py”, line 174, in __init__
self.fill_predefwin()
File “/home/user/openERP/openerp-client-5.0.16/bin/modules/gui/window/win_export.py”, line 241, in fill_predefwin
self.predef_model.append(([f[‘name’] for f in fields], export[‘name’], ‘, ‘.join([self.fields_data[f[‘name’]][‘string’] for f in fields])))
KeyError: u’reference’

I found out comparing old and new backups of my database, that there’s a line in ir.exports table that’s not showing in the predefined export fields. Deleting all rows in this table made the client functioning as it used to.

List of essential 100 open source applications for Linux and Windows

Sunday, April 1st, 2012

A list of top 100 open source applications for use with Linux and MS Windows :

http://www.ubuntulinuxhelp.com/top-100-of-the-best-useful-opensource-applications/

Suse 11.1 bash script to convert files mp4 to mp3

Monday, January 3rd, 2011

Find below script that converts MP4 files into MP3 :

Using mplayer and lameĀ :


#! /bin/bash
#
# Converts all MP4 files in the current directory to MP3s.
#
for f in *.mp4; do
newname=`echo $f | tr ' ' '_' `
mv "$f" $newname
f=$newname
mplayer $f -ao pcm:file=tmp.wav
lame -b 128 -q 2 tmp.wav ${f/.mp4/.mp3}
rm -f tmp.wav
done

Source page is here.

Batch converting audio files :

Sunday, May 16th, 2010

This script may be of interest and value :

File: convertomp3
#!/bin/bash
#
# Usage: convertomp3 fileextention
#
if [ $1 = "" ];then
  echo 'Please give a audio file extention as argument.'
  exit 1
fi

for i in *.$1
do
  if [ -f "$i" ]; then
  rm -f "$i.wav"
  mkfifo "$i.wav"
  mplayer \
   -quiet \
   -vo null \
   -vc dummy \
   -af volume=0,resample=44100:0:1 \
   -ao pcm:waveheader:file="$i.wav" "$i" &
  dest=`echo "$i"|sed -e "s/$1$/mp3/"`
  lame -V0 -h -b 160 --vbr-new "$i.wav" "$dest"
  rm -f "$i.wav"
fi
done

Running convertomp3 wma will covert every .wma file in the current folder to .mp3.

iFolder 3.8 is out.

Monday, December 7th, 2009

iFolder 3.8 is out. Download it from here http://sourceforge.net/projects/ifolder/files/.

Using Clam AntiVirus to provide real-time protection for your iFolder 3 Server

Sunday, September 13th, 2009

“Because iFolder is a cross-platform distributed solution, there is a possibility of a virus infection on a platform migrating across the iFolder server to other platforms, and vice versa. You should enforce server-based virus scanning to prevent viruses from entering the corporate network.”

This solution applies for openSuSE 11.1 :

The following packages need to be installed :

clamav
dazuko
postfix

Execute modprobe dazuko (as root)

Run lsmod and check that dazuko is loaded:

Edit /etc/init.d/boot.local

  • Add:
    modprobe dazuko

Edit /etc/clamd.conf

Enable logging by activating :
LogFile /var/log/clamd

* Activate:
# Path to a local socket file the daemon will listen on.
LocalSocket /var/lib/clamav/clamd-socket

* Deactivate:
# TCP port address.
#TCPSocket 3310

* Deactivate:
# TCP address.
#TCPAddr 127.0.0.1

* Activate and edit:
# Execute a command when virus is found.
VirusEvent /bin/echo “iFolder VIRUS ALERT: %v” | /bin/mail -s “ClamAV – iFolder” -r ClamAV@server.domain ToUser@domain

* Deactivate:
# Run as a selected user (clamd must be started by root).
#User vscan

Note:
If not deaktivating “User vscan” you receive the error: “clamuko cannot connect to dazuko” in /var/log/clamd

* Clamuko settings, Activate the following :

ClamukoScanOnAccess yes
ClamukoScanOnOpen yes
ClamukoScanOnClose yes
ClamukoScanOnExec yes
ClamukoIncludePath /YOUR_PATH_TO_IFOLDER/ifolder/simias/SimiasFiles

Change any other settings in the file to reflect your needs (see ClamAV documentation).

Start clamd:
/etc/init.d/clamd start

Check that clamd was started without any errors:
tail -f /var/log/clamd

Download the EICAR test signature from:
http://www.f-secure.com/virus-info/eicar_test_file.shtml

Note!
This is not a real virus.

Run: tail -f /var/log/clamd

Save the test file (eicar.zip and/or eicar.com) in your iFolder and wait for sync.

When the virus pattern is detected you should see this (see below) in the log file
/var/log/clamd.

Check that a mail has been sent: tail /var/log/mail

Update ClamAV:
You can update ClamAV using the command: freshclam

A better way is to use the freshclam daemon for automatic updates.

Settings for freshclam: /etc/freshclam.conf

Edit /etc/freshclam.conf

  • Activate:
    # Path to the log file (make sure it has proper permissions)
    UpdateLogFile /var/log/freshclam.log
  • Activate and provide your country code:
    # Uncomment the following line and replace XY with your country code.
    DatabaseMirror db.se.clamav.net
  • Activate and provide update interval (e.g 24 for every hour):
    # Number of database checks per day.
    Checks 24

Create a log file for freshclam:
touch /var/log/freshclam.log

Set file rights:
chown vscan:vscan /var/log/freshclam.log

Start freshclam:
/etc/init.d/freshclam start

Check the log file:
tail /var/log/freshclam.log

Activate automatic start for clamd, freshclam and postfix from Yast –> System –> System Services (Run Level).

Now you have a real-time anti-virus scanning for your iFolder3 server.

Installing iFolder server on openSuSE 11.1

Monday, August 24th, 2009

iFolder is a simple and secure storage solution that can increase your productivity by enabling you to back up, access and manage your personal files-from anywhere, at any time. Once you have installed iFolder, you simply save your files locally-as you have always done-and iFolder automatically updates the files on a network server and delivers them to the other machines you use.

Using iFolder, you can designate any network server as an iFolder server and publish information to a personal iFolder created on that server. Once your folder is established, you can install iFolder on the computers you regularly use and download information from your personal iFolder to any of those computers. Not only that, but using iFolder, you can also invite other iFolder users to share your files in the same safe and secure way so that your teams always have the most relevant copy of a document.

You can download iFolder server for openSuSE 10.3 from this URL : http://www.ifolder.com/download/

But installing iFolder server on openSuSE 11.1 is a bit tedious as mono packages packed with version 11.1 are a bit advanced for iFolder. Find below instructions to help you out :

– Install iFolder server and plugins from this repo.

– Configure apache2 with SSL support.

– Setup by typing as root :

simias-server-setup

ifolder-admin-setup

ifolder-web-setup

in console and follow question given by each command.

Change folder directory to /etc/apache2/conf.d by cd command and copy all .conf file to /etc/apache2 with cp command on console.

– Start apache service by typing service rcapache2 start in console.

– Allow services http and https in Firewall.

And you’re done.

IMPORTANT :

If you experience the following error code while the client is trying to connect to the server : Authentication Status Code: Unknown. The problem can be solved by NOT choosing the default server data location while running simias-server-setup. I have chosen /home/iFolder instead and that solved my problems. The server will create the folder for you with correct setup and permissions.

I would like to thank http://www.decriptor.com/2009/05/22/ifolder-on-opensuse-11-1/ for helping in creating the repository and making the above information available.


Installing ifolder3 server on openSuSE 10.3

Friday, July 10th, 2009

iFolder is a simple and secure storage solution that can increase your productivity by enabling you to back up, access and manage your personal files-from anywhere, at any time. Once you have installed iFolder, you simply save your files locally-as you have always done-and iFolder automatically updates the files on a network server and delivers them to the other machines you use.

Using iFolder, you can designate any network server as an iFolder server and publish information to a personal iFolder created on that server. Once your folder is established, you can install iFolder on the computers you regularly use and download information from your personal iFolder to any of those computers. Not only that, but using iFolder, you can also invite other iFolder users to share your files in the same safe and secure way so that your teams always have the most relevant copy of a document.

Below are installation instructions for openSuSE 10.3 server :

Download the following packages :

ifolder3 from http://www.kablink.org/index.php

http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-core-1.2.6-4.novell.i586.rpm
http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-data-1.2.6-4.novell.i586.rpm
http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-data-sqlite-1.2.6-4.novell.i586.rpm
http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-web-1.2.6-4.novell.i586.rpm
http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-nunit-1.2.6-4.novell.i586.rpm
http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-winforms-1.2.6-4.novell.i586.rpm
http://ftp.novell.com/pub/mono/download/noarch/xsp/1.2.6-2/xsp-1.2.6-2.novell.noarch.rpm
http://ftp.novell.com/pub/mono/download/suse-103-i586/mod_mono/1.2.6-1/apache2-mod_mono-1.2.6-1.suse103.novell.i586.rpm

Install as following :

rpm -i mono-core-1.2.6-4.novell.i586.rpm
rpm -i mono-data-1.2.6-4.novell.i586.rpm
rpm -i mono-data-sqlite-1.2.6-4.novell.i586.rpm
rpm -i mono-nunit-1.2.6-4.novell.i586.rpm
rpm -i mono-web-1.2.6-4.novell.i586.rpm –nodeps
rpm -i mono-winforms-1.2.6-4.novell.i586.rpm
rpm -i xsp-1.2.6-2.novell.noarch.rpm
rpm -i apache2-mod_mono-1.2.6-1.suse103.novell.i586.rpm

Then install iFolder server.