venerdì, luglio 01, 2005

/media error resolved

Have you got any problem wit /media directory? cannot automatically mount cd or usb drives? well, your solution is in fstab ( /etc/fstab ).
Check if in fstab that media directory is mounted Read-Only ( ro ). If so, edit it and change ro with rw ( read-write ). Well, now you can umount /media/ and mount it again ( mount /media/ )!!

well done

bye
antonio

lunedì, maggio 02, 2005

Powersaved and CPU frequency

Sometimes, powersaved daemon, cannot recognize cpu correctly and load the necessary cpufreq module. To force loading of module concerning your CPU, modify /etc/sysconfig/powersave/cpufreq file adding the module to the voice POWERSAVE_CPUFREQD_MODULE="".


Full list of available modules could be find here

martedì, aprile 19, 2005

Name Resolution Does Not Work with Several Concurrent DHCP Clients

If you have some problems getting your wireless card work on startup and make you go on internet, READ THIS!

rapid solution ( in case you are lazy ):

Set the following option in the file ifcfg of all network devices configured as DHCP clients. This file is located at /etc/sysconfig/network/

DHCLIENT_PRIMARY_DEVICE=yes

lunedì, aprile 18, 2005

Kde 3.4 and SuSE 9.2

As you can read in one of my previous post, changin installation sources, now you can upgrade to Kde 3.4 directly via yast.
>>> Easy!
Go to Yast control center, then choose 'Install/Remove packages'. In the new loaded panel choose 'packet groups' from the drop-down menu and then 'zzz.All' from left frame. Click with right button on right frame and hit 'all in this list->update if a new version is available'.
>>> End!
well done... enjoy your new Kde desktop!

bye
Antonio

mercoledì, aprile 13, 2005

NETGEAR WG511v2 (Marvell chip) and SuSE 9.2

Ladies and Gentlemen,
we are here reunited to celebrate the fantastic NDISWRAPPER and his team for make wireless work on our linux boxes and my SuSE Laptop too :)
Let's go to show how to make this fuckin pcmcia card to work (Gates slaves!!).... ohhhhhh shit, I dont wanna write now, it's late! it's 2:11 am and I'm sitting on a wc, havin my shit (yeeeessss i'm really on wireless, yeeeeeah!) and wanna go sleep soon so, check out this two links:

http://ndiswrapper.sourceforge.net/phpwiki/index.php?Installation
(HArd but worked for me!)
http://ndiswrapper.sourceforge.net/phpwiki/index.php/Suse%20Professional%209.2
(didnt work for netgear)

you can mix up the two articles and you will be wireless soon!
maybe next time I'll make a summary mix for you.

bye
antonio

TIP:
if you get an error loading the module ndiswrapper (moprobe ndiswrapper), do this:
rm /lib/modules/$(uname -r)/extra/ndiswrapper.ko
cp /lib/modules/$(uname -r)/misc/ndiswrapper.ko /lib/modules/$(uname -r)/extra

lunedì, aprile 04, 2005

Apache2 and Virtual Hosts (VHost)

In this article, i'll explain you how to set your Apache configuration on SuSE 9.2 to make your local websites visible on you machine. This is particularly useful for people like me who make websites and need to test them on their local machines before publish.

First of all, you need Apache installed on you machine via YaST with eventually PHP and MySql.
After that you'll have all apache configuration files under /etc/apache2 directory.
Well DONT TOUCH ANY FILE THERE!
The simplest thing you have to do is create a mysites.conf file wherever you want and hardlink it to /etc/apache2/vhosts.d
I created mysites.conf in my public_html for my personal comfort :)

What about mysites.conf content? HERE to you a simple example:


NameVirtualHost *

<virtualhost>
ServerName localhost
ServerAlias linzekus
DocumentRoot /srv/www/htdocs
</virtualhost>

<virtualhost>
DocumentRoot /home/zekus/public_html/ontosofia/ontosophy
ServerName ontosophy
ServerAdmin antonio@linzekus
</virtualhost>


Thus, the last thing to do is adding all our virtual servers on /etc/hosts file to make them available. This file is only accessible via root and this is a sample:

#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost linzekus XXXX <-list all virtual hosts HERE
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

What else now? Point your browser on the URL of your new virtual hosts like that:

http://xxxx

Thats all folks!
good setting

lunedì, marzo 28, 2005

backup mysql tables and restore

it's easy to backup all you mysql tables: just go to /var/lib/mysql (on SuSE linux distro) and copy all folders, that's it.
If you record this forlders on a cd or dvd as backup and you lost all privilege settings, this is what you have to do after you copy back your backup on mysql folder:

chmod -R 766 *
chmod -R 700 mysql/

and all will work fine again!

go backup guys! ;)

venerdì, marzo 18, 2005

Apache2 settings

after installing all needed rpms about apache2 and php4, just open /etc/apache2/httpd.conf and add following two lines on bottom to make UserDir and Alias work:
Include /etc/apache2/mod_userdir.conf
Include /etc/apache2/conf.d/*
UserDir permit you to use /home//public_html directory as server directories and make users publish their own files.
Alias permit to use any directory on you server for publish contents.
For more infos, consult apache documentation or contact me!

bye
antonio

mercoledì, marzo 02, 2005

strange SU wrong password

Haven't told you that I've installed the brand-new SuSE 9.2 on my laptop and It works great only if I use KDE. In fact I tried Gnome 2.6 and was so unhappy to see that it doesn't work good... Gnome it's hard to configure if u are a maniac of personalization. Let me know if your experience wit gnome have been better than mine!

But, let's talk about the title's argument. It was so strange but, after a long "play" with yast and user configuration, I wasn't able to "su" or "sudo" from console. Still dont know what happened but that executables lost the suid privileges. What I've done, to make all things work again, was:

chown 4755 /bin/su /usr/bin/sudo

bye

venerdì, febbraio 04, 2005

/dev/loki

this is the blog of the mantainer of GURU-rpm, a killer SuSE rpm mantainer!

check it out!

/dev/loki

lunedì, gennaio 24, 2005

Force user logout!

have you ever wanted to know how to force logout of a user on a remote machine that is logged in locally ( or remotely too :P )?

here the tip:
kill -15 $(ps -U NameOfUserToLogout -o "pid=")

what does it mean this command??
well why dont you type in your command line these other two commands:
man kill
man ps

you will learn more, guaranteed :D

domenica, dicembre 19, 2004

WineTips

If you want configure wine easy, I suggest you this site
WineTips
I'm planning to mirror it! Stay tuned!

sabato, dicembre 18, 2004

change file permissions

Again a simple command to simplefy our life on linux/unix machines :D

As you know I am a webmaster and usually I need to upload files on webservers that manage permissions in different ways from me on my machine and I have to chmod a large amount fo files. Using following command I can make this work in seconds :D
find . -type d -name public_html -exec chmod 0755 {} \;
It searches (using find recursively (ie it checks folders and sub folders/directories and sub directories) for a directory (-type d) called (-name) public_html and when it does it runs the command (-exec) chmod 0755 (which sets the permissions so that the owner can read, write and execute/open the folder and all other users can read and execute/open the folder).

Feel free to experiment and change this command on your machine

bye

domenica, novembre 28, 2004

change names of folders

Today I got a funny problem: I create a new link on Desktop of my Home folder.
My Surprise was that his name was "TRASH FOLDER".
So I thought "WHAT's UP?? Who gave this name to my home folder??". The first Thing I've done ( as ex-Winzozz User ) was right-click on folder to access properties and change the name there, but .... the name didn't change.
Well I demistyfied that, to change the name of folders, there is an hidden file inside every folder-link on desktop called ".directory". Here you can change some property, included the name "TRASH FOLDER".

:d see you

mercoledì, settembre 22, 2004

multiple conversion to lowercase

This is a modified version of my script to change extensions, for lowercase (or uppercase inverting in script) multiple files in a directory recursively.
for i in $(find . -type f);
do mv $i $(echo $i | tr "[:upper:]" "[:lower:]");
done

hope to be useful as usual.

good work!

lunedì, settembre 13, 2004

MYSQL wont startup

Today, mysql wont startup and dont know why (or maybe!)
First of all I looked at "/var/lib/mysql/<\your host name\>.err" log and this was the error:
Fatal error: Can't open privilege tables: Can't find file: 'host.MYI' (errno: 2)
The problem is the file was there (/var/lib/mysql/mysql).
The solution is delete /var/lib/mysql/mysql wit command rm -fR,
type rcmysql start and the folder will be recreated.
You'll lost all users but mysql will be up and running! Now you have to reset the root password: mysqladmin -u root password

hope to have been useful again!

P.S.
I forgot... the error was my fault ... I played too much with phpmyadmin.
Machines do always what we want they do!

sabato, settembre 11, 2004

Multiple rename with find command!

I've done this shell script for multiple rename files not in same folder
(for doin that, simply use rename command) using the combination between mv and find in this way:
for i in $(find / -name *.ext1);
do mv $i $(echo $i | cut -f1 -d.).ext2;
done
in the specific, this change an extension of a file (ext1) in one another (ext2).
feel free to modify it to match your needs.

bye

bluetooth and SuSE 9.1

It costed to me a lot of work, but finally I got IT!
My bluetooth phone work and I can browse it.

First of all, connect your bluetooth.usb.key directly on usb port without using hubs or will not work (dont know why but I'll solve it in future).

UPDATE the deafault kdebluetooth installed with your suse wit this one kdebluetooth
because it lacks a lot of necessary files you need for make it work.

After that, start kbluetoothd and you'll have an icon in system proces pannel click on it and it will show u the services disposable on your phone. that's all (well ... there are a lot of things to learn so read here: kde-bluetooth.sourceforge.net)!

martedì, settembre 07, 2004

Tips Installing software on SuSE 9.1

To install RPM files with Yast from command line, type this : yast -i <\packagetoinstall\>.rpm

If you downloaded source code from a program (tar.gz files) you can quickly make an RPM file from it.
To do this, first of all install the package "checkinstall", then unpack your source package and cd to the directory where you unpacked the tar.gz file.
Run the following commands:

./configure
make
checkinstall #instead of make install

When finished, you'll find your RPM in /usr/src/packages/RPMS/i686

Now you can install it where you want with yast - i <\packagetoinstall\>.rpm or with rpm -i <\packagetoinstall\>.rpm. This allows your to easily uninstall it afterwards.

bye

venerdì, settembre 03, 2004

Asus L3500 Power Management on SuSE 9.1

Today, I discovered that power management on my asus doesn't function properly and that I can configure extra buttons and leds on my laptop trought powersave (default acpi manager for suse).
Now I'll show you how-to do it!

SUSPEND AND STANDBY
edit '/etc/powersave.conf'. Right at the end there are two lines:
POWERSAVED_DISABLE_USER_SUSPEND=yes POWERSAVED_DISABLE_USER_STANDBY=yes
modify it to
'no'

ASUS_ACPI
acpi4asus (kernel module for asus special keys and leds) is included in the kernel (from 2.6). Just load the module 'asus_acpi' since startup, editing the file '/etc/sysconfig/powersave/common'.

Search for the definition of
'POWERSAVE_ACPI_MODULES' and add 'asus_acpi'.
Same goes for
'POWERSAVE_ACPI_MODULES_NOT_TO_UNLOAD'.

Set
POWERSAVE_CPUFREQD_MODULE="p4-clockmod" (doesnt work well: cpu boot at 300Mhz instead of 2.400Mhz even I've set powersave as well! tryin to find help and further informations)

searching for other tips... stay tuned!


sources:
http://www.wach-o-witz.de/asus_l3500d_install.html