Tuesday, December 12, 2006

Good Sites for Installing Ubuntu and Tweaking Gnome

The Linux Journal had an excerpt from Beginning Ubuntu Linux: From Novice to Professional by Keir Thomas(Chapter 10) that has some very good tips on personalizing the desktop regarding things like the panels, themes, and login that might be useful. Another great site for installing ubuntu and making some changes at the start including gnome modifications is the Linux FUD blog. Finally, just for reference there is an ubuntu forum article and a blog entry on the Snippets blog under the ubuntu category with instructions on how to use a custom icon for the main menu.

Saturday, December 09, 2006

New or Second Hard Drive on Edgy

The steps for adding a new or second hard drive on Edgy are slightly different because of the new UUID system. The intro stuff is, of course, the same as I stated before for Dapper. Again, install gparted because it makes it easy to see where everything is. So to set up the second hard drive with Edgy, do the following:
1. Decide where you will want to mount your hard drive. This terminology can be confusing. First, your drive has a location such as /dev/hdb1. You then also need a mount point. I decided to to mount the new hard drive in /media/Storage. To do this, type the following in a terminal:
sudo mkdir /media/Storage
You can call your folder within /media whatever you like
2. Find out where the hard drive is located. Use gparted for this. My second hard drive location is dev/hdb1 (your main hard drive is probably hda)
3. We will also need to download two packages using synaptic (acl and eiciel). These will be used later.
4. Find out what your hard drive UUID is. For this, go to the /dev/disk/by-uuid folder. For each "file" you see there, right click and then choose options. Check each one to see which has the "link target" matching your new hard drive. In other words, for me, I was checking to see which one matched hdb1. Once I had the correct one, either write down or copy the name (a string of numbers and letters).
5. Next type the following in a terminal:
sudo gedit /etc/fstab
6. Edit the fstab file by adding the following information at the end (use what is already there for guidance:
(Your hard drive UUID) (Your mount point) (file system type) (options including the acl option) (0) (0)
Mine looks like:
2702b4b2-3225-4f51-9ebe-c04e86e7541g /media/Storage ext3 defaults,acl 0 0
7. Save the file and close it.
8. I next wanted to change the permissions on the new hard drive so that an average user could read, write, and execute the files located on it. To do this, type the following in a terminal:
sudo chmod -R 2777 /media/Storage
(I'm not sure if the sticky bit is needed or not, but it worked and I don't see any harm)
(Substitute /media/Storage with your chosen mount point)
9. Reboot and everything should work.
10. The final step is to make sure all future files and folders created also have read, write, and execute permissions. For this we use the acl and eiciel packages installed above.
11. ACL and Eiciel. Eiciel is the gui for acl. If you right click on your shared folder, you should have a new tab for access controls. (As a side note, if this doesn't work, try running eiciel with the following command and then navigate to your shared folder: gksudo eiciel)
12. Once you are at the shared folder through the acl tab or the command, you want to click the default acl button and also check the default box. You want to make sure that read, write, and execute is checked for everything.
13. The next step is to do the same for all subdirectories. Eiciel does not act recursively so you have to set the default on all subdirectories by again going to those folders and right clicking and choosing the access control tab or by running the above stated command and then again clicking the default acl button and the default check box.
14. You may also want to then read the post of file sharing.

File Sharing on Ubuntu

I have a desktop (I'll call my server) that all of my files are on and a laptop with which I need to access the files on my desktop. Both run ubuntu. I decided to share the files over my wireless network using Samba. My method can compromise network security, so you may want to find an alternative way unless you have a firewall in front of your network as I do. To share, do the following to your server computer:
1. Install Samba by installing the following packages on your server computer: samba and smbfs
2. Go to the folder you want to share under Places. Right click the folder and choose "Share folder."
3. In the dialog box that pops up, choose "Share with SMB"
4. In name, choose a share name--it can be anything you want. Leave the comment field blank.
5. Check "Allow browsing folder" if using Dapper or uncheck "read only" if using Edgy.
6. Click "OK"
7. To make sure that all users have read, write, and execute permissions to the files and subfolders in the shared folder, a couple steps have to be taken. First, type the following in a terminal (I will pretend that your shared folder is /home/Bob):
sudo chmod -R 2777 /home/Bob
(I'm not sure if the sticky bit is needed or not, but it worked and I don't see any harm)
8. Second, we need to set the default permissions for any new files or directories within the shared directory. For this, download two things using synaptic: acl and eiciel. Eiciel is the gui for acl. If you right click on your shared folder, you should have a new tab for access controls. (As a side note, if this doesn't work, try running eiciel with the following command and then navigate to your shared folder: gksudo eiciel)
9. Once you are at the shared folder through the acl tab or the command, you want to click the default acl button and also check the default box. You want to make sure that read, write, and execute is checked for everything.
10. The next step is to do the same for all subdirectories. Eiciel does not act recursively so you have to set the default on all subdirectories by again going to those folders and right clicking and choosing the access control tab or by running the above stated command and then again clicking the default acl button and the default check box.
11. Now we must edit the smb.conf file so type the following in a terminal:
sudo gedit /etc/samba/smb.conf
12. Notice that throughout this file there are headings in brackets such as [Global]. Under the [Global] heading, you will see workgroup=MSHOME. Change this if your workgroup is called something else, otherwise, you can leave it as it is.
13. Next, under the ####Authentication#### section, you will see the following:
; security = user
Remove the semi-colon and change it to look like:
security = share
14. At the bottom of the file, you will see a section under a [ ] heading with your shared folder name. Edit it so that it states the following so that all users on other computers can edit the files:
path = /home/Bob
available = yes
browseable = yes
public = yes
writable = yes
create mask = 0777
directory mask = 0777
15. Save the file and reboot.
16. You can now access these files from your laptop under Places->Network Servers. Find the folder and choose to connect to it.