Sunday, March 31, 2013

Kill process in Linux or terminate a process in UNIX or Linux systems

Q. How do I kill process in Linux?
ALinux and all other UNIX like oses comes with kill command. The command kill sends the specified signal (such as kill process) to the specified process or process group. If no signal is specified, the TERM signal is sent.

Kill process using kill command under Linux/UNIX

kill command works under both Linux and UNIX/BSD like operating systems.

Step #1: First, you need to find out process PID (process id)

Use ps command or pidof command to find out process ID (PID). Syntax:
ps aux | grep processname
pidof processname
For example if process name is lighttpd, you can use any one of the following command to obtain process ID:
# ps aux | grep lighttpdOutput:
lighttpd  3486  0.0  0.1   4248  1432 ?        S    Jul31   0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
lighttpd  3492  0.0  0.5  13752  3936 ?        Ss   Jul31   0:00 /usr/bin/php5-cg
OR use pidof command which is use to find the process ID of a running program:
# pidof lighttpdOutput:

Step #2: kill process using PID (process id)

Above command tell you PID (3486) of lighttpd process. Now kill process using this PID:
# kill 3486
# kill -9 3486
  • -9 is special Kill signal, which will kill the process.

killall command examples

DO NOT USE killall command on UNIX system (Linux only command). You can also use killall command. The killall command kill processes by name (no need to find PID):
# killall -9 lighttpd
Kill Firefox process:
# killall -9 firefox-bin
As I said earlier killall on UNIX system does something else. It kills all process and not just specific process. Do not use killall on UNIX system (use kill -9).

by  on AUGUST 1, 2006 · 84 COMMENTS· last updated at AUGUST 22, 2007


Install Samba on Ubuntu 12.04/11.10/11.04/10.10/10.04/Linux Mint/other Distro's and share files with samba from Ubuntu to Windows and Windows to Ubuntu

I wrote tutorials on samba sometime ago but some peoples found that is not useful for them or the method couldn't work properly for them, I also made video on samba sharing.

Now I made complete tutorial on samba configuration to share you data from Ubuntu to Windows and also Windows to Ubuntu, Its mean you can access your Ubuntu shared data from Windows and Windows Shared data from Linux Ubuntu with/without permissions. Permission is up to you, if you want to set permission or not.

Install Samba on Ubuntu/Linux Mint open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:
  • sudo apt-get install samba samba-common
  • sudo apt-get install python-glade2
  • sudo apt-get install system-config-samba

I made this tutorial on Ubuntu 10.04 LTS and Windows 7, It is working on all Ubuntu versions and all Windows Versions.

Method 1: How to access Ubuntu/Linux shared data from Windows
Method 2: How to access Windows shared data from Ubuntu/Linux

>> First of all How to access Ubuntu Shared Data from Windows.

Now go to Dash and search for 'Samba' then open it. As shown in picture.


When Samba Server Configuration open, Click on 'Add +' button then click on browse >home >select user.

Ubuntu samba

Now go to 'Access' tab and select username from which you want to access sharing.

linux samba

Now set password on your selected username for samba sharing. Enter following command to set password (change noobslab with your selected username).
  • sudo smbpasswd -a noobslab
mint samba

Now right click on Folder which you want to share on network, then select 'Sharing Options'

Windows samba

Here is Folder Sharing options, You can choose and write whatever you want to do. Then click on 'Create Share'

install samba

Now open Terminal and enter following command to know your local network ip. (See the picture below and see red marks)
  • ifconfig
Note your Ubuntu/Linux Machine IP Address


It's time to access your sharing on Windows, Now go to start and open 'Run' then enter ip with double backslash. Like this (\\

samba sharing

Now sharing will open, Now click on shared folders then windows will ask for samba username and password. You can share without username and password it's up to you.


When you enter the username and password your shared folder will open. You can write/delete/modify whatever you want to do (It's up to your permission implementations).

That's it.

>> Second How to access Windows Shared Data in Ubuntu

In Windows right click on folder which you want to share on network, Then click on 'Advanced Sharing' or 'Sharing'.

share samba

Select your Username or Everyone, I chose my username cause I want sharing restrictions.

ubuntu samba

Now click on 'Permissions' button and select options as you want.


Now it's time to check your network ip, open Command prompt or go to 'Run' type 'cmd'.
In Windows Command Prompt write following command to know your local network ip.(See Picture Below)
  • ipconfig
Note your IP Address.

linux samba

Now go to Ubuntu, Open File Browser>File Menu > 'Connect to Server'

install samba

Select 'Windows Share' in Service type and Enter Windows IP Address in 'Server' then click on 'Connect'


Enter your Windows Selected Username and Password, then click on 'Connect'. (Not Samba username Password)


After connect you'll see folders, open your shared drive/folder and enter Windows username and password again. (Not Samba username and password)


Here sharing is accessed, You can write/delete/modify whatever you want to do (It's up to your permission implementations).

samba share
That's it. Enjoy 

LFTP - Multi-Segmented Linux FTP

Disclaimer: The process in this article may seem complicated and slow, but it is designed for you to learn the basics first. The final section of the article is dedicated to making things easier and faster for everyday use. So, please don't give up early.



Install lftp, OpenSSH, and OpenSSL from the Net category in Cygwin


Install lftp with your package manager, something like: sudo apt-get install lftp
Note: lftp is installed on your Whatbox slot by default. You can use it to transfer between your slot and other ftp servers (e.g. another seedbox). Just connect to your slot using SSH and use it as normal.

Connecting to Whatbox

  1. Open your terminal (Cygwin Terminal for Windows users). You will see a window that looks similar to below.
  2. Start lftp and connect to Whatbox. Type lftp s Enter your password at the prompt. lftp keeps your password hidden, so it's easiest to paste with the right-click menu.
  3. Now type ls in the terminal to show a listing of your home directory. Since most users will want to start in their files directory, type cd files to navigate there for the next step.
  4. (optional) If you want your password to be saved when you create a bookmark, use the command set bmk:save-passwords true now.
    bookmark add Whatbox will save a bookmark to your slot named Whatbox. You can use bookmark list to make sure it saved properly. This allows you to use lftp Whatbox to open a connection to your slot instead of having to type out the address.

Local and Remote Navigation

Note: I have set up directories and files for demonstration. You can set things up like I have for practice, if you like, or replace them in the commands with your own.
  1. You've used cd to go down one level into a directory. You can use cd .. to go up one level. Typels to see that you're back in your home directory.
  2. Next, you'll use cd to navigate directly to a directory more than one level away. cd ~/files/Video brings me into the directory I set up.
  3. Now to navigate to directories on your computer with the lcd(read: local cd) command. The directory structure will be different on Linux than with Cygwin. On Linux, simply type lcd /path/to/directory. With Cygwin, if you want C:\Download you would type lcd /cygdrive/c/Download. To list what's in the current local directory, add an exclamation point to the ls command like !ls.


  1. There are two main commands used for downloading: pget for files and mirror for directories.
  2. There are two main commands used for uploading: put for files and mirror -R for directories.
  3. To cancel a transfer, use Ctrl+c
  4. To resume partially downloaded files/directories, you will use the -c switch: mirror -c Directory pget -c Video1.mp4 put -c Video1.mp4

Segmented Downloading

Note: This guide uses 5 segments as an example. You may use as many as needed or desired.
  1. pget command using segmentation is pget -n 5 Video2.mp4, where 5 is the number of segments.
  2. mirror command using segmentation is mirror --use-pget-n=5 Directory, where 5 is the number of segments.
  3. You can use jobs -v to see the speeds of the individual segments as well as the total speed.

Queues and Jobs

  1. The queue command will allow you to transfer files/directories while still being able to browse. The basic command to queue a file transfer will look like queue pget Video1.mp4. To transfer entire directories, queue mirror Directory. This adds them to your transfer queue and automatically starts the transfer if ready.
  2. Use queue alone to display your transfer queue. The jobs command displays your current transfers and transfer queue with more detail.
  3. You can stop your queue from automatically transferring by using queue stop. This can be used before adding anything to your queue to prevent immediate transfer. queue start will start your queued transfers. To delete a transfer from your queue, add the -d switch like queue -d #, where # is the queue number listed by jobs or queue
  4. To stop and delete a running transfer, use the kill command. If you set lftp to allow multiple transfers simultaneously, kill #, where # is the number listed by jobs, will stop and delete the specified transfer. kill all will stop and delete all transfers.

Configuration and Aliases

Now to make it quick and easy, we'll set up some aliases. Aliases allow you to make shortcuts to commands.
  • In Linux, find your lftp.conf file. It should be in /etc.
  • In Windows, open the etc directory where you installed Cygwin (C:\Cygwin by default) and open lftp.conf.
  • Go to the end of the file and add some or all of these example aliases. Modify them to fit your needs.
Some examples from this guide with those aliases applied:
lcd /cygdrive/c/Download becomes down
queue pget -cn 5 Video1.mp4 becomes q p Video1.mp4
queue mirror -c --use-pget-n=5 Directory becomes q m Directory
For full command help and settings, see the lftp man page.

Tips and Tricks

  • The Tab key autocompletes file and directory names. It also autocompletes commands.
  • Files and directories with spaces or special characters need special handling. The easiest method is to put quotes around the file/directory names.
  • You can cycle through peviously used commands with the Up and Down arrow keys.
  • To quit lftp, type exit. Then type exit again to close the terminal.

How to install Linux / UNIX *.tar.gz tarball files

Q. I’m new to Linux. Over few days I found lots software distributed as .tar.gz file. How do I install tar.gz files under Linux?
A. tar.gz also known as tarball, an archive format for electronic data and software. Most Linux tarball contains a source code for software. If you are new to Linux I recommend using apt-get, rpm and yum command to install all binary packages.
Tarballs are a group of files in one file. Tarball files have the extension .tar.gz, .tgz or .tar.bz2. Most open source software use tarballs to distribute programs/source codes.

# 1: Uncompress tarball

To uncompress them, execute the following command(s) depending on the extension:
$ tar zxf file.tar.gz
$ tar zxf file.tgz
$ tar jxf file.tar.bz2
$ tar jxf file.tbz2

Now change directory
$ ls
$ cd path-to-software/

# 2: Build and install software

Generally you need to type 3 commands as follows for building and compiling software:
# ./configure
# make
# make install
  • ./configure will configure the software to ensure your system has the necessary functionality and libraries to successfully compile the package
  • make will compile all the source files into executable binaries.
  • Finally, make install will install the binaries and any supporting files into the appropriate locations.

# 3: Read INSTALL / README file

Each tarball comes with installation and build instructions. Open INSTALL or README file for more information:
by  on JUNE 18, 2007 · 203 COMMENTS· last updated at JUNE 18, 2007

Setup OpenSSH Server on Ubuntu Linux

Setting up an SSH server on Ubuntu is about as simple as it gets. The server of choice is OpenSSH.

Run this command from a terminal window:
sudo apt-get install ssh
To test that it’s working, you can try to ssh into your own machine:
> ssh localhost
The authenticity of host ‘localhost (’ can’t be established.
RSA key fingerprint is 98:8a:b8:b2:9e:8a:84:e0:d4:08:27:fb:74:f0:de:d4.
Are you sure you want to continue connecting (yes/no)?
Looks like it’s working! Naturally our ssh client doesn’t have the key for the server, since we just installed it. You can type yes to continue or just hit Ctrl-C to stop.

Tuesday, March 26, 2013

Getting rid of the Unity Bar and Using Gnome with Ubuntu 12.10

If you're using Ubuntu 12.10 with Unity or some other desktop environment and want to switch to a complete GNOME 3 desktop experience without installing Ubuntu GNOME Remix 12.10, you can do this by simply installing a few packages.

Using the instructions below, you won't just install GNOME Shell, but also the default settings and applications that come with Ubuntu GNOME Remix. There are also some optional steps to install the GNOME 3 applications which are missing from Ubuntu GNOME Remix.

1. Install the Ubuntu GNOME packages

You can simply install the "gnome-shell" package if GNOME Shell is all you want, but if you want the whole GNOME 3 desktop which includes the default applications as well as the default settings, use the command below:
sudo apt-get install ubuntu-gnome-desktop ubuntu-gnome-default-settings
When prompted, select GDM as the default display manager.

If you already had GDM installed and the package manager didn't prompt you to choose between LightDM and GDM or you've selected LightDM by mistake, you can run the following command:
sudo dpkg-reconfigure gdm
And select GDM instead of LightDM (more about changing the display manager, here). You can use LightDM with GNOME Shell, but you won't get the complete GNOME 3 experience - for instance, GNOME Shell won't use the new GNOME 3.6 lock screen.

It is also a good idea to remove the "ubuntu-settings" package:
sudo apt-get remove ubuntu-settings

Note that removing this package, the "ubuntu-desktop" package will be removed as well. This is just a meta package and your system shouldn't be affected by it.

The "ubuntu-settings" package is used to set various Ubuntu defaults, like the window button order, which Rhythmbox plugins are enabled by default and so on.


2. Install missing GNOME 3 packages

Even though they are part of the default GNOME 3 application stack, GNOME Documents and Boxes are not installed by default with the ubuntu-gnome-desktop package. Install them using the following command:
sudo apt-get install gnome-documents gnome-boxes
Note: Boxes is only available on 64bit due to a bug!

3. Upgrade GNOME Control Center, Nautilus, Totem and other GNOME 3 packages to version 3.6.x

Some packages in the Ubuntu 12.10 repositories aren't updated to the latest 3.6.x version. So, like we wrote a while back, you can use the GNOME3 PPA to upgrade these applications.

Add the PPA using the following command:
sudo add-apt-repository ppa:gnome3-team/gnome3

Then, launch Software Updater from Dash / menu and use it to upgrade your packages.

The packages that will be upgraded once you add the PPA are: GNOME Control Center 3.6.3, Aisleriot 3.6.0, Brasero 3.6.0, Nautilus 3.6.3 and Totem 3.6.2. The PPA also provides Transmission 0.7.1, Transmageddon 0.23 and Sound Juicer 3.5.0.

4. Remove overlay scrollbars

One thing I've noticed after following the steps above myself, is that GNOME Shell continues to use Ubuntu's overlay scrollbars. If you want to use the GNOME 3 scrollbars instead, remove overlay scrollbars using the following command:
sudo apt-get remove overlay-scrollbar*

Once you're done, restart your computer (a logout may be enough for most stuff, but to get all the changes, including GDM for the login screen, a restart is probably a better idea) and select "GNOME" from the login screen.

Monday, March 25, 2013

Importing a LDD Lego Digital Designer Model into BrickLink

The LDD Manager - a tool I’ve been working on for some time. With it you can analyze and manage your LDD files, and also to upload to BrickLink. There’s also a bunch of other features, like a possibility to search and find all the bricks in LDD Extended Mode, and generate custom Brick Palettes.

UPDATE March 2013: The latest version is now 1.13 with support for LDD 4.3.5. If you have a previous version, you should download the new version. NOTE, installing a new version will remove your previously imported LDD-files, but hopefully it's not too much work to import them again.

Posted Image

Note that this software requires MS Access 2003 or higher. If you don’t have it installed on your PC, you need to download and install the free Access 2003 runtime first. Read more in the link below.

Download LDD Manager and help file here.

By Superkalle

I used this to take models and then export an XML file formatted for bricklink.
Works good. 

Fallout Online client (FOnline:2238)

This FOnline:2238 client is pre-configured by me, which makes it easier to run.
Try it if you have a problem with "official" client. I also recommend it for any new player.

» download FOnline:2238 client « 

Installation instructions

  • Download and unzip the file
  • Copy master.dat and critter.dat into data folder OR run FO2238Config.exe and in DataFiles
    tab specify paths to master.dat and critter.dat.

  • Where can I get master.dat and critter.dat from?
  • These files are part of Fallout 2.
    To get them you can buy Fallout 2 on as well as in many other places.
  • OK, I have both dat files, paths are set up correctly, but I still can't run FOnline!
  • Run Updater.exe. Try both FOnline.exe and FOnlineGL.exe.
    If it still doesn't work, this thread is the best place to look for help.
This client is preconfigured version of the official client. I prepare it by hand, so sometimes it may
be out-of-date. In such case simply run updater. If updater doesn't work, you can get the files you
need individually from

The official client can be downloaded from
It's updated automatically every hour, but more difficult to set up compared to my release.

Full list of differences between my release and official release
 - Added file Readme.txt with information about Master.dat and Critter.dat.
 - Added folder Manual with link to FOnline wiki.
 - Added file FOnline.cfg (so you don't have to run FOConfig.exe), differences compared to
default configuration:
  • English language instead of Russian
  • Running is enabled by default
  • Fixed FPS is set to -15 instead of 100
  • Server host and port is configured properly
  • Updater paths are configured properly
- Added file FOnline2238.cfg (so you don't have to run FO2238Config.exe unless you want to
have Master.dat and Critter.dat outside of data folder), differences compared to default configuration:
  • Displaying player names enabled
- Added file DataFiles2238.cfg with default paths to Master.dat and Critter.dat pointing to data folder.