Saturday, July 19, 2008

Create a symbolic link

First go to the directory where you want the link. Then use the following command:
sudo ln -s /path/to/file nameoflink
Note: "nameoflink" is whatever you want to call your link.

Friday, July 18, 2008

How to convert VOC files (and how to run a C program)

Update: There is a new website by Aria Stewart based on Dave Coffin's program to convert RCA-VOC files. Here is the link.

I have an RCA voice recorder and wanted to convert the VOC (specifically RCA-VOC) files to something I could use. I found the perfect program on Dave Coffin's page.
1. First install "sox" using synaptic.
2. Then, simply download Dave Coffin's free C program called "devoc.c."
3. You then have to make the devoc program into something you can use. Do this by running the following command:
gcc /path/to/devoc.c
This will spit out a file called "a.out" to the same directory where devoc.c is located.
4. Rename "a.out" to something else, such as "devoc" (no file extension is needed)
5. To run devoc from where it is, change to that directory in terminal and type ./devoc with an option. However, to make running devoc a little easier, move the new devoc file to /usr/bin by typing the following into the terminal:
sudo mv /current/path/to/devoc /usr/bin
6. Now to run devoc, simply open a terminal and type devoc with an option
7. To see a list of options, type the following into the terminal:
devoc
8. Finally, run the program with the option you desire, for example, to convert a VOC file to a WAV, type the following:
devoc -w /path/to/file.voc
This will convert the file and put the new WAV file in the same directory as the VOC file. I like soundconverter (available in synaptic) to then convert the WAV file to an MP3.

Sources: Dave Coffin AND Computing.net
Webpage Converter
Windows Conversion Program link

Sunday, July 06, 2008

The Command Line Way to Remove a Package's Unused Dependencies

When removing a package, if you want to also remove the unused dependencies associated with it, type the following:
sudo apt-get autoremove packagename


To also remove any configuration files with the dependencies, type:
sudo apt-get --purge autoremove packagename

Wednesday, June 25, 2008

Command line way to install a package

Use the following command to install a package:
sudo dpkg -i /path/to/filename.deb

PulseAudio, Flash, and Firefox

After installing Hardy, I was having a variety of problems with sound as well as Flash. Apparently there is some conflict between Flash and PulseAudio. For example, I was only getting sound from the first application I launched. So if I had firefox open, it would have sound. But then if I then opened a second application like rhythmbox, exaile, etc, no sound from that. This also worked the opposite way. In addition, I was having a problem with Firefox crashing everytime flash was running on sites like youtube.

The following has worked for me:
1. Uninstall the following packages using synaptic: libflashsupport and flashplugin-nonfree
2. Install the following packages using synaptic: pulseaudio-module-hal pulseaudio-module-x11 libasound2 libasound2-plugins padevchooser swh-plugins libao-pulse ladspa-sdk libsdl1.2debian libsdl1.2debian-pulseaudio
3. Run the following command to edit the /etc/libao.conf file:
sudo gedit /etc/libao.conf
Edit the file so that it looks like this:
default_driver=pulse
Then save and close the file
4. Run the following command to edit (or create if has not been) the asound.conf file:
sudo gedit /etc/asound.conf
Then add the following to the file:
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}

Then save and close the file. This addition makes it so that all sound runs through pulse.
5. Go to System-->Preferences-->Sound and change the first four lines to "PulseAudio Sound Server"
6. To get flash working properly, we need to download the beta version of Flash 10. Download the deb package here. Then double click to install. To see other versions, check the site here.
7. Finally, reboot.

Sources: The (almost) Perfect Pulse Audio Setup and PulseAudio Fixes & System-Wide Equalizer Support (Hardy Heron)

Friday, June 06, 2008

The command to use to search for installed packages in terminal

The following command will let you check to see if a package is installed:
aptitude search package-name

If you see an "i" next to the package name, it is installed.

Bluetooth Headsets with Hardy

I used the Bluez Wiki page to help get my bluetooth headset working with ubuntu. It basically uses the new default pulseaudio to divert the sound to your headset. I don't know if it matters, but it's a Samsung headset. Also, I know some people have had problems with skype which this post does not address.

To get it working, do the following:
1. Install the following package using synaptic: padevchooser
2. Type the following into a terminal to get your headset's mac address and then write it down:
sudo hcitool scan
3. Install Blueman using the instructions at the Blueman website. This is the only way I could bond / pair / connect my headset to my computer without getting an obex error. As long as Blueman shows a lock next to your headset, it should be good. I believe the problem occurs because the default ubuntu/gnome bluetooth app is trying to browse the headset for files.
4. Next use the following command to edit (or create if it doesn't already exist) the asound.conf file (note that "nano" can be replaced for "gedit" if you like):
sudo nano /etc/asound.conf
Add the following to the file as stated on the Bluez wiki page:
pcm.bluetooth {
type bluetooth
device 00:11:22:33:44:55
}
and save the new file
*Note that "xx.xx.xx.xx.xx.xx" should be replaced by the mac address you found in step 2.
6. Run the PulseAudio Device Chooser found in Sound & Video and will then show up in the tray.
7. Under preferences, choose to start on login. Also, check what you like under "configure local sound server."
8. Restart your computer.
9. In a terminal type:
pactl load-module module-alsa-sink device=bluetooth
This command has to be run each time you start your computer. I have not found a way to automate it without getting an error message somewhere. Therefore, I just made a launcher using the above command to speed things up.
Also, although I have not tested it, the following command should work to get a bluetooth microphone working:
pactl load-module module-alsa-source device=bluetooth

You should now be able to choose your bluetooth headset in the pulse device chooser under "default sink." If this doesn't work, try using the volume control option in the pulse device chooser, right click on the stream that is playing, and choose the bluetooth headset.

The Bluez wiki page also gives ways to send audo to the headset for only specific programs. (I found exaile can be set up using the rhythmbox instructions). Also, if this doesn't work for you, please check this thread at ubuntu forums for a slightly different approach.

Changing preferred actions or programs for media in Hardy

Hardy seems to have moved the preferred actions around for media. Some of it can still be configured in Systems-->Preferences-->Preferred Applications. However, to set the defaults for what happens when something like a CD is inserted, you must change it in nautilus. Therefore, pull up your home folder or any other folder and go to Edit-->Preferences-->Media Tab and make the changes you want.

Saturday, May 31, 2008

Problems with Hardy (Emerald, Java, & Samba Config)

Here are the solutions to a few problems I had with Hardy:

Emerald:
Emerald wasn't actually changing my windows even though a different theme was highlighted. So add the following (as a new startup program) to sessions (Systems-->Preferences-->Sessions):
emerald --replace

Java:
I was using sun's version of java but it wasn't working for me on firefox and I found this thread to help. First if you want to use sun's version, install the following packages: sun-java6-jre and sun-java6-plugin. To get it to work, first try uninstalling the package icedtea-gcjwebplugin. Then restart firefox and test again on the java webpage. If that doesn't work, try also uninstalling openjdk-6-jre. That did it for me.


System-Config-Samba:
For anyone that doesn't know, this package makes Samba configuration incredibly simple. (As a side point, I will show possible settings in a separate future post). However, the samba config utility wasn't working. Here's what I had to do. Run the following command:
sudo touch /etc/libuser.conf

Thanks to Ubuntu Forums for the answers.

Saturday, December 01, 2007

If you mess up your display...

In messing with my display settings, I killed everything. I found two actions helpful in getting it back to normal:
First, I had a screen with no command prompt. To get one, press Ctrl+Alt+F1
Second, to get the interactive display setup, type: sudo dpkg-reconfigure xserver-xorg

Sunday, May 13, 2007

Grip Settings

I've recently switched to Grip after having problems with Sound Juicer. I encode to mp3 using lame and VBR settings. To use Grip, download "grip" and "lame" using synaptic. For the settings, I referenced the following pages: Grip Configurations (which list switches used below), Lame switches, a HOWTO from the ubuntu forums (be sure to read the whole thing for the full story), and Musicbrainz FreeDBGateway instructions. With this information, I set up Grip in the following way:
1. Go to the Grip config tab
2. Under the Rip settings, I only changed where the ripped filed were stored. Therefore, I changed the default to: ~/rip/%A/%d/%n.wav
3. Under the Encode settings, I first changed the Encoder to "lame." I then changed the Encoder command-line to: -V 1 --vbr-new %w %m
The first part (-V 1 --vbr-new) contains lame switches which are described in the lame page listed above. Note that the "1" can be changed to whatever you like between 0 and 9. The differences are descirbed here. The second part (%w %m) are grip switches and, according to the HOWTO listed above, should not be changed.
4. I next changed the "Encode file format" line to: ~/music/%A/%d/%t - %A - %d - %n.%x
The first part (~/music), like in the Rip settings, tells it where to store the encoded mp3's. Everything after describes the sub-directories within ~/music and the sonn to be encoded mp3 file name. A description of what these mean can be found by looking at the switches section of the Grip page listed above.
5. Then under the options sub-tab of Encoder settings, I unchecked all references to m3u's as I don't use them.
6. Next, under the ID3 tab, I checked the "Add ID3 tags" box.
7. Next, under the DiscDB tab, I made the default "freedb.freedb.org" my secondary server by simply copy and pasting it from the DBServer line in primary server tab to the same in the secondary server tab. I then changed the DBServer line in the primary server tab to "freedb.musicbrainz.org" All else stayed the same. This is so it checks the Musicbrainz database first. The DBServer line to use was found on the Musicbrainz site listed above.
8. Finally, in the Misc tab, I checked "Do not lowercase filenames" and "Do not change spaces to underscores" This was done for obvious reasons.

Monday, April 23, 2007

Restricted Formats on Feisty

The best thing that I've found about Feisty so far is the grouping of the restricted formats into one file. To get the them, simply download and install the "ubuntu-restricted-extras" packages using synaptic. This will cover the gstreamer plugins, flash, jre, and msttcorefonts. You will still need to get libdvdread3, libdvdcss2, and libxine1-ffmpeg separately for dvd's and mp3's. libdvdcss2 comes from the medibuntu repository. See the instructions here regarding medibuntu. There is a link on the right to the key and the new apt line for feisty is:
deb http://medibuntu.sos-sts.com/repo/ feisty free non-free

Getting Rid of Default Keyring/nm-applet Message

I kept getting a message requesting me to type in my default keyring password for nm-applet whenever I logged into Feisty. To get rid of it, do the following which will log in the keyring password automatically:
1. Make sure the default keyring manager password is the same as the root password. If not, delete default.keyring from you home/.gnome2/keyrings/ directory. When you log into Feisty again, it will prompt you to make a new one. When it does, make it the same as your root login.
2. Download and install libpam-keyring using synaptic.
3. Bring up an editor for /etc/pam.d/gdm. For example, type the following into a terminal: sudo gedit /etc/pam.d/gdm
4. Add the following to the end of the file: @include common-pamkeyring
5. Save the gdm file and exit the editor.

Friday, April 20, 2007

Feisty Guide

Feisty has been released. Therefore, I have updated the Ubuntu Guide link on the side. The Ubuntu Guide site links to previous versions if you need them.

Thursday, April 05, 2007

Ubuntu Magazine

Check out the new Ubuntu Magazine (articles listed at the bottom of the wiki page). It's sure to be a useful site for instructions.

Thursday, March 15, 2007

DVD Burning Apps

So far, I have been using k9copy for shrinking and ripping and brasero (previously bonfire) for straight ripping, however, there are many others. Plus, k9copy is native to KDE even though it will run on gnome. Therefore, check Assente's list of the "10 Best" linux DVD ripping applications.

Saturday, February 10, 2007

Deleting Themes

Here's a good post on how to delete themes. (See the post referring to the "how to install anything" page on how to install themes) Basically, to uninstall a theme such as Mist, run the following command:
sudo rm -R /usr/share/themes/Mist

However, some themes are in your home folder in the .themes directory. So change that in the command above.

Another way is to start nautilus under root by running the following command:
sudo nautilus
Then go to the .themes directory in your home folder or /usr/share/themes/ and delete the appropriate theme folder from there.

Sunday, January 28, 2007

Connecting to a Network Drive on Startup

This post is mostly drawn from the Ubuntu Starter Guide directions with some modifications and assumes you already have Samba set up (see previous post on file sharing). You also want to set a mount point on your local computer for the shared directory. To do this, pick a name for the folder (I'll choose Storage) and type this into a terminal:
sudo mkdir /media/Storage

Then you want to edit /etc/fstab by adding a line for the network folder as shown below. The formula should be:
(network location) (mount point) (filesystem) (options) (0) (0)

So assuming my shared folder is named Bob and is on my desktop named Ugly, and assuming that the mount point on my local computer is at /media/Storage, then the fstab entry would be as follows:
//ugly-desktop/Bob /media/Storage smbfs defaults,users,dmask=777,fmask=777 0 0

Saturday, January 27, 2007

Just some Dilbert

Thanks to the Ubuntu Blog for linking to the linux toons page.








Ubuntu Blog ping

Wednesday, January 24, 2007

Installing Stuff on Ubuntu

Simon Gray has posted an excellent tutorial on "How to install ANYTHING in Ubuntu." It covers everything from synaptic, to the terminal, to compiling and installing a package with source code.