PCMan File Manager: 7z and rar archives

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

By default, pcmanfm will not extract/create 7zip and Rar archives. Extracting rar archives is already implemented but not enabled by default while the ability to extract 7z archives is not implemented at all. To enable the extraction of rar and 7zip archives and the creation of 7zip archives open src/ptk/ptk-file-archiver.c:

Uncomment:

       {
           "application/x-rar",
           NULL,
           "unrar -o- e",
           ".rar", TRUE
       }

And add this below:

       {
           "application/x-7z-compressed",
           "7zr a -bd -y",
           "7zr x -bd -y",
           ".7z", TRUE
       }

Next, insert a comma, after the end bracket of the rar section.

The archive handlers section should endup looking like this:

const ArchiveHandler handlers[]=
   {
       {
           "application/x-bzip-compressed-tar",
           "tar --bzip2 -cvf",
           "tar --bzip2 -xvf",
           ".tar.bz2", TRUE
       },
       {
           "application/x-compressed-tar",
           "tar -czvf",
           "tar -xzvf",
           ".tar.gz", TRUE
       },
       {
           "application/zip",
           "zip -r",
           "unzip",
           ".zip", TRUE
       },
       {
           "application/x-tar",
           "tar -cvf",
           "tar -xvf",
           ".tar", TRUE
       },
       {
           "application/x-rar",
           NULL,
           "unrar -o- e",
           ".rar", TRUE
       },
       {
           "application/x-7z-compressed",
           "7zr a -bd -y",
           "7zr x -bd -y",
           ".7z", TRUE
       }
   };

Compile with a standard ./configure; make; make install or ./configure; make; checkinstall.

Install Flash Player 10 in liferea

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

Installing flash player 10 in Ubuntu does not install it for Liferea.

The fix for this is very simple:

  1. First install Flash Player 10 using this Tutorial

  2. Next execute this command in the terminal:

     sudo ln -s /usr/lib/firefox-addons/plugins/libflashplayer.so \
                /usr/lib/xulrunner-addons/plugins/libflashplayer.so
    

Flash Player 10 should now work in Liferea.

Tip: Purge Auto-installed packages with Aptitude

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

When switching from apt-get to aptitude, I discovered that aptitude, unlike apt-get, does not purge configuration files of auto-removed packages when given the command aptitude purge package. The fix for this is very simple.

In order to purge configuration files only when the purge command is given you must either specify the --purge-unused option in the command or create an alias. To create an alias add this alias command='sudo aptitude purge --purge-unused' to ~/.bashrc. Command is the command that you would like to assign for purging the packages.

To always purge configuration files for auto-removed packages add Aptitude::Purge-Unused=true to /etc/apt/apt.conf.d/05aptitude. This will cause aptitude to always purge configuration files for all auto-removed packages regardless of weather or not the command was aptitude purge or aptitude remove.

Rarcrack: Crack zip, rar, and 7z files

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I have just tested rarcrack and love it. Rarcrack cracks password protected rar, 7z, and zip archives. Sadly, it’s not in the Ubuntu repository. I have therefor compiled a deb: rarcrack.deb. I have not included this deb in my PPA because I compiled it with debianpackagemaker.

Make Firefox 3's autocomplete bar work with a dark theme

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I use MurrinaAngustifolium as my gtk theme but, because it is a dark theme, it does not always play nicely with other applications. One problem that I have finally fixed is the drop-down auto-complete menu for the location bar. Put the following code in your userChrome.css file (or use stylish).

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
.ac-comment {
  font-size: 100% !important;
  color: #dddddd !important;
}
.ac-comment[selected="true"] {
  color: #56aaff !important;
}

.ac-url-text {
  font-size: 100% !important;
  color: #555555 !important;
}

.ac-url-text[selected="true"] {
  color: #666666 !important;
}
.autocomplete-richlistbox {
  background: #1a1a1a !important;
}
.autocomplete-richlistitem[selected="true"] {
  background: #000000 !important;
}
tooltip {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
}

This code also makes some of the tooltips black.

Tip: Pause a command line program

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

This trick is known by many but it can’t hurt to mention it once more. I sometimes find myself in the middle of running a program in the command line but would like to check on something before I continue. The easiest way to pause a program in the command line is to hit Control+Z. To restart the command simply type fg. Do not close the terminal window or restart your computer because the paused program will close.

Ubuntu hardy upgrade status: Buggy but working

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I ran into a few problems during the upgrade but all of them were fixable.

Partial Upgrade fix: Downgrade non-ubuntu packages to their ubuntu versions if an ubuntu version exists. My system refused to complete the upgrade (and I had to upgrade it through aptitude) because of a few package conflicts (mostly from the schmidtke repository).

Numpad Fix: My computers numpad stopped working after upgrading. Somehow an acceptability option had been turned on. To fix this go to System > Preferences > Keyboard and go to the mouse keys tab and uncheck the checkbox.

Remove custom G15 drivers: A while back I had installed the G15 drivers based on a tutorial posted on the ubuntu wiki. These drivers should now be uninstalled as Ubuntu Hardy comes with its own drivers.

Everything appears to be working fine now.

Tip: Faster Ubuntu upgrade

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I am currently upgrading to Ubuntu 8.04 and so far so good. For the past releases I have upgraded from the standard server but that was very slow (8 hour download).

Fix: Use another server.

My current download is almost complete and my download speed is currently at 164kb/s (my max, thanks AT). To change the download server, simply open System > Administration > Software Sources and select download from other. Pick a random server in your country and hope for the best (the pick the best server button does not find the least bogged down server, it finds the closest server). The Ubuntu teem should make this happen automatically. The System Updater should find the mirror with the greatest download speed and use that server for its upgrade.

'Pause' command in linux

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

Windows comes with a very useful pause command. Linux does not. This can be problematic when running programs in the terminal from the GUI. If a program runs in a terminal but did not originated in the terminal (i.e. you double click on a file in nautilus and select run in terminal) the terminal window closes immediately when the program finishes. This makes it impossible to read the output from the terminal.

This function can be added to your ~/.bashrc file:

function pause() {
   test $*  read -p "$*" || read -p "Press enter to continue..."
}

I found this code on www.cyberciti.biz but edited it to allow for no arguments.