Difference between revisions of "Ubuntu"

From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to: navigation, search
(Undo revision 716 by [[Special:Contributions/imported>Pew|imported>Pew]] ([[User talk:imported>Pew|talk]]))
(Tag: Undo)
Line 1: Line 1:
TODO: Move to software page
 
 
 
{{Infobox_OS
 
{{Infobox_OS
 
| name                  = Ubuntu
 
| name                  = Ubuntu

Revision as of 08:07, 3 January 2019

Template:Infobox OS Below are some recommended steps to customizing Ubuntu to function at maximum efficiency, generally, and at Virginia Tech.

Use Local Mirrors

Virginia Tech has several local mirrors of Linux and other Free and Open Source Software. Using Virginia Tech's mirrors has the main advantage of being fast.

Using Software Sources

  1. Open Ubuntu Software Center (Applications → Ubuntu Software Center).
  2. Click the Edit menu and choose Software Sources. This requires root privileges so you will need to enter your password.
  3. Uncheck everything in the "Downloadable from the Internet" section.
  4. Click on the Other Software tab and click the Add button.
  5. Paste the following line into the text box than click Add Source:
    deb http://mirror.cc.vt.edu/pub/ubuntu/ maverick main restricted universe multiverse
    • Note that this assumes you are running 10.10, use the Campus Computing mirror, and want all the repositories. Replace maverick with the codename for your Ubuntu version (9.10 is karmic, 10.04 is lucid, 10.10 is maverick, 11.04 is natty) If you want the VBI mirror instead, replace http://mirror.cc.vt.edu/pub/ubuntu/ with http://mirrors.vbi.vt.edu/mirrors/linux/ubuntu/.
  6. Click Add again and repeat the process with the following lines, entering each one individually:
    deb http://mirror.cc.vt.edu/pub/ubuntu/ maverick-updates main restricted universe multiverse
    deb http://mirror.cc.vt.edu/pub/ubuntu/ maverick-security main restricted universe multiverse
  7. Click Close. Ubuntu Software Center will now update the package sources. You can close the Software Center after this finishes (the cycling arrows in the left corner of the window will disappear when it's done.)

Manually

You will need to alter your /etc/apt/sources.list file. First of all, make a backup of your original. Open a terminal emulator (Applications → Accessories → Terminal) and enter the command:

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.original

Next, copy the commands below into a shell script. You can use a text editor like gedit; Applications → Accessories → Text Editor. Select the mirror you wish to remove by uncommenting (removing the beginning # character from) one of the two lines with MIRROR=. Save it in your home directory as vtmirror.sh:

#!/bin/sh
## Uncomment one of the two MIRROR lines below to choose your mirror
##
## VT Campus Computing mirror
#MIRROR="mirror.cc.vt.edu/pub/ubuntu"
## VBI Mirror (which also hosts PowerPC and SPARC repositories)
#MIRROR="mirrors.vbi.vt.edu/mirrors/linux/ubuntu"

sed "s,\(us\.\)\?archive.ubuntu.com/ubuntu,$MIRROR," /etc/apt/sources.list.original |\
sed s,security.ubuntu.com/ubuntu,$MIRROR, > \
/etc/apt/sources.list.new
mv /etc/apt/sources.list.new /etc/apt/sources.list

IMPORTANT: make sure that you have uncommented one of the MIRROR= lines. (highly suggested to use the VBI mirror as it is updated) Next, in your terminal window, change the permissions on this file to make it executable:

$ chmod u+x vtmirror.sh

Finally, run the script from the terminal with

$ sudo ./vtmirror.sh

Next, update your package information. You can do this in the terminal with

$ sudo apt-get update

You can also do this with the Update Manager in System → Administration → Update Manager. You will now be downloading all standard Ubuntu packages from your local VT mirror.

Setup VT-Wireless

Follow the instructions in the VT-Wireless article to get your wireless connection setup to automatically and securely connect to the campus wireless network.

HP Ralink RT5390

If you have been trying to get your wireless to work and have this driver, this is what you need to do.

sudo apt-get install --reinstall linux-headers-$(uname -r) build-essential dkms patch fakeroot unzip

wget http://media.cdn.ubuntu-de.org/forum/attachments/3208747/angepasster-2011_0406_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO.zip

unzip angepasster-2011_0406_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO.zip

cd angepasster-2011_0406_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO/

sudo make

sudo make install

sudo modprobe -v rt5390sta

sudo depmod -a

sudo update-initramfs -u

Setup Email

See the email article for instructions on setting up your preferred email client to download and send email (including for reliable off-campus sending), and how to add the LDAP faculty address book.

If you use Evolution mail, you can find instructions at the Evolution page.

Customize Your Desktop

While not necessary, the desktop customization guide may improve your desktop experience.

Broadcom Wireless

This walks through the installation of the proprietary driver. Remove all installed Broadcom drivers (b43*, fwcutter, etc.) Reboot.

$ rm -r hybrid-portsrc*
$ sudo apt-get install build-essential
$ wget http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_64-v5.10.91.9.3.tar.gz
$ tar -xzvf hybrid-portsrc-x86_32-v5.10.91.9.3.tar.gz
$ make
$ sudo make install

Reboot again, should now show up under "Restricted Drivers".

Touchpad Button

This only will apply to those who have a touchpad with a button that disables the touchpad. Synaptics touchpad driver and Gnome both disable the touchpad individually. For some reason, Gnome (in particular gnome-settings-daemon) fails to re-enable it; which is why you will end up with a dead touchpad, once you disable it. If you find yourself with a dead touchpad, here is what you should do. First of all, open a terminal. Press Alt+F1 to open the applications menu and choose the Terminal application from the accessories or use an external mouse to so.

To bring your touchpad back to life, enter the following command into terminal:

gconftool --type bool --set /desktop/gnome/peripherals/touchpad/touchpad_enabled true

The key "/desktop/gnome/peripherals/touchpad/touchpad_enabled" is where gnome-settings-daemon remembers that you disabled your touchpad. This is the reason, why it is disabled even after a reboot.

The issue will re-appear, next time you disable your touchpad. You need to prevent gnome-settings-daemon from disabling your touchpad in the first place, because the Synaptics touchpad driver does this already. To do so, run the following command in a terminal:

 gconftool-2 --type string --set /apps/gnome_settings_daemon/keybindings/touchpad "" 

This dissociates the key to lock your touchpad from gnome-settings-daemon. If for any reason, the latter command breaks the lock touchpad support for you, than you probably have a different issue. To re-associate the key with gnome-settings-daemon, run this command:

 gconftool-2 --type string --set /apps/gnome_settings_daemon/keybindings/touchpad XF86TouchpadToggle 

Connect to Scholar WebDAV

The Scholar site for students taking classes has an option for connecting to the web directory to download the resources uploaded by the teacher and site administrators. To connect, it's very simple and it makes an easy way to keep all your class resources up to date and provides an great way to copy multiple files to your computer at one time.

VT Resources Scholar Screenshot.png

Notice the link called "Upload-Download Multiple Resources". This is the link you will click that takes you to a page with the server information you will need to connect to the remote directory. The page also includes instructions for setting the WebDAV link up on Windows and Mac computers, but not Linux, so you can ignore pretty much everything beneath the URL to the server. You will see a part that gives you a "SiteID". This "SiteID" is the unique part of the server URL that allows you to connect to it with your Virginia Tech PID.

Now, the most important part of this page is the server URL. You can find it under the part that says "To access the resources in this site through a WebDAV client, you will use the following URL:"

That URL will look like this (substitute your own SiteID for the [SiteID]):

 https://scholar.vt.edu/dav/[SiteID] 
  • Note* We will only want the part AFTER the "https://" because otherwise, your WebDAV client may give you an error. I will be using Nautilus, the standard file manager in Ubuntu, seeing as this the Ubuntu section.

After you have your URL, see the WebDAV page for further instructions.

Automatically Mount Partitions

If you are dual-booting operating systems, you can mount your partitions after you have logged in, or you can mount partitions at boot. When mounting partitions at start-up you can do it either through programs that are out there, or you can mount it manually.

Program

If you decide that you would like to mount your partitions through a program there are a few out there that can help you. One example program that will do this is psydm.

Psydm

$ sudo apt-get install psydm

Once this is installed, it is pretty self explanatory. The type of Hard drive should be noted. Often the partitions that will show are ext3 (linux), NTFS (Windows), and HFS+(Mac). Using the assistant will allow to mount the partition then and by default it will also mount at startup.

Manually

DISCLAIMER: USING THIS METHOD, WILL WRITE YOUR FILE SYSTEM TABLE FILE. WHEN WRITING ON ANY SYSTEM FILE YOU CAN POTENTIALLY DAMAGE YOUR SYSTEM. USE AT OWN RISK.

First you need to make the point in which the partition will mount

ls /media/windows

If a response like ls: /media/windows: No such file of directory is returned, the location is open, and that will be the one that we use.

mkdir /media/windows

To manually mount partitions at start up we will need to edit fstab (file system table) which is found at /etc/fstab. When deciding which partition to mount you need to see the partitions that are currently on your hard drive.

$ sudo blkid


The output will give you the partition, it's UUID, label (if it has one), and type of filesystem. The output should look similar to:

/dev/sda1: LABEL="System Reserved" UUID="AEF4B555F4B5208F" TYPE="ntfs" 
/dev/sda2: UUID="EA68C7FE68C7C791" TYPE="ntfs" 
/dev/sda5: UUID="3eedabec-f260-4fd7-ace7-a76c2e3723a4" TYPE="ext4" 
/dev/sda6: UUID="943d37c8-50f7-4959-9464-9e7386f14f7f" TYPE="swap" 

Where /dev/sda(x) is the hard drive. For this tutorial, we will mount /dev/sda2, which is the windows partition that is on my hard drive.

Before editing the fstab file, make sure that you back it up. To edit the fstab file, you can use one of two commands which will depend on preference (these commands will be in terminal). Ubuntu:

$ gksu gedit /etc/fstab

Command line:

$ sudo nano -w /etc/fstab

Fstab should look something like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda5 during installation
UUID=3eedabec-f260-4fd7-ace7-a76c2e3723a4 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=943d37c8-50f7-4959-9464-9e7386f14f7f none            swap    sw              0       0

The "#" sign will comment out anything and it will not be read. As I said earlier, we are going to mount /dev/sda2. However there are two ways to go about mounting this partition of your hard drive. Either by the UUID (shown earlier) or by /dev/sda(x). (Again it is personal preference of which you choose but I would suggest using the UUID as your file will remain consistent and as it says in fstab "UUID= as a more robust way to name devices that works even if disks are added and removed."

Now, on to mounting the partition.

# Windows partition (Or whatever you want to call it.)
UUID=EA68C7FE68C7C791 /media/windows ntfs rw,auto,user,fmask=0111,dmask=0000 0 0

(The above entry is case specific, so make sure that everything matches.)

"UUID="(your hard drives UUID) will specify which hard drive. "/media/windows" specifies the mount point, "ntfs" specifies the filesystem. The next line is what is important. If you want to be able to write to this partition when it is mounted, you will need to put "rw". If for some reason you are having trouble writing to this partition you may need to download the package "ntfs-3g", however this is the set-up I have, and it works just fine.

The line "rw,auto,user,fmask=0111,dmask=0000" will allow all users to mount, read, and edit the partition. If you don't want this, you can use uid (for users) and gid (for groups) after dmask to determine who will be able to do that. "dump" and "pass" are for use of native filesystems and will be set to "0", hens the "0 0" after "dmask=0000". WARNING: If you do not fill out all of that information your system will NOT load correctly and you will have some problems.

If you system runs into problems loading after editing this file, it is more than likely because you stopped writing the file after entering "UUID=(the UUID)". To fix this you can use a live cd to re-write the file by running the system off of the cd and editing the file as root (you may just want to take the whole thing out completely and figure out what you did wrong.)

For further information visit, https://help.ubuntu.com/community/AutomaticallyMountPartitions

Connecting to Tech's VPN

See the VPN page for information on connecting to the Virginia Tech VPN.


Tweaks

Ubuntu Tweak

One easy way to start tweaking ubuntu to server you in the way that you so deserve and desire is to download this program (http://ubuntu-tweak.com/). It is pretty self explanatory. It will keep your box clean of old kernels and packages that are no longer being used and will allow you to tweak the appearance more with compiz.

Wallpapoz

http://www.akbarhome.com/ This will allow you to have a different background on each workspace. Pretty easy to use and fun to use.