Sunday 30 September 2012

Install and Configure Samba share in Ubuntu 12.04, 12.10 Quantal Quetzal | Howto

How to Samba...

One of the most asked features for Samba is a graphical user interface to help with configuration and management,  there are several GUI interfaces to Samba available, for me the most  simple and powerful one of these tools is samba server configuration tool. In this post, i will show you how to install and configure samba in Ubuntu 12.10 Quantal Quetzal, this work also for previous releases of Ubuntu.

Installing Samba on Ubuntu:

1- Install Samba files

First thing we need to do is to install samba, go to Software center in Ubuntu and search for samba then install the package. If you want to install it via terminal then copy this command :

sudo apt-get  install  samba samba-common

2- Install some dependencies for Configuration tools (don`t   forget to  install python-glade2)

sudo apt-get install python-glade2

3- Installing Samba Server configuration Tool :

Now install the graphical interface System-config samba

sudo apt-get install system-config-samba

4- Add a Linux/Unix user:

adduser   pirat9

5- Make  a Linux/Unix  password for  user  pirat9

passwd pirat9

6- Now open samba configuration tool.

7- Add the  folder you want to share and setup the permissions access.

- Setup the permissions access

8- Now before to connect to  the  share, you  have  to  create the  samba user  :

sudo smbpasswd -a  pirat9  New SMB password  retype New SMB Password

Now the configuration is done.

Tip: You can chose any  directory you want to share by  right click on the  folder directory and open the  share options

And activate share:

 

9- Now, let`s test if samba share is working from another Linux Machine, in my case will try to connect from LinuxMint12 machine to Ubuntu 12.04 machine where we just installed samba, from menu open connect to server and type the details of your Ubuntu machine

12- Connect  from  windows  (XP/Vista/7)




Useful commands for Linux normal users and administrators



For Linux/Unix administrators:

1- Compare a remote dir with a local dir

 $ diff -y <(ssh user@host find /boot|sort) <(find /boot|sort)

2- Trace and view network traffic

tcpdump -s 0 -w - port <port> | tcpdump -r - -A

3- Check if a machine is online

ping -c 1 -q MACHINE_IP_OR_NAME >/dev/null 2>&1 && echo ONLINE || echo OFFLINE

PING
parameters
c 1 limits to 1 pinging attempt
q makes the command quiet (or silent mode)
/dev/null 2>&1 is to remove the display
&& echo ONLINE is executed if previous command is successful (return value 0)
|| echo OFFLINE is executed otherwise (return value of 1 if unreachable or 2 if you're offline yourself).
I personally use this command as an alias with a predefined machine name but there are at least 2 improvements that may be done.
Asking for the machine name or IP
Escaping the output so that it displays ONLINE in green and OFFLINE in red (for instance).

4-  Reverse SSH

ssh -f -N -R 8888:localhost:22 user@somedomain.org

Reverse SSH
this command from the source server and this follow in the destination server:

 ssh user@localhost -p 8888

5- Show mounted volumes in a table (Thanks to Shawn):

mount | column -t

6- The fastest way to kill tcp or udp port is to run the following command (Thanks to Sriram):

fuser -k PORT-NUMBER-HERE/tcp  fuser -k PORT-NUMBER-HERE/udp

7- edit a file on a remote server using vim from your Linux / Unix / OS X desktop:

vim scp://sriram@server1/etc/http/httpd.conf  

Commands for Both Normal users and Linux admins

8- Grep your command history (Thanks to Shawn)

history | grep /pattern/

9- Extract audio from Flash video (*.flv) as mp3 file

 ffmpeg -i video.flv -vn -ar 44100 -ac 2 -ab 192k -f mp3 audio.mp3

10- copy hybrid iso images to USB key for booting from it, progress bar and remaining time are displayed while copying

time (pv file.iso | dd bs=1M oflag=sync of=/dev/sdX 2>/dev/null)

11- what model of computer I'm using?

sudo dmidecode | grep Product



The latest Dream Studio OS release! ( DreamStudio )

Rock musician and software developer Dick MacInnis, announced a few days ago the availability of the new Dream Studio release which is based on Ubuntu 12.04.

Dream Studio is a GNU/Linux multimedia distribution, aiming to offer tools for graphic designers, photographers, music composers and video editors. The main reason to upgrade is that the latest release is based on an LTS version of Ubuntu, thus it is a lot more stable and for the specialized uses that such distributions have, stability is a serious matter. Another important reason to upgrade would be that all applications and tools are at their latest version.

Lets take a look at the available tools that Dream Studio offers out of the box.

Besides all that, there are of course more application that cover the daily desktop need like  Firefox, LibreOffice, Thunderbird and Tomboy. The only thing I have to notice before suggesting the download of this great distribution is that some users reported that while the system works perfectly in live mode, it doesn't work at all after the installation. Dick McInnis is already working on that, and I suppose there will be a bugfix minor version available soon.

Dream Studio




Sunday 23 September 2012

Create custom notification on your Ubuntu desktop using python

You can easily create custom notifications for your applications on ubuntu. Ubuntu's current notification system is called NotifyOSD. It provides api for several languages. Using python-notify library it is really so easy than in any other.

Ubuntu by default have the python-notify installed. If don't install it using

1
sudo apt-get install python-notify

Sample notification program using python for notifyOSD

Now you open gedit or any other text editor, paste the following code and save it as notify.py


#!/usr/bin/python
import sys
import pynotify
 if __name__ == "__main__":
    if not pynotify.init("icon-summary-body"):
        sys.exit(1)
 
    n = pynotify.Notification(
        "Burhan Uddin",
        "What is life? Full of of care? We have no time to stand or stare!",
        "notification-message-im")
    n.show()

Now run this py file using terminal

1
python notify.py

And see the output ..




Run C, C++ Programs In Ubuntu Linux


If you are a developer you need C and C++ Compiler for your development work.In ubuntu you can install the build-essential for C and C++ compilers.

Install C and C++ Compilers in Ubuntu

#  sudo aptitude install build-essential

This will install all the required packages for C and C++ compilers

Testing C and C++ Programs

Compiling Your first C Programs

Now you need to open first.c file

sudo gedit first.c

add the following lines save and exit the file

Firstly compile the code using the following command

cc -c first.c

that would produce an object file you may need to add to the library.

then create an executable using the following command

cc -o first first.c

Now run this executable using the following command

./first

Output should show as follows

Hello, world

Compiling your first C++ program

If you want to run c++ program follow this procedure

g++ is the compiler that you must use.

you should use a .cpp file extension rather than a .c one

You need to create a file

sudo gedit first.cpp

add the following lines save and exit the file

Run your C++ Program using the following command

g++ first.cpp -o test

./test

Output should show as follows

Hello World!




Sunday 16 September 2012

History of Linux operating system

Linux history, How Linux come into existence, When it started and what is the history of Linux. These questions are answered here.
  • What is Unix/Linux?
  • History of Linux
  • Features Supported Under Linux
  • The future of Linux

In 80's, Microsoft DOS was the dominated OS for PC
Apple MACINTOSH was better, but expensive
UNIX was much better, but much, much more expensive. Only for minicomputer for commercial applications
People was looking for a UNIX based system, which is cheaper and can run on PC
Both DOS, MAC and UNIX were proprietary, i.e., the source code of their kernel is protected
No modification is possible without paying high license fees

GNU foundation, established in 1984 by Richard Stallman, who believes that software should be free from restrictions against copying or modification in order to make better and efficient computer programs.

GNU is a recursive acronym for GNU's Not Unix.
Aim at developing a complete Unix-like operating system which is free for copying and modification
Companies make their money by maintaining and distributing the software, e.g. optimally packaging the software with different tools (Redhat, Slackware, Mandrake, SuSE, etc)
Stallman built the first free GNU C Compiler in 1991. But still, an OS was yet to be developed

A famous professor Andrew Tanenbaum developed Minix, a simplified version of UNIX that runs on PC
Minix is for class teaching only. No intention for commercial use
In Sept 1991, Linus Torvalds, a second year student of Computer Science at the University of Helsinki, developed the preliminary kernel of Linux, known as Linux version 0.0.1

Message from Professor Andrew Tanenbaum
" I still maintain the point that designing a monolithic kernel in 1991 is a fundamental error.  Be thankful you are not my student. You would not get a high grade for such a design."
                                                              (Andrew Tanenbaum to Linus Torvalds)


Soon more than a hundred people joined the Linux camp. Then thousands. Then hundreds of thousands
It was licensed under GNU General Public License, thus ensuring that the source codes will be free for all to copy, study and to change.
Linux has been used for many computing platforms
PC, PDA, Supercomputer.
Not only character user interface but graphical user interface is available
Commercial vendors moved in Linux itself to provide freely distributed code. They make their money by compiling up various software and gathering them in a distributable format
Red Hat, Slackware, etc

Recent estimates say about 29 million people use Linux worldwide. The effects of the dot-com bust, IT slowdown and global economic recession can be clearly seen.

Free software, as defined by the FSF (Free Software Foundation), is a "matter of liberty, not price." To qualify as free software by FSF standards, you must be able to:
Run the program for any purpose you want to, rather than be restricted in what you can use it for.
View the program's source code.
Study the program's source code and modify it if you need to.
Share the program with others.
Improve the program and release those improvements so that others can use them.




Saturday 15 September 2012

Fire Wall: Firewall Builder

http://static.howtoforge.com/images/configuring_source_and_destination_nat_with_firewall_builder/fwbuilder_logo.png


Image of NAT rule

Firewall Builder is a firewall configuration and management GUI that supports configuring a wide range of firewalls from a single application. Supported firewalls include Linux iptables, BSD pf, Cisco ASA/PIX, Cisco router access lists and many more. The complete list of supported platforms along with downloadable binary packages and soure code can be found at http://www.fwbuilder.org.

In this tutorial we are going to cover how to use Firewall Builder to configure a NAT rule that translates both the source and destination IP addresses of the original packet. This type of NAT configuration can be useful in a variety of network configurations.

There are situations where both the source and destination IP addresses of a packet need to be NAT'ed. The diagram below shows just such a scenario where an internal server needs to be accessed remotely from the outside using the Remote Desktop Protocol (RDP).




How to login as root in Ubuntu 12.04 !

Note:- People make mistakes so login as root may harm your system severely so please be careful and remember what you are doing. Also making the smallest mistake(in Ubuntu) can render your computer inoperable.

In Ubuntu linux it's still possible to login with the root or administrator account, and this brief tutorial is going to show you how. If you still wanna login as the root user after all the risks I mentioned above, then continue below to learn how.

To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to create a new root password.

sudo passwd root

Next, copy and paste the commands below to enable manual or other login.

sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'

root_precise_2

Restart your workstation and choose to login as Root.

When you login, the username on the username will show Guest, ignore that. You're root!




How to : Auto login without entering password in Ubuntu linux !


With Ubuntu linux getting famous day by day and an estimated 20 million active users according to ubuntu.com the amount of tricks, tweaks and hacks for this linux distro is on the  rise and hence i thought of including this article today.

If we observe (during installation from live media like cd or usb stick) there is option while we enter credentials for autologin (we need to check that option). Now in case if the user fails to do this and in future due to some reasons want to automate the login process then this tutorial would be helpful.

o get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to open lightdm configuration file.

sudo gedit /etc/lightdm/lightdm.conf

Just edit the lines below and hit Save, that's it you're done. Make sure the right username is selected if there are multiple users select the appropriate one.




Apache OpenOffice Product Description

 
http://www.quicktweaks.com/wp-content/uploads/2008/10/openoffice3.png

Compatible with other major office suites, Apache OpenOffice is free to download, use, and distribute. Download it now, and get:

Apache OpenOffice?

  • Writer a word processor you can use for anything from writing a quick letter to producing an entire book.
  • Calc a powerful spreadsheet with all the tools you need to calculate, analyse, and present your data in numerical reports or sizzling graphics.
  • Impress the fastest, most powerful way to create effective multimedia presentations.
  • Draw lets you produce everything from simple diagrams to dynamic 3D illustrations.
  • Base lets you manipulate databases seamlessly. Create and modify tables, forms, queries, and reports, all from within Apache OpenOffice.
  • Math lets you create mathematical equations with a graphic user interface or by directly typing your formulas into the equation editor.

Why Apache OpenOffice?

Apache OpenOffice is synonymous with quality

  • the roots of Apache OpenOffice go back twenty years, creating a mature and powerful product
  • hundreds of thousands of users participated in the beta testing of version 3
  • independent reviewers around the world have recommended the product
  • with a fully open development process, Apache OpenOffice has nothing to hide - the product stands or falls on its reputation

Apache OpenOffice is easy to use

  • the software looks and feels familiar and is instantly usable by anyone who has used a competitive product
  • it's easy to change to Apache OpenOffice - the software reads all major competitors' files
  • few language barriers - if it's not yet available in your language, the chances are it will be soon
  • Apache OpenOffice is supported by a global community of friendly volunteers, only too happy to provide assistance to newcomers and advanced users alike

Apache OpenOffice is free software

  • you may download Apache OpenOffice completely free of any licence fees
  • install it on as many PCs as you like
  • use it for any purpose - private, educational, government and public administration, commercial...
  • pass on copies free of charge to family, friends, students, employees, etc.

Apache OpenOffice is standards compliant

  • certified by OSI as open-standard compliant, and the first software package in the world to use OASIS OpenDocument Format (ISO 26300) as its native file format.



Tag: Apache Open Office



Ubuntu file system in General !

Now lets have a look for Ubuntu Linux file structure in general. Please note that everything in Linux is considered as a file even the devices, folders, partitions etc, are considered as a file.

/

This is the root folder, all other folders come under root.. think of it as C: in a Windows context. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system.

/bin

This folder contains all the user-essential binaries (programs) that are needed to administer and run your linux system, delete this folder and your system is broken. It contains commands that may be used by both the system administrator and by users, but which are required when no other filesystems are mounted.

/boot

This folder contains configuration files and other necessary files that are needed by the bootloader. Thus /boot stores data that is used before the kernel begins executing user-mode programs. This may include saved master boot sectors and sector map files.

/dev

This folder contains special or device files. Be careful while working with it. Look through this directory and you should hopefully see hda1, hda2 etc. which represent the various partitions on the master drive of the system. It is a very interesting directory that highlights one important aspect of the Linux filesystem – everything is a file or a directory.

/etc

This folder contains all the configuration files used by the system, you can also start and stop services from here. It contains the following :

opt – Configuration for /opt

X11- Configuration for the X Window system (optional)

sgml- Configuration for SGML (optional)

xml- Configuration for XML (optional)

/home

This folder contains the home folders of all the normal (non – root ) users on the system .. think of it as my documents in windows. It is clearly a site-specific filesystem & setup will differ from host to host.

/lib

This folder contains essential shared libraries and kernel modules. This directory contains those shared library images needed to boot the system and run the commands in the root filesystem, ie. by binaries in /bin and /sbin.

/media

This is a mount point for removable media. This directory contains subdirectories which are used as mount points for removeable media such as floppy disks, CDroms, thumb drives etc.

/mnt

This is a mount point for a temporarily mounted file-systems. This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run.

/lost+found

Sometimes your system might crash or a power failure might take the machine down. Either way, at the next boot, a lengthy filesystem check will be done. Fsck will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory.

/opt

This folder contains add on softwares. A package to be installed in /opt must locate its static files in a separate /opt/<package> or /opt/<provider> directory tree, where <package> is a name that describes the software package and <provider> is the provider's registered name.

/sbin

This folder contains binaries that can only be run as the root user ("superuser").

/tmp

This folder contains temporary files that are created while browsing, video buffering, system updates etc. and all the data is erased on reboot.

/usr

This folder and its subfolders contains user installed programs, utilities and libraries. Utilities used for system admin (and other root-only commands) are stored in /sbin, /usr/sbin, and /usr/local/sbin. /sbin contains binaries essential for booting, restoring, recovering, and/or repairing the system in addition to the binaries in /bin.

/var

The /var contains data that is changed when the system is running normally. It is specific for each system, i.e., not shared over the network with other computers.

/run

This directory contains all the run time data a system administrator need while working. Everything is in one place making it easy for control purposes.

/root

This folder contians the root user's files. The root account's home directory may be determined by developer or local preference, but this is the recommended default location.

/proc

This is a psuedo folder, that contains information about the linux kernel and hardware that is updated in realtime.

/srv

It contains data for services provided by this system. /srv contains site-specific data which is served by this system.

Now, things are clear in front of you what different directories are there and what are their functions. All these collectively make the Ubuntu (Linux) Filesystem. We can actually mount a seperate hard drive for each of these directories. For example, your /home can be put on another hard-drive than your / which means that you can easily recover your personal files if the harddrive on / fails because the harddrive mounted to your /home folder is seperate from the one that is mounted to your /. Simlarly /boot can also be made a separate paritition. It helps in easy management of bootloaders in dual-boot scenarios.

GetStartedwithlinux......




Awesome Ubuntu Apps For Wallpaper Slideshow

Variety

Variety is an applet indicator that lets you create wallpaper slideshow from pictures stored at various location as well as from several different online sources such as Picasa and Flickr. Apart from setting the time interval for the slideshow, you can also apply various filters for blur or oil paint effect on the wallpapers. Since Variety sits in the top panel, you can use it for a quick change in the background image or deleting a wallpaper. To change the settings or configuration select Preference from the drop down:

Variety-Change-Wallpaper-Ubuntu

You can see the different configuration options here. As advised before, select the option to start Variety at start up to enjoy the wallpaper slideshow painlessly.

Variety-Change-Wallpaper-Ubuntu

Use the following commands to install Variety in Ubuntu:

sudo pat-get install variety

Use the following command to remove Variety:

sudo apt-get remove variety

Slidewall:

Slidewall is a complete wallpaper application that provides all the functionalities of Wallch and Variety. In addition, it also provides the option of using Android-style live wallpapers in Ubuntu. It comes with bunch of live wallpaper with option of adding more live wallpapers from different sources. You can select the type of wallpaper you prefer from the settings.

Slidewall-Wallpaper-Settings

So if you want some good live desktop background (like the one in picture below) and are not feeling comfortable with Conky, Slidewall is the perfect suite for your need.

Ubuntu-Live-Wallpaper

Use the following command in terminal to install Slidewall:

sudo add-apt-repository ppa:fioan89/slidewall  sudo apt-get update  sudo apt-get install slidewall

Use the following command to uninstall slidewall:

sudo apt-get remove slidewall

Hope it helps you in making your Ubuntu desktop look better. What is your favorite way of managing wallpapers? Do you know some better tips for wallpaper management? Do share with us as well.






Guide to Install Source Package Tarballs (tar.gz,tar.bz2,tar.tgz) in Linux !

Howdy Folks !

Today I'd be showing you how to install from Source Package ie Tarballs also commonly seen as tar.gz/bz2 files.Though be strongly recommend using PPA for installation or the DEB package sometimes these aren't available and we have to rely on Tarballs package.Don't panic cause installation using Tarballs is as simple but is avoided cause it comes at a cost of few extra steps which we generally tend to avoid. ? Building from source is a reasonably simple process, but it can be complicated sometimes. You can even end up with two versions of an application installed simultaneously which can cause a lot of problems. So, all you need to do is Be Careful !

Make Install first:-

There are the 3 basic command you'll like to commit-to-memory because these are the ones that you'll be running everytime you need to install an application from a source file. If you don't want to, then just for Deb :) its still working.

First things first ! We need these binaries -

sudo apt-get install checkinstall build-essential

Not to mention, we will need to extract the files before we can actually install them using building tool make

Extracting the Tarballs (without being the root)

$ tar zxf compressed_file.tar.gz  $ tar zxf compressed_file.tgz  $ tar jxf compressed_file.tar.bz2  $ tar jxf compressed_file.tbz2

(Replace 'compressed_file' by the actual package file name)

The 3 steps to success are (make sure that you cd to the directory in which you've unzipped the file and then type in the commands shown below)

$ ./configure  $ make  $ make install

and  it's done the package would be installed in few moments. Just to make a note that also sometime in state of error

sudo apt-get clean all command is very helpful.




Install libreoffice 3.6 in Ubuntu 11.10/12.04 & Debian – the easy way !

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHZXXTjDuJYShcVSO9wcu_D-pIhQxGjvQ4h2ZFtHPmNe0IPLApitGa-VAb597ysLR9xxXwnLdP5wEkfUJeR4dX0UdBKl0VUyzjZvXynJXqimi7vZIN2n1-CzaydBJsZc4uErKt50y6r1E/s1600/text4339.png


Downloading and installing manually:-

Download the archive from the libreoffice website and make sure you select the right one that is DEB file (.deb)

After downloading extract the folder the name would be LibO_3.6.0.4_Linux_x86_install-deb_en-US (in this example for libreoffice 3.6)

Cd the extracted directory:

cd /Downloads/DEBS/

Now Install the .deb packages using the following command :

sudo dpkg -i *.deb

Now you need to install the LibreOffice menu entries, first cd the sub directory

cd /Downloads/en-US/DEBS/desktop-integration

Then install the package: (For libreoffice 3.6 in this example)

sudo dpkg -i libreoffice3.6-debian-menus_3.6.0-104_all.deb



That's it you're done, Enjoy!

Continue....

LibreOffice is the power-packed free, libre and open source personal productivity suite for Windows, Macintosh and GNU/Linux, that gives you six feature-rich applications for all your document production and data processing needs: Writer, Calc, Impress, Draw, Math and Base. Support and documentation is free from our large, dedicated community of users, contributors and developers. 


Download LibreOffice



See what LibreOffice can do for you »

Download LibreOffice









Thursday 13 September 2012

DIGILITE launches two new AMD-based motherboards in India


New offerings for the Indian market


DIGILITE, one of the fastest-growing motherboard brands in India, has extended its range of DIGILITE AMD chipset motherboards with the launch of two new AMD models - DL-960GM-GS3 FX and DL-E35M1. Both the models support on-board AMD Radeon Graphics and are available across India through authorized dealers. The DL- 960GM-GS3 FX is priced at Rs.2,699 while the DL-E35M1 is priced at a Rs. 3,699.

New offerings for the Indian market

 
Rajan Sharma, VP - Sales, DIGILITE, said, "We have been working closely with different chipset vendors to offer our customers world-class products. AMD chipset-based motherboards are growing popular in India as it combines good features with robustness.  WE had had success with our premium AMD fusion series, and we are confident of boosting affordable computing with the new DL-E35LM1 motherboard."

Perfect for HTPCs

Perfect for HTPCs

 


Some of the key features of the DL-960GM-GS3-FX include:

  • Support for  AM3+ and AM3 CPUs
  • Solid state capacitors for better power and a longer lifespan
  • Supports Dual Channel DDR3 1800MHz(OC) memory
  • 1 x PCI Express 2.0 x16 slot
  • Integrated AMD Radeon 3000 graphics, DX10
  • Gigabit LAN 10/100/1000 Mb/s
  • 5.1 CH HD Audio (Realtek ALC662 Audio Codec)


The key features of DL-E35LM1 include:

  • Supports on-board E240 single core 1.5GHz CPU.
  • AMD Zacate E-240 APU with AMD A50M chipset
  • Supports DDR3 1066, 2 DIMM slots, Max. capacity up to 8GB
  • Integrated AMD Radeon HD 6310 graphics, DX11 class iGPU, Pixel Shader 5.0, up to 2GB Graphics memory.
  • 1 x PCI Express 2.0 x16 slot (@ x4)
  • 4 x SATA3 connectors
  • 7.1 CH HD Audio (Realtek ALC887 Audio Codec)