Well, I'm now on study leave for a week before my exams start. By the end of May I'll have graduated high school. So if the next update is a little delayed (day or two maybe) you guys know why.
These days I've been bothered by my temperamental laptop again. The charger is starting to die (it's the THIRD charger for this HP DV6545eg laptop in the last year), and I'm tired of replacing it, so I've decided to replace the laptop after I graduate. I've decided this mainly because the battery life of the HP laptop is terrible (about and hour and a half, maybe a bit longer), and the hard drive seems to be starting to die (I give it another month or two before it bites the dust). Seeing as the total cost of replacements would be around about 200€ I decided I may as well buy a new laptop for twice as much and get better battery life and mobility (my laptop is 15.4"). I've decided I want to get the Samsung NC10 netbook, which has a rumoured battery life of up to 7 hours (even if it only gets to 4 or 5 hours I'd be ecstatic), and is 10.2", which means it'll be nice and portable for me. Not sure if I'll go with Ubuntu 9.04 netbook edition, ArchLinux, or a normal install of Ubuntu. If anyone has any comments on compatibility (according to Ubuntu wiki only suspend/resume and sound recording doesn't work), please post a comment.
On a bit of an ironic note...the Samsung NC10 has an integrated graphics card with more shared memory than my laptop. Current laptop: Nvidia 7150m chipset with 128MB shared memory, NC10: Intel GMA 950 with max. 384 MB SharedMemory. Sure, the NC10 only has 1GB of RAM, but I can easily increase that, though my current PC and laptop set ups only require about 300MB of RAM for everything I do. Actually...looking at these specifications...the NC10 has bluetooth and all that, seems it is a better deal than my laptop (for half the price too). How times change.
I'm also hoping to get another Acer x223w monitor (22") for my PC, which will require yet another re-organizing of my desk.
The latest program I'm working on is a command-line tool for googling using python. So far the only thing it does is take supplied search terms and open the google results in firefox, since the SOAP API from google was dropped, and I've not got the time yet to try to implement the AJAX API in some way or form. I'm doing this mainly for practice so that I can get some hands-on experience with formatting large chunks of input in python, and so I can work with urls a bit.
Also, I noticed something interesting this morning. I have a follower! First one too, it was a bit of a surprise. I thought to myself "has that function always been there?". It's nice to know someone reads these articles (besides people I know personally).
One final note: I'm open to any suggestions if anyone would like a how-to written on a specific linux problem, or anything like that. Just drop a comment with your request and I will do my best to write a how-to on it.
A blog where I review Linux OSes, publish how-tos, or publish/display artwork under the Creative Commons BY license.
Sunday, April 26, 2009
Sunday, April 12, 2009
Some Python scripts
Well, as I mentioned in the last post I made, I plan on updating this blog every other Sunday (besides when I'm on vacation). This is the first of that series of updates (on time too!). I've been using Python a lot for small scripts lately, because a) it's good practice, and b) it's efficient. Below are a few scripts I wrote and an explanation of what they do:
Sorry, but the whitespaces seem to be ignored, so I'll post a link to a pastebin for each one as well. (For those who don't know, whitespace is significant in Python since each indentation level denotes a "block" of code, similar to the function of braces "{}" in Java or most other programming languages).
FileCondenser
http://lswest.pastebin.com/f21a592a4
LineCounter
http://lswest.pastebin.com/f6c52aaa0
updateCheck
http://lswest.pastebin.com/f4d33eb3d
To Buy.py
http://lswest.pastebin.com/f4b4c9849
TO DO.py
http://lswest.pastebin.com/f18550d93
Well, that's all the scripts I've written so far that are half-way useful. I'm thinking about making a github repository for scripts of mine, so if you think it's a good idea, drop a comment and I'll post an update on the blog with the link if I do it.
*edit* I went ahead and made the github repository: http://github.com/lswest/scripts/tree/master
Sorry, but the whitespaces seem to be ignored, so I'll post a link to a pastebin for each one as well. (For those who don't know, whitespace is significant in Python since each indentation level denotes a "block" of code, similar to the function of braces "{}" in Java or most other programming languages).
FileCondenser
http://lswest.pastebin.com/f21a592a4
#!/usr/bin/env pythonThis is a small script that can be run using the arguments ("FileCondenser --help" to see the help information), and is used to take all the files within a directory tree ending in the specified extension, and then copy each line of those files into the output file. I used it for my Computer Science coursework, since I had to print a hard-copy of my code (weird, I know).
#Script to condense the multiple files of a project into one for easy printing/copying
#Author: lswest
import os
import optparse
def main():
usage="usage: %prog [options] args"
p = optparse.OptionParser()
p.add_option('--origin', '-o', help="The location of the files to be read in.", default="")
p.add_option('--output', '-t', help="The location of the file to which the condensed output will be written.", default="");
p.add_option('--extension', '-e', help="The extension of the files to condense.", default="");
options, arguments = p.parse_args()
if options.origin == "" or options.output == "" or options.extension == "":
p.print_help()
else:
print "Input file: %(o)s*%(e)s \nOutput file: %(t)s" % {'o' : options.origin, 't' : options.output, 'e' : options.extension}
ff=open(os.path.join(options.output), "wt")
for root, dirs, files in os.walk(os.path.join(options.origin), "true", "none", "true"):
for infile in [f for f in files if f.endswith(options.extension)]:
fh=open(os.path.abspath(os.path.join(root,infile)))
for line in fh:
ff.write(line,)
fh.close()
ff.close()
if __name__ == '__main__':
main()
LineCounter
http://lswest.pastebin.com/f6c52aaa0
#!/usr/bin/env pythonThis script basically just tallies the number of lines within the specified files, and was done for practice (no real practical reason), but I still thought I'd include it.
#Program to tally the lines in a file
#Author: lswest
import os
import os
import optparse
def main():
usage="usage: %prog [options] args"
p = optparse.OptionParser()
p.add_option('--file', '-f', help="The path to the file to count.", default="")
options, arguments = p.parse_args()
if options.file == "":
p.print_help()
else:
print "Input file: %s" % options.file
count=0
ff=open(os.path.join(options.file))
for x in ff:
count+=1
values={'name': os.path.join(options.file), 'count' : count}
print "The file %(name)s contains %(count)s lines." % values
if __name__ == '__main__':
main()
updateCheck
http://lswest.pastebin.com/f4d33eb3d
#!/usr/bin/env pythonI use this script in my Conky on both my PC and laptop, in combination with a cronjob of "pacman -Sy" to update the database, to display the number of available updates for my system.
#A program to check if there are any updates available for Arch
#Author: lswest
from subprocess import Popen,PIPE
import os
def main():
p=Popen("pacman -Qu|grep Targets|cut --delimiter=\" \" -f 2|sed -e 's/(//' -e 's/)://'",shell=True,stdout=PIPE)
x=p.stdout.read()
if x != "":
tally=int(x)
if tally == "1":
print "1 package to update"
else:
print "%s packages to update" % str(tally)
else:
print "No packages to update"
if __name__ == '__main__':
main()
To Buy.py
http://lswest.pastebin.com/f4b4c9849
#!/usr/bin/env pythonThis is a small script that takes all the text files in my To Buy folder, and prints it out, which I use in Conky. I create the text files with just echo "something to buy" > To\ Buy/something.
## A script to print out my "to buy" list
#Author: lswest
import os
home=os.path.expanduser("~")
for root, dirs, files in os.walk(os.path.join(home,"To Buy")):
for infile in [f for f in files]:
if(infile.endswith("~")!=True):
fh=open(os.path.abspath(os.path.join(root,infile)))
for line in fh:
print "- "+line,
fh.close()
TO DO.py
http://lswest.pastebin.com/f18550d93
#!/usr/bin/env pythonBasically the same as above, besides the fact that it's a to-do list.
#A script to print out my To Do list
#Author: lswest
import os
home=os.path.expanduser("~")
for root, dirs, files in os.walk(os.path.join(home,"Reminders")):
for infile in [f for f in files]:
if(infile.endswith("~")!=True):
fh=open(os.path.abspath(os.path.join(root,infile)))
for line in fh:
print "- "+line,
fh.close()
Well, that's all the scripts I've written so far that are half-way useful. I'm thinking about making a github repository for scripts of mine, so if you think it's a good idea, drop a comment and I'll post an update on the blog with the link if I do it.
*edit* I went ahead and made the github repository: http://github.com/lswest/scripts/tree/master
Saturday, April 4, 2009
An update (very delayed, sorry!)
Sorry about the slow updates on my blog here, I've been kinda swamped with school work, writing articles for Full Circle, and such that I haven't been able to think of things to write when I did have time (or I just simply didn't have time). I am now, however, setting aside every other Sunday of the month (second and last sunday of each month) to updating this blog (short of when I have exams, or when I'm off on Summer vacation, but I'll leave a notice as to how long I'll be gone). Over Summer vacation I'll probably be writing a lot, and so I'll just be unable to post them until I return.
A few things I'm working on these days:
- A website about Linux along with a wordpress blog, and once it's finished I may find hosting for it and use that instead, but I will see how it turns out first.
- Learning Python thoroughly
- Studying for exams
- Planning my gap year out
- Writing for Full Circle
Changes to my computers:
- Both PC and Laptop are now running ArchLinux 64bit with Awesome 3.1
- PC will soon be running with 4GB of RAM
Things I plan on doing:
- LPIC-1 during my gap year
- Getting a second 22" monitor for my PC
- Getting a graphics tablet for my PC
Favourite programs these days:
- MOC (command-line music player)
- My ipod Touch (for checking emails and such without having to pull out my old clunky laptop)
- Conky (I added a to-do list and a shopping list to it using python and an assortment of text files)
That's all I can think of posting for this time. Anyone is free to post suggestions for articles, how-tos, and so forth and I will cover as many as I can. Also, I would like to get a rough estimate of how many people read this blog, so if you feel like just leaving a comment, please do so!
Lswest
A few things I'm working on these days:
- A website about Linux along with a wordpress blog, and once it's finished I may find hosting for it and use that instead, but I will see how it turns out first.
- Learning Python thoroughly
- Studying for exams
- Planning my gap year out
- Writing for Full Circle
Changes to my computers:
- Both PC and Laptop are now running ArchLinux 64bit with Awesome 3.1
- PC will soon be running with 4GB of RAM
Things I plan on doing:
- LPIC-1 during my gap year
- Getting a second 22" monitor for my PC
- Getting a graphics tablet for my PC
Favourite programs these days:
- MOC (command-line music player)
- My ipod Touch (for checking emails and such without having to pull out my old clunky laptop)
- Conky (I added a to-do list and a shopping list to it using python and an assortment of text files)
That's all I can think of posting for this time. Anyone is free to post suggestions for articles, how-tos, and so forth and I will cover as many as I can. Also, I would like to get a rough estimate of how many people read this blog, so if you feel like just leaving a comment, please do so!
Lswest
Wednesday, February 4, 2009
Finally!
I have finally decided my laptop is configured to my liking.
Specs:
HP DV6545EG
2GB of DDR2 RAM
1.8GHz AMD Turion 64x2
160GB hdd (10GB - ArchLinux (ext4), 10GB - ext4 /home for Arch, 10GB - Ubuntu, 17GB - /home for Ubuntu, the rest to Vista)
Nvidia 7150m chipset
Basically, I installed Arch because I was tired of semi-laggy performance for graphics and lots of extra services running in Ubuntu. I decided to go with openbox, and from there I found a nice system tray replacement, panel, dock and found a nice dzen script for battery display (I modified it a tiny bit to suit my needs).
I plan on getting rid of Ubuntu entirely, and removing the old /home, but I'm waiting until I'm sure I have all the config files, fonts, cups settings, etc. that I need copied over before doing so. After all...disk usage isn't bad for a pretty much complete system. Also, if I decide I don't need it anymore, I will also dispose of Vista, but I see no reason to yet, as the space isn't required. Sure, I never use it, but why throw away what you paid money for if it works, right?
The apps I decided on using are trayer for a system tray (top right), cairo-dock for a dock, tint2-svn for the panel, and a dzen2 script off the archlinux for the battery display. All the running system is configured through config files (save for cairo-dock), and battery life (managed by laptop-mode-tools with custom config files) gives me about 2 hours and 15 minutes of battery life, which is roughly 10 minutes more than Ubuntu gave me with slightly tweaked system settings. The wallpaper is a custom one that I call "Electric". I may or may not release this one, I haven't released any for a while. Also, I use xcompmgr for the transparencies.
Ultimately, I'm satisfied with this setup, it boots quickly, is responsive, and looks nice as well. Not only that, it also still hooks up to the beamers (projectors) at school, and (almost) all my keyboard shortcuts are fully functional. Only thing I have to figure out are my media keys, they seem to not be working properly in openbox yet.
Specs:
HP DV6545EG
2GB of DDR2 RAM
1.8GHz AMD Turion 64x2
160GB hdd (10GB - ArchLinux (ext4), 10GB - ext4 /home for Arch, 10GB - Ubuntu, 17GB - /home for Ubuntu, the rest to Vista)
Nvidia 7150m chipset
Basically, I installed Arch because I was tired of semi-laggy performance for graphics and lots of extra services running in Ubuntu. I decided to go with openbox, and from there I found a nice system tray replacement, panel, dock and found a nice dzen script for battery display (I modified it a tiny bit to suit my needs).
I plan on getting rid of Ubuntu entirely, and removing the old /home, but I'm waiting until I'm sure I have all the config files, fonts, cups settings, etc. that I need copied over before doing so. After all...disk usage isn't bad for a pretty much complete system. Also, if I decide I don't need it anymore, I will also dispose of Vista, but I see no reason to yet, as the space isn't required. Sure, I never use it, but why throw away what you paid money for if it works, right?
[lswest@lswest-laptop:~]% df -h [19:48:10 on 09-02-04]
Filesystem Size Used Avail Use% Mounted on
/dev/sda8 9.7G 3.6G 5.7G 39% /
/dev/sda9 9.2G 1.3G 7.4G 15% /home
The apps I decided on using are trayer for a system tray (top right), cairo-dock for a dock, tint2-svn for the panel, and a dzen2 script off the archlinux for the battery display. All the running system is configured through config files (save for cairo-dock), and battery life (managed by laptop-mode-tools with custom config files) gives me about 2 hours and 15 minutes of battery life, which is roughly 10 minutes more than Ubuntu gave me with slightly tweaked system settings. The wallpaper is a custom one that I call "Electric". I may or may not release this one, I haven't released any for a while. Also, I use xcompmgr for the transparencies.
Ultimately, I'm satisfied with this setup, it boots quickly, is responsive, and looks nice as well. Not only that, it also still hooks up to the beamers (projectors) at school, and (almost) all my keyboard shortcuts are fully functional. Only thing I have to figure out are my media keys, they seem to not be working properly in openbox yet.
Labels:
archlinux,
configuration,
custom,
hp dv6545eg,
laptop,
lswest,
screenshot,
setup,
ubuntu
Tuesday, February 3, 2009
That itch to disassemble is back!
Well, on Sunday I was sitting at home and this urge came over me to take something apart (it's been a while since that happened, used to be too busy to do so), and all I really had on-hand that I hadn't yet taken apart and re-assembled was my old, broken iPod Mini (broken in the sense that the battery holds roughly 5 seconds of charge). First I had to heat the glue at the top and bottom with a hair dryer, then I pried them off (using a thin screwdriver and my fingernail to bend the side away), unhook the bottom metal plate (held in place using tension in the tags), disconnected the click-wheel, unscrewed it from the top metal plate, and pushed it out. I even took pictures!
Quick note: the parts were lying on a Lufthansa clipboard, thus the funny colors.
Another slightly off-topic note. The article for Full Circle Magazine I wrote (Command & Conquer, filling in for Robert Clipsham) was released in issue 21 yesterday: http://fullcirclemagazine.org/2009/02/02/full-circle-21-out-now-finally/



Quick note: the parts were lying on a Lufthansa clipboard, thus the funny colors.
Another slightly off-topic note. The article for Full Circle Magazine I wrote (Command & Conquer, filling in for Robert Clipsham) was released in issue 21 yesterday: http://fullcirclemagazine.org/2009/02/02/full-circle-21-out-now-finally/



Thursday, January 1, 2009
Installing Ubuntu 8.10 on a Macbook Santa Rosa (4.1)
Section 1 - Preparatory Steps:
Check to see if your Macbook is a Santa Rosa 4.1:
In Mac OS X go to the Mac Menu (apple logo) and choose "About this Macbook" and it will show the "Model Identifier" in the "More Info..." window.
Preparing the Hard Drive:
Start the Boot Camp assistant (under Applications-->Boot Camp Assistant).
If it says the system is not up to date do the following:
Cancel the boot camp assistant after creating the partition, no need to create a disk of drivers.
Installing rEFIt:
Note: you can skip rEFIt and use the option key to choose between Mac OS X and "Windows" (the Ubuntu partition created by boot camp), but I prefer rEFIt.
First, download a disk image from here: http://refit.sourceforge.net/
Double click the dmg file that you've downloaded, and launch the rEFIt.mpkg file.
Follow the instructions on the screen, and select your Mac OS X installation volume.
Download an Ubuntu LiveCD:
Go to http://www.ubuntu.com/getubuntu/download and download a liveCD of Ubuntu 8.10 Intrepid Ibex. You can choose either 32 or 64 bit, though I have only installed a 32 bit version (this was before Adobe released a native 64bit client).
Once downloaded, insert a blank CD and start Disk Utility (Applications-->Utilities-->Disk Utilities).
Then go to File-->Open Disk Image and select the image you've downloaded.
This disk image will now appear in the left-hand column. Select it.
Click "Burn" and follow the instructions that appear.
Section 2 - Installation:
Booting to the Ubuntu Install CD:
Insert the Ubuntu LiveCD and reboot, and then while it is starting press and hold the "c" key to boot to the CD.
Once the CD menu has loaded, choose the language you wish to use, and then choose "Try Ubuntu" (the top menu choice).
Wait for the system to load, and for the Ubuntu user to login.
Installing Ubuntu:
Once the system has loaded, there will be an "install" icon on the desktop, double-click it. Once the ubiquity installer has loaded, follow the initial steps until you arrive at the partitioning screen.
The partitioning should be step 4.

Once at this screen choose "manual" and hit "next". A new window will load.

From this menu choose the last partition (it will be either FAT or NTFS as a filesystem type). In it's place create a partition of ext3 with mountpoint "/" (without quotes (see NB)). Continue with the install, and tell the installer to proceed without a swap partition (we will create a swapfile (see NB2) later).

On the last screen of the installation, it will display details on what you've configured it to do. Here you need to select the "advanced" button and change the location of GRUB to the filesystem you created in the partitioning screen (the name will be listed on that screen as well, so you need only choose the correct /dev/sdaX value).



Once the install is complete, reboot the macbook, and at the rEFIt boot screen, choose the second icon on the second row (should look like a hard disk). It will then ask you if you want it to re-write the MBR as it was modified. Type in "y" (without the quotes) and wait for it to finish. Then reboot, and choose the Tux icon in the rEFIt boot menu to load Ubuntu. Sign in using your username and password that you set up during install.
NB You may be able to set up Ubuntu with a / filesystem and a /home filesystem, though I don't know this for sure, as I didn't try it. Don't own a Macbook either, so I won't be able to find that out for the time being. There is a limit to partitions you can create.
NB2: A swap file is like virtual memory in Windows, and can be used when the RAM is full.
Section 3 - Post-Installation:
Adding a Swap file:
First create the swap file with 1024MB (1024 x 1024 = 1048576)
Setup Linux swap and turn it on
Edit the /etc/fstab
and add this line to your /etc/fstab
Wireless Card
Insert an ethernet cable to your Macbook, and wait until it connect. Then, go to System--
>Administration-->Hardware Drivers. There should be a Broadcom driver listed. Select it and choose "activate". Enter your password and wait for it to download and install the drivers. A reboot will be required to have it working.
iSight
To enable the MacBook's built-in webcam, simply follow these steps:
1. Mount your Mac OS X partition
2. Install the isight-firmware-tools package and direct it to your iSight firmware on the Mac OS X partition (just confirm the default when mounted to /MacOSX)
3. Restart HAL
The Code:
Touchpad:
Here we will create an fdi file for HAL to use, in order to enable two finger scrolling and two-finger tapping for right click.
then enter the following into the file (blogspot wants to render the xml, so I have to put it up as a picture):

Microphone:
https://wiki.ubuntu.com/MacBook/SantaRosa
(The configuration steps were taken from this site, as it was what I used)
Check to see if your Macbook is a Santa Rosa 4.1:
In Mac OS X go to the Mac Menu (apple logo) and choose "About this Macbook" and it will show the "Model Identifier" in the "More Info..." window.
Preparing the Hard Drive:
Start the Boot Camp assistant (under Applications-->Boot Camp Assistant).
If it says the system is not up to date do the following:
- Run system update and download all updates available
- Go to Applications-->Utilities-->Disk Utilities.
- Select your hard drive
- Click the large green "Enable Journaling" button on the top bar.
- Re-launch boot camp (after any reboots due to updates)
Cancel the boot camp assistant after creating the partition, no need to create a disk of drivers.
Installing rEFIt:
Note: you can skip rEFIt and use the option key to choose between Mac OS X and "Windows" (the Ubuntu partition created by boot camp), but I prefer rEFIt.
First, download a disk image from here: http://refit.sourceforge.net/
Double click the dmg file that you've downloaded, and launch the rEFIt.mpkg file.
Follow the instructions on the screen, and select your Mac OS X installation volume.
Download an Ubuntu LiveCD:
Go to http://www.ubuntu.com/getubuntu/download and download a liveCD of Ubuntu 8.10 Intrepid Ibex. You can choose either 32 or 64 bit, though I have only installed a 32 bit version (this was before Adobe released a native 64bit client).
Once downloaded, insert a blank CD and start Disk Utility (Applications-->Utilities-->Disk Utilities).
Then go to File-->Open Disk Image and select the image you've downloaded.
This disk image will now appear in the left-hand column. Select it.
Click "Burn" and follow the instructions that appear.
Section 2 - Installation:
Booting to the Ubuntu Install CD:
Insert the Ubuntu LiveCD and reboot, and then while it is starting press and hold the "c" key to boot to the CD.
Once the CD menu has loaded, choose the language you wish to use, and then choose "Try Ubuntu" (the top menu choice).
Wait for the system to load, and for the Ubuntu user to login.
Installing Ubuntu:
Once the system has loaded, there will be an "install" icon on the desktop, double-click it. Once the ubiquity installer has loaded, follow the initial steps until you arrive at the partitioning screen.
The partitioning should be step 4.
Once at this screen choose "manual" and hit "next". A new window will load.
From this menu choose the last partition (it will be either FAT or NTFS as a filesystem type). In it's place create a partition of ext3 with mountpoint "/" (without quotes (see NB)). Continue with the install, and tell the installer to proceed without a swap partition (we will create a swapfile (see NB2) later).
On the last screen of the installation, it will display details on what you've configured it to do. Here you need to select the "advanced" button and change the location of GRUB to the filesystem you created in the partitioning screen (the name will be listed on that screen as well, so you need only choose the correct /dev/sdaX value).
Once the install is complete, reboot the macbook, and at the rEFIt boot screen, choose the second icon on the second row (should look like a hard disk). It will then ask you if you want it to re-write the MBR as it was modified. Type in "y" (without the quotes) and wait for it to finish. Then reboot, and choose the Tux icon in the rEFIt boot menu to load Ubuntu. Sign in using your username and password that you set up during install.
NB You may be able to set up Ubuntu with a / filesystem and a /home filesystem, though I don't know this for sure, as I didn't try it. Don't own a Macbook either, so I won't be able to find that out for the time being. There is a limit to partitions you can create.
NB2: A swap file is like virtual memory in Windows, and can be used when the RAM is full.
Section 3 - Post-Installation:
Adding a Swap file:
First create the swap file with 1024MB (1024 x 1024 = 1048576)
sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576
Setup Linux swap and turn it on
sudo mkswap /swapfile1
sudo swapon /swapfile1
Edit the /etc/fstab
sudo gedit /etc/fstab
and add this line to your /etc/fstab
/swapfile1 swap swap defaults 0 0
Wireless Card
Insert an ethernet cable to your Macbook, and wait until it connect. Then, go to System--
>Administration-->Hardware Drivers. There should be a Broadcom driver listed. Select it and choose "activate". Enter your password and wait for it to download and install the drivers. A reboot will be required to have it working.
iSight
To enable the MacBook's built-in webcam, simply follow these steps:
1. Mount your Mac OS X partition
2. Install the isight-firmware-tools package and direct it to your iSight firmware on the Mac OS X partition (just confirm the default when mounted to /MacOSX)
3. Restart HAL
The Code:
sudo mkdir /MacOSX && sudo mount /dev/sda2 /MacOSXYou can then test your iSight with e.g. cheese (sudo aptitude install cheese && cheese).
sudo aptitude install isight-firmware-tools
sudo invoke-rc.d hal restart
Touchpad:
Here we will create an fdi file for HAL to use, in order to enable two finger scrolling and two-finger tapping for right click.
sudo gedit /etc/hal/fdi/policy/appletouch.fdi
then enter the following into the file (blogspot wants to render the xml, so I have to put it up as a picture):
Microphone:
- Open Volume Control by right clicking on the volume icon and selecting "Open Volume Control".
- Click on Preferences and enable Capture, enable Mic Boost, and then close Preferences.
- In the Recording tab of Volume Control, raise the Capture level.
- In the Playback tab of Volume Control, raise the Mic Boost level.
- Under System > Preferences > Sound choose "HDA Intel ALC885 Analog (ALSA)" for Audio
- Conferencing / Sound capture
- Test it by running gnome-sound-recorder. Ensure that "Capture" is selected in the "Record from input" dropdown.
https://wiki.ubuntu.com/MacBook/SantaRosa
(The configuration steps were taken from this site, as it was what I used)
Wednesday, November 26, 2008
Terminal Commands (Introduction) Part 1
Introduction to *nix Commands
ls [folder] - lists the content of current folder unless another folder is passed as an argumentcd [folder] - changes directory to supplied folder. Other arguments can be "~" (home folder of user running command) and ".." (move up one directory), both these must be entered without the quotes.
man [command] - will display the manual page for any command supplied that offers manual pages. Will offer in-depth explanation of every flag and argument possible with the supplied command.
rm [flags] [directory or filename] - Commonly used to delete files or folders. To delete a non-empty folder the -r (recursive) flag must be supplied.
su [username] - switches user to supplied username. If no username is supplied it will default to root.
sudo [command] - runs the supplied command as super user (sudo = super user do). This will require a password for an admin account, however, it will cache (store) the password for a short time after the first use. This cached password will not be available anywhere but the original terminal shell in which it was first supplied.
locate [term] - is used to locate files that contain the term supplied. Requires "sudo updatedb" to be run to update the locate database.
grep [term] - program that will search supplied input for term supplied (is often used with piped [see below for explanation] input)
cp [flag] [file] [destination] - copies specified file to destination (or directory if the -R (recursive) flag is supplied)
ln -s [original location] [symbolic link] - creates a symbolic link (such as a shortcut in windows) to files, folders, or programs.
echo [content] - used to echo content (enclosed within quotation marks) to the screen, can be diverted to a file using the ">>" characters and then the path to the file, including the file name. (e.g. echo "test123">>Desktop/test123.txt)
cat [filename] - used to output the content of the file to the terminal (again, can be diverted to a file or to the grep command using aforementioned methods).
mkdir [directory name] - Creates a new directory in the current folder, unless a full file path is supplied for the new directory.
pwd - Is a command that prints the working directory (e.g. if you run it in /home/
Programs are usually installed to either /bin/ or /usr/bin, and almost all programs offer manpages, allowing you to use any program you need to just by knowing ls and man. These commands should exist in all *nix environments (mac, linux, unix), however, there may be slight alterations to how they must be entered.
1. A pipe is the character "|" and is used to divert output of a previous command into yet another command (e.g. 'ls|grep "home"')
Subscribe to:
Posts (Atom)