Linux
Anything I post related to Linux (i.e., most of my posts).
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.
Tip: Pause a program not started from the command line
Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.
This tip is a follow-up from the last one. To pause a program that was not started from a terminal, simply go to the gnome-system-manager, right click, and select stop. Select continue to resume a paused process.
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.
Gnome-Blog debs (no repository)
Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.
Here is the link to the debs from the Gnome-Blog debs post if you don’t want to add my repository.
Gnome-Blog debs
Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.
I have just uploaded the patched gnome-blog deb and an updated python-gdata deb (gnome-blog requires python-gdata 1.0.1 or up but gutsy only includes 1.0). The python-gdata is unnecessary if you use hardy but is a later version than the one provided by hardy.
My PPA:
deb http://ppa.launchpad.net/stebalien/ubuntu gutsy main
deb-src http://ppa.launchpad.net/stebalien/ubuntu gutsy main
Edit: I got the patch from http://bugzilla.gnome.org/show_bug.cgi?id=151291 (thanks to Richard Schwarting)
PDF tools
Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.
A while back I wrote a script that can convert PDFs into several other formats. It can also print information about PDFs. I recommend you use this script in conjunction with nautilus-actions.
Usage
./PDFtools.sh [pdf document]
Screenshots
Main Window:
Info:
Font Info:
This script requires poppler-tools and zenity
Copy Script From: PDFTools.sh