Thursday, November 18, 2010

Speeding Up Your Surfing

Ok, so one of these days I'm going to have to compile all of these steps that I took to get my Ubuntu System where I wanted it to be. In the mean time here is another tip. This one speeds up your surfing (just a little) and protects you from DNS outages.

Just follow these steps to add OpenDNS servers to your system. Don't forget to read the bottom of the article. Yes do what the bottom of the article says too; unless you want to possibly have other problems in the future.

OpenDNS is good for Windows and Mac as well but there are simply different steps for adding those to each relative OS.

Labels: , , ,

Wednesday, November 17, 2010

Add mp3, WAV and EXIF Columns to Your Nautilus View

Wow I am actually quite amazed that this sort of a thing is not already integrated into the Nautilus file manager. It seems such a basic thing to be able to add additional columns to the file viewer of your choice. I hunted all over the Nautilus options before I started looking online. I can vouch for this solution below, I just did it myself. And here is the link to the guy that deserves the credit for this work.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A long time ago, we wrote about a Nautilus extension (called Nautilus Columns) which adds music (mp3, WAV and FLAC) and EXIF metadata info to the Nautilus List View. Well, I though I'd rescue this extension (as it's no longer packaged as a .deb) and upload it to the WebUpd8 PPA so it can be easily installed.

Here's a Nautilus screenshot before using this extension:

Nautilus

And after:

Nautilus Columns


The extension supports displaying the following info in the Nautilus list view columns:
  • mp3, WAV, FLAC: artist, track, album, title, bitrate, date, genre, length and sample rate
  • EXIF: dateshot, image size, software and flash


To install the Nautilus Columns extension (in Ubuntu 10.04 Lucid Lynx and 10.10 Maverick Meerkat), use the following commands:
<code>sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install nautilus-columns</code>

Once installed, it should automatically restart Nautilus but in case it doesn't, manually restart Nautilus using the following command:
<code>nautilus -q</code>

Then go to Edit > Preferences > List Columns and check the columns you want to see. Then navigate to a folder where you have some music files and switch Nautilus to the List View (View > List, or by using the Nautilus Elementary view widget).

Now there's only one thing missing: being able to play the music directly in Nautilus (no, the music preview built into Nautilus is not what I'm looking for).

I've tested the package on both Ubuntu 10.04 and 10.10 32bit. Since it's written in Python, there shouldn't be any issues on 64bit, however note that I didn't test it on 64bit. Update: Zagrux posted a comment below confirming he tested it on 64bit and it works (I was unsure about the dependencies).





Labels: , ,

Saturday, November 13, 2010

Opening Your Windows URL collection in Ubuntu

Thanks for those of you that are joining me in my adventure to finally live in the Linux world; specifically in the Ubuntu flavor of things.

If you are migrating from Windows to Linux there is a chance that you have a few .url files that you've kept over the years. If you have just a couple then this may not be a big deal to you. However if you are like me and have hundreds of them then this solution may be worth your while. If you take out all the time I took to study every nuance of everything I did (hey I really want to understand this stuff), then it only took me about ten minutes to put this soltion into place.

The guy who did this certainly needs his own post in this week's tip of the week. The only thing I can take credit for is spending a couple of hours to find this solution and then verifying that it works in Ubuntu 10.04 (a.k.a Lucid). Without further ado here is oomingmak's instructions.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The explanation of how I discovered the various pieces of the jigsaw puzzle (that finally allowed me to get .url files working on Linux) can be found in my earlier posts in this thread. However, below is a summary of the steps that I took to get it working.

As I said before, I'm a complete novice when it comes to Linux, so my method might not be the most efficient way of providing this functionality, but no one else has come up with any kind of solution, and at least I know that my method definitely works.

Apologies if my instructions are a bit too simplistic, but you did say that you are a total noob, so I've tried not to make any assumptions about what you already know how to do on Linux. By keeping my instructions simple, it should hopefully make it easier for other newbies to
understand and follow as well.





- Steps to get .url internet shortcuts to open in Firefox on Ubuntu


1.
Create a script file that can read and extract the web links contained within a .url file.
The following script is the one that I created (after much struggling) based on the 'nsurl' code that I found on the internet
. The version below contains the fix for the 'URL truncation' problem that was mentioned earlier in this thread.

Right-click on your Desktop and select 'Create Document' and then 'Empty File'. This will create a new blank text file. Open the file and paste the the script shown below into it. Save the file and name it: fx-url

Code:
#!/usr/bin/perl

# Script to make Microsoft Windows Internet Shortcuts (*.url) work on Linux.

# Oomingmak fixed version. This script now works properly.
# It no longer cuts off the last character of the URL.

# Open up the file
open(F,"<$ARGV[0]") or die "$0: Could not load Internet Shortcut file $ARGV[0]!\n";

# Find the URL
while($in = <F> and not $url) {
chomp($in);
if($in =~ m/\s*URL\s*\=\s*\S*\s*\015*/) {
$url = $in;
$url =~ s/\s*URL\s*\=\s*//; # Filter out the beginning stuff
$url =~ s/\s*\015+//; # Filter out the nasty DOS carriage return!


}
}

system "firefox $url &";# or die "$0: Could not open $netscape\n"


.

2. Make the script executable.

Once you have created and saved the script, you need to make it executable so that it can run like a program. To do this, open a command line terminal window and use the 'cd' command to change directory to where you have the script stored (for example: cd Desktop) and then type:
Code:
sudo chmod a+x fx-url


.

3.
Place the executable script into the /usr/bin folder.
You must have 'root' privileges in order to put anything in /usr/bin (because it's a system folder). This means that you must use the 'sudo' command when issuing the file move instruction. Copy the command shown below and paste it into the terminal window:
Code:
<font color="Black">sudo mv fx-url /usr/bin/fx-url</font>


.

4. Create a symlink to the executable script (in the same /user/bin folder).
To create a symlink to the fx-url file, paste the following command into the terminal window:
Code:
sudo ln -s /usr/bin/fx-url /usr/bin/'Web Browser'
This symlink step is not essential, but it does allow you to specify the name that appears in the context menu when right-clicking on .url files (without having to mess with the name of the script itself). If you don't do this step, then when you right-click on an internet shortcut, instead of seeing a menu item that says "Open with Web Browser" you will instead just see "fx-url" (which is not very nice looking). Seeing as you are only renaming the symlink, you can choose whatever name you'd like to see in the context menu. Just replace the text 'Web Browser' (in the above command) with the name that you prefer.




5.
Create a Mime type to recognise .url files.
A 'mime type' must exist for each file type. Mime types are what the system uses to detect the presence of a certain type of file. We therefore need to create a mime type for .url files so that the system will be able to identify them in future. By far the easiest way to work with mime types is to use a program called AssoGiate.

If you are using Ubuntu 7.10 (Gutsy Gibbon) or later, you can easily install AssoGiate
by using the 'Add/Remove' item on the 'Applications' menu. Just search for 'AssoGiate', install it, and then skip to step number 6. (Make sure that you have selected 'Show: All Available Applications' in the 'Add / Remove' dialog, otherwise AssoGiate won't show up in the search results).

For earlier versions of Ubuntu, you will need to install AssoGiate from source code using the instructions below:
  • Install the libraries that are needed in order for AssoGiate to work. You do this by pasting the following into a command line terminal:
  • Unpack the downloaded file and follow the 'Basic Install' instructions that are located in the file called INSTALL. See my post here if you require more information.
The installation puts an AssoGiate icon under your 'Applications' menu, so you just go to Applications > System Tools > File Types Editor and run it from there whenever you need to make file type changes.




6. Create a url file type.
Open AssoGiate. Click the 'New' button on the toolbar to create a new Mime type. Enter the settings exactly as they are shown below and then save your changes:


For the Default Icon setting (shown above), just use the browse button . . to select any icon of your choosing.













7. Associate the executable script with the .url file type.
Now that you've created a url mime type, your system knows how to recognise which files are url files, but it still doesn't know what it should do with them once it's identified them. We therefore have to associate the .url file type with the executable script that we made earlier. To do this, find any .url file, right-click on it and choose the 'Properties' menu. Go to the 'Open With' tab and press the 'Add' button. (An 'Add Application' window will appear). At the bottom of the Add Application window is an option called 'Use a custom command', click this option and browse to /user/bin and then select the symlink file that you created in step number
4 - [for example: /usr/bin/Web Browser ]. Click the 'Add' button to save your changes.



8. Make the associated action the default option.
If you don't specify a 'default' action, then your .url files won't be activated automatically when you click on them (you will instead always have to right-click the .url file and choose the required option from the context menu). To make opening in Firefox the default action, go back to the 'Open With' tab of any .url file (Right-click on .url file > 'Properties' > 'Open With') and click the dot to the left of the entry that you just added (e.g. Web Browser). Next, open a Nautilus file manager window and go to the '
Edit' menu and select 'Preferences' then 'Behavior'. In the 'Executable Text Files' section, make sure that 'View executable text files when they are clicked' is selected.

To check that the default option change has worked properly,
restart X (by pressing: Ctrl + Alt + Backspace) then log back in to your desktop and right-click on any .url file. You should now see the top entry of the .url context menu saying: Open with "Web Browser".

Clicking a .url file should then automatically start Firefox and go to the specified web site. If Firefox is already running then the web page will just open in a new tab.


Done!






Labels: , ,

Monday, November 08, 2010

GoogleTalk for Ubuntu

Ok ladies and gents. I'm feeling a little tired so I'll be to the point with this tip. I downloaded the Google Voice plugin (32bit Ubuntu version) from this site. And couldn't figure out why it wasn't working at first. Even realized that the entire file wasn't coming in (though it was very close).

Turned out to be a simple matter of getting the 'direct' url where the file was located by copying the URL from the download manager in Firefox. Then I could go to a terminal windows (command line) and do a wget -c http://dl.google.com/linux/direct/google-talkplugin_current_i386.deb which completed the download in less than a minute.

Please email me if you have any specific questions about this. Enjoy freedom whenever possible.

Labels: , ,

Friday, November 05, 2010

WebMastering Again?

Ok, so I used to be a bit of a webhost guy about a decade or so ago but I was doing it all for fun back then. There seemed to be too much competition at the time and I was really too busy being an Executive Director slash Volunteer Coordinator slash Lead Tech to really get into the hosting stuff. But still I enjoyed it. I bought a few domains and had a reseller account. But I was really only a webhost for myself <ha ha>.

Here now, ten years later it looks like the skills that I started to learn then are becoming useful again. I'm on my third client for web design and hosting with a forth one being recommended to me. And I think this is 'really' useful for me because it takes off the rough edges on my HTML/XML and lays the foundation for the MySQL/PHP database work that I've been trying to break into (only one floundering client in that area at the moment).

Ok so it looks like I'll be writing a little about my work in this area since it's starting to take off a little bit. And once I feel like I've mastered most of the skills that I need then I'll be ready to hire one or two web slingers to take my place while I move onto the database/MySQL/PHP that I want to gain speed on.

Labels: ,

Tuesday, November 02, 2010

Getting Started with Unbuntu/Linux

You ever wanted to abandon Windows and join the bandwagon of the millions that have already installed and are enjoying Linux? Well; me too. Which is why I'm going to share my journey with you and hope you can benefit from it as well. I'm no slouch when it comes to technology. But I have a 'lot' of time and effort invested in the Windows world. Which is why I have had such a hard time moving from Windows to Linux even though I know of a hundred benefits.

It seems that every time that I would move to Linux for a little while, via a Linux LIVE CD or a USB installation, there would be some project that would suck me back into windows. I can't say that I have had a compelling reason to go back to Windows, it really was sort of like being 'sucked' back into it. After being sucked back to it about ten times in a row I've bought a new desktop computer and I purposefully did not buy a copy of Windows to put on it. So now I'm stuck; but stuck by choice. I'm hoping to give myself no option other than sticking it out with Linux.

So what flavor did I go with? There are hundreds of "flavors" that you could choose. And if you have no clue about what all of this stuff is you could spend endless hours, as I have, trying to figure out what flavor of Linux or Unix you should go with. So lets go with simplicity of thought; I've decided to go with Ubuntu. Yes you will get a 'lot' of heated debate from some really purist Linux/Unix users about what I'm advising you of but I think the average Windows users will relate more to what I'm going to say. You the average Windows user, in order to keep your attention, you are going to want to use the easiest Linux distribution available. That phrase "easiest to use" has a lot tied into it. For the move in and of itself isn't going to be one hundred percent easy. Easiest to use for most Windows users means that it is not only the most similar to Windows in the interface, but that it's also the easiest to find the answers to when (notice I did not say "if") you have problems.

I spent many hours trying to poor over a couple of the other finalists when I've tried to make the change previously. And I'll just mention one of those finalists (Fedora) so we can discuss one of the biggest problem that I had and I would like to save you from. As a professional problem solver in the IT field I don't have any better resource to resolve issues than the Internet. I had heard that, from a security and stability perspective (just slightly better), Fedora was the way to go.

So I embarked on this journey knowing that there were going to be hurtles and challenges. I have a great deal of patience and troubleshooting experience. I was fully prepared for everything, that is except for the unexpected misinformation that I was going to run into. You see, in the Linux world Ubuntu is 'so' popular that every time that I did a search for solutions I was getting answers that applied to Ubuntu and did not work in Fedora. Yes they were almost the same solutions but computers don't give you errors like "ok that was close but you really meant to type this didn't you?"

So what I've concluded is that there is already 'enough' of new information that I'm going to need to learn. So I'm going to go with the version that is easiest to find answers to for now, and then if I have a compelling reason to move to another distribution later then I'll be armed with enough Linux experience to do that without it being such a time sucking excavation.

The Low Down

Now that we are done with that lets get to the steps that I suggest to get you up and running as quickly as possible.
1) Go to the Ubuntu Homepage and download (for free) the CD Image then burn it onto CD.
... If you have a slow Internet Connection you might want to order a CD from them.
2) Boot to the CD and choose the "Try Ubuntu" option.
... This does not install Ubuntu yet it simply allows you to take it for a test drive and makes sure your hardware will play well with it.
.. This is also useful if you plan to go computer shopping. If the computer you hope to get will run this CD then it's a good choice.
3) If you like what you saw, boot to the CD again but this time choose install.
... Always make sure you have an installation disk for your previous OS and a backup for all the programs and data that was on your computer previously. Email me if you have any questions here.
4) Ok so you have Ubuntu and installed and you think it looks pretty good. Before you really get going your going to want to consult the update manager.
... This may take hours especially if you have a slow Internet connection.
... If the CD you used to install Ubuntu was outdated, then this could possibly take two or three days.
... Good think you can do other stuff while you wait for this :-)
5) Lastly to really get all of the cool programs that will make your life easier, check out the steps of this  great article that I followed on this subject already.
... Just in case this article ever disappears I will try add a TechSupportTV entry of these steps.


Ok so what thought would I like to end this article with? ... Hmm; "Would Jesus use Linux?" :-)





Labels: , ,