Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, October 29, 2010

Zooming in GNU Octave under Ubuntu

Yay, I finally solved my problem! I can now zoom in Octave plots using the mouse (currently on Ubuntu 10.04 LTS).


...but here it is so you don't have to scroll through all of that:

Build gnuplot with:
./configure --enable-volatile-data
make
sudo make install

and if necessary change the gnuplot's path in octave with:
gnuplot_binary ("/usr/local/bin/gnuplot") 





Just use the right mouse button to select the first point, then click a second time to select the other corner. Whala! Press "a" to go back to the original zoom level, and press "h" to dump some help out to the Octave terminal window.

Enjoy!

Saturday, June 12, 2010

Mini Home Theater

Check out my sweet new mini home-entertainment system! I used to be into the whole "11-channel surround, 10,000W subwoofer" etc... thing, but in my old age, have decided most of that stuff is a gimmick. All you need are some decent speakers, well shielded cables, and a high-res (1080p) screen up close, so you can actually see the pixels. This system uses a PC (hidden under the end-table) hooked in through an HDMI input, running Ubuntu so I can surf the web. My keyboard is wireless, and has a built-in track-pad to minimize device juggling. The speakers are M-Audio powered monitors, which do a good job down to about 80 Hz... chosen to maximize audio quality while minimizing space consumption and neighbor-annoyance.


Friday, February 26, 2010

Dual Booting an HP Mini 210 HD with Windows and Ubuntu 9.10 64-bit


So you just bought an HP Mini 210 HD netbook, and want to shrink the Windows partition so you can install Ubuntu 9.10 64-bit, eh? Well, you've come to the right place! I'll walk you through the process from booting it for the first time to tweaking both OS installs. I'll include some of my favorite Ubuntu tricks, but I won't bore you with trivial details, like how to unpack it, and where the power button is... just the important stuff for someone with some prior Linux (preferably Ubuntu) experience.

(most of this is broadly applicable, not just to netbooks, so don't stop reading just because you don't have my exact netbook!)

Windows Stuff
  • First, of course, turn it on, and go through all the normal Windows configuration stuff. I entered a few different users, but later decided I just wanted one user for the whole family. I was able to delete the other users and set a password under Settings... Control Panel... User Accounts.
  • Remove HP's pre-installed "crap ware" under Add Remove Programs.
  • Finish setting up Windows to your taste, installing software updates, etc...
Installing Ubuntu
  • Download the Ubuntu 9.10 64-bit iso.
  • Burn it to a USB flash drive by following the instructions on this page.
  • Go to this HP web page to see all of the boot-hotkeys, but to get into the BIOS, boot the system while holding the F10 key. Change the first boot device to a USB disk. Then reboot with your flash drive inserted. The Ubuntu installation menu should greet you.
  • Choose to boot into Ubuntu rather than install right away.
  • Double click on the installer on the desktop, and during installation, be careful to select the dual boot option when prompted.
  • In the partition setup, drag the slider down (which will be a pain, see below) so Windows has as much space as you think it needs (I chose 40 gigs, but you could probably get away with 30). I recommend leaving the file system as ext4, unless you have a reason to do otherwise.
  • After installation, don't reboot just yet. Make sure you have an ethernet cable plugged in, and when prompted, click "Continue Testing". Click the hardware icon on the top panel to select hardware drivers. Activate the Broadcom STA driver, but not the b43 driver. (Full disclaimer: It was significantly more challenging than this, but after much research, trial, and error, I'm pretty sure if you do it this way the first time, its'll "just work", and you won't have to futz around with it as much as I did.)
  • You'll notice the trackpad buttons have some issues, which will make adjusting the slider in the above step a pain. To fix this, after installing Ubuntu, launch a terminal, and do this:
> sudo su
> echo options psmouse proto=exps > /etc/modprobe.d/psmouse.modprobe
> reboot
  • Upon re-entering your fresh Ubuntu install, now would be a good time to go into Synaptic (System... Administration... Synaptic Package Manager), do a "Reload", then "Mark All Upgrades" and "Apply". This first software update is pretty extensive, so you'll have to reboot.
  • To use your webcam, install "cheese" through Synaptic. Cheese Webcam Booth will then show up under Sound & Video.
Space Efficiency
  • I encourage you to take a moment to customize the UI to best optimize your relatively small screen. Under Appearance Preferences... Interface... choose "Icons Only" for "Toolbar button labels". I like to consolidate down to just a single panel on the bottom of the screen, like Windows, and I set it to "Autohide". This setting can be found under Properties after right-clicking on it.
  • I also like to get rid of the Menu Bar on the panel, and instead replace it with the Main Menu, which is just a single icon. There are lots of other optimizations you can do with the items on the panel, just poke around and see what options you have.
  • I recommend going into System... Preferences... Keyboard Shortcuts and setting up shortcuts how you like. I have a strong preference for "ctrl + alt + ..." shortcuts. I do recommend that you make at least two; 1) Fullscreen: "ctrl + alt + f", and 2) Open Main Menu: "ctrl + alt + u". I know the main menu one is already defined, but this keyboard shortcut will prove very useful in the next step.
Fix the Main Menu Delay
  • You will notice a delay when clicking on the Main Menu icon for the first time after rebooting or re-logging in. This is because it doesn't properly cache its icons, and has to reload them at the beginning of each session. It is snappy after this first click, however. If this annoys you like it annoys me, you can fix it by following the next steps.
  • Note that this is probably only applicable to Ubuntu 9.10 and earlier. I've heard rumors that it is fixed in 10.04.
  • First, install the X-Virtual Keybaord via Synaptic (xvkbd). This allows you to execute keyboard commands from within scripts, and we're going to create one which quickly opens and closes the Main Menu behind the black login screen during the login process. You'll never notice it!
  • To do this, open System...Preferences...Startup Applications
  • Then add a new command to execute this:
sh -c "sleep 6 && xvkbd -text '\C\Au' && sleep 0.1 && xvkbd -text '\[Escape]'"
  • Whala! Reboot and check it out. No more delay on first-click! You may, however, need to tweak it a bit (the number of seconds in the sleep commands). It needs enough delay for Ubuntu to have loaded your keyboard shortcuts, but too much delay, and it'll be visible. It seems like there needs to be a delay before hitting "escape" to close the menu, to give the menu enough time to open, and 0.1 seconds seemed to work well for me.
Firefox
  • Since this is a 64-bit install, rather than going through Synaptic to install Adobe's Flash Player, you'll have to install it manually... but its simple! Download it here. Extract it, then install it with this command:
> sudo cp libflashplayer.so /usr/lib/mozilla/plugins/
  • Restart Firefox, and you're set!
  • To further optimize your precious screen realestate, you should turn off the status bar (View...Status Bar), and install Tree Style Tabs, which makes much better use of the excess horizontal space available with the wide-screen display.
Multimedia File Support
  • To get movies and other multimedia files playing, do this:
> sudo apt-get install vlc ubuntu-restricted-extras
> sudo /usr/share/doc/libdvdread4/install-css.sh
  • I recommend using .iso files as your default movie file type. They are the raw binary data ripped straight from a DVD using Ubuntu's built-in DVD burning ability (right click on a mounted DVD on your desktop, then choose "Copy Disk", and copy it as an .iso file).
  • I then recommend setting VLC as your default movie viewer for .iso files by right clicking on a .iso file, choose Properties... Open With, then add VLC, and choose it as your default.
Customized Boot Menu
  • I like to customize my grub (boot) splash screen. To do that, I followed this guide.
  • I also like to reduce the grub menu timer to 5 seconds (instead of 10 seconds). You can do this by modifying the line "GRUB_TIMEOUT=10" to say "GRUB_TIMEOUT=5" in the file /etc/default/grub. Be sure to "sudo update-grub" after changing the file.
Install software not found in default repositories
  • To install Google Earth, follow the instructions found in my previous blog entry
  • A nice, screen-space-efficient browser alternative is Google Chromium. You can add the daily-build to your software repositories by following the instructions here.
  • If you have a digital camera and like to process RAW files, I recommend RawStudio. You can add the daily-build to your repositories here.
Conclusion

This stuff was pretty easy, eh? Not too technical, but there is a lot to do after a fresh install. It only takes a few hours, and should make your computing experience that much more enjoyable. Happy Ubuntuing!

PS: I've tested every last little bit of hardware on this netbook, and every single thing works.... the headset jack (for integrated microphone ear-bud hands-free headsets), the speakers, the wifi, the webcam, everything. I'm impressed. It can sometimes be a bit of a challenge to get everything working under 64-bit Ubuntu.

    Sunday, December 20, 2009

    Ubuntu - "Open With"

    Ever wonder how to easily specify which program ought to (by default) open a given file type? Wonder no more: Right click on a file of the type in question, then click "Properties" and select the "Open With" tab. There you will be able to either select a program by clicking on its check-box, or add a new program.

    Happy Ubuntuing!

    Thursday, December 10, 2009

    Ubuntu Templates

    Ever wonder why, when you right click on your desktop or in a folder, and select "Create Document", it tells you there are "No templates installed"?


    Ubuntu expects you to have a ~/Templates folder (which should have been created when you installed Ubuntu). You may have deleted this at some point, and even if you hadn't, it probably didn't have anything in it. If you'd like to have some handy file templates, just create a ~/Templates folder. Then put some files in it. Whala! They should be available next time you use this right-click menu.

    If you try it, and they don't show up, you'll need to edit this file:

    ~/.config/user-dirs.dirs

    And make sure the following line exists:

    XDG_TEMPLATES_DIR="$HOME/Templates"

    It turns out that Ubuntu is smart enough to automatically edit this file for you, should you move (and maybe even rename) this folder. However, if you delete it, Ubuntu will set this line to use your home folder as the default location.

    While you are editing this file, you might want to take a look at some of the other lines; you may find them useful.

    Happy Ubuntuing!

    Sunday, June 21, 2009

    Google Earth 5.0 in Ubuntu 9.04 64-bit

    There's a bit of a gochya when installing Google Earth in Ubuntu 9.04, 64-bit. If you read my previous blog post on this topic, that'll get you part way to installing it. However, it won't run properly, and will give you the following error message:

    "google earth detected an error while trying to authenticate"

    There is a missing dependancy, so all you have to do to get it to run is to do this:

    > sudo apt-get install lib32nss-mdns

    Happy Google Earth Surfing.

    Monday, January 12, 2009

    Ubuntu and AMD

    For a few years, I'd been happily using the MSI K8NGM2-FID motherboard with AMD Athlon 64 processors (most recently, a 2.2 GHz X2). I've also been using an Intel Core2 Duo laptop (2 GHz), and have historically always used 64-bit versions of Ubuntu. With my recent upgrades to Ubuntu 8.04 and 8.10, Ubuntu seems to be more and more sluggish on my desktop, but on my laptop, it is pleasant as ever. Firefox had been especially sluggish. I also had serious (unresolved) audio problems on my desktop. Because of these nagging annoyances, I finally decided to upgrade. I really hate doing that, my hardware was just fine for daily computing, but the fact that Flash sites rarely worked correctly, the audio sucked (if it worked at all) and my (similarly spec'd) laptop was noticeably snappier than my desktop, in general. I couldn't take it any more.

    Here's the upgrade I settled on:
    • NVidia 9800 GTX video card
    • 3 Gigs of triple channel (1333 MHz) DDR3 RAM
    • Intel Core i7 (2.67 GHz) chip
    • ASUS P6T Deluxe motherboard
    The verdict is in: this setup ROCKS. Ubuntu 8.10 (64-bit) installed without a hitch, all the hardware appears to work flawlessly, the 3D goodies work great, so does Google Earth, Firefox is fast, Adobe Flash websites work perfectly (after installing Flash 10), and seemingly simple tasks (watching a video) don't hog 100% of one of the cores (more like 10%).

    I can't describe how much snappier everything is.... must be, on average, about 3x faster. It still annoys me that I had to do this. My new hardware is only about 23% faster (clock speed), so clearly there was some weird driver/hardware issue. With my new, well-supported Intel hardware, however, the driver support seems perfect. My 4 hyperthreaded cores are detected as 8 total processors, and the OS appears to load balance intelligently.

    I highly recommend this setup. You will NOT be disappointed!

    Sunday, January 11, 2009

    Installing Google Earth in Ubuntu

    I recently installed Google Earth 4.3 in Ubuntu 8.10 (64-bit). I suspect the issue I discovered will be relevant for more than just these versions of software. To install it, use the following method:

    1. Download it to your desktop
    2. cd ~/Desktop
    3. chmod +x GoogleEarthLinux.bin
    4. sudo ./GoogleEarthLinux.bin

    DO NOT let it launch GE after the installation. Close down the installer, then launch GE from the desktop or menu icon. If you let it launch GE from the installer, some files will be created under the root account. You then won't be able to run it as a normal user. If this happens to you, follow this remedy:

    1. cd ~
    2. sudo rm -Rf .config/Google
    3. sudo rm -Rf .googleearth

    Things should now work as expected.

    Saturday, September 6, 2008

    ERROR 21

    Well, that sucked.

    I just spent about 1 hour breaking my laptop, and another 3 fixing it. To save you the pain, here's how I broke it, and how I fixed it.

    As part of debugging another computer, I installed Ubuntu to an external USB drive, using my laptop. This went fine, and I was able to boot the laptop from the USB drive. I unplugged the drive, and tried to boot my laptop the usual way, which gave rise to the error message:

    Grub loading, please wait...
    Error 21

    Oh well hell.

    Anyway, like I said above, to "save you the pain", here's the solution:

    1) Boot from an Ubuntu live CD
    2) Open up a terminal
    3) Type the following:
    >> sudo grub
    >> find /boot/grub/stage1
    4) This will tell you something like "(hd0,2)". Use this information for the next step:
    >> root (hd0,2) <------ there is a space between "root" and "(hd0,2)"
    >> setup (hd0) <------ again, don't forget the space
    >> quit
    5) Now reboot. It should be fixed.

    Tuesday, September 2, 2008

    Slow SSH

    Is SSH being slow? Are you running Ubuntu (8.04 at the time of this writing)? I've found the following solution fixes slow SSH and Telnet logins. Specifically, the symptom is an annoying ~10 second delay between attempting to log into a remote terminal, and when it prompts you for a password. If this is happening to you, do the following (to the remote machine):

    sudo nano /etc/hosts

    Then, just add a line with the IP address and host name of the machine you are logging in from. Apparently, the remote machine is trying to do a DNS lookup, or something, and timing out. If it already has your machine in its list of hosts, you can get in instantly. I've found a few other folks discussing this in the forums, but none of their suggestions worked for me.

    Happy computing.