Archive for the ‘Ubuntu Linux’ Category

Joomla Search: undefined method SearchHelper::checknohtml()

Tuesday, March 24th, 2009

I’ve recreated a website for my friend using the Joomla portal-framework, the successor of the late Mamboo portal-engine. I personally think it is a bit over-rated, not an easy-to-use system at all.

One huge error I found with the 1.5 install: the search got mixed up somehow, and it failed with the following error message:

Fatal error: Call to undefined method SearchHelper::checknohtml() in /plugins/search/content.php on line 254

..and of course there were no checknohtml() functions in any of the directories.

So i’ve downloaded the last stable version, and found out that originally, this function must live in the ~/administrator/components/com_search/helpers/search.php file. So i’ve just copied over the old file, and voila: it’s working.


Download remote images with Wget

Thursday, January 8th, 2009

If you want to get all images (and other fancy stuff like scripts, css) from a website (even if the files referenced in the Html source are hosted on other domains), you can do it with the following wget command:

wget -E -H -k -K -p -U "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"  http://the.domain/file.name

note: if you don’t specify the browser type, the server possibly will think of you as a Crawler, a search engine bot, and will only serve you the robots.txt file.


Set a Network Interface to full duplex 100Mbit mode

Wednesday, March 26th, 2008

Create a new file in init.d (i like nano for file editing):

nano /etc/init.d/makefull100mode

type in:

ethtool -s eth0 speed 100 duplex full autoneg off

exit. in shell, type:

chmod +x /etc/makefull100mode
update-rc.d makefull100mode defaults

when you reboot the machine or restart the network stack, the interface will come up with true full duplex.


Create an ISO image under Ubuntu

Wednesday, March 26th, 2008

The other day I tried to create an ISO under Ubuntu, finally I found out how:

mkisofs --cap -o myVolume.iso /home/balint/archive

With cdrecord, you can write it to disk, and if you want to eject the disk (as i did with my slot-loader drive):

cdrecord -eject myVolume.iso


Mrtg on Ubuntu

Thursday, May 24th, 2007

I’ve added MRTG to Cron, but later I found that it is not running. Checking the logs, and found the following:
<code>
ERROR: Creating templock /var/lock/mrtg/_etc_mrtg.cfg_l_3723: No such file or directory at /usr/bin/mrtg line 1757
</code>

The folder doen not exist, so <code>mkdir -m 0755 /var/lock/mrtg</code>…


mount a Windows share with Samba on Ubuntu

Tuesday, May 8th, 2007


mount -t smbfs //10.1.1.99/folder /mnt/mymount -o lfs,username=administrator,password=xxxxxx

the parameter lfs is to disable Samba’s 2G filesize limit, so you can copy huge files over as well.


restore JFS filesystem under Ubuntu

Monday, May 7th, 2007

today, a 5 disk SATA raid5 array misteriously went to ‘beeping mode’, it was unable to mount the JFS partition, however the ext3 root partition worked (thank God!) so we’ve needed to do the following:

apt-get install jfsutils
fsck.jfs -a -f /dev/sda2 -j /dev/sda2


Resume a download with wget

Thursday, April 19th, 2007

wget -c http://the-failed-download-s.url


Change locale on Ubuntu to make MC usable with a non utf-8 capable terminal

Thursday, April 12th, 2007

I like to use OpenSSH for Windows on my XP box, but unfortunately it does not understand utf-8.
Ubuntu, however forces utf-8.


balint@s-xxx:~$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

All we need to do is to remove the ‘.UTF-8′ from all listings, by inserting the following lines into our .bashrc (or the configuration file of the shell we use):


export LANG=en_US
export LC_ALL=en_US


Assign fix IP to an ethernet interface on Ubuntu

Thursday, April 12th, 2007

Edit /etc/network/interfaces, and do it like this below:

Make sure, you have all interfaces listed and automatically started:


auto lo eth0 eth1
iface lo inet loopback

First uncomment the DHCP, if it was active for eth0:


# The primary network interface
#auto eth0
#iface eth0 inet dhcp

Now you can enter the fixed values for eth0:


#custom
iface eth0 inet static
address 10.1.1.233
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.1.254

If you have more interfaces, type all in as abowe.

iface eth1 inet static
address 80.xx.xx.xx
netmask 255.255.255.0
broadcast 80.xx.xx.254
network 80.xx.xx.0