Ubuntu and Toshiba

Apr 07, 2010 21:22

I spent all last weekend tinkering with the theme on my beloved 3-year-old laptop. I hugged it and praised it before shutting it down for the night.

Monday morning it rained. No problem, I thought, and wrapped my laptop in the plastic bag that has served me well in the event of rain before, and put it in my backpack. This rain, however, was the heaviest downpour known to Culver City in recent memory, and penetrated backpack, plastic bag, and laptop on the way to the bus.

That said, I think the final damage was either to the inverter or the backlight. The screen doesn't light up, though you can still make it out if the light in the room is bright enough, you hold your nose an inch from the screen, and you move your head around to get just the right angle on each part. Christina and I are planning to disassemble and try to fix it at some point, an endeavor requiring her to buy a soldering iron and me to buy replacement parts. At worst, we break a broken machine.

Tuesday night, I bought a Toshiba E205-S1904, with an Intel Dual Core i5-430M 2.27 GHz processor, 500 GB hard drive, and 4 GB RAM. I then attempted to install Ubuntu 9.04 on it.

I have a great machine and a great operating system, but good luck getting them to talk to each other. At 12:05 am Wednesday morning (i.e. after 5 hours Tuesday night) I managed to install the OS.

Sometime around 9:30 pm Wednesday evening I managed to get the ethernet driver installed. Actually, I had managed to install it earlier, but I somehow got locked out of admin tasks (sudo no longer worked), necessitating a reinstall of the OS and the driver.

Thursday I pass it off to the Departmental Technology Analyst, telling him that the screen resolution and aspect ratio was just no good, despite my efforts to change it in the GUI, in the gconf file, and modifying xrandr. No luck.

He gave me a kernel to upgrade, which promptly broke the system, and some video drivers, which required a higher version of libdrm than I had. Reinstalled the OS, dropped it off again Friday.

The eventual solution used by the DTA was to install 10.04, which is in beta. He also gave me the wireless driver, which I have installed and now have wireless (at least in theory--I'll test it in practice when I'm on campus and in range of a wifi network).

As of today, I have finally installed all the software apps I like. Tomorrow I'm going into campus, buying a laptop sleeve (!!!), and transferring my backed-up files to my Documents folder.

Ubuntu is something like a honeymoon-marriage in reverse: the initial setup is hell, but the marriage is incredibly stable, a prolonged joyful union.

Due to the difficulty of setting things up, I have finally wised up to the necessity of keeping track of changes. I was rereading Neal Stephenson's In the Beginning Was the Command Line today, and I thrilled to the following lines:

Over the years that I've been working with Linux I have filled three and a half notebooks logging my experiences. I only begin writing things down when I'm doing something complicated, like setting up X Windows or fooling around with my Internet connection, and so these notebooks contain only the record of my struggles and frustrations. When things are going well for me, I'll work along happily for many months without jotting down a single note. So these notebooks make for pretty bleak reading. Changing anything under Linux is a matter of opening up various of those little ASCII text files and changing a word here and a character there, in ways that are extremely significant to how the system operates.

My virtual "notebook" is here, for future reference for the next time I reinstall the OS on this machine (which will probably be soon). And in case anyone else is not intimidated by the thought of trying to make these two entities speak to one another and wants to give it a try.


1. Install Ubuntu
F12 to start the boot menu
F6 to edit boot options
set acpi=off
type irqpoll (at least for 9.04. DTA did not mention it for 10.04. He said he may have had to start in safe graphics mode during the initial installation. acpi=off + irqpoll definitely does not work for 9.10.)

2. Install ethernet driver
Go here: http://partner.atheros.com/Drivers.aspx
get the AR81Family-Linux-v1.0.1.9.tar.gz driver (works for both 9.04 and 10.04)
cd to file
tar zxvf file.tar.gz
cd to src
sudo make install
sudo modprobe atl1e
ifconfig -a (optional)

3. Install wireless driver
Make sure physical on-off button is on.
Go here: http://sourceforge.net/projects/madwifi/
same as above
modprobe ath, ath5k, ath9k. Not sure if all of these are mandatory, but my physical button was turned off, so I modprobed everything I could think of before realizing.

4. Run update manager
Restart, possibly twice. Possibly have to reinstall ethernet driver after kernel upgrade.
Remove old kernel via Synaptic
Go into software sources, check everything, make sure new packages are downloaded

5. Install build-essential, checkinstall, libpanelapplet2-dev

6. Flash:
search "flashplugin" in Synaptic
install flashplugin-nonfree

7. Multimedia
9.04 http://shibuvarkala.blogspot.com/2009/04/howto-make-ubuntu-904-jaunty-jackalope.html
10.04 http://linux.dipin.info/2010/03/how-to-make-ubnutu-1004-lucid-lynx.html

sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list
sudo apt-get --quiet update
sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring
sudo apt-get --quiet update
sudo apt-get install non-free-codecs
sudo apt-get install libdvdcss2 libxine1-ffmpeg gxine mencoder
sudo apt-get install vlc mplayer

8. Acrobat reader
after enabling all repositories in Software Sources, search "acroread" in Synaptic

9. LaTeX
$ sudo apt-get install texlive-full

10. Tcl/Tk
Search tcl8.5, tk8.5 in Synaptic. Make sure to get the .dev files.
Make sure the tcl.h and tclConfig.sh files are in the same place
tcl.h goes to /usr/share/doc/tcl8.5
tclConfig.sh goes to /usr/share/tcltk
Put both relevant folders in Documents under folder computer
Be sure to keep the path the same, like, forever, so R can access it

11. R
Go here: http://cran.stat.ucla.edu/
cd to Desktop
tar zxvf R-2.10.1.tar.gz
cd to R-2.10.1

Install the following packages:
gfortran
libreadline6-dev
libxt-dev

Run ./configure --with-tcltk --with-tcl-config=/home/sherrylyn/Documents/Computer/tcltk/tcl8.5/ --with-tk-config=/home/sherrylyn/Documents/Computer/tcltk/tk8.5/

make
sudo checkinstall

12. Audio
Restart.
If that doesn't work, type alsamixer in the terminal, turn things up to maximum. Try making a note of original settings first, because once upon a time you did screw everything up with alsamixer.

13. Kile
Use Synaptic. Still not sure how to get the document viewer to work, or the endnotes package.

14. Note to self: You can delete Telepathy and Empathy packages. Leave evolution alone or you won't have a working OS.

15. Customizing the keyboard
System-Preferences-Keyboard-Layouts-Brazil-Options
Keys to change layout-uncheck both Alts, check alt-shift
Keys to choose 3rd level, uncheck right alt, check right alt key never chooses 3rd level, check left win

xmodmap -pke > xmodmap.conf
xmodmap xmodmap.conf
I'm not sure of the exact fix for enforcing the new layout at startup by default.
I created a file .Xmodmap in ~/, put in the code
keycode 51 = bracketright braceright backslash bar bar bar
xmodmap xmodmap.conf
I'm not sure which of these is necessary. When I rebooted, an applet popped up asking me if I wanted to load files. It gave me .xmodmaprc, .Xmodmap, and xmodmap.conf 
I loaded the second two of these. Again, not sure if both are necessary.
Then I rebooted again, and everything worked.

xmodmap /home/xmodmap.conf is the command for a startup program

16. Background picture rotation
System - Preferences - Startup Applications, make background a startup app
#!/bin/bash
while true; do

BG_LIST="/home/sherrylyn/Images/file.paths" # This file contains a list of the pictures
list_size_with_name=`wc -l $BG_LIST` # Prints the number of lines in BG_LIST, and the name of the BG_LIST file
list_size=$(echo $list_size_with_name | awk '{ print $1 }') # Strips the name, leaving only the number of lines
i=`expr $RANDOM % $list_size + 1` # Produces a random number i between 1 and the number of lines.
echo $i
function hello {
z=$(echo $i | sed 's/\([0-9]\+\)/\1p/g') # This regular expression generates the numeric value for i, and concatenates the letter p to the numeral
echo $z
}

string=$(cat $BG_LIST | sed -n $(hello)) # Prints line i of the file BG_LIST, producing the file name of a picture
/usr/bin/gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$string" # Uses gconftool-2 to set the background picture to the filename produced + in the previous line
sleep 5 # Reruns the program every 10 seconds, producing a new random number and a new picture.
done

#!/bin/bash

while true; do

BG_LIST="/home/sherrylyn/Images/file.paths" # This file contains a list of the pictures

list_size_with_name=`wc -l $BG_LIST` # Prints the number of lines in BG_LIST, and the name of the BG_LIST file

list_size=$(echo $list_size_with_name | awk '{ print $1 }') # Strips the name, leaving only the number of lines

i=`expr $RANDOM % $list_size + 1` # Produces a random number i between 1 and the number of lines.

#echo $i

function hello {

z=$(echo $i | sed 's/\([0-9]\+\)/\1p/g') # This regular expression generates the numeric value for i, and concatenates the letter p to the numeral

echo $z

}

string=$(cat $BG_LIST | sed -n $(hello)) # Prints line i of the file BG_LIST, producing the file name of a picture

#The set of if-else if commands sets the picture options for best display.
if [ "$string" = "/home/sherrylyn/Pictures/BlackWhite.jpg" ]

then

/usr/bin/gconftool-2 --type string --set /desktop/gnome/background/picture_options "wallpaper"

elif [ "$string" = "/home/sherrylyn/Pictures/Border-Collies.jpg" ]

then

/usr/bin/gconftool-2 --type string --set /desktop/gnome/background/picture_options "zoom"

elif [ "$string" = "/home/sherrylyn/Pictures/Ruins.jpg" ]

then

/usr/bin/gconftool-2 --type string --set /desktop/gnome/background/picture_options "zoom"

elif [ "$string" = "/home/sherrylyn/Pictures/Road.jpg" ]

then

/usr/bin/gconftool-2 --type string --set /desktop/gnome/background/picture_options "zoom"

elif true

then

/usr/bin/gconftool-2 --type string --set /desktop/gnome/background/picture_options "stretched" # Uses gconftool-2 to set the background picture to the filename produced + in the previous line

fi

/usr/bin/gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$string" # Uses gconftool-2 to set the background picture to the filename produced + in the previous line

sleep 5 # Reruns the program every 5 seconds, producing a new random number and a new picture.

done

17. Bus

Compa, make sure libpanelapplet2-dev is installed in Synaptic
1. $ ./configure --prefix=/usr/
2. $ make
3. $ sudo make install

Campus:
hour=`date '+%H %M %S' | awk '{ print $1 }'` ; minute=`date '+%H %M %S' | awk '{ print $2 }'` ; holiday=`date '+%B %e'` ; hour=`echo $hour|sed 's/^0*//'` ; minute=`echo $minute|sed 's/^0//'` ; day=`date '+%A' | awk '{ print $1 }'` ;  if [[ "$minute"  -eq 0 ]] ; then current_time=`expr $hour \* 60` ; else current_time=`expr $hour \* 60 + $minute` ; fi ; if [[ "$day" = "Saturday" || "$day" = "Sunday" || "$holiday" = "January 1" || "$holiday" = "May 31" || "$holiday" = "July 4" || "$holiday" = "September 6" || "$holiday" = "November 25" || "$holiday" = "December 25" ]] ; then for departure in 350 380 410 440 470 500 530 560 590 620 650 680 710 740 770 800 830 860 890 920 950 980 1010 1040 1070 1100 1130 1160 1190 1250 1310 1381 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "campus:" $difference ;  break ; fi; done ; else for departure in 322 342 362 382 402 422 442 462 482 502 522 535 548 563 578 593 608 623 628 653 668 683 698 713 728 743 758 773 788 803 818 833 848 862 882 902 922 942 962 982 1002 1022 1042 1062 1082 1104 1125 1145 1165 1185 1205 1225 1270 1310 1365 1425 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "campus:" $difference ;  break ; fi; done ; fi

home:
hour=`date '+%H %M %S' | awk '{ print $1 }'` ; minute=`date '+%H %M %S' | awk '{ print $2 }'` ; holiday=`date '+%B %e'` ; hour=`echo $hour|sed 's/^0*//'` ; minute=`echo $minute|sed 's/^0//'` ; day=`date '+%A' | awk '{ print $1 }'` ; if [[ "$minute"  -eq 0 ]] ; then current_time=`expr $hour \* 60` ; else current_time=`expr $hour \* 60 + $minute` ; fi ; if [[ "$day" = "Saturday" || "$day" = "Sunday" || "$holiday" = "January 1" || "$holiday" = "May 31" || "$holiday" = "July 4" || "$holiday" = "September 6" || "$holiday" = "November 25" || "$holiday" = "December 25" ]] ; then for departure in 416 456 488 528 558 573 588 603 618 633 648 663 678 693 708 723 738 753 768 783 798 813 828 843 858 873 888 903 918 933 948 963 978 993 1008 1023 1038 1053 1063 1083 1095 1110 1140 1175 1215 1255 1295 1332 1402 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "home:" $difference ;  break ; fi; done ; else for departure in 378 393 410 430 445 458 472 487 499 511 523 535 547 559 573 586 598 611 626 641 656 671 687 702 717 732 747 762 777 792 807 822 837 852 867 882 895 907 919 931 943 955 967 979 991 1003 1015 1027 1039 1052 1064 1076 1088 1100 1112 1124 1133 1145 1160 1175 1191 1211 1241 1271 1301 1331 1361 1391 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "home:" $difference ;  break ; fi; done ; fi

Update 10-01-10 hour=`date '+%H %M %S' | awk '{ print $1 }'` ; minute=`date '+%H %M %S' | awk '{ print $2 }'` ; holiday=`date '+%B %e'` ; hour=`echo $hour|sed 's/^0//'` ; minute=`echo $minute|sed 's/^0//'` ; day=`date '+%A' | awk '{ print $1 }'` ; if [[ "$minute" -eq 0 ]] ; then current_time=`expr $hour \* 60` ; else current_time=`expr $hour \* 60 + $minute` ; fi ; if [[ "$hour" -eq 0 ]] ; then current_time=$minute ; else current_time=`expr $hour \* 60 + $minute` ; fi ; if [[ "$day" = "Saturday" || "$day" = "Sunday" || "$holiday" = "January 1" || "$holiday" = "May 31" || "$holiday" = "July 4" || "$holiday" = "September 6" || "$holiday" = "November 25" || "$holiday" = "December 25" ]] ; then for departure in 350 380 410 440 470 500 530 560 590 620 650 680 710 740 770 800 830 860 890 920 950 980 1010 1040 1070 1100 1130 1160 1190 1250 1310 1381 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "campus:" $difference ; break ; fi; done ; else for departure in 322 342 362 382 402 422 442 462 482 502 522 535 548 563 578 593 608 623 628 653 668 683 698 713 728 743 758 773 788 803 818 833 848 862 882 902 922 942 962 982 1002 1022 1042 1062 1082 1104 1125 1145 1165 1185 1205 1225 1270 1310 1365 1425 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "campus:" $difference ; break ; fi; done ; fi

Update 10-01-10
hour=`date '+%H %M %S' | awk '{ print $1 }'` ; minute=`date '+%H %M %S' | awk '{ print $2 }'` ; holiday=`date '+%B %e'` ; hour=`echo $hour|sed 's/^0//'` ; minute=`echo $minute|sed 's/^0//'` ; day=`date '+%A' | awk '{ print $1 }'` ; if [[ "$minute" -eq 0 ]] ; then current_time=`expr $hour \* 60` ; else current_time=`expr $hour \* 60 + $minute` ; fi ; if [[ "$hour" -eq 0 ]] ; then current_time=$minute ; else current_time=`expr $hour \* 60 + $minute` ; fi ; if [ "$day" = "Saturday" -o "$day" = "Sunday" -o "$holiday" = "January 1" -o "$holiday" = "May 31" -o "$holiday" = "July 4" -o "$holiday" = "September 6" -o "$holiday" = "November 25" -o "$holiday" = "December 25" ] ; then for departure in 416 456 488 528 558 573 588 603 618 633 648 663 678 693 708 723 738 753 768 783 798 813 828 843 858 873 888 903 918 933 948 963 978 993 1008 1023 1038 1053 1063 1083 1095 1110 1140 1175 1215 1255 1295 1332 1402 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "home:" $difference ; break ; fi; done ; else for departure in 378 393 410 430 445 458 472 487 499 511 523 535 547 559 573 586 598 611 626 641 656 671 687 702 717 732 747 762 777 792 807 822 837 852 867 882 895 907 919 931 943 955 967 979 991 1003 1015 1027 1039 1052 1064 1076 1088 1100 1112 1124 1133 1145 1160 1175 1191 1211 1241 1271 1301 1331 1361 1391 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; echo "home:" $difference ; break ; fi; done ; fi

Work:
hour=`date '+%H %M %S' | awk '{ print $1 }'` ; minute=`date '+%H %M %S' | awk '{ print $2 }'` ; hour=`echo $hour|sed 's/^0*//'` ; minute=`echo $minute|sed 's/^0//'` ; if [[ "$minute" -eq 0 ]] ; then current_time=`expr $hour \* 60` ; else current_time=`expr $hour \* 60 + $minute` ; fi ; for departure in 330 350 370 390 410 430 450 470 490 510 530 543 556 571 586 601 618 633 648 663 678 693 708 723 738 753 768 783 798 813 828 843 859 865 874 880 894 895 910 914 925 934 940 954 955 970 974 985 994 1000 1014 1015 1030 1034 1045 1054 1060 1074 1075 1090 1094 1105 1114 1120 1133 1153 1173 1193 1213 1233 1278 1318 1373 1433 1425 ; do if [ $current_time -ge $departure ]; then true ; else difference=`expr $departure - $current_time` ; if [ $difference -eq 1 ] ; then echo "next bus:" $difference "minute" ; break ; else echo "next bus:" $difference "minutes" ; break ; fi; fi; done

18. acpi fix
Follow http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=1470732&page=2
with these modifications:

sudo cp /boot/config-2.6.32-22-generic ./.config
sudo cp .config .config.bk
run make-kpkg clean and following as sudo

19. Modify Navigation Menu
For removing items from Applications-Places-System that can't be removed via Nautilus or Alacarte, download the source code and comment out items, as I posted here: http://community.livejournal.com/ubuntu_users/485044.html
"It turns out that you need to download the source code, which can be done thus:

sudo apt-get install apt-build

sudo apt-get build-dep gnome-panel
sudo apt-build source gnome-panel

I owe this how-to tutorial for that much.

Find the file named panel-menu-items.c and modify to your heart's content. If your aim is to remove items, this can be done by commenting out code.

To remove items from Places, look for

static GtkWidget *
panel_place_menu_item_create_menu (PanelPlaceMenuItem *place_item)
{
...
}

It's pretty easy to identify what code corresponds to what menu item. In my case, I commented out every item except my personal folder and gtk bookmarks.

To remove items from System, look for

static void
panel_desktop_menu_item_append_menu (GtkWidget *menu,
gpointer data)
{
...
}

and
void
panel_menu_items_append_lock_logout (GtkWidget *menu)
{
...
}

In my case, I commented out all the items in the second block, as well as the Help and About Gnome and menu separator from the first block. This left me with only Preferences and Administration.

Everything in Applications is theoretically doable with Alacarte.

Edit for 10.10 bug: the Makefile in ../gnome-panel/ should be modified to add applet-signaler.$(OBJEXT) in the panel-compatibility line before making.

After modifying the code, run ./configure; make; sudo make install , and restart.

As the tutorial linked to shows, you can also change the "Applications", "Places", and "System" names in the panel-menu-bar.c file. I may yet do that if I think of something clever enough (someone else on a forum somewhere wanted "What" "Where" "Way")."

For gtk-bookmarks:
gedit ~/.gtk-bookmarks &
modify file to read:
file:/
file:///home/sherrylyn/Documents
file:///home/sherrylyn/Downloads
file:///home/sherrylyn/Pictures

20. To restart Gnome, sudo /etc/init.d/gdm restart

21. For 10.04, edit /usr/share/polkit-1/actions/org.freedesktop.upower.policy to remove hibernate and disable from the log-off menu.

22. /etc/default/grub and run update-grub to remove quiet and splash

23. Grub

Entries are in /etc/grub.d
Running update-grub will overwrite /boot/grub/grub.cfg
sudo chmod -x /etc/grub.d/20_memtest86+ will omit memtest entries from the menu
/etc/default/grub contains settings and parameters
Uncomment GRUB_DISABLE_LINUX_RECOVERY=true to omit recovery modes from the menu
Running sudo grub-setup /dev/sda updates the master boot record

24. Date-time format: /apps/panel/applets/clock_screen0/prefs

There was also
Though Linux works for me and many other users, its sheer power and generality is its Achilles' heel. If you know what you are doing, you can buy a cheap PC from any computer store, throw away the Windows discs that come with it, turn it into a Linux system of mind-boggling complexity and power. You can hook it up to twelve other Linux boxes and make it into part of a parallel computer. You can configure it so that a hundred different people can be logged onto it at once over the Internet, via as many modem lines, Ethernet cards, TCP/IP sockets, and packet radio links. You can hang half a dozen different monitors off of it and play DOOM with someone in Australia while tracking communications satellites in orbit and controlling your house's lights and thermostats and streaming live video from your web-cam and surfing the Net and designing circuit boards on the other screens. But the sheer power and complexity of the system--the qualities that make it so vastly technically superior to other OSes--sometimes make it seem too formidable for routine day-to-day use.
for the benefit of all people who wonder what on earth I see in my happy marriage to Linux.

I am impressed by the backlit keyboard on my new Toshiba. I am not amused by "Murrine configuration option "scrollbar_color" is no longer supported and will be ignored" in 10.04. I loved the colorized scrollbar in 9.04! That was what motivated me to start tinkering with my layout last weekend!

I am impressed by the startup time of this machine + OS as well: 32.6 seconds. I am not impressed that it won't boot without acpi=off, which means I have to manually push the button to shut it down.

ETA: acpi fixed! Thanks to anonymous commenter for directing me to a forum with a fix, and thanks to the poster of that fix.
Previous post Next post
Up