Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

2007/09/30

Shorewall does not start at boot time

I am neither shell scripting nor security guru, but I think that there is an error in the /etc/init.d/shorewall script that installs with the version 3.2.6-2 of Shorewall.

I installed Shorewall using Synaptic today, configured it and tested that I can start it manually. Then I restarted the computer and found out that there are no rules defined in any iptables chain (sudo iptables -L). I used the sudo invoke-rc.d shorewall start command to check what's happening during boot time and I saw the following error:

  Please read about Debian specific customization in
  /usr/share/doc/shorewall/README.Debian.gz.


After a few minutes of checking by trial and error I knew there was a problem with a piece of code right after the # check if shorewall is configured or not comment and after a few more minutes I modified it and the problem was solved. Below is the modified version - the script was looking for a wrong file and checking a non-existent variable.
# check if shorewall is configured or not
if [ -f "/etc/shorewall/shorewall.conf" ]
then
. /etc/shorewall/shorewall.conf
if [ "$STARTUP_ENABLED" != "Yes" ]
then
not_configured
fi
else
not_configured
fi

2007/05/30

KeePassX looks ugly; making it look good again

If KeePassX (or other Qt application) looks really awful on your machine, the problem is probably the GUI Style chosen for Qt applications.

For quite a long time I couldn't find a way to change it, until I read this howto. I installed the qt4-qtconfig package and used the Qt Configuration tool (run qtconfig) to change the GUI Style to Plastique. You can see the results below.

Before
Ugly KeePassX

After
Nice KeePassX

2007/05/14

How to improve sub-pixel font rendering for Feisty (from Ubuntu Guide)

The fonts look way better out-of-the-box in Ubuntu 7.04 than they used to in previous versions (I wrote about this before - 1, 2), but they can still be improved.

How to improve sub-pixel font rendering for Feisty
This will dramatically improve the appearance of fonts with respect to the default Ubuntu install. The patched libraries are built against Freetype 2.3.x (not currently in feisty) and include David Turner's sub-pixel rendering patches.

In my opinion, the results are really impressive.

2007/05/03

Album Cover Art Downloader does not start

Today I've run into my first problem caused by upgrading Ubuntu to version 7.04 - Album Cover Art Downloader (version 1.6.0) stopped working.

If you try to run Album Cover Art Downloader (by typing albumart-qt in the console) and get the following error:
Traceback (most recent call last):
File "/usr/bin/albumart-qt", line 145, in 
sys.exit(runGui())
File "/usr/bin/albumart-qt", line 77, in runGui
import albumart_dialog
File "/usr/lib/albumart/albumart_dialog.py", line 32, in 
from pixmap import getPixmapForPath
File "/usr/lib/albumart/pixmap.py", line 4, in 
import albumart_images
File "/usr/lib/albumart/albumart_images.py", line 6
SyntaxError: Non-ASCII character '\xa0' in file 
/usr/lib/albumart/albumart_images.py on line 6, but no encoding declared; 
see http://www.python.org/peps/pep-0263.html for details
open the /usr/lib/albumart/albumart_images.py and in the first or second line in the file add:
# coding: latin-1

2007/04/23

Upgrading Ubuntu 6.10 to 7.04 on ASUS A6RP-AP069 laptop

If you are expecting a lengthy post with detailed list of encountered problems and their solutions, you will be disappointed, because... there were none.

We just clicked the Upgrade button in Update Manager and left the computer for a few hours to download the updates. Then, after the installation began, we answered 3 or 4 questions whether to keep or replace some configuration files (we replaced them all, but kept the copies of modified files just in case) and that's it.

After restart we had a laptop running Ubuntu 7.04 and everything - wireless networking (with WPA), sound, graphics - was working properly. No problem at all.

2007/02/10

Reading mail from root@localhost.localdomain using Thunderbird (a quick note)

1. Create a Unix Mailspool (Movemail) account.

2. Run the following command:
  sudo chmod 777 /var/spool/mail

2007/01/27

VMware, Ubuntu 6.10 & USB flash drives

Before Ubuntu 6.10, I had no problems to access USB flash drives from Windows running under VMware (guest system) with Ubuntu as a host system.

And then Ubuntu 6.10 came and the problems came, too. Sometimes, when I plugged the drive, Windows detected it and I could access the data on it (rarely) and sometimes Windows didn't detect it at all or did detect it but there was no access to the data (usually). And I could see no pattern in this behaviour.

After a few months I finally found this article 3862823 in the VMTN Knowledge Base - USB Devices Are Not Available on Some Linux hosts, the VM > Removable Devices > USB Devices Menu Is Empty.

Adding the following line:
  usbfs /proc/bus/usb usbfs auto 0 0
to the /etc/fstab file solved the problem.

2007/01/25

Installing Ubuntu on ASUS A6RP-AP069 notebook (part 3 - WPA)

I don't know why, but WPA doesn't work on Ubuntu out-of-the-box. WEP does and we were using it for some time, but recently we finally decided to switch to WPA.

First we found these instructions, but for some reason they didn't work for us. And even if they did, this method is way too complicated.

After some further searching, we found this post. Really simple and it works! Although, after having followed the steps 1, 2 and 3 listed there, we also had to reboot the machine and add ifup eth1 to /etc/init.d/bootmisc.sh file.

2007/01/01

Installing Ubuntu on ASUS A6RP-AP069 notebook (part 2 - headphones)

If you hear no sound after connecting headphones or external speakers to the headphones jack, try installing alsa-driver-1.0.14rc1, alsa-lib-1.0.14rc1 and alsa-utils-1.0.14rc1 packages and remove the options snd-hda-intel model=uniwill-m31 line from the /etc/modprobe.d/alsa-base file (if you added it before).

Thanks for the advice, mario_7!

2006/11/26

Installing Ubuntu on ASUS A6RP-AP069 notebook

There were three problems that me and my girlfriend encountered while installing Ubuntu 6.10 (Edgy Eft) on ASUS A6RP-AP069 notebook.
  1. Starting the installation
    There was no problem to boot the laptop from the Ubuntu CD, it showed the available option, but after choosing any of them it... froze after a few seconds.
    We tried 3 or 4 different version of Ubuntu and Mandriva. Every time it hung as soon as Using hpet for high-res timesource message showed. (It is worth noticing that Ubuntu 6.10 does not show such information to the user by default, while its older version do.)
    We found the solution here - adding hpet=disable to the kernel parameters worked like a charm.
  2. Connecting to the wireless network
    Ubuntu correctly detected the wireless card. We entered all necessary configuration parameters (SSID, key, etc.), activated the card and... it couldn't connect to the network no matter how many time we re-checked its configuration and restarted it.
    Finally, we found this post. It's really great! We followed the instructions and the WiFi network was up and running in no time.
  3. Enabling sound
    That was the hardest part. Everything looked fine - Ubuntu detected the sound card, Amarok looked like it was playing a song, but... there was no sound. We tried to play files in different formats, we checked the headphones, we found countless posts telling to uncheck some External Amplifier option in KMix, but we found no such option.
    Late at night after a lot of googling I (my girlfriend went to sleep earlier) found this post. Another great post! I recompiled alsa-driver, alsa-lib and alsa-utils packages and the sound problem was gone.
  4. Headphones
  5. WPA

2006/08/12

HOWTO: Perform a scheduled shutdown without installing additional software

The easiest way of performing a scheduled shutdown of a Linux computer, that came to my mind, was executing something like this:

  sleep 3600 && poweroff

However, this couldn't work, since root privileges are necessary to run poweroff command. So you have to use:

  sleep 3600 && sudo poweroff

But this will cause the computer to wait for 1 hour (3600 seconds) and then prompt for the root password. And what we are trying to avoid is sitting in front of the computer at that time.

But there is a very simple solution:
  1. Type sudo visudo to edit the /etc/sudoers file.
  2. Add the following line:
    your_username ALL= NOPASSWD: /sbin/poweroff

Now you can execute sudo poweroff without typing the password.

2006/08/08

Linux applications - languages

If a Linux application starts and the interface is translated into some language that you don't want to use (or even worse - it is partly translated, as it was in my case, so names in the menus were a mix of English and Polish words), you can go to:

/usr/share/locale/[language_folder]

and delete [application_name].mo file.

Rather a dirty hack, but it works.

You will need root privileges, of course.

2006/06/08

How to format USB flash drive on Linux

You can use mkdosfs command.

For example:
  sudo mkdosfs /dev/sdb1

2006/03/30

Finding orphaned packages

If you are using Debian or any other Debian-based Linux distribution, you can use deborphan tool to find orphaned and/or unneeded packages. Read the man page for the options (--guess-all is very useful).

I have just removed over 100 packages. And my system still works. :)

2006/03/25

How to encode a DVD to an XviD file (on Linux)

There are of course many ways to do it, but a very simple one is to use:
  • Mencoder for ripping and/or encoding,
  • SimpleRip to generate all the necessary commands.

2006/03/05

How to load subtitles in Kaffeine Player

I finally found how to manually load subtitles in Kaffeine Player.

An appropriate option is available only in the playlist context-menu.


Not very intuitive, in my opinion.

2005/12/21

Normalizing tracks when burning Audio CD's with K3b

K3b currently does not support normalizing when writing on the fly, so, if you installed normalize-audio application, and 'Normalize volume levels' option is still inactive, make sure that 'On the fly' option is unchecked.

2005/12/20

How to install lame on Ubuntu 5.10 (Breezy Badger)

If you want to install lame encoder using Synaptic or apt-get, you should add the following two lines to /etc/apt/sources.list file:

deb http://archive.ubuntu.com/ubuntu hoary multiverse
deb-src http://archive.ubuntu.com/ubuntu hoary multiverse

2005/12/15

Ubuntu unstable due to BIOS settings

Just a quick & dirty note this time.

These settings caused my machine to be unstable.
CHIPSET
FSB:  166 MHz
RAM
freq: 199 MHz (DDR 398)
CAS:  3-3-3-8
Various applications (for example, Firefox, Synaptic, GNU Gadu) and both GNOME and KDE environments crashed because of segmentation faults or unknown reasons. Memtest86 detected RAM errors during moving inversions test.

With these settings everything seems to be working fine:
CHIPSET
FSB:  166 MHz
RAM
freq: 166 MHz (DDR 332)
CAS:  2.5-3-3-7

UPDATE:

A friend of mine has sent an e-mail to tell me that this post might be a little confusing. So to make things clear:
  • The problem described above was caused only by wrong BIOS settings and it was by no means Ubuntu's fault.
  • The above RAM timings are useful only for me; this blog is, among other things, also my notepad, so I will sometimes jot down things like this.

Ubuntu & fonts (yet again)

I've just found a nice way of installing Microsoft's TrueType core fonts on Ubuntu without using msttcorefonts package.

You can read about it in post #9 of this thread.