Back to a Walking Speed

May 7, 2010

Well the Firefox slow down has finally gotten out of hand.  I’ve installed Swiftfox, which is basically Firefox but supposedly optimized for speed.  If you want to try it then just do a Google search for Swiftfox, and click on just about any link of your choice.

In the previous post I provided a link that showed how to supposedly fix the problem.  More or less what it instructed you to do was disable IPv6 in Firefox.  Well this didn’t work for me (though it might for you so I suggest you try it anyway).  After realizing that this didn’t work I found another site that showed how to disable IPv6 system wide.  Here is what the site says to do;

First check to see if IPv6 is enabled. If the following returns 0 then it is, otherwise it’s not.

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

If it is enabled the you need to run the following and then restart your system.

echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf

Just to be safe however, I installed Google Chrome anyway.  My system still freezes every now and then, but it’s no longer as bad as it used to be.  At this point I think that it’s something else (probably flash, who knows).

Another problem I’ve encountered is that Pidgin isn’t as responsive as it was back when I used 8.04.  But that could be due to the Facebook plugin, I’ve experienced this before so fixing it shouldn’t be too difficult.

Well my next post will most likely be about more problems I have with 10.04 (thank god this is a LTS, because it seems like the problems don’t stop).

EDIT: I totally forgot to mention what the tee command does.  It reads from standard in and writes to either standard out or a file.  When used with the -a flag it appends to the end of the designated file(s). Therefore, the following commands will have the same (overall) result.

echo "I can append to a file" >> my_file
echo "I can append to a file" | tee -a my_file

Similarly the same is true of the following.

echo "I can overwrite a file" > my_file
echo "I can overwrite a file" | tee my_file

Advertisements

Passwords

January 9, 2010

If you were to tell me that you have never had to create a password for any kind of electronic account I would think that you lived under a rock or didn’t have a bank account.

I don’t know about you but for me the worst part about having a password for an account is creating one. Sure there are ones that are easy to remember, but are at the same time easy to guess. Such as you birthday or your anniversary. On the flip side, there are passwords that are near impossible to “break”, but they are also damn near impossible to remember. Well I’m not going to talk about how you should go about creating a password. If you really don’t know then I suggest you spend some time on Google or even CNN and NYT.

Instead I will discuss how you can use your computer to generate pretty strong (and “random”) passwords for you.  To do this we will make use of  /dev/urandom, cat, tr, and grep.  Suppose that you must create a password that has length 8 and contains at least one of the following characters !,*,&, and #, in addition to alphanumeric characters.  Well here is what you would enter to have your system create a list of, say 4, such passwords.

cat /dev/urandom | tr -dc 'a-zA-Z0-9!*&#' | fold -w 8 | head -n 4 | grep -i '[!*&#]'

Now instead suppose that your password did not have to have one of !, *, &, or #.  Then instead you could run:

cat /dev/urandom | tr -dc 'a-zA-Z0-9!*&#' | fold -w 8 | head -n 4

In addition to using /dev/urandom you could also use /dev/random for an even more secure password. For more information on this (and other aspects) go and read this post. It should answer some, if not most, of your questions.

To lean more about head and fold just go and read their man pages.  They are pretty straight forward.


Linux File System: Part 2

September 7, 2009

This is a continuation from part 1, so you might want to read that first in order to get a general idea of what’s going on.  That is  of course you are a somewhat experienced Linux user.

In this part of the series I will be discussing the following directories/partitions: /bin /boot /dev /etc /home.

/home

I will start by discussing the partition that is most familiar to most new users, /home.  First you should know that Linux, unlike Windows, was originally designed to be a multi-user system.  Thus in the home directory you will find a set of directories, one for each user.  Every user (along with the system administrator) can access their directory by entering cd /home/[user name].  Each user’s home directory contains their own personal files in addition to their personal settings for programs.

/bin

This directory contains programs that are able to be used by the system(Linux), the administrator and non-privileged users. Examples of such programs would include cp, mv, rm, and other such commands/programs. In addition to programs it also contains the shells, like bash, csh, sh, and so on. Just as a side note, you should be aware that there is also a /usr/bin which also contains programs that the system, administrator, and non-privileged users can use. However, unlike those in /bin, these programs are not essential-meaning that you can do without them and not have any real problems. Some programs that are located in my /usr/bin are: g++, apt-get, javac, whoami, and acroread. Sure it would be a pain not having these programs, but the system would still run perfectly fine.

/boot

All of the system startup files and the kernel (vmlinuz) are located in this directory (also I would suggest reading the Wikipedia article on System.map, which is also stored in this directory). On Ubuntu, this is also where Grub (GRand Unified Boot loader) stored.  For those of you that are dual-booting here is something that might interest you.  When you start up your system you will normally see a list asking you which OS you want to enter.  This list normally contains the various Linux kernels along with Windows (or whatever OS you have on your computer).  If you would like to change the order these elements are presented along with other properties here is what you need to do.  cd /boot/grub then sudo gedit menu.lst (actually you can use whatever text editor you desire)  The file is pretty well documented so editing it is pretty straight forward.

/dev

All computers have hardware, and this is where the information on all your hardware is stored. Once again let me reiterate that EVERYTHING is a file (or directory but I don’t distinguish between them in this case). If you list all of the files here, you should find sda, sda1, sda2… which represent the partitions of you master drive (instead of sda you might have hda depending on your drive type). Also you might see a files /dev/cdrom and /dev/fd or (/dev/fd0). These represent your CDROM and floppy drive (if you have them that is, because really who still has a floppy drive?). Here is something “cool” that you should all try (don’t worry it won’t damage your computer. I have done it on mine if that makes you feel any better). The file /dev/dsp represents your speakers (or whatever sound output device you have). So anything written to this file will be redirected to your speakers and played for you to hear. Thus if you run cat ~/funfile.java > /dev/dsp you will hear what funfile.java “sounds like”, assuming that you have a file called funfile.java in your home directory. Pretty cool hu?

/etc

Finally, I will slightly discuss the /etc directory.  One overview that I read, described this directory as the Linux equivalent to the Control Panel in Windows.  Basically most of the important configuration files are located here.  There are a lot of important files here that have to do with system start up (one being /etc/rc.d which contains the startup scripts for the system). It is always a good idea to back up your system, but this file more than any other I would say should really be backed up. Doing so would save you a lot of headache later when you have to reconfigure your settings, because you reinstalled your system or somehow managed to lose your installation.

Well that’s all there is for part 2. Hope you will stick around for part 3.