Sunday, April 6, 2008

How to install ANYTHING in Ubuntu

Having problems installing something on your new Ubuntu operating system? "Where's the EXE?",
"Where do I need to extract this to?",
The Applications menu
"How do I run it?", "Where did it go?" -

have you been thinking questions like these? Don't worry, installing software, themes and other things on Ubuntu is actually very easy! This guide will help you understand with screenshots, instructional videos and to-the-point language.

Note: The guide was written for Ubuntu 6.06 - The Dapper Drake using the tools of the Gnome desktop environment as its base. The program names and paths will undoubtedly vary if you're using Kubuntu or Xubuntu.

The package manager

Linux applications are almost all open source [1] and they're, unlike typical Windows programs, highly dependant on external libraries to work. You don't have to understand what libraries are, but just that Windows programs typically include parts of libraries in their installers, taking up lots of space after they've been installed because the same libraries have duplicates many places on your harddisk; Linux programs usually don't do this.

Most Linux operating systems have evolved a system where you can download the program, along with any needed dependencies, without having duplicates scattered all over your harddisk saving you lots of space. At the same time, this system allows you to have a central location from which to install and update packages. This system is called the package manager and on Ubuntu you'll meet it in the form of apt-get, aptitude, Add/Remove..., Update Manager and Synaptic. All these programs are frontends to the same package manager[2] built right into Ubuntu.

Installing software with Synaptic

Synaptic is a graphical program for installing packages and probably the one you'll feel the most comfortable with. You can launch it from System → Administration → Synaptic Package Manager (paths will vary depending on your locale, the System menu is the third menu on the menubar at the very top of your screen); as a safety precaution it will ask you for your password before proceeding! It's not because it's dangerous, Ubuntu is just very strict with trying to keep you, and more importantly, non-administrator users, from messing up your system.

Synaptic Package manager

The Synaptic Package Manager

The 3 steps: Search, mark and apply

  1. The Search icon in SynapticFirst you search for the package you want to install. Note that there are thousands of themes, applications, libaries and documentation available right away in Synaptic. All of these packages are located on the Ubuntu servers for you to download and update; the package manager essentially works like a kind of improved Windows update that will not only keep your operating system updated, but also all of the non-critical programs you've installed through it. You can find packages by looking for them inside the categories on the sidebar to the left or search for them. Click the search icon in the toolbar to search.
    The search popup in Synaptic

    The search popup that will pop up when you hit search

  2. When you've found the package you want to install, right-click on it and mark it to be installed. Most likely it will inform you of a bunch of dependencies that will also be installed in the same procedure; this is all being taken care of automatically! Note that you can also remove packages in the same way (right-clicking and selecting remove instead). Also note that you can mark more than one package to be installed, speeding up the install procedure significantly.
    Selecting a package for installation in Synaptic

    Selecting a package for installation in Synaptic

  3. The Apply icon in SynapticOnce you have marked all the packages you want to install, you can click the apply icon. This will download, install and set up everything! It's that easy.

Tango video icon See a screencast of the 3-step install process

But what if my program isn't available through Synaptic?

Trust me, it probably is. If it isn't, here are some of the reasons why it's not and how to fix it:

  • The Ubuntu package manager gets its package lists from the main Ubuntu repositories, but there are more repositories than just these default ones. There are even more official Ubuntu repositories! Try enabling extra repositories before you give up all hope!
  • If you're not connected to the Internet, you're not completely out of luck. There is a chance that your package is available on a CD.
  • Even if the package is not available in any repositories, you can still do the old Windows trick: installing it manually. But remember, there are more types of package-formats in Linux than you can think of. You might want to look at the explanation of how you go about installing a package manually.

I installed it, but where did my program go?

Usually your Applications menu is updated with a launcher to your new program, but sometimes this doesn't happen automatically. Here are some ways to find a link to your new program:

  • The Debian menuInstall the Debian menu. The Debian menu has a much more thorough list of your installed applications, and it will be available as a category in your existing Applications menu. You need to install the package called menu-xdg and possibly restart X (ctrl + alt + backspace) for it to show up.
  • They will very likely be available as a terminal command with the same name as the package. Try running the package name as a command in the terminal. Say I've installed the package muine[3] through Synaptic, then I open up the terminal and enter muine ending with a press on the return/enter key. Muine fires up. Note that the application will close when you close the terminal window! To avoid this behavior, press Alt + F2 and the Run Application window will show up; Type in muine to start it. Sometimes the command isn't called exactly the same as the package; try typing the beginning letters and then press tab twice. This will either give you the name of the command or a list of names to choose from.
  • Right-click on your package in Synaptic, select Properties from the menu and click on the tab labeled Installed Files. There will be a list of installed programs; the ones installed inside the folder /usr/bin are most likely the name(s) of the command(s).
    The properties of the music player Muine

    The installed files of the music player Muine

How do I uninstall the program?

When you want to remove a program, you do exactly the same as when installing - just select Mark for Removal instead of Mark for Installation in step 2. If you want to remove configuration files as well (maybe you want some weird modifications undone) select Mark for Complete Removal. Remember to apply the changes!

Installing software with the terminal

Very often, you'll see other Ubuntu users saying "You can install program ABC with this code ..." and then they'll provide you with a command you can input in the terminal. This not unlike what Synaptic does. In fact, Synaptic uses these commands below the friendly user interface! You can find the terminal at Applications → Accessories → Terminal. The two commands that you can use are:

sudo apt-get install ABC and sudo aptitude install ABC

ABC is just a fictious package in this case, not a real one. The sudo part of the command means you temporarily grant super-user/administrator rights to the command, provided you supply a correct user password. It's the same thing that happens when you open up Synaptic, only in the terminal instead! If you run aptitude by itself like this sudo aptitude, you get something that looks like a command-line version of Synaptic.

Aptitude package manager

The Aptitude user interface

It's also possible to search from the command-line like it is in Synaptic. Try this:

apt-cache search ABC or aptitude search ABC

To uninstall a package:

sudo apt-get remove ABC and sudo aptitude remove ABC

Removing configuration files as well:

sudo apt-get remove --purge ABC and sudo aptitude purge ABC

Though the command-line can be scary for new users, as you can see it's fairly simple and straight-forward to use and has many of the same features as Synaptic when it comes to installing software. Some users prefer installing software through the terminal, others don't. You decide for yourself what you like best.

Tango video icon See a screencast of the terminal search & install process

Installing a package manually

Are you absolutely sure you can't find the package in Synaptic? Did you try enabling extra repositories? If you've tried all this with little or no success, here's how you do it the Windows-style way. Download a package (.deb, .rpm, .tar.gz, .package, klik:// → .cmg, .sh, .bin, .exe) and let's have a look.

Installing a ...

Debian Package (.deb)
When you download a program with the package manager, you actually download Debian packages! It's possible to install individual Debian packages you've downloaded yourself, but unless they're built specifically for Ubuntu, they're not guaranteed to work. Installing them is rather simple in Ubuntu 6.06 Dapper Drake: double-click the package in Nautilus or on your desktop and a package installer will show up:
Gdebi Debian package installer

The Debian Package installer (GDebI)

You simply press Install Package to install. If you have a missing dependency, it will inform you of that. It will also inform you if there's a newer version available from the repositories!

Another way to install a Debian package is to use the command dpkg which is what the package manager uses to manipulate Debian packages (or short: debs). The syntax is as follows: if your package is located on your desktop and your username is carl, then you install the package test.deb with dpkg -i /home/carl/Desktop/test.deb. You need to take care of dependencies yourself, so it's not the optimal way of installing software.
RPM Package (.rpm)
RPM is another popular way of packaging software, and it's used by popular distributions such as Fedora Core, SUSE Linux and Mandriva. RPM is not used by the Ubuntu Package Manager, but there does exist a command for converting an RPM into a Deb; this doesn't mean that any RPM will work on your system, though! The same program can also install the RPM directly so that you won't have to do this yourself. The command is not available right away so you'll need to install it yourself - the package is called alien and is of course available through Synaptic. If the user carl wants to install an RPM called test.rpm located on his desktop, he will enter sudo alien -i /home/carl/Desktop/test.rpm.
Desktop Theme (.tar, .tar.gz, .tgz, .tar.bz, ...)
Installing themes[4] is relatively painless in Gnome. You open the Theme Preferences which you'll find at System → Preferences → Theme. With this application you can change icons, controls and window borders to your liking. To install your theme, simply drag and drop the package onto the Theme Preferences window and confirm the dialog window that pops up. To use your new theme, edit one of the existing themes to use your new icons, controls or window borders.
Installing a new desktop theme

Click Install to install the new desktop theme

Login Screen Theme (.tar, .tar.gz, .tgz, .tar.bz, ...)
Installing themes for your login screen is as simple as installing desktop themes. You open up Login Window Preferences in System → Administration → Login Screen and drag and drop your theme onto the window. Confirm the dialog window that pops up. To use your new theme, select it in the list of themes.
Installing a new login screen theme

Click Install to install the new login screen theme

Source Package (.tar, .tar.gz, .tgz, .tar.bz, ...)
Note: not all files with an extension named .tar, .tar.gz, and so on are archives with source code in them - they might be precompiled! If the archive is precompiled, there should be an installer or a binary executable inside it.

Sometimes all you've got is a package full of uncompiled source code. Luckily, you don't need to be a programmer to know how to compile and install a package with source code. Back in the old days, this was the only way to install software on Linux and there is a standard way of installing these files. It will not work in every case, but it will in most (if you have the right dependencies installed). To compile a package you must first extract it somewhere. This is easily done, simply right-click on the package and select Extract Here.
Extracting a package

Tango video icon See a screencast of package contents being extracted

To proceed you must have the compiler tools installed. They all come with the package build-essential, available in Synaptic. When you're sure you have the compiler tools installed, you fire up the terminal and change directory to the one you've just extracted (if you're not sure how to do that see: Navigating the terminal.

When you're in the correct directory you execute a configure script: ./configure. The purpose of the configure script is usually to check for dependencies and then create the makefile. If the script fails for some reason and tells you to install certain packages, look up the names in Synaptic (Important! If you find packages in Synaptic named almost the same but with a -dev extension, remember to install those as well! They're development packages and are needed for compiling). Don't worry if it complains that there is no configure script - many packages don't come with one! Then you compile it with make and after it's been compiled you can install it. There are two ways:

Normal install: If you want to install it the normal "primitive" way, type sudo make install. To remove the temporary files you run make clean. To uninstall the program you run sudo make uninstall. These two clean-up commands don't always work, though, the programmer needs to have enabled them.

Package manager install: If you want to install it in a way that means it can be easily removed from inside the package manager, first install the package checkinstall. To install the package type sudo checkinstall. This will take slightly longer than a normal install and quite possibly you'll have to supply a description of the application yourself (and edit the other information slightly). If the need arises, this will be easy to take care of from inside the checkinstall program.

Tango video icon See a screencast of a package being installed from source

Autopackage (.package)
The Autopackage format is supposed to be a "Linux distribution"-neutral way of installing packages. It uses its own self-contained package management tool, which is download from the Internet and installed along with the first Autopackage you install. To install an autopackage called test.package located on user Carl's desktop, first make sure it has permission to execute in your file-system, then run /home/carl/Desktop/test.package. The installer will ask you some questions, likely what your password is.
Klik package (klik:// → .cmg)
Klik is an online software repository that uses its own protocol called klik:// (similar to http://) to allow you to install a package from their site by clicking on a hyperlink in your web browser. To use Klik you must first install the packages binutils libstdc++5 rpm gnome-about using Synaptic and then run this command in the terminal: wget klik.atekon.de/client/install -O -|sh which downloads and installs the Klik client. Klik completely bypasses both your package manager and your file-system; everything you need to run the program is included in a .cmg-file located on your desktop after the installation is done. You simply double-click the file to start your application. To remove it again, simply delete the .cmg-file
Shell Script Installer (.sh, .bash, ...)
You can run the shell script inside a terminal with the command sh. If the script is called test.sh and is on the desktop of user carl, you can install it with sh /home/carl/Desktop/test.sh. Keep in mind that the script might not have permission to execute in your file-system.
Custom Binary Installer (.bin, ...)
If the installer is called test.bin and is located on the user carl's desktop, you can run it inside your terminal with /home/carl/Desktop/test.bin. Keep in mind that the installer might not have permission to execute in your file-system.
Windows Executable (.exe)
If you, after having searched around the Internet for a Linux version or a viable Linux replacement for the Windows program you want to install, find that there is no Linux program that will replace it, there is a slight chance the Windows executable will run on Linux[5]. This is not a proper solution to your problem, not in any way, but for some people it's the only way. To run Windows executables you need to install a package called wine. When that is done, run the command wine PATH in the terminal where PATH is the path to your EXE. If the user carl has an EXE called test.exe inside his home folder, he'll run the command wine /home/carl/test.exe to execute it. Be adviced that running Windows programs in WINE is often very buggy and probably won't work to your satisfaction; very often it doesn't work at all!

If the executable you ran was an installer wizard, your program will be installed in a hidden folder located inside your home folder. If the user carl has installed a program called Test, it will probably be installed to the folder "/home/carl/.wine/drive_c/Program Files/Test" (remember to include quotes around paths with spaces in them when typing them in a terminal). EXEs from inside this folder can be run with wine. You might want to create at launcher/shortcut for your desktop to easily start up your app. Here is a Windows program run with wine:
The Windows application Graph

The Windows application Graph

Appendix

The following isn't directly connected to installing software and themes.

Enabling extra repositories

On a standard Ubuntu installation, Ubuntu is configured to use the main repository. There are however, other official repositories (or sections on the Ubuntu server) that aren't available right away. There is one called Universe which is the largest one. It's a pool of community-maintained software, but it is not officially supported by Ubuntu. There is also a section called Multiverse which has software under questionable licences. The third section is called Restricted and is a very small pool of software with restricted copyright.

To enable the rest of the Ubuntu repositories you open Synaptic and select an option in its menubar: Settings → Repositories. Here is a list of the current repositories. To enable the missing section select each of the packages that are labeled binary, click on Edit and tick the boxes outside the sections of the Ubuntu repositories you want to enable.

Enabling the universe and multiverse repositories

Enabling the universe, restricted and multiverse repositories

Tango video icon See a screencast showing how to enable the extra repositories

When you're done, Synaptic will probably ask you to reload your list of packages; agree to do that. Now your list of available packages should have increased significantly.

Using CDs as offline package repositories

The best way to install new software in Ubuntu is to be connected to the Internet, but sometimes this is not possible. When you install Ubuntu the first time, your install CD should have been added as a repository. If it isn't, you can add it from the same window you enable extra repositories from. There's a button labeled Add CDrom; press this, insert your install CD and it will be added to the repositories.

Adding a CD to the package manager

Adding a CD to the package manager

You can now install software through Synaptic without being connected to the Internet, provided the install CD is inserted. Note that the install CD has software solely from the main repository, not Universe, Multiverse or Restricted! You now can download the entire Universe and Multiverse repositories on a set of DVD's and CD's courtesy of a volunteer effort. There is an ongoing project to create an Addon CD or DVD with select packages from the other sections of the Ubuntu repositories. You can download a preliminary CD ISO file for Ubuntu 5.10 'Breezy Badger' and try it out if you want to, but this guide will not go further into the subject[6].

The standard terminal on Ubuntu is Gnome Terminal which can be found in Applications → Accessories → Terminal. A terminal is in a way very similar to a file manager in that it's always inside a specific folder and is able to navigate to other folders and do regular file management. By default it will be inside your home folder when you run it. To confirm that your terminal is indeed browsing your home folder, type pwd ending with a press on enter. The pwd command will output the path to the current folder.

To see a list of files and directories inside the current directory, run the command ls. If you want to navigate up the directory tree run cd ... If you want to navigate down the directory tree run cd NAME where NAME is the name of the folder you want to navigate to. Example: if Tom is inside his home folder and there's a directory called test inside it, he will run cd test to change directory. If he wants to go back he can run cd ... I he ever gets lost he can run cd by itself; this will take him back to his home folder.

Adding a launcher/shortcut to your desktop

These are well-known from Windows. Launchers are shortcuts to your application allowing you to easily run it. To add a launcher, right-click somewhere on your desktop and select Create Launcher.... This will open a dialog from which you can enter information about the launcher. Remember to enter a name as well as a path to the executable. This is what carl would enter if he wanted a launcher for the executable named test located in his home folder:

Creating a new launcher

Creating a new launcher

Tango video icon See a screencast showing how to create a launcher

Changing permissions

To change permissions so that the file is executable, you right-click on the file on the desktop and select Properties; a window will open. Click on the tab labeled Permissions inside the window. There will be some boxes you can tick which tell the system what you're allowed to do with the file. Tick the box that says Execute outside the label that says Owner.

Changing permissions on a file

Permissions are tied to every file in the file-system

You can also run the command chmod +x /home/carl/Desktop/test.bin to make the file executable.

Tango video icon See a screencast showing a file being made executable

Why I created this guide

The easiest way to help a new user install something is to provide a command that will accomplish it. That is not in my opinion the best way to make a new user understand how Ubuntu works. It's also sad how you can leave the impression that Ubuntu needs to be used through a command-line for the simplest of tasks, when capable graphical tools exist for the same purposes. I hope this guide will help new users understand everything a little bit better. As they say in China: "Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime."

Changelog

  • Revision 1 (2006-05-06): Changed the introduction slightly, added list of contents, added part about checkinstall.
  • Revision 2 (2006-05-14): Linked to all important sections at the top of the page (BTW thanks to the bloke who put this on digg.com and to all those who dugg it!).
  • Revision 3 (2006-05-19): New URL, new introduction (+ disclaimer about the Gnome-centrism), experimenting with instructional screencasts in the GIF format (recorded with Byzanz).
  • Revision 4 (2006-07-28): Explained about precompiled archives and development packages in the source package section, moved the explanation of permissions to its own section in the appendix, added link to the DVD repository project, added link to Portuguese translation, added short description of the Autopackage format and added short description for installation of Klik packages.

Created by sachin kumar singh © 2008


Notes:

VLC media player for Ubuntu Linux

Ubuntu Gutsy Gibbon 7.10

Ubuntu Feisty Fawn 7.04

Ubuntu Edgy Eft 6.10

Graphical way

Open Synaptic (System -> Administration -> Synaptic Package Manager). In Settings -> Repositories, make sure you have a "universe" repository activated.

Search for vlc and install it. You should also install vlc-plugin-esd, mozilla-plugin-vlc (and libdvdcss2).



follow the way:-


Sunday, April 6, 2008

Install VLC Media Player in Ubuntu





-



Command line way

You need to check that a "universe" mirror is listed in your /etc/apt/sources.list.

   % sudo apt-get update
% sudo apt-get install vlc vlc-plugin-esd mozilla-plugin-vlc

Ubuntu Dapper Drake LTS 6.06

Dapper will be supported until June 2009 by Canonical. However, its VLC version is very old, so use our packages to get the latest version.

You can add our repository this way:

  • Be sure to have a universe repository enabled. Type these commands in a terminal:
    echo "deb ftp://ftp.videolan.org/pub/videolan/ubuntu dapper universe" > /etc/apt/sources.list.d/vlc.list
    sudo apt-get update
    sudo apt-get install vlc vlc-plugin-esd mozilla-plugin-vlc libdvdcss2

Ubuntu Breezy Badger 5.10

You really should upgrade! We don't provide up-to-date binaries for this release.

Moreover, you should know that this version is subject to several unpatched vulnerabilities!

If you're really desperate, you can find a not entirely outdated version for Breezy

on nightlies.videolan.org.

Ubuntu Hoary Hedgehog 5.04

You really should upgrade! We don't provide up-to-date binaries for this release.

Moreover, you should know that this version is subject to several unpatched vulnerabilities!

Sunday, March 16, 2008

sharing file between a windows guest and ubuntu host using VM ware and samba

VMware Workstation (and presumably the other enterprise-grade products in the VMware family) come with the handy “shared folders” feature which makes sharing files between a host and a virtual appliance nice and simple. The free products (VMware Player and Server) do not, unfortunately, have this ability and so we must find another way.

This quick guide shows how to use Samba to achieve the same aim. It is aimed at Ubuntu users but (the general concepts at least) should work on any modern Linux distribution. It is also written with a Windows XP guest in mind but a similar process should work in Windows Vista, Windows 2000 and other operating systems.

The goal is to set up a network share which both operating systems can transparently read and write to.

For reference, I am using Ubuntu 7.04 (Feisty).

Which VMware?

I’ll presume you have VMWare already installed with a Windows XP guest virtual appliance already set up. This guide is aimed at users of VMware Player and Server editions (I am using VMware Player).

VMware Player is a simple:

sudo apt-get install vmware-player

away. For the Server edition, you’ll probably want to consult the wiki.

Install Samba

If you don’t already have Samba installed, now would be a good time to do it:

sudo apt-get install samba

In order to keeps things clean and easy to manage, we’ll set up a new user account to own the share. This account name will be used when connecting to the share from within Windows. For the purposes of illustration, I will be creating a share called sandbox with the username and group also being sandbox.

Create the new group and user account with no login privileges:

sudo groupadd sandbox
sudo useradd --gid sandbox --shell /bin/false sandbox

To avoid creating a redundant home directory, you can add:

--home /nonexistent

to the end of the previous command.

Now you need to add a matching Samba account. You’ll be prompted to set a password - make note of this as this is what you will use to connect to the share from within Windows.

sudo smbpasswd -a sandbox

Next you’ll need to create a directory to be used as the share (assuming you don’t already have one). Create a directory, setting the username to your usual login and group to sandbox. Then chmod the directory 775 (assuming you wish both yourself and the virtual appliance to have read/write access). Here is what I entered:

cd $HOME
mkdir sandbox
sudo chown russ:sandbox sandbox
sudo chmod 775 sandbox

When you write to the share from within Ubuntu, new files will be created with the default permissions 644 with the username and group being your own user account. When your Windows client connects to the share, it will access it as if it were the local system user sandbox and so the group permissions will apply and you won’t be able to write to any files created from within Ubuntu.

To get around this problem, we can set the groupid bit for the sandbox directory which means all new files created will inherit the permissions of the parent and so the sandbox user from within Windows will be able to make read and write changes as desired.

sudo chmod g+s sandbox

If you don’t understand the above, don’t worry, just chmod the directory with the command above and all should be well.

Setting up the Samba share

Now all that’s left to do is to tell Samba about our share. Open up /etc/samba/smb.conf in your favourite text editor.

sudo gedit /etc/samba/smb.conf

Firstly, we need to set the security mechanism to user. Look for the line:

security = user

and make sure it is uncommented (remove the preceding semicolon if there is one).

Now, scroll down to the Share Definitions section and add the following:

[sandbox]
path = /home/russ/sandbox
valid users = sandbox
read only = No
create mask = 0777
directory mask = 0777

Be sure to set the correct path to your share. Save the file and restart the Samba daemon:

sudo /etc/init.d/samba restart

That should be it. You should now be able to connect to your share from within the Windows guest. At this point you need to know what IP address to connect to from within Windows. This depends on what networking mode you are using for your virtual appliance.

Bridged Networking

In this mode, your guest OS has its own IP address and so the address it needs to connect to is your usual host machine’s address. In this case your address is probably the top line from the output of this command:

ifconfig | grep "inet addr:"

NAT networking

In this mode, your guest OS shares your host’s address (in terms of other machines on the LAN) and communicates with the host via a private network. In this case, the IP address you need to connect to is most likely the bottom one from the output of this command:

ifconfig | grep "inet addr:"

Connecting to the share from within Windows

If you are unsure as to your host’s IP address, try and ping it first from within the Windows guest to confirm you have the right one.


Having worked out what IP address to connect to, you should now be able to connect to your share from within Windows.

The easiest way to do this is:

1. Open up My Computer
2. Go to the Tools menu and then Map Network Drive
3. Choose a drive letter to map the network share to
4. In Folder, enter: \\HOSTIP\sandbox (replacing HOSTIP)
5. Click “Connect using a different user name” and enter:
* username: sandbox
* password: yourpassword
6. Click OK and then the Finish button to connect

Hopefully, congratulations are in order. If not, be sure to make sure that any firewalls you have running (host or guest) have the correct rules set to allow communication between the two systems.

A note on security

At this point, assuming you have a successful connection, it is worth noting that any other machine on your local network (and potentially the internet if you are not behind a NAT or firewall) can connect to your share (assuming they have the correct credentials).

If you are only using Samba for sharing with VMware (as I am), you may wish to restrict access to VMware only. This is quite easy to do since VMware creates virtual network interfaces for communication between hosts and guests. This means we can set Samba up to ignore any communications that do not originate from these interfaces.

To do this, open up your Samba configuration file again:

sudo gedit /etc/samba/smb.conf

Make sure you have a:

bind interfaces only = true

line and that it is uncommented (remove any preceding semicolons). Just above this should be an interfaces line (most likely commented out). Add the following just below this:

interfaces = vmnet0 vmnet1 vmnet8

These are the virtual interfaces VMware uses for each type of virtual networking: bridged, host only and NAT respectively.

After making the changes, you will need to restart Samba again:

sudo /etc/init.d/samba restart

and possibly shutdown your VMware session and restart the VMware service:

VMware Player:

sudo /etc/init.d/vmware-player restart

VMware Server:

sudo /etc/init.d/vmware restart

Finished

You should now have a Samba share configured which is only accessible from your VMware guest appliances. Good luck!

Sharing files between Ubuntu Feisty/Gutsy and Windows XP or VISTA

This guide to install samba server on Ubuntu, will help you share files from your Ubuntu Feisty with the windows machines on your network.

This way maybe you will be able to use Ubuntu at your office, hope you can.

First install samba

sudo apt-get install samba

With this you will have samba installed on your system, now you need to edit the configuration file which is located at:

/etc/samba/smb.conf

Here I will put a simple minimal configuration to allow share files from your Linux server.

[global]
workgroup = MSHOME
netbios name = UBUNTU_SERVER
security = SHARE
auth methods = guest
domain master = No
wins support = Yes

[share1]
comment = mi home
path = /home/ggarron
read only = No
guest ok = Yes


Ok, the [global] section lets you configure all global parameters, which in this case are:

* workgroup; Lets you specify the windows workgroup
* netbios name; Lets you specify the name with your Linux PC will be seen by windows PCs
* security; specifies the level of security, default is user, but if the users on the windows PCs are not the same as the ones on the Linux PC, you better use share instead
* auth methods; Possible options include guest (anonymous access), sam (lookups in local list of accounts based on netbios name or domain name), winbind (relay authentication requests for remote users through winbindd), ntdomain (pre-winbindd method of authentication for remote domain users; deprecated in favour of winbind method), trustdomain (authenticate trusted users by contacting the remote DC directly from smbd; deprecated in favour of winbind method)
* domain master; Lets you configure your PC as a domain master or not, in this case we prefer not, as our goal is only to share files
* wins support; If you want or not to have wins enabled or not

Now comes the shares section, the string you put between the [] will be how windows will sees the share, in this case share1

path; You put here the path you may want to share
read only; yes or no, depending if you want to permit other users to write on this directories.
gest ok; It is a boolean field, and will permit or not guest users to access this resource

Until here you are able to share files from your Linux PC to your Windows PCs.

If you want to configure Samba using a GUI tool, you may want to install swat (samba web administration tool).

Once again you first need to install the software, which in this case it is almost all you need to do.

sudo apt-get install swat netkit-inetd tcpd

Once installed you can open your browser and enter

http://localhost:901

You will need to login as root to have full access to configure samba by this way.

so you will first need to enable root user on Ubuntu

sudo passwd root

then choose a password for your root user.

could be good to block access to port 901 via your firewall , or use SSL to secure the connection.

How to enable SSL for SWAT?, fortunately it is easy, here is how.

1. Install OpenSSL.
2. Generate certificate and private key.

/usr/bin/openssl req -new -x509 -days 365 -nodes -config /usr/share/doc/packages/stunnel/stunnel.cnf -out /etc/stunnel/stunnel.pem -keyout -etc/stunnel/stunnel.pem

3. Remove SWAT entry from [x]inetd.
4. Start stunnel.

stunnel -p /etc/stunnel/stunnel.pem -d 901 -l /usr/local/samba/bin/swat swat

Update for Vista:

You will need samba 3.0.22 in order to see shares of Linux on Vista, and to be able to mount the Vista's shares on Linux you will maybe need to do it manually using the mount command.

mount -t smbfs -o username=[username] password=[secret] //ip_address/share /mountpoint

Please post your experiences, if you want to know more about Linux, and how to work with it,

Saturday, March 15, 2008

How to install Pidgin 2.2.0 in Ubuntu Feisty

What is Pidgin?

It’s a instant messenger, same like yahoo messenger, skype, irc, msn etc. It also has many common features that found in other messenger clients.

There 2 things that I like from Pidgin:

  • You can chat with AIM, MSN, Yahoo!, XMPP, ICQ, IRC, SILC, Novell GroupWise, Lotus Sametime, Zephyr, Gadu-Gadu, and QQ, all, in the same time.

  • Use less data transfer when we chat. May be you don’t recognize it when you use phone line, internet connection from LAN, broadband, cable modem etc. But, when you use pre paid Mobile and it charges you per kb, same like me, then you will know that you save a lot.

Step 1. Install the library

There are few modules that you have to install. Just open your console (Applications > Accessories > Terminal or Alt-F2 and type xterm).

taufanlubis@zyrex:~$ sudo apt-get install libgtk2.0-dev libxml2-dev gettext libnss-dev libnspr-dev

Password:

Reading package lists… Done

Building dependency tree

Reading state information… Done

gettext is already the newest version.

gettext set to manual installed.

The following extra packages will be installed:

libatk1.0-dev libcairo2-dev libexpat1-dev libfontconfig1-dev

libfreetype6-dev libglib2.0-dev libice-dev libpango1.0-dev libpng12-dev

libsm-dev libx11-dev libxau-dev libxcursor-dev libxdmcp-dev libxext-dev

libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxrandr-dev

libxrender-dev x11proto-core-dev x11proto-fixes-dev x11proto-input-dev

x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-xext-dev

x11proto-xinerama-dev xtrans-dev zlib1g-dev

Suggested packages:

libcairo2-doc libglib2.0-doc libgtk2.0-doc libpango1.0-doc

The following NEW packages will be installed:

libatk1.0-dev libcairo2-dev libexpat1-dev libfontconfig1-dev

libfreetype6-dev libglib2.0-dev libgtk2.0-dev libice-dev libnspr-dev

libnss-dev libpango1.0-dev libpng12-dev libsm-dev libx11-dev libxau-dev

libxcursor-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev

libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev x11proto-core-dev

x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev

x11proto-render-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev

zlib1g-dev

0 upgraded, 35 newly installed, 0 to remove and 0 not upgraded.

Need to get 16.3MB of archives.

After unpacking 49.8MB of additional disk space will be used.

Do you want to continue [Y/n]? y

Get:1 http://archive.ubuntu.com feisty/main x11proto-core-dev 7.0.10-1 [86.3kB]

Get:2 http://security.ubuntu.com feisty-security/main libfreetype6-dev 2.2.1-5ubuntu1.1 [640kB]

Get:3 http://archive.ubuntu.com feisty/main libice-dev 2:1.0.3-1build1 [55.9kB]

Get:4 http://archive.ubuntu.com feisty/main libsm-dev 2:1.0.2-1build1 [25.6kB]

….

….

Setting up libpango1.0-dev (1.16.2-0ubuntu1) …

Setting up libgtk2.0-dev (2.10.11-0ubuntu3) …

Setting up libnspr-dev (1.firefox2.0.0.6+1-0ubuntu1) …

Setting up libnss-dev (1.firefox2.0.0.6+1-0ubuntu1) …

Setting up libxml2-dev (2.6.27.dfsg-1ubuntu3) …

taufanlubis@zyrex:~$

Step 2. Download and Install the package

Extract the package

taufanlubis@zyrex:~$ sudo tar jxvf pidgin-2.2.0.tar.bz2

…..

….

pidgin-2.2.0/share/ca-certs/

pidgin-2.2.0/share/ca-certs/Makefile.am

pidgin-2.2.0/share/ca-certs/Makefile.in

pidgin-2.2.0/share/ca-certs/Makefile.mingw

pidgin-2.2.0/share/ca-certs/Equifax_Secure_CA.pem

pidgin-2.2.0/share/ca-certs/GTE_CyberTrust_Global_Root.pem

pidgin-2.2.0/share/ca-certs/Verisign_RSA_Secure_Server_CA.pem

pidgin-2.2.0/share/ca-certs/Verisign_Class3_Primary_CA.pem

pidgin-2.2.0/pidgin.spec

taufanlubis@zyrex:~$

Configure

taufanlubis@zyrex:~$ cd pidgin-2.2.0/

taufanlubis@zyrex:~/pidgin-2.2.0$./configure

………

………

pidgin 2.2.0

Build GTK+ 2.x UI…………. : yes

Build console UI………….. : no

Build for X11…………….. : yes

Enable Gestures…………… : yes

Protocols to build dynamically : gg irc jabber msn myspace novell oscar qq simple yahoo zephyr

Protocols to link statically.. :

Build with GStreamer support.. : no

Build with D-Bus support…… : no

Build with NetworkManager….. : no

SSL Library/Libraries……… : Mozilla NSS

Build with Cyrus SASL support. : no

Use kerberos 4 with zephyr…. : no

Use external libzephyr…….. : no

Has you………………….. : yes

Use XScreenSaver Extension…. : no

Use X Session Management…… : yes

Use startup notification…… : no

Build with GtkSpell support… : no

Build with plugin support….. : yes

Build with Mono support……. : no

Build with Perl support……. : no

Build with Tcl support…….. : no

Build with Tk support……… : no

Print debugging messages…… : no

Pidgin will be installed in /usr/local/bin.

configure complete, now type ‘make’

taufanlubis@zyrex:~/pidgin-2.2.0$

Build the application

taufanlubis@zyrex:~/pidgin-2.2.0$ sudo make

…..

…..

make[3]: Entering directory `/home/taufanlubis/pidgin-2.2.0/share/ca-certs’

make[3]: Nothing to be done for `all’.

make[3]: Leaving directory `/home/taufanlubis/pidgin-2.2.0/share/ca-certs’

make[3]: Entering directory `/home/taufanlubis/pidgin-2.2.0/share’

make[3]: Nothing to be done for `all-am’.

make[3]: Leaving directory `/home/taufanlubis/pidgin-2.2.0/share’

make[2]: Leaving directory `/home/taufanlubis/pidgin-2.2.0/share’

make[2]: Entering directory `/home/taufanlubis/pidgin-2.2.0′

LC_ALL=C ./intltool-merge -d -u -c ./po/.intltool-merge-cache ./po pidgin.desktop.in pidgin.desktop

Found cached translation database

…..

make[2]: Nothing to be done for `install-exec-am’.

test -z “/usr/local/share/applications” || mkdir -p — “/usr/local/share/applications”

/usr/bin/install -c -m 644 ‘pidgin.desktop’ ‘/usr/local/share/applications/pidgin.desktop’

make[2]: Leaving directory `/home/taufanlubis/pidgin-2.2.0′

make[1]: Leaving directory `/home/taufanlubis/pidgin-2.2.0′

taufanlubis@zyrex:~/pidgin-2.2.0$

Step 3. Run the application

Open Applications > Internet > Pidgin Internet Messenger.

pidgin.png

Installing Ubuntu inside Windows using VirtualBox

Installing Ubuntu inside Windows using VirtualBox 1. My new experiment about Ubuntu installation inside the windows using virtual box. ( Wo...