Τετάρτη 31 Μαρτίου 2010
Zynga Games Flash Fix for Firefox/SeaMonkey
I was browsing some posts and guides and got it to work on seamonkey.
I'll post a small guide here to get it all working.
First of all be sure that you don't have seamonkey installed.
1. Download ubuntuzilla from http://sourceforge.net/projects/ubun...es/ubuntuzilla
Install the .deb package for your system
2. Install Seamonkey
sudo ubuntuzilla.py -a install -p seamonkey
3. Or just upgrade your firefox flash player (you need to have flash installed from the software manager)
You have to run it under sudo cause it wont have the permissions to install.
Follow trough the process (might take some time)
When it asks to link the firefox plugins select "no"
After the installation is finished just copy the file to:
Download http://filebeam.com/0adecd130a0379e32503db8d28e498db
- extract it to desktop or wherever you want.
- copy it in to those folders
/opt/seamonkey/plugins
/usr/lib/firefox/plugins
/usr/lib/firefox-3.5.7/plugins
/usr/lib/flashplugin-installer
(i did it like that cause i didn't really know where exactly to put in the file, but its working)
After you are done with that just start seamonkey. It should work without any problems.
I'm not good in writing guides, but i hope everyone understands how to do it.
It should work for the normal ubuntu version too but i'm using the 64 bit one so i've posted it here.
I've tried it in opera but it was making some problems.
Δευτέρα 29 Μαρτίου 2010
Troubleshooting Startup Problems
Troubleshooting is merely the methodical application of common sense and technical knowledge to the inevitable problems that crop up in a fallen world. If common sense can be codified (and perhaps it can with AI) then it starts with answers to simple questions like: Why? How? What? In this article I'll try to distill the issues, tools and procedures of troubleshooting Windows XP/2003 boot problems into a small amount of easily digestible information that you as a system administrator can write on the back of a note card or store in your PDA for easy access when the proverbial poop hits the fan. Let's begin with the Why question.
Why do startup problems happen?
Windows may fail to start for a variety of reasons, and generally speaking in order of decreasing likelihood here they are:
- Hardware failure
- Bad driver
- Corrupt file or volume
- System misconfiguration
- Virus infection
Let me elaborate. A common reason systems fail to start is because some element of the system's hardware has failed. This could range from the simple (someone kicked the power cord out of its socket) to the obvious (smoke emitting from the machine) to the mysterious (something transient that happens only when the moon is full or during sunspot minimum). Next most common is when you update the driver for some piece of hardware (or the BIOS for that matter) and the system won't boot afterwards. After that comes those mysterious messages we'll talk about shortly that usually indicate some key operating system file has somehow become corrupt or gone missing. Misconfiguration is another possible source of boot problems, but this is somewhat rare as in most cases you'll still be able to boot but one or more services may fail to start or your applications may not function as expected. Finally, virus infection can cause a system to fail to boot, but I've listed this in last place because I'm assuming you've got an antivirus solution in place and you're keeping the antivirus signature files updated, right?
Now that we know why Windows may fail to start properly, let's ask the logical next question: How can we know which of these underlying causes is the one that might be preventing Windows from successfully booting?
Here is where we need to apply our brains and use a bit of common sense to determine what the cause of startup failure might be. Think of the previous list above as a list of disease-causing viruses, and now you have to play doctor and figure out which virus the patient (your sick computer) actually might have. For if you skip this step and try blasting the patient with every possible remedy in your doctor's bag, two things may happen:
- One of the remedies you try may actually make the patient worse and indeed could prove fatal.
- You'll waste a lot of time and the recovery of your patient will be delayed, and your boss may get upset with you as a result since her business is losing money due to downtime.
So careful diagnosis is a step you should always take time for and never avoid, and just like in the medical profession such diagnosis usually begins with your senses. For example, do you smell something burning? Better unplug your system immediately and wait for things to cool off, then open the case and inspect the damage. Do you hear your CPU fan making a slow grinding sound? Power down your system and replace the fan before your processor burns out and needs replacing. Is your video display flickering? Maybe try reseating the video card after checking if the video cable is seated properly.
OK let's assume its not such a simple and obvious problem. Instead, say you get a black screen with one of the following dreaded messages when you try and boot your system:
- "NTLDR is missing"
- "A disk read error occurred"
- "Invalid partition table"
- "Error loading operating system"
- "Could not read from selected boot disk"
- "Windows could not start because the following file is missing or corrupt"
Or you might get a blue screen (called a STOP screen) with some obscure message on it. Or if you're lucky you might make it all the way through the Windows splash screen to the logon box and then suddenly get a dialog box saying "One or more services failed to start". Or your mouse pointer might freeze and your system hang either before or immediately after logon. How can you match these symptoms to the underlying condition that might be causing them? First let's look at some possible "black screen" messages that can occur after the BIOS POST routine finishes but before the Windows splash screen appears:
Symptom Probable Cause Master boot record is corrupt due to hard disk errors or virus infection Boot sector is corrupt due to hard disk errors or virus infection Boot.ini file is corrupt, missing, or needs updating. Boot volume is corrupt or the referenced system file is missing.
In addition to these error messages, a variety of other startup problems can occur including:
- Blue screens. These are typically caused by hardware failure or driver problems but can also be due to virus infection.
- Hung system. These are typically caused by buggy drivers or by registry corruption but can also be due to virus infection.
- Dialog box saying "One or more services failed to start". This is typically caused by misconfiguration or registry corruption but can also be caused by application incompatibility of some form.
So what should you do to resolve such problems?
How to resolve startup problems
Like a doctor's mysterious black medical bag full of medical instruments (at least in old movies on TV) the system administrator also has a set of tools provided by Microsoft for resolving startup problems like the ones in the table above. In a nutshell, here's a quick inventory of the main tools:
- Last known good. Restores the HKLM\System\CurrentControlSet portion of the registry its version during the last successful logon to the system.
- Safe mode. Starts Windows with a minimal set of drivers and creates a record of which drivers load in %windir%\Ntbtlog.txt.
- System Restore. Windows XP only feature to restore system to previously saved configuration.
- Recovery Console. Boots to a command line that allows you to run various commands, see this article by Johannes Helmig for more info.
- Automated System Recovery (ASR). Restores the boot volume from backup, see this article by Johannes Helmig for more info.
- Repair. Run Windows Setup from your product CD and select the option to try and repair your installation.
Which tool should you use to address each of the symptoms we described earlier? Assuming there is no obvious hardware problem (no funny smell) and you've already asked yourself the Golden Question ("What was the last thing I did to this system?") then here's a quick outline that maps the type of knife (may be several in order of severity) to the kind of surgery (underlying problem or visible symptom) you need to perform on your system:
Problem/Symptom | Tool(s) to Use |
Corrupt master boot record | Recovery Console (fixmbr) |
Corrupt boot sector | Recovery Console (fixboot) |
Corrupt or missing boot.ini | Recovery Console (bootcfg /rebuild) |
Corrupt system file | Recovery Console (chkdsk) |
Corrupt registry | Recovery Console (chkdsk) |
Blue screen | See this resource first |
Hung system | Last known good |
"One or more services failed to start" | Don't logon! Reboot and select last known good, log on, undo the last configuration steps you performed. |
Τετάρτη 24 Μαρτίου 2010
Learn how to design a partition layout for disks on a Linux system
In this article, learn to design a disk partitioning layout for a Linux system. Learn to:
Allocate filesystems and swap space to separate partitions or disks
Tailor the design to the intended use of the system
Ensure the system can be booted
This article helps you prepare for Objective 102.1 in Topic 102 of the Linux Professional Institute's Junior Level Administration (LPIC-1) exam 101. The objective has a weight of 2.
Note: This article deals mostly with planning the layout. For the implementation steps, see the articles for Topic 104 (described in our series roadmap).
Prerequisites
To get the most from the articles in this series, you should have a basic knowledge of Linux and a working Linux system on which you can practice the commands covered in this article. Sometimes different versions of a program will format output differently, so your results may not always look exactly like the listings and figures shown here.
Filesystem overview
A Linux filesystem contains files that are arranged on a disk or other block storage device in directories. As with many other systems, directories on a Linux system may contain other directories called subdirectories. Unlike a system such as Microsoft® Windows® with a concept of separate file systems on different drive letters (A:, C:, etc.), a Linux filesystem is a single tree with the / directory as its root directory.
You might wonder why disk layout is important if the filesystem is just one big tree. Well, what really happens is that each block device, such as a hard drive partition, CD-ROM, or floppy disk, actually has a filesystem on it. You create the single tree view of the filesystem by mounting the filesystems on different devices at a point in the tree called a mount point.
Usually, the kernel starts this mount process by mounting the filesystem on some hard drive partition as /. You may mount other hard drive partitions as /boot, /tmp, or /home. You may mount the filesystem on a floppy drive as /mnt/floppy, and the filesystem on a CD-ROM as /media/cdrom1, for example. You may also mount files from other systems using a networked filesystem such as NFS. There are other types of file mounts, but this gives you an idea of the process. While the mount process actually mounts the filesystem on some device, it is common to simply say that you "mount the device," which is understood to mean "mount the filesystem on the device."
Now, suppose you have just mounted the root file system (/) and you want to mount a CD-ROM, /dev/sr0, at the mount point /media/cdrom. The mount point must exist before you mount the CD-ROM over it. When you mount the CD-ROM, the files and subdirectories on the CD-ROM become the files and subdirectories in and below /media/cdrom. Any files or subdirectories that were already in /media/cdrom are no longer visible, although they still exist on the block device that contained the mount point /media/cdrom. If the CD-ROM is unmounted, then the original files and subdirectories become visible again. You should avoid this problem by not placing other files in a directory intended for use as a mount point.
Table 1 shows the shows the directories required in / by the Filesystem Hierarchy Standard (for more detail on FHS, see Resources).
Table 1. FHS directories in /
| Directory | Description |
| bin | Essential command binaries |
| boot | Static files of the boot loader |
| dev | Device files |
| etc | Host-specific system configuration |
| lib | Essential shared libraries and kernel modules |
| media | Mount point for removable media |
| mnt | Mount point for mounting a filesystem temporarily |
| opt | Add-on application software packages |
| sbin | Essential system binaries |
| srv | Data for services provided by this system |
| tmp | Temporary files |
| usr | Secondary hierarchy |
| var | Variable data |
Partitions
The first SCSI drive is usually /dev/sda. On an older Linux system, the first IDE hard drive is /dev/hda. With the advent of serially attached (SATA) IDE drives, a mixed PATA/SATA system would sometimes use /dev/hda for the first PATA drive and /devsda for the first SATA drive. On newer systems, all IDE drives are named /dev/sda, /dev/sdb, and so on. The change of name for IDE drives is a result of the hotplug system, which initially supported USB drives. Hotplug allows you to plug in new devices and use them immediately, and is now used for all devices whether they are built into the system or plugged later into a running system using USB or Firewire (IEEE 1394) or potentially other types of connection.
Traditionally, a hard drive is formatted into 512 byte sectors. All the sectors on a disk platter that can be read without moving the head constitute a track. Disks usually have more than one platter. The collection of tracks on the various platters that can be read without moving the head is called a cylinder. The geometry of a hard drive is expressed in cylinders, tracks (or heads) per cylinder, and sectors/track. At the time of this writing, drive manufacturers are starting to introduce disks with 4K sectors. If a filesystem still assumes 512-byte sectors, you may lose performance if a partition does not start at a sector that is on a 4K boundary.
Limitations on the possible sizes for cylinders, heads, and sectors used with DOS operating systems on PC systems resulted in BIOS translating geometry values so that larger hard drives could be supported. Eventually, even these methods were insufficient. More recent developments in disk drive technology have led to logical block addressing (LBA), so the CHS geometry measurements are less important, and the reported geometry on a modern disk may bear little or no relation to the real physical sector layout. The larger disks in use today have forced an extension to LBA known as LBA48, which reserves up to 48 bits for sector numbers.
The space on a hard drive is divided (or partitioned) into partitions. Partitions cannot overlap; space that is not allocated to a partition is called free space. The partitions have names like /dev/hda1, /dev/hda2, /dev/hda3, /dev/sda1, and so on. IDE drives are limited to 63 partitions on systems that do not use hotplug support for IDE drives. SCSI drives, USB drives, and IDE drives supported by hotplug are limited to 15 partitions. A partition is often allocated as an integral number of cylinders (based on the possibly inaccurate notion of a cylinder).
If two different partitioning programs have different understandings of the nominal disk geometry, it is possible for one partitioning program to report an error or possible problem with partitions created by another partitioning program. You may also see this kind of problem if a disk is moved from one system to another, particularly if the BIOS capabilities are different.
You can see the nominal geometry on a Linux system using either the parted or fdisk tools. Older Linux systems also reported geometry in the /proc filesystem, in a file such as /proc/ide/hda/geometry, a file that may not be present on newer systems. Listing 1 shows how to use the fdisk command to display the partitions and geometry of an IDE hard drive with SATA attachment. The -v parameter of fdisk shows the version. You will need to be root or have root authority via sudo, as shown here, to display or manipulate the partition table.
Listing 1. Hard disk geometry
ian@attic4:~$ fdisk -v
fdisk (util-linux-ng 2.16)
ian@attic4:~$ sudo fdisk /dev/sdb
[sudo] password for ian:
The number of cylinders for this disk is set to 30401.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000404d6
Device Boot Start End Blocks Id System
/dev/sdb1 1 25 200781 83 Linux
/dev/sdb2 26 12965 103940550 83 Linux
/dev/sdb3 12966 30401 140054670 83 Linux
Command (m for help):
In Listing 1, note that fdisk prints a warning about the nominal position for the end of cylinder 1024. Cylinder 1024 is important in some older systems where the BIOS is only able to boot partitions that are completely located within the first 1024 cylinders of a disk. This is most likely to occur in a BIOS that does not have LBA support, or some older boot managers. It is not usually a problem in modern machines, although you should be aware that the limit may exist.
You can use fdisk to display units in sectors, using the -u option, or you can use the u subcommand in interactive mode to toggle between sectors and cylinders. The parted command supports several different units. Listing 2 illustrates the use of different units in parted for the same disk as used in Listing 1.
Listing 2. Using different units with parted
ian@attic4:~$ sudo parted /dev/sdb
[sudo] password for ian:
GNU Parted 1.8.8.1.159-1e0e
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help u
unit UNIT set the default unit to UNIT
UNIT is one of: s, B, kB, MB, GB, TB, compact, cyl, chs, %, kiB, MiB,
GiB, TiB
(parted) p
Model: ATA HDT722525DLA380 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 206MB 206MB primary ext3
2 206MB 107GB 106GB primary ext4
3 107GB 250GB 143GB primary ext3
(parted) u s
(parted) p
Model: ATA HDT722525DLA380 (scsi)
Disk /dev/sdb: 488397168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 63s 401624s 401562s primary ext3
2 401625s 208282724s 207881100s primary ext4
3 208282725s 488392064s 280109340s primary ext3
(parted) u chs
(parted) p
Model: ATA HDT722525DLA380 (scsi)
Disk /dev/sdb: 30401,80,62
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 30401,255,63. Each cylinder is 8225kB.
Partition Table: msdos
Number Start End Type File system Flags
1 0,1,0 24,254,62 primary ext3
2 25,0,0 12964,254,62 primary ext4
3 12965,0,0 30400,254,62 primary ext3
(parted)
Note that the apparent discrepancy between the starting cylinder and ending cylinders shown by parted and fdisk output is due to the fact that parted starts counting cylinders at 0, while fdisk starts counting them at 1. Listing 3 shows that fdisk does have the same starting and ending sector as parted.
Listing 3. Checking start and end sector numbers
ian@attic4:~$ sudo fdisk -ul /dev/sdb
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000404d6
Device Boot Start End Blocks Id System
/dev/sdb1 63 401624 200781 83 Linux
/dev/sdb2 401625 208282724 103940550 83 Linux
/dev/sdb3 208282725 488392064 140054670 83 Linux
ian@attic4:~$ echo $(( 208282725 / 255 / 63 ))
12965
Partition types
There are three types of partition on IDE drives: primary, logical, and extended. The partition table is located in the master boot record (MBR) of a disk. The MBR is the first sector on the disk, so the partition table is not a very large part of it. This limits the number of primary partitions on a disk to four. When more than four partitions are required, as is often the case, one of the primary partitions must instead become an extended partition.
An extended partition is simply a container for one, or usually more, logical partitions. This partitioning scheme was originally used with MS DOS and PC DOS and permits PC disks to be used by DOS, Windows, or Linux systems. A disk may contain only one extended partition. Data is stored in the logical partitions within the extended partition. You cannot store data in an extended partition without first creating a logical partition within it.
Linux numbers primary or extended partitions as 1 through 4, so dev/sda may have four primary partitions, /dev/sda1, /dev/sda2, /dev/sda3, and /dev/sda4. Or it may have a single primary partition /dev/sda1 and an extended partition /dev/sda2. If logical partitions are defined, they are numbered starting at 5, so the first logical partition on /dev/sda will be /dev/sda5, even if there are no primary partitions and one extended partition (/dev/sda1) on the disk. So if you want more than four partitions on an IDE drive, you will lose one partition number to the extended partition. Although the theoretical maximum number of partitions on an IDE drive is now limited to 15 for kernels with hotplug, you may or may not be able to create the last few. Be careful to check that everything can work if you plan on using more than 12 partitions on a drive.
The disk used in the earlier examples has three primary partitions, all formatted for Linux use. Two use the ext3 filesystem, while the other one uses ext4. Listing 4 shows the output from the parted command p for an internal drive with primary, extended, and logical partitions on a Ubuntu 9.10 system and for a USB drive attached to a Fedora 12 system. Note the different filesystem types. Note also that you can specify one or more parted commands on the command line to avoid interactive mode.
Listing 4. Displaying the partition table with parted
ian@attic4:~$ sudo parted /dev/sda u s p
[sudo] password for ian:
Model: ATA WDC WD6401AALS-0 (scsi)
Disk /dev/sda: 1250263728s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 63s 2040254s 2040192s primary ext3
2 2040255s 22523129s 20482875s primary linux-swap(v1)
4 22523130s 1250258624s 1227735495s extended boot
5 22523193s 167397299s 144874107s logical ext3
6 167397363s 310761359s 143363997s logical ext3
7 310761423s 455442749s 144681327s logical ext3
8 455442813s 600092009s 144649197s logical ext3
[root@echidna ~]# parted /dev/sdc p
Model: WD My Book (scsi)
Disk /dev/sdc: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 135GB 135GB primary fat32 lba
2 135GB 750GB 616GB extended
5 135GB 292GB 157GB logical ext3
6 292GB 479GB 187GB logical ext3
7 479GB 555GB 76.5GB logical ext3
8 555GB 750GB 195GB logical ext3
Allocating disk space
As mentioned earlier, a Linux filesystem is a single large tree rooted at /. It is fairly obvious why data on floppy disks or CD-ROMs must be mounted, but perhaps less obvious why you should consider separating data that is stored on hard drives. Some good reasons for separating filesystems include:
Boot files. Some files must be accessible to the BIOS or boot loader at boot time.
Multiple hard drives. Typically each hard drive will be divided into one or more partitions, each with a filesystem that must be mounted somewhere in the filesystem tree.
Shareable files. Several system images may share static files such as executable program files. Dynamic files such as user home directories or mail spool files may also be shared, so that users can log in to any one of several machines on a network and still use the same home directory and mail system.
Potential overflow. If a filesystem might fill to 100 percent of its capacity, it is usually a good idea to separate this from files that are needed to run the system.
Quotas. Quotas limit the amount of space that users or groups can take on a filesystem.
Read-only mounting. Before the advent of journaling filesystems, recovery of a filesystem after a system crash often took a long time. Therefore, filesystems that seldom changed (such as a directory of executable programs) could be mounted read-only so as to not waste time for checking it after a system crash.
In addition to the filesystem use covered so far, you also need to consider allocating swap space on disk. For a Linux system, this is usually one, or possibly multiple, dedicated partitions.
Making choices
Let's assume you are setting up a system that has at least one hard drive, and you want to boot from the hard drive. (This article does not cover setup for a diskless workstation that is booted over a LAN or considerations for using a live CD or DVD Linux system.) Although it may be possible to change partition sizes later, this usually takes some effort, so making good choices up front is important. Let's get started.
Your first consideration is to ensure that your system will be bootable. Some older systems have a limitation that the BIOS can boot only from a partition that is wholly located within the first 1024 cylinders of disk. If you have such a system, then you must create a partition that will eventually be mounted as /boot that will hold the key files needed to boot the system. Once these have been loaded, the Linux system will take over operation of the disk, and the 1024 cylinder limit will not affect further operation of the system. If you need to create a partition for /boot, approximately 100 megabytes (MB) is usually sufficient.
Your next consideration is likely to be the amount of required swap space. With current memory prices, swap space represents a very slow secondary memory. A once common rule of thumb was to create swap space equivalent to the amount of real RAM. Today, you might want to configure one or two times real RAM for a workstation so that you can use several large programs without running out of RAM. Even if it is slow to switch between them, you are probably working in only one or two at any given time.
A large swap space is also advisable for a system with very small memory. For a server, you might want to use a swap space of about half of your RAM, unless you are running an application that recommends a different value. In any event, you should monitor server memory usage so that you can add real RAM or distribute the workload across additional servers if needed. Too much swapping is seldom good on a server. It is possible to use a swap file, but a dedicated partition performs better.
Now we come to a point of divergence. Use of a personal workstation tends to be much less predictable than use of a server. My preference, particularly for new users, is to allocate most of the standard directories (/usr, /opt, /var, etc.) into a single large partition. This is especially useful for new users who may not have a clear idea of what will be installed down the line. A workstation running a graphical desktop and a reasonable number of development tools will likely require 5 or more gigabytes of disk space plus space for user needs. Some larger development tools may require several gigabytes each. I usually allocate somewhere between 40 GB and 60 GB per operating system, and I leave the rest of my disk free to load other distributions.
Server workloads will be more stable, and running out of space in a particular filesystem is likely to be more catastrophic. So, for them, you will generally create multiple partitions, spread across multiple disks, possibly using hardware or software RAID or logical volume groups.
You will also want to consider the workload on a particular filesystem and whether the filesystem is shared among several systems or used by just one system. You may use a combination of experience, capacity planning tools, and estimated growth to determine the best allocations for your system.
Regardless of whether you are configuring a workstation or a server, you will have certain files that are unique for each system located on the local drive. Typically, these include /etc for system parameters, /boot for files needed during boot, /sbin for files needed for booting or system recovery, /root for the root user's home directory, /var/lock for lock files, /var/run for running system information, and /var/log for log files for this system. Other filesystems, such as /home for user home directories, /usr, /opt, /var/mail, or /var/spool/news may be on separate partitions, or network mounted, according to your installation needs and preferences.
Sharing Folders on a Network
This is often thought of as one of the more difficult aspects of trying to use Linux on a mostly-Windows network. Just a few short years ago this was truth. But now things are very different and sharing files and folders with Linux is as simple (if not simpler) than it is on a Windows machine. I will demonstrate how to share out folders using the GNOME desktop.
Of course sharing folders between Linux, Windows and Mac requires the help of a very powerful tool called Samba. Since I want to illustrate just how easy the process of sharing folders I won't go into the details of Samba - it can quickly become overwhelming. Instead I will show you how this is done from the perspective of an end- ser.
Naturally this can only work with the correct software installed. Samba is, obviously, a must. So let's get all of the software installation out of the way. Click on System > Administration > Synaptic Package Manager and then do the following:
- Search for "samba" (no quotes).
- Mark the following packages for installation: samba, libpam-smbpass, nautilus-share (these should pick up all the dependencies you need for installation).
- Click Apply to install.
That's it. You are now ready to set up file sharing.
Let's take a look at the steps for file sharing with the GNOME desktop.
Figure 2
Nautilus is the file manager for GNOME. Say you want to share out the folder ~/Documents. Click on Places > Home Folder and Nautilus will open in your ~/ directory (see Figure 2).
Step 2: Open up folder sharing settings.
Right click on the Documents folder. This will bring up a menu where you will find listed Sharing Options. Select that option from the menu.
Step 3: Configure sharing.
From the Folder Sharing window you will want to configure the following:
Share this folder: Enable this by clicking the checkbox.
Share name: Give the share a name.
Comment: Give the share a comment (this is optional, but useful in case there are similar share names on your network).
Allow others to create and delete files in this folder: Check this if you want to allow others to add and remove files in this share.
Guest access: If you want to allow everyone access to this share (even people without an account on your machine), check this box.
Once you have filled out all of the information click "Create Share." When you click this button a warning window will appear informing you that Nautilus needs to add some permissions to the target folder. Allow this (or the share won't work) by clicking "Add the permissions automatically."
When you have successfully shared out this folder you will know because 1) The icon on the share will change (the new icon will have a small hand below the icon indicating it is a shared folder) and 2) It will (after a moment) appear in your Windows My Network Places window. If the share doesn't show up there you can easily find it by entering \\IP_ADDRESS_OF_SHARE in the Explorer address bar, at which point the share will certainly show up. If you would like these shares to show up in My Network Places (in Windows) and they don't automatically, it means you might have to edit your /etc/samba/smb.conf file. But don't worry; it's so simple anyone can do it. Open up a terminal window and follow these steps:
- Enter the command sudo nano /etc/samba/smb.conf
- Search for the line workgroup = WORKGROUP
- Change the section of the above line (to the right of the "=" sign) to match the workgroup you are working with.
- Save and close the file by hitting
x followed by hitting the y key (for "yes"). - Restart Samba with the command sudo /etc/init.d/samba restart
That's it. Now your Ubuntu machine will be seen in the Windows "My Network Places."
To connect to this share on a Mac you would simply follow these steps:
- Open up Finder.
- Click
k. - Enter the IP address of your share and click Connect.
- In the new window select the share you want to connect to.
- Enter the authentication information and click OK.
You are now connected to that share. You can save this connection as a bookmark in Finder to make things easier.
But what about connecting to shared folders that reside on a Windows machine? This is equally as easy. In the GNOME desktop click Places > Connect to Server. When the new window opens up (see Figure 3) fill out the following:
- Service type: Windows Share
- Server: IP Address of machine with Share
- Share: Name of folder that is shared
Once you have that all filled out, click Connect and you should be connected to that shared folder. This, of course, will only work if said folder on the Windows machine is shared out onto the network.