Archive for Ubuntu

Automatically Mounting Windows SMB Shares in Ubuntu v3

Mounting SMB SharesThis post is an update to two posts I wrote previously on how to make your network shares mount automatically when you start up your Ubuntu Linux computer. In this method we modify the fstab file so that when all the file systems are mounted the network shares are mounted as well.

This method works for me in Ubuntu Gusty Gibbon 7.10 and is probably the most secure. I have only tested this on a wired connection, so I don’t know exactly what will happen if you use this method when using a wireless connection.

First you have to install smbfs:

sudo apt-get install smbfs

Then create a folder inside of the /media directory to mount the share on:

sudo mkdir /media/Storage

You can call it whatever you want, I call it Storage. If you change the name remember to change it below when we edit the fstab file.

Create a credentials file in /root so that you can save your password and have it protected by the root account:

sudo gedit /root/.cifscredentials

Add the following information to the file, but change Guest to your SMB username and add your SMB password.

username=Guest
password=

Note: If your fileserver allows Guest access you can just leave the file as above. If it is password protected you have to put in your username and password.

Save and close the .cifscredentials file.

Now open up your fstab file so that you can add mounting instructions:

sudo gedit /etc/fstab

Add the following line to the bottom of the file:

//192.168.0.10/SHARENAME /media/Storage cifs auto,iocharset=utf8,uid=USER,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0

You have to change the following information:
Change 192.168.0.10 to the IP address or DNS name of your server
Change SHARENAME to the share you want to mount
Change USER to your Ubuntu username

The file_mode=0775,dir_mode=0775 part sets the mounted directory as read/write for all users so long as the SMB username you set in .cifscredentials has read/write access.

Now save the file and run the following command to test to see if you mount now works:

sudo mount -a

If that worked you should see a new drive icon on your desktop that lets you access your share. Now try rebooting and see if your shares mount automatically. If everything went as planned you will have a nice little drive mounted on your desktop every time you start up.

SMB Shares with Spaces in the Names

If you have a share with a space in the path you can replace the space with \040. For example:

//192.168.0.10/Storage\040130 /media/Storage\040130 cifs auto,iocharset=utf8,uid=matt,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0

This mounts my 130GB drive on my fileserver to a local directory called Storage 130.

Comments (43)

Amazed with Ubuntu Gusty GIbbon 7.10

I just wanted to say how impressed I am with the latest release of Ubuntu. 7.10, or Gusty, whichever you want to call it has really been an update about making it easier for mainstream (windows?) computer users to get started on linux. Here is a list of some of the improvements I have noticed in my daily use:

  • The Screens and Graphics utility: If Xorg can not start because of a misconfigured display adapter instead of failing to an error report like in previous versions, this GUI utility is automatically launched so you can select appropriate settings. It’s not foolproof, but it is leaps and bounds ahead of what you used to get.
  • Automatic installation of plugins: I went to a website with flash, Firefox told me it wasn’t installed and asked me if I wanted to install the plugin. Just like on Windows and OS X it worked flawlessly. I tried to open a video file in Totem and there was not codec installed for it. Totem prompted me to install the gstreamer packages, installed them, and then continued to play the video – better than windows. I opened Amarok and tried to play an MP3 file. It notified me that MP3 support was not installed and asked if I would like to install it. I went to the Apple Trailers website and they all worked. This is probably a result of me opening that video file in Totem earlier. All this was done without me having to pull up a terminal window once.
  • Compiz Fusion: It has all the eye candy of Compiz Fusion installed by default, you just have to enable it. If you want access to all the advanced effects just install the compizconfig-settings-manager package.
  • Speed: I dont know why, but it runs faster. Firefox launches faster and the whole system is more responsive. The boot process seems quicker as well.

The next version of Ubuntu is going to be a Long Term Support version, which means over the next 6 months they are mainly going to be working on bug fixes and stability. I really think Ubuntu is going to take off in the next year. Soon enough all that will be holding them back will be that ugly yellow colour scheme.

Comments

Backing Up Your Files on Ubuntu Linux

The reality of having a new Ubuntu release every 6 months means you either upgrade your distro and deal with the inevitable bugs or you wipe your system and install a fresh copy from scratch. Before you wipe your system you are going to want to back up any files you have on your drive. This can be done with a simple command.

First switch to root:

sudo su

Then run the tar command:

tar cvpzf /backup.tgz /home

Running the above command will create an archive file in the root folder of all of the files in your home directory including all the settings stored in the hidden folders. Be careful though, if you have a lot of large files in your home directory this archive is going to be quite large. I usually manually backup any ISOs or video files before creating the archive. Also remember to empty your trash or the files in there will be backed up too. I usually just use this command to back up any documents and pictures I have. The great thing is this will backup your Firefox bookmarks and everything.

Now, I also want to save a few configuration files in my backup so I don’t have to recreate them on the new system. I’m talking about my xorg.conf, fstab, and sources.list files. It is easy enough to add these files to the archive, just tack the path and filename onto the end of the command and they will be included.

tar cvpzf /backup-oct-2007.tgz /home /etc/fstab /etc/X11/xorg.conf /etc/apt/sources.list

Now just copy this backup file onto a thumb drive or file server and you are good to reformat your drive and install your fresh copy of the latest Ubuntu. Once installed I just open the archive and extract any files I want to keep then turf the archive.

Comments

Fixing Issues With Usplash on a Widescreen Monitor

The Ubuntu boot spash screen has never worked on my Dell 2405fpw widescreen monitor until now. The closest I ever got was to get the shutdown splash to work by editing the /etc/usplash.conf file. Well, I just installed 7.10 and after a little bit of digging today I finally figured out how to get my boot splash to display properly. PS, my issue with the boot splash was that the picture was squashed and skewed across the middle of the screen.

This is a three step process. First figure out what display levels are supported by your frame buffer, then edit your grub configuration to use one of the 16 bit resolutions supported, then edit your usplash.conf file to use a similar resolution. I had used this method before with no luck, then I came across a bug report that said you have to run sudo dpkg-reconfigure usplash because when Usplash is started during boot your root folder has not been mounted yet (meaning /etc/usplash.conf can not be read). This worked like a charm.

First we install hwinfo so we can use it to find out what resolutions we support.

sudo apt-get install hwinfo

Then I ran hwinfo and redirected the output to a text file. This way we can try a few different resolutions and we only have to reference the file, not run the command every time.

hwinfo --framebuffer > framebuffer.txt

Here is what my framebuffer.txt file looks like:

02: None 00.0: 11001 VESA Framebuffer
  [Created at bios.447]
  Unique ID: rdCR.z77_s6lubfB
  Hardware Class: framebuffer
  Model: "NVIDIA G70 Board - p317h2  "
  Vendor: "NVIDIA Corporation"
  Device: "G70 Board - p317h2  "
  SubVendor: "NVIDIA"
  SubDevice:
  Revision: "Chip Rev"
  Memory Size: 256 MB
  Memory Range: 0xe0000000-0xefffffff (rw)
  Mode 0x0300: 640x400 (+640), 8 bits
  Mode 0x0301: 640x480 (+640), 8 bits
  Mode 0x0303: 800x600 (+800), 8 bits
  Mode 0x0305: 1024x768 (+1024), 8 bits
  Mode 0x0307: 1280x1024 (+1280), 8 bits
  Mode 0x030e: 320x200 (+640), 16 bits
  Mode 0x030f: 320x200 (+1280), 24 bits
  Mode 0x0311: 640x480 (+1280), 16 bits
  Mode 0x0312: 640x480 (+2560), 24 bits
  Mode 0x0314: 800x600 (+1600), 16 bits
  Mode 0x0315: 800x600 (+3200), 24 bits
  Mode 0x0317: 1024x768 (+2048), 16 bits
  Mode 0x0318: 1024x768 (+4096), 24 bits
  Mode 0x031a: 1280x1024 (+2560), 16 bits
  Mode 0x031b: 1280x1024 (+5120), 24 bits
  Mode 0x0330: 320x200 (+320), 8 bits
  Mode 0x0331: 320x400 (+320), 8 bits
  Mode 0x0332: 320x400 (+640), 16 bits
  Mode 0x0333: 320x400 (+1280), 24 bits
  Mode 0x0334: 320x240 (+320), 8 bits
  Mode 0x0335: 320x240 (+640), 16 bits
  Mode 0x0336: 320x240 (+1280), 24 bits
  Mode 0x033d: 640x400 (+1280), 16 bits
  Mode 0x033e: 640x400 (+2560), 24 bits
  Mode 0x0345: 1600x1200 (+1600), 8 bits
  Mode 0x0346: 1600x1200 (+3200), 16 bits
  Mode 0x0347: 1400x1050 (+1400), 8 bits
  Mode 0x0348: 1400x1050 (+2800), 16 bits
  Config Status: cfg=new, avail=yes, need=no, active=unknown

The information you are interested in is the Mode. If you want to set your boot resolution to 1024×768 at 16 bits you want to use mode 0×0317. As you can see my frame buffer doesnt support any widescreen resolutions. I picked the 1280×1024@16bit, which was 0x031a on my computer. I tried some of the higher resolutions as well as some of the lower ones. They all resulted in different issues from only displaying as black and white, to not displaying anything at all. both 1024 and 1280 seemed to work ok though, so I went with the higher one. Just pick one and go with it. I should note that these resolutions will not effect the resolution once Ubuntu is completely started up. They are unrelated.

Open up the grub menu configuration to edit the resolution:

sudo gedit /boot/grub/menu.lst

find the following line:

# defoptions=quiet splash vga=

and modify it so that it has your mode after the vga=. Here is what mine looks like:

# defoptions=quiet splash vga=0x031a

Do not uncomment the above line or it will not work. It has to be commented.

Save and close the file and then update grub:

sudo update-grub

Now you want to update usplash to use the same resolution that you set for boot. Open the Usplash configuration file:

sudo gedit /etc/usplash.conf

I changed mine to look like this:

# Usplash configuration file
xres=1280
yres=800

Now you will notice I set my boot resolution to 1280×1024 but my Usplash resolution is set to 1280×800. This is because I have a widescreen monitor and when I set Usplash to 1280×1024 the boot logo was stretched. I changed it to 800 to counteract the stretch. If you have a standard 4:3 monitor you should set them both to 1280×1024. Otherwise, try what I did and see if it works for you.

This is the most important part. You have to update Usplash or the configuration change you just made will have no effect. So run the following command:

sudo dpkg-reconfigure usplash

Now reboot and cross your fingers. You might have a working boot splash. If you dont, try changing the mode in grub and the resolution in Usplash to something lower and reboot again. Trial and error is the only way you will find what works best on your system. Good luck!

Comments

Installed Kubuntu 7.10 Last Night

Well, 2 nights ago I whacked my SUSE 10.2 install and tried installing OS x86 10.4.8. It looked like it was working, but stalled when trying to extract the files. I was able to format my SATA drive and everything. Since I do have an AMD CPU and an Nforce4 chipset it looks like there might be some problems getting it to install on a SATA drive out of the box. I’m downloading a different ISO to give it a try, but in the meantime I had to get something up and running. So last night I installed Kubuntu 7.10. I have had it downloaded since it was released but I didn’t want to take the time to install it.

First off I had the same two problems I always have with Linux. I had to install the nvidia-glx drivers and I had to remove the bluez packages so that my keyboard and mouse would work without having to reconnect the dongle every time I start up. This only took me about 10 minutes to do as opposed to the first time when it took me hours of research to figure out. Oh yeah, and usplash still doesnt work. By adding a better resolution to /etc/usplash.conf I was able to get the shutdown splash to display, but the boot splash is all distorted.

I must say, I am happy with how responsive it is. It does seem a little quicker than SUSE was. However, there is a lot of software that SUSE came with preinstalled that Kubuntu doesn’t. Firefox for example. It also seems to boot faster. From GRUB to KDM it’s about 24 seconds on my AMD 3700+. I was able to add my windows shares on my fileserver to the fstab file and they mount automatically when I boot. On SUSE I had to do sudo mount -a every time I booted up to get the shares to mount. That was a pain in the ass because if I started Amarok before running the mount command Amarok wouldnt be able to find my music on the server and would delete it all from the database. I would have to reindex my entire music folder again.

There is this issue with kdesu where sometimes it can’t find the current screen session for starting elevated applications. There is a bug report on this but it wasn’t fixed before Feisty was released. In that bug report kko has posted a fix that worked for me. It’s more of a workaround though because you have to do it every time it gets messed up.

I also had to install rdesktop for krdp to work. It’s strange that they had krdp installed, but not the required rdesktop package. Of course I also had to install MP3 support and all that jazz.

Those are the only things I can think of now that I had issues with. I think I am going to hold off on installing Beryl, or whatever it’s called now. I like how stable this stock install has been. Eventually I’d like to have a tri-boot system OS X, XP, and some KDE based linux, but I need to get an IDE drive that I can try OS X on before I attempt that.

Comments

Ubuntu 7.04 Fiesty Fawn Released

Ubuntu 7.07 has been released today. I was looking forward to upgrading from 6.10, but since I installed openSUSE the other day I don’t think I want to go back to Gnome. I love KDE. Gnome is great for people who dont want options. If you want it simple, stick with Ubuntu and Gnome.

Ubuntu 7.04 released

I may break down and try Kubuntu which was also released today, but I don’t know. It is usually a few hours work getting Linux running on my GeForce 7800/Dell 2405 video card/monitor combination. Plus, I have read that previous versions of Kubuntu were not as quick as openSUSE. This release claims to be quicker than past ones, but will it really be worth it?

In the end I will probably end up trying it out. I’ll post back in the future with a comparison if I do.

Comments

Ubuntu 7.04 Fiesty Fawn is almost out, I’m almost excited

Ubuntu will be releasing 7.04 Feisty Fawn within the next month and I’m pretty excited about it. Aside from the bluetooth issues I had with 6.10, the current version has served me well, and there has been a lot of good buzz about 7.04. By the way, in case you people aren’t up to speed, the Ubuntu “versions” are named by year.month since each release is significant enough to warrant a whole new version number.

At the same time as being excited there is sooo much I have customized on my current install that I dread having to go back and do it all over again now that it is working good. On top of that, the upgrade process NEVER works 100%, and since I have done so much to my install I’m guessing I would have a hell of a time with that. Here is the stuff I can think of off the top of my head that I will have to do:

Of course I’ll have to backup all of my files and settings from my current install. I found a pretty good method of making a tarball backup of everything, so I’m not so worried about that.

After I install 7.04:

  • My monitor never works out of the box so modify xorg.conf to fix that
  • Install the nVidia driver
  • Install Beryl
  • Tweak my Xorg.conf file for video/mouse/keyboard settings
  • Install automatix and all of the extra apps
  • Install Fasterfox, del.icio.us, and adsense extensions to Firefox
  • Install smbfs and setup automatic mounting of shares from my fileserver
  • Install Amarok
  • Configure my desktop/theme/root theme/kde theme/custom logon/custom splash
  • Turn off tooltips in gconf-editor
  • Turn off panel animations in gconf-editor
  • Tweak Beryl

This is all that I can think of off the top of my head too… I’m sure I’ll have a list almost equal in length of stuff that I forgot. I have been considering trying Suse or Kubuntu too. Who knows that’ll happen.

Anyway, the release date is April 19th. I’ll probably wait a week or two after that to see what all the major bugs are. By then people on Ubuntu Forums will have a fix for most of them.

Comments

Change GTK Themes and Icons for Root Applications on Ubuntu (Synaptic)

I know… shut up about Linux already.

If you have changed any of the system colors, icons, or fonts in Ubuntu you probably will have noticed sooner or later that when you open a program like Synaptic Package Manager or pretty much anything under the System > Administration menu, the theme is still the default one.

Well this is because all these applications are launched by root and the root profile doesnt have these customizations. It is an easy fix that I found on this Gnome customization thread on ubuntuforums.org.

Just run these three simple commands to create links to your theme, icon, and font folders in the root profile.

NOTE: This trick really only works if you are the only user on your system, or if every user has the same theme, icon, and font settings. Because it links to your theme, if someone else logs into the computer who has a different theme and opens any root application they will see your theme for that app, not their own. There really is no workaround for this.

Anyway, run these three link commands:

sudo ln -s ~/.themes /root/.themes
sudo ln -s ~/.icons /root/.icons
sudo ln -s ~/.fonts /root/.fonts

Here is a before and after screenshot of what it looked like on my workstation.
View the before image
View the after image

Comments

Customizing Font and Icon Sizes in Ubuntu Edgy Eft 6.10

One thing about Ubuntu I find is it is more geared to higher resolutions… either that, or they like huge ass fonts and icons at lower resolutions. I still dual boot with Windows XP for a few reasons. I have a Harmony remote that can only be updated through Windows, and I use Guitar Pro 5, which I haven’t taken the time yet to try and get working through Wine.

Anyway, every time I boot in Windows I am surprised at how much bigger my monitor looks. Fact is, it looks bigger because XP came out when 1024 was pretty much the highest resolution anyone used. When you run it at 1920×1200 it seems like such a higher resolution because the fonts and icons are not scaled larger to match the it. Then I boot back into Ubuntu and everything seems so large.

It is actually pretty simple to modify these settings. In fact I fixed it by changing two simple options.

Read the rest of this entry »

Comments (1)

Give aMSN Anti-Aliased Fonts in Ubuntu

I was browsing the Faqs, Howto, Tips & Tricks forum on ubuntuforums.org and came across a script to automatically compile the beta versions of Tcl and Tk and then recompile amsn with anti-aliasing support.

I knew this has been possible, but I wasnt really interested in putting the work in to have more buggy beta software running. But since I found this script and it seemed to be working flawlessly for a lot of people I gave it a try.

See the forum post here: Automatic Script for Anti-Aliasing aMSN

Read the notes in the post before you try to run the script. There are some conditions that may affect some users. It worked fine for me though.

Here are my before and after pictures:

Read the rest of this entry »

Comments (2)

« Previous entries