This is curious, I have both Javas, Sun and OpenJDK, installed and for both I have the Firefox plugin (I forgot to remove Sun's after installing OpenJDK). The side-effect was a seemingly high CPU use some times in Firefox. I suspect that it was due to the fact that I have too many extensions that could be fighting over conflicting resources (like 2 extensions that control the behaviour of tabs, I don't know, just bad guess work). Anyway, the point is: it wasn't. Since I removed one of the plugins (Sun's) it all got normal.
So, if you have both plugins (or you forgot that you have both installed, like me) and are experiencing some high CPU use with Firefox, try removing one of them :-)
Have a nice day!
Friday, July 18, 2008
Saturday, May 31, 2008
Migrating from Firefox 2.0 to 3.0
There are some problems when migrating from Firefox 2.0 to Firefox 3.0 (in this case Firefox 3.0b5), which is the case when migrating from Fedora 8 to Fedora 9. For me it was not clear what was happening so maybe if you are experience some "weird" Firefox behaviour it might be also the case.
To keep things short:
1. Backup your bookmarks.
2. Close Firefox or kill it:
#---
killall firefox && echo done
#---
3. Remove your $HOME/.mozilla directory (or a safer measure, move it):
#---
cd $HOME
mv .mozilla .mozilla-firefox2
#---
4. Restart Firefox and start the painfully work of customising it.
Just a little history. I had had a Firefox 2.0 for a long time and when I migrated to Fedora 9 (see my road map) it also implies a migration from Firefox 2.0 to 3.0b5. The first thing, which was expected, was that my add-ons did not worked any more (compatibility issues). This was ok, I removed the deprecated add-ons and kept using the ones the worked.
The problem that first caught my attention was GMail, which was working just in the basic html mode (which sucks if you are used to the normal version). I thought that it was a problem with add-ons (so I remove every single one of them), it did not work. Then I start suspecting of Java (tried 2 Sun versions and open-java version), but it wasn't it. At the end I was suspecting some incompatibilities between Firefox and AJAX (which is what Google uses).
The very last thing, after a week or so seeking for an answer, was clearing my configuration directory. Which solved the problem. Don't ask me why, I do not know (and didn't bother to look for the answer).
The bottom line is: if you are experience some weird behaviour with Firefox, try to start fresh.
To keep things short:
1. Backup your bookmarks.
2. Close Firefox or kill it:
#---
killall firefox && echo done
#---
3. Remove your $HOME/.mozilla directory (or a safer measure, move it):
#---
cd $HOME
mv .mozilla .mozilla-firefox2
#---
4. Restart Firefox and start the painfully work of customising it.
Just a little history. I had had a Firefox 2.0 for a long time and when I migrated to Fedora 9 (see my road map) it also implies a migration from Firefox 2.0 to 3.0b5. The first thing, which was expected, was that my add-ons did not worked any more (compatibility issues). This was ok, I removed the deprecated add-ons and kept using the ones the worked.
The problem that first caught my attention was GMail, which was working just in the basic html mode (which sucks if you are used to the normal version). I thought that it was a problem with add-ons (so I remove every single one of them), it did not work. Then I start suspecting of Java (tried 2 Sun versions and open-java version), but it wasn't it. At the end I was suspecting some incompatibilities between Firefox and AJAX (which is what Google uses).
The very last thing, after a week or so seeking for an answer, was clearing my configuration directory. Which solved the problem. Don't ask me why, I do not know (and didn't bother to look for the answer).
The bottom line is: if you are experience some weird behaviour with Firefox, try to start fresh.
Wednesday, May 21, 2008
[updated] Encrypting partition with LUKS
This topic is far away from new and you will find a lot of tutorials on the net. But as I already said before I lack a sort of baked recipes and central point for things. So if want the originals from this baked recipes go here and here and for the official LUKS page here
So first of all what I really need to encrypt are the following partitions:
/home
/var
/etc
swap
You can simplify by encrypting everything except /boot (ok, you may also encrypt that but I do not see the point and did not try it).
The main issue about disk encryption resides in disk performance specially by removing things (which includes moving from and to file systems). So if you really need some juicy speed upped partition I recommend to have a plain ext2/ext3 partition by the end of the disk (as closer to the out border of the disk as quick things get done, it does not apply for SCSI disks).
That said, the reasons you want to encrypt swap is to ensure that no one will eventually forces an swap attack on you (forcing the system to drop some sensitive data on the swap partition and then read them out). The /var is also important because there are the system logs and if you are a not that security freak you will eventually mix things up and type your password instead of username (which will be registered in the security log). The /etc is for the sake of it (you do not need it if you keep a safe check sum of all files there and check it before turning your network connection on, hehe). The last, but not the least, your precious /home and you know why you need it (as also RIAA).
The problem with Fedora 9 out-of-the-box procedure is that it does not randomizes the disk before encrypting it (which is important but takes a lot, but a LOT of time) and it is understandable for a installation procedure. But you want security so you want to do things right. Before you start doing things keep that in mind: you need time, a lot of time. For my SATA disk in a Pentium 4 3.2GHz the speed was about 3M/s, doing the math:
1GB ~ 6min.
10GB ~ 1h
50GB ~ 4h 45min.
100GB ~ 9h 30min.
150GB ~ 14h
200GB ~ 19h
250GB ~ 24h
300GB ~ 29h
512GB ~ 2days
1TB ~ 4days
If you know a speed upped procedure, please tell me. The speed problem is not on the disk but on the random generation, so it is unlikely to change for a notebook (if you getting nervous about that).
So the procedure is the following for a data partition and swap. But first of all (and that is VERY important) copy this text in text file and save it in your root partition (I really meant /) because you will need to shutdown your X11 AND network connections.
1. Do backup of your partition, you will lost everything.
2. Really, DO a backup, you will regret it later if you don't (you can use the FlyBack)
3. Save this text on text file in "/";
4. Logout and switch to a terminal (<CONTROL>+<ALT>+<F1> should do it) and log on as root;
5. Execute the following commandos:
5.1. Runlevel 1:
#---
telinit 1
#---
5.2. Note somewhere which is the real partition that you want to encrypt:
#---
mount | grep home
#---
It should return something like: /dev/sdaXX or /dev/hdaXX
If it returns something /dev/mapper/SEC_DEV it means that your partition was previously encrypted and you will need the real device.
5.2.1. Dealing with encrypted devices:
#---
cat /etc/crypttab | grep SEC_DEV
#---
Here you should get the real partition name.
5.3. /home:
#---
fuser -mvk /home
umount /home
#---
5.4. Verify if it was really unmounted:
#---
cat /proc/mounts | grep home
#---
5.4.1. If you have a previously encrypted partition you need this step (I'm confident that you do have a safe backup):
#---
cryptsetup remove SEC_DEV
#---
Note that I do NOT included the whole path (/dev/mapper/SEC_DEV)
5.5. Fill the partition with random data (this is the point where you must be sure you have a backup):
#---
dd if=/dev/urandom of=/dev/REAL_DEV
#---
The REAL_DEV is the same from step 5.2.
Note that the above command will end with and "out of space" error, do not worry about it.
5.6. Let LUKS know about your new partition.
#---
cryptsetup --verbose --verify-passphrase luksFormat /dev/REAL_DEV
#---
5.6.1. Open it:
#---
cryptsetup luksOpen /dev/REAL_DEV SEC_DEV
#---
SEC_DEV is a string you like. Fedora standard is luks-REAL_DEV (like luks-sda6 for /dev/sda6).
5.6.2. Verify it is everything there:
#---
ls -l /dev/mapper | grep SEC_DEV
#---
5.7. Create the file system:
#---
mkfs.ext3 /dev/mapper/SEC_DEV
#---
5.8. Mount it, to check it out:
#---
mount /dev/mapper/SEC_DEV /home
df -h | grep home
#---
5.9. Edit your /etc/crypttab and include the following line:
SEC_DEV /dev/REAL_DEV none
[update]
5.10. Collect your UUID for the /etc/fstab:
NOTE: The method with cryptsetup does NOT work in reencrypted partitions, so prefer the tune2fs method.
#---
cryptsetup luksUUID /dev/REAL_DEV
#---
#---
tune2fs -l /dev/mapper/SEC_DEV | grep UUID
#---
[update]
It must throw something like: c3119452-5a93-49bb-9c91-28d75a830a18
5.10.1. Alternatively you can already throw it in your /etc/fstab (but be careful to include the two ">":
[update]
#---
tune2fs -l /dev/mapper/SEC_DEV | grep UUID >> /etc/fstab
#---
[update]
5.11. Edit your /etc/fstab to include the following line (removing any other existing line that refers to /home):
UUID=<YOUR UUID> /home ext3 defaults 1 2
or
/dev/mapper/SEC_DEV /home ext3 defaults 1 2
5.12. Verify again:
#---
umount /home
mount /home
#---
5.13. Restore SELinux contexts:
#---
/sbin/restorecon -v -R /home
#---
6. Now the swap partition, which is a little bit different:
6.1. Identifying the partition:
#---
swapon -s
#---
6.1.1. If it turns out to be an encrypted partition, follow the step 5.2.1.
6.2. Turn off the swap (unmount the partition):
#---
swapoff -a
#---
6.3. Repeat the steps 5.4.1. (if you need) and 5.5.
6.4. Let LUKS knows about the new partition:
#---
cryptsetup create SEC_DEV /dev/REAL_DEV
#---
Here you will get the UUID for this device, note it somewhere. Or use the cryptsetup method from step 5.10 (because it is NOT a data file system it is the only way and it works, but just for swap partitions).
6.5.1. Open it: (step 5.6.1)
6.5. Make it swap:
#---
mkswap /dev/mapper/SEC_DEV
#---
6.7. Edit your /etc/crypttab (step 5.9.).
6.6. Edit your /etc/fstab to include the following line:
UUID=<YOUR UUID> swap swap defaults 0 0
or
/dev/mapper/SEC_DEV swap swap defaults 0 0
6.7. Check it:
#---
swapon -a
swapon -s
#---
7. Reboot your system:
#---
shutdown -r now
#---
Your passphrase will be asked at boot time and after everything is running restore your backup.
Have fun!
So first of all what I really need to encrypt are the following partitions:
/home
/var
/etc
swap
You can simplify by encrypting everything except /boot (ok, you may also encrypt that but I do not see the point and did not try it).
The main issue about disk encryption resides in disk performance specially by removing things (which includes moving from and to file systems). So if you really need some juicy speed upped partition I recommend to have a plain ext2/ext3 partition by the end of the disk (as closer to the out border of the disk as quick things get done, it does not apply for SCSI disks).
That said, the reasons you want to encrypt swap is to ensure that no one will eventually forces an swap attack on you (forcing the system to drop some sensitive data on the swap partition and then read them out). The /var is also important because there are the system logs and if you are a not that security freak you will eventually mix things up and type your password instead of username (which will be registered in the security log). The /etc is for the sake of it (you do not need it if you keep a safe check sum of all files there and check it before turning your network connection on, hehe). The last, but not the least, your precious /home and you know why you need it (as also RIAA).
The problem with Fedora 9 out-of-the-box procedure is that it does not randomizes the disk before encrypting it (which is important but takes a lot, but a LOT of time) and it is understandable for a installation procedure. But you want security so you want to do things right. Before you start doing things keep that in mind: you need time, a lot of time. For my SATA disk in a Pentium 4 3.2GHz the speed was about 3M/s, doing the math:
1GB ~ 6min.
10GB ~ 1h
50GB ~ 4h 45min.
100GB ~ 9h 30min.
150GB ~ 14h
200GB ~ 19h
250GB ~ 24h
300GB ~ 29h
512GB ~ 2days
1TB ~ 4days
If you know a speed upped procedure, please tell me. The speed problem is not on the disk but on the random generation, so it is unlikely to change for a notebook (if you getting nervous about that).
So the procedure is the following for a data partition and swap. But first of all (and that is VERY important) copy this text in text file and save it in your root partition (I really meant /) because you will need to shutdown your X11 AND network connections.
1. Do backup of your partition, you will lost everything.
2. Really, DO a backup, you will regret it later if you don't (you can use the FlyBack)
3. Save this text on text file in "/";
4. Logout and switch to a terminal (<CONTROL>+<ALT>+<F1> should do it) and log on as root;
5. Execute the following commandos:
5.1. Runlevel 1:
#---
telinit 1
#---
5.2. Note somewhere which is the real partition that you want to encrypt:
#---
mount | grep home
#---
It should return something like: /dev/sdaXX or /dev/hdaXX
If it returns something /dev/mapper/SEC_DEV it means that your partition was previously encrypted and you will need the real device.
5.2.1. Dealing with encrypted devices:
#---
cat /etc/crypttab | grep SEC_DEV
#---
Here you should get the real partition name.
5.3. /home:
#---
fuser -mvk /home
umount /home
#---
5.4. Verify if it was really unmounted:
#---
cat /proc/mounts | grep home
#---
5.4.1. If you have a previously encrypted partition you need this step (I'm confident that you do have a safe backup):
#---
cryptsetup remove SEC_DEV
#---
Note that I do NOT included the whole path (/dev/mapper/SEC_DEV)
5.5. Fill the partition with random data (this is the point where you must be sure you have a backup):
#---
dd if=/dev/urandom of=/dev/REAL_DEV
#---
The REAL_DEV is the same from step 5.2.
Note that the above command will end with and "out of space" error, do not worry about it.
5.6. Let LUKS know about your new partition.
#---
cryptsetup --verbose --verify-passphrase luksFormat /dev/REAL_DEV
#---
5.6.1. Open it:
#---
cryptsetup luksOpen /dev/REAL_DEV SEC_DEV
#---
SEC_DEV is a string you like. Fedora standard is luks-REAL_DEV (like luks-sda6 for /dev/sda6).
5.6.2. Verify it is everything there:
#---
ls -l /dev/mapper | grep SEC_DEV
#---
5.7. Create the file system:
#---
mkfs.ext3 /dev/mapper/SEC_DEV
#---
5.8. Mount it, to check it out:
#---
mount /dev/mapper/SEC_DEV /home
df -h | grep home
#---
5.9. Edit your /etc/crypttab and include the following line:
SEC_DEV /dev/REAL_DEV none
[update]
5.10. Collect your UUID for the /etc/fstab:
NOTE: The method with cryptsetup does NOT work in reencrypted partitions, so prefer the tune2fs method.
#---
cryptsetup luksUUID /dev/REAL_DEV
#---
#---
tune2fs -l /dev/mapper/SEC_DEV | grep UUID
#---
[update]
It must throw something like: c3119452-5a93-49bb-9c91-28d75a830a18
5.10.1. Alternatively you can already throw it in your /etc/fstab (but be careful to include the two ">":
[update]
#---
tune2fs -l /dev/mapper/SEC_DEV | grep UUID >> /etc/fstab
#---
[update]
5.11. Edit your /etc/fstab to include the following line (removing any other existing line that refers to /home):
UUID=<YOUR UUID> /home ext3 defaults 1 2
or
/dev/mapper/SEC_DEV /home ext3 defaults 1 2
5.12. Verify again:
#---
umount /home
mount /home
#---
5.13. Restore SELinux contexts:
#---
/sbin/restorecon -v -R /home
#---
6. Now the swap partition, which is a little bit different:
6.1. Identifying the partition:
#---
swapon -s
#---
6.1.1. If it turns out to be an encrypted partition, follow the step 5.2.1.
6.2. Turn off the swap (unmount the partition):
#---
swapoff -a
#---
6.3. Repeat the steps 5.4.1. (if you need) and 5.5.
6.4. Let LUKS knows about the new partition:
#---
cryptsetup create SEC_DEV /dev/REAL_DEV
#---
Here you will get the UUID for this device, note it somewhere. Or use the cryptsetup method from step 5.10 (because it is NOT a data file system it is the only way and it works, but just for swap partitions).
6.5.1. Open it: (step 5.6.1)
6.5. Make it swap:
#---
mkswap /dev/mapper/SEC_DEV
#---
6.7. Edit your /etc/crypttab (step 5.9.).
6.6. Edit your /etc/fstab to include the following line:
UUID=<YOUR UUID> swap swap defaults 0 0
or
/dev/mapper/SEC_DEV swap swap defaults 0 0
6.7. Check it:
#---
swapon -a
swapon -s
#---
7. Reboot your system:
#---
shutdown -r now
#---
Your passphrase will be asked at boot time and after everything is running restore your backup.
Have fun!
Tuesday, May 20, 2008
[updated] Time Machine on Linux
If wonder about the Time Machine from MacOS X and wanted it, you can make your own using rsync but if you want something more fancier (like I do) with a GUI you should try FlyBack (if it does not work try this) which is a nicely made Python program (or should I say script) that includes all your needs for a decent backup (using, of course, rsync). Try it, it worth.
By the way I already tried other solutions like:
Unison (painfully slow)
Grsync (hard to configure, exclude list is not possible)
fwbackups (very slow)
KBackup (very slow)
And my own TAR based backup script, which I was using until I tried flyback. It is really a great backup solution for the average desktop backup needs.
By the way, the first backup is a little time consuming (for my 16GB it took about an hour or so), but the following backups are very efficient (it takes no longer then 5 minutes).
P.S.: I'm using LUKS in my partitions.
[update]
I just used a full recovery from my system (I migrated my /home to LUKS and it worked just perfect, like nothing happened).
By the way I already tried other solutions like:
Unison (painfully slow)
Grsync (hard to configure, exclude list is not possible)
fwbackups (very slow)
KBackup (very slow)
And my own TAR based backup script, which I was using until I tried flyback. It is really a great backup solution for the average desktop backup needs.
By the way, the first backup is a little time consuming (for my 16GB it took about an hour or so), but the following backups are very efficient (it takes no longer then 5 minutes).
P.S.: I'm using LUKS in my partitions.
[update]
I just used a full recovery from my system (I migrated my /home to LUKS and it worked just perfect, like nothing happened).
Monday, May 19, 2008
[updated] Aplause for Fedora 9
I'm really impressed by Fedora 9 and here come one of my source of frustration on the previous versions: Java Support and Eclipse.
Until Fedora 8 I needed to install a "thrid party" (the original) Eclipse and Sun's Java to have a decent Java support. I needed to use the original Eclipse because somehow it doesn't wanted to use the Sun's Java, just Gnu Java (which wasn't compatible with Java 1.6). Now Fedora have really flexible Eclipse (3.3.2) with some useful plugins and I can use the Java version that I want. Here comes the hack: I do not need it any more because Gnu Java (ok, openjdk actually) is already Java 1.6 compatible. An amazing step forward to interoperability (at least for me). I still keep the Eclipse "third party" step in my road map, as also Sun's Java, but just because I haven't tried it long enough to discard it (but I'm using the Fedora packages now).
For those of you that want to give a shot:
[update]
Java source included:
java-1.6.0-openjdk-src
java-1.5.0-gcj-src
[update]
Java support:
#---
yum -y install \
gcc-java \
java-1.6.0-openjdk \
java-1.6.0-openjdk-plugin \
java-1.6.0-openjdk-javadoc \
java-1.6.0-openjdk-src \
java-1.5.0-gcj \
java-1.5.0-gcj-devel \
java-1.5.0-gcj-javadoc \
java-1.5.0-gcj-src
#---
Eclipse for Java:
#---
yum -y install \
eclipse-platform \
eclipse-ecj \
eclipse-jdt \
eclipse-cvs-client \
eclipse-subclipse \
eclipse-subclipse-book
#---
For C++ development:
#---
yum -y install \
eclipse-cdt
#---
Mylyn plugin:
#---
yum -y install \
eclipse-mylyn \
eclipse-mylyn-ide \
eclipse-mylyn-java \
eclipse-mylyn-bugzilla \
eclipse-mylyn-trac
#---
A note on the docs, you will find them in:
/usr/share/javadoc/java-1.5.0-gcj/
/usr/share/javadoc/java-1.6.0-openjdk/
Until Fedora 8 I needed to install a "thrid party" (the original) Eclipse and Sun's Java to have a decent Java support. I needed to use the original Eclipse because somehow it doesn't wanted to use the Sun's Java, just Gnu Java (which wasn't compatible with Java 1.6). Now Fedora have really flexible Eclipse (3.3.2) with some useful plugins and I can use the Java version that I want. Here comes the hack: I do not need it any more because Gnu Java (ok, openjdk actually) is already Java 1.6 compatible. An amazing step forward to interoperability (at least for me). I still keep the Eclipse "third party" step in my road map, as also Sun's Java, but just because I haven't tried it long enough to discard it (but I'm using the Fedora packages now).
For those of you that want to give a shot:
[update]
Java source included:
java-1.6.0-openjdk-src
java-1.5.0-gcj-src
[update]
Java support:
#---
yum -y install \
gcc-java \
java-1.6.0-openjdk \
java-1.6.0-openjdk-plugin \
java-1.6.0-openjdk-javadoc \
java-1.6.0-openjdk-src \
java-1.5.0-gcj \
java-1.5.0-gcj-devel \
java-1.5.0-gcj-javadoc \
java-1.5.0-gcj-src
#---
Eclipse for Java:
#---
yum -y install \
eclipse-platform \
eclipse-ecj \
eclipse-jdt \
eclipse-cvs-client \
eclipse-subclipse \
eclipse-subclipse-book
#---
For C++ development:
#---
yum -y install \
eclipse-cdt
#---
Mylyn plugin:
#---
yum -y install \
eclipse-mylyn \
eclipse-mylyn-ide \
eclipse-mylyn-java \
eclipse-mylyn-bugzilla \
eclipse-mylyn-trac
#---
A note on the docs, you will find them in:
/usr/share/javadoc/java-1.5.0-gcj/
/usr/share/javadoc/java-1.6.0-openjdk/
Friday, May 16, 2008
A word about flash and Firefox 3.0
If you are using Firefox 3.0 and want to have flash support there is a broken dependency problem in the flash RPM, it does not include the libflashsupport, which is mandatory to have sound in flash.
So to install flash and have it working properly you need to:
1. Add flash repository: Adobe (flash plugin)
2. Install it, with libflashsupport:
#---
yum -y install \
flash-plugin \
libflashsupport
#---
The problem was reported here.
So to install flash and have it working properly you need to:
1. Add flash repository: Adobe (flash plugin)
2. Install it, with libflashsupport:
#---
yum -y install \
flash-plugin \
libflashsupport
#---
The problem was reported here.
Wednesday, May 14, 2008
My Fedora 9 road map
- Basic system setup
-- Adjust [/etc/resolv.conf]
-- Adjust [/etc/fstab]
-- Adjust [/etc/sysconfig/network-scripts/ifcfg-eth0]
- Add repositories:
-- Freshrpms
-- Adobe (flash plugin)
-- Livna
-- Correct conflict between livna and freshrpms (in favor of freshrpms):
Edit your [/etc/yum.repos.d/livna.repo] file to look like this:
...
#mirrorlist=http://rpm.livna.org/mirrorlist-7
exclude=vlc*,mplayer,libdvbpsi*,ffmpeg*,mencoder*,x264*,lame*
enabled=1
...
-- Update your system:
#---
yum -y upgrade
#---
- Install additional software:
-- Multimedia:
#---
yum -y install \
mplayer \
mencoder \
gecko-mediaplayer \
gnome-mplayer \
vlc \
grip \
ogle \
flash-plugin \
libflashsupport \
AdobeReader_enu \
k3b \
k3b-extras-nonfree
#---
-- Torrent with transmission
#---
yum -y install \
transmission
#---
-- Email with sylpheed-claws
#---
yum -y install \
bogofilter \
claws-mail \
claws-mail-plugins
#---
-- XMMS with its most precious plug-ins
#---
yum -y install \
xmms \
xmms-libs \
xmms-skins.noarch \
xmms-mp3 \
xmms-faad2 \
xmms-flac \
xmms-wma \
xmms-cdread \
xmms-arts \
xmms-esd \
xmms-musepack \
xmms-acme
#---
-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-encryption \
pidgin-guifications \
pidgin-libnotify \
pidgin-otr \
purple-plugin_pack-pidgin \
purple-plugin_pack-pidgin-xmms
#---
-- For kernel modules
#---
yum -y install \
kernel-devel \
kernel-headers
#---
-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-flac-converter \
nautilus-extensions
#---
-- Misc
--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
graphviz \
dia \
gv \
xfig \
xpdf \
eog \
gnuplot \
grace
#---
--- Editors and related
#---
yum -y install \
gvim \
kile \
dictd \
diction
#---
--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---
--- Unrar and related programs
#---
yum -y install \
unrar \
p7zip
#---
--- My beloved debugging program
#---
yum -y install \
ddd
#---
-- Remove things I do NOT like:
--- Multimedia players that do not play divx/mp3 and stays as default for video and audio files:
#---
yum -y erase \
xine* \
totem*
#---
--- This is REALLY annoying, it prevents mplayerplug-in from working properly:
#---
yum -y erase \
mozplugger
#---
-- Update your system:
#---
yum -y upgrade
#---
- Install and setup third-part programs
-- VirtualBox/VMware
-- Skype
-- Real Player (check for the RPM version)
-- Sun Java
-- Eclipse
P.S.: For Real Player you will need to install the following package (broken dependency on Real Player RPM):
#---
yum -y install \
compat-libstdc++-33
#---
- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---
- Some issues:
Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---
Related posts:
- Pidgin with multiple languages (obsolete by package purple-plugin_pack-pidgin, but not working properly)
- C Cedilla with Gnome
- Eclipse and Java from RPMs
-- Adjust [/etc/resolv.conf]
-- Adjust [/etc/fstab]
-- Adjust [/etc/sysconfig/network-scripts/ifcfg-eth0]
- Add repositories:
-- Freshrpms
-- Adobe (flash plugin)
-- Livna
-- Correct conflict between livna and freshrpms (in favor of freshrpms):
Edit your [/etc/yum.repos.d/livna.repo] file to look like this:
...
#mirrorlist=http://rpm.livna.org/mirrorlist-7
exclude=vlc*,mplayer,libdvbpsi*,ffmpeg*,mencoder*,x264*,lame*
enabled=1
...
-- Update your system:
#---
yum -y upgrade
#---
- Install additional software:
-- Multimedia:
#---
yum -y install \
mplayer \
mencoder \
gecko-mediaplayer \
gnome-mplayer \
vlc \
grip \
ogle \
flash-plugin \
libflashsupport \
AdobeReader_enu \
k3b \
k3b-extras-nonfree
#---
-- Torrent with transmission
#---
yum -y install \
transmission
#---
-- Email with sylpheed-claws
#---
yum -y install \
bogofilter \
claws-mail \
claws-mail-plugins
#---
-- XMMS with its most precious plug-ins
#---
yum -y install \
xmms \
xmms-libs \
xmms-skins.noarch \
xmms-mp3 \
xmms-faad2 \
xmms-flac \
xmms-wma \
xmms-cdread \
xmms-arts \
xmms-esd \
xmms-musepack \
xmms-acme
#---
-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-encryption \
pidgin-guifications \
pidgin-libnotify \
pidgin-otr \
purple-plugin_pack-pidgin \
purple-plugin_pack-pidgin-xmms
#---
-- For kernel modules
#---
yum -y install \
kernel-devel \
kernel-headers
#---
-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-flac-converter \
nautilus-extensions
#---
-- Misc
--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
graphviz \
dia \
gv \
xfig \
xpdf \
eog \
gnuplot \
grace
#---
--- Editors and related
#---
yum -y install \
gvim \
kile \
dictd \
diction
#---
--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---
--- Unrar and related programs
#---
yum -y install \
unrar \
p7zip
#---
--- My beloved debugging program
#---
yum -y install \
ddd
#---
-- Remove things I do NOT like:
--- Multimedia players that do not play divx/mp3 and stays as default for video and audio files:
#---
yum -y erase \
xine* \
totem*
#---
--- This is REALLY annoying, it prevents mplayerplug-in from working properly:
#---
yum -y erase \
mozplugger
#---
-- Update your system:
#---
yum -y upgrade
#---
- Install and setup third-part programs
-- VirtualBox/VMware
-- Skype
-- Real Player (check for the RPM version)
-- Sun Java
-- Eclipse
P.S.: For Real Player you will need to install the following package (broken dependency on Real Player RPM):
#---
yum -y install \
compat-libstdc++-33
#---
- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---
- Some issues:
Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---
Related posts:
- Pidgin with multiple languages (obsolete by package purple-plugin_pack-pidgin, but not working properly)
- C Cedilla with Gnome
- Eclipse and Java from RPMs
Tuesday, April 22, 2008
There is no such thing as GPL tools or why I love GS
I had had a problem, actually my advisor, to convert a bunch of PDFs to PDFs with embedded fonts. The usual windows approach is to open every single file with Acrobat Professional and embed the fonts. But I found a solution (here). To understand why non-embedded PDFs are a problem is to figure out that for some professional printers (the ones that you find by big publishers) assumes that the PDF has the fonts embedded (so that it does not have to have them installed on the printer). But back to the solution:
INPUT=<file to convert>
OUTPUT= <font embedded file>
#---
gs \
-dSAFER \
-dNOPLATFONTS \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-dPDFSETTINGS=/printer \
-dCompatibilityLevel=1.4 \
-dSubsetFonts=true \
-dEmbedAllFonts=true \
-sOutputFile=${OUTPUT} \
-f ${INPUT}
#---
I left the following options out:
-sPAPERSIZE=letter
-dMaxSubsetPct=100
You may also want to change the compatibility parameter to:
-dCompatibilityLevel=1.6
To check if the fonts are OK:
#---
pdffonts ${INPUT}
pdffonts ${OUTPUT}
#---
To check if format and such are also OK:
#---
pdfinfo ${INPUT}
pdfinfo ${OUTPUT}
#---
INPUT=<file to convert>
OUTPUT= <font embedded file>
#---
gs \
-dSAFER \
-dNOPLATFONTS \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-dPDFSETTINGS=/printer \
-dCompatibilityLevel=1.4 \
-dSubsetFonts=true \
-dEmbedAllFonts=true \
-sOutputFile=${OUTPUT} \
-f ${INPUT}
#---
I left the following options out:
-sPAPERSIZE=letter
-dMaxSubsetPct=100
You may also want to change the compatibility parameter to:
-dCompatibilityLevel=1.6
To check if the fonts are OK:
#---
pdffonts ${INPUT}
pdffonts ${OUTPUT}
#---
To check if format and such are also OK:
#---
pdfinfo ${INPUT}
pdfinfo ${OUTPUT}
#---
Wednesday, March 26, 2008
Java... what a hell?!?[2]
Following the last post about Java (here) I tell another weird Java behaviour that costed my a work day to figure it out.
//--- snippet ---//
double tst1[] = new double[]{1.0, 2.0};
double tst2[] = new double[]{1.0, 2.0};
Collection lst1 = new ArrayList();
Collection lst2 = new ArrayList();
for (double val : tst1) {
lst1.add(val);
}
for (double val : tst2) {
lst2.add(val);
}
// array version
System.out.println(tst1.hashCode());
System.out.println(tst2.hashCode());
System.out.println(tst1.hashCode() == tst2.hashCode());
System.out.println(tst1 == tst2);
// collection version
System.out.println(lst1.hashCode());
System.out.println(lst2.hashCode());
System.out.println(lst1.hashCode() == lst2.hashCode());
System.out.println(lst1 == lst2); // false
System.out.println(lst1.equals(lst2)); // true
//--- snippet ---//
Try the snippet above and you will see what I mean. I always thought that arrays would be at least hash consistent, i.e., implementing the collection specification on Java.
Once again Java had proven my intuition wrong. By the way, my output from the above snippet is the following:
//--- snippet ---//
4072869
1671711
false
false
-32504895
-32504895
true
false
true
//--- snippet ---//
//--- snippet ---//
double tst1[] = new double[]{1.0, 2.0};
double tst2[] = new double[]{1.0, 2.0};
Collection
Collection
for (double val : tst1) {
lst1.add(val);
}
for (double val : tst2) {
lst2.add(val);
}
// array version
System.out.println(tst1.hashCode());
System.out.println(tst2.hashCode());
System.out.println(tst1.hashCode() == tst2.hashCode());
System.out.println(tst1 == tst2);
// collection version
System.out.println(lst1.hashCode());
System.out.println(lst2.hashCode());
System.out.println(lst1.hashCode() == lst2.hashCode());
System.out.println(lst1 == lst2); // false
System.out.println(lst1.equals(lst2)); // true
//--- snippet ---//
Try the snippet above and you will see what I mean. I always thought that arrays would be at least hash consistent, i.e., implementing the collection specification on Java.
Once again Java had proven my intuition wrong. By the way, my output from the above snippet is the following:
//--- snippet ---//
4072869
1671711
false
false
-32504895
-32504895
true
false
true
//--- snippet ---//
Thursday, January 31, 2008
gVim revisited
In previous post (here) I gave some hints about gVim and some scripts. The first serious update is on the spell-checking area. The new Vim 7.0 already includes a spell-checker. To activate it include the following in your ~/.vimrc file: set spell spl=<lang>, where <lang> is of [en,en_gb,en_us,de,de_20], see the complete documentation for more (here) and a nice quick reference chart here, from where I got inspired to add my own contribution for spell-checking.
First you need to install the dictd package:
#---
yum -y install dictd
#---
Then you can add the following to your ~/.vimrc file:
nmap <silent> <F2> :!dict -s exact -d gcide -m <C-R><C-W><CR>
nmap <silent> <F3> :!dict -s exact -d gcide <C-R><C-W><CR>
This line makes a dict query for word where your cursor is (if you press <F2>. It is just a match against on of the available dictionaries (see: dict --help for more details). This is useful for dictionaries that are not that updated and when the Vim spell-checker says that a word does not exist you can double-check it with <F2>.
The second variant, pressing <F3>, gives you the word definition.
I hope you enjoy it!
Related posts: Some scripts.
First you need to install the dictd package:
#---
yum -y install dictd
#---
Then you can add the following to your ~/.vimrc file:
nmap <silent> <F2> :!dict -s exact -d gcide -m <C-R><C-W><CR>
nmap <silent> <F3> :!dict -s exact -d gcide <C-R><C-W><CR>
This line makes a dict query for word where your cursor is (if you press <F2>. It is just a match against on of the available dictionaries (see: dict --help for more details). This is useful for dictionaries that are not that updated and when the Vim spell-checker says that a word does not exist you can double-check it with <F2>.
The second variant, pressing <F3>, gives you the word definition.
I hope you enjoy it!
Related posts: Some scripts.
Wednesday, January 23, 2008
Fedora Control Center: I'm impressed
I just bumped into the Gnome Control Center today and I must say I'm impressed. It is just the thing that MS Windows had had since the beginning and I sort of regretted that Linux doesn't, actually didn't. It is pretty much a polished clone from the earlier versions of MS Windows Control Panel (resembles the MS Windows 2000).
The first thing I tried was the regular stuff: sound and so on. But what really impresses me was the IPTables configuring tool (Firewall). It is really not that bad. I'm still a shell guy but that control center worths the try.
Main Menu -> System -> Preferences -> Control Center
The first thing I tried was the regular stuff: sound and so on. But what really impresses me was the IPTables configuring tool (Firewall). It is really not that bad. I'm still a shell guy but that control center worths the try.
Main Menu -> System -> Preferences -> Control Center
Tuesday, January 15, 2008
[UPDATE] C Cedilla with Gnome
This problem could be perfectly overcame with a language switch to Portuguese, but I like to have my Linux in English or German and still be able to write in Portuguese, this includes the ç characters. But the default for English and German is to produce a ć instead of our beloved cedilla.
Anyway the answer I found in here and it says the following:
1. Edit the file /etc/gtk-2.0/i386-redhat-linux-gnu/gtk.immodules /etc/gtk-2.0/x86_64-redhat-linux-gnu/gtk.immodules
2. Add at the line beginning with: "cedilla" the language that you want to produce, as default, the c cedilla.
The original is:
"/usr/lib64/gtk-2.0/2.10.0/immodules/im-cedilla.so"
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"
And I changed it to:
"/usr/lib64/gtk-2.0/2.10.0/immodules/im-cedilla.so"
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en:de"
Anyway the answer I found in here and it says the following:
1. Edit the file
2. Add at the line beginning with: "cedilla" the language that you want to produce, as default, the c cedilla.
The original is:
"/usr/lib64/gtk-2.0/2.10.0/immodules/im-cedilla.so"
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"
And I changed it to:
"/usr/lib64/gtk-2.0/2.10.0/immodules/im-cedilla.so"
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en:de"
Tuesday, December 04, 2007
[update] Convert .ape to .flac
There is a new audio format around: the monkey's audio codec or file. To make the conversion you will need the shntools (RPM) and MAC (RPM). Notice that both RPMs are for Fedora 7, but they work. If found a Fedora 8 version, please let me know. This document is a customized version from other two documents: this and this.
- Set some variables:
CUE_FILE=<full path name to the CUE file>
#---
# assuming that the APE/FLAC file has the same name as the CUE file
APE_FILE="`basename \"${CUE_FILE}\" .cue`.ape"
WAV_FILE="`basename \"${CUE_FILE}\" .cue`.wav"
FLAC_FILE="`basename \"${CUE_FILE}\" .cue`.flac"
#---
- Convert APE file to WAV and to FLAC (if instead of an APE file it is a FLAC file you should skip this step):
#---
mac "${APE_FILE}" "${WAV_FILE}" -d
flac --best "${WAV_FILE}" "${FLAC_FILE}"
rm -f "${WAV_FILE}"
#---
- Break and convert to flac:
#---
cuebreakpoints "${CUE_FILE}" | shnsplit -o flac "${FLAC_FILE}"
#---
- Rename single tracks into music names, based on CUE file:
[UPDATE]
This script does NOT check character set validity. It means that it may not work for some particular case (or the general case in some languages). A simple example would be a CUE file in French in ISO-8859-1 (Windows default) and a Linux in Unicode (UTF-8). Oder problem also related with character set is the protection for non-valid character like ":" or "/", which may not be used within a file name. In any case the script will simply not rename the file (which will be left to the user to do). So, in the worst case, you will need to rename the failed files by hand. Useful for that will be to run the following command:
#---
grep -e "^[[:space:]]\+TITLE" "${CUE_FILE}"
#---
[UPDATE]
#---
COUNT=1;
## the first TITLE is for the album name, discard it
grep -e "^[[:space:]]\+TITLE" "${CUE_FILE}" \
| sed -e "s/.*\"\(.*\)\".*/\1/g" \
| while read TRACK_NAME;
do \
## just a little fine tune to have track names like
### "artist - 01 - track.flac" and "artist - 10 - track.flac"
if [ ${COUNT} -lt 10 ];
then \
NUM="0${COUNT}";
else \
NUM="${COUNT}";
fi;
ARTIST=`grep -e "^[[:space:]]\+PERFORMER" "${CUE_FILE}" \
| head -${COUNT} | tail -1 | \
sed -e "s/.*\"\(.*\)\".*/\1/g"`
## rename in the format: "<artist> - <track number> - <track name>.flac"
mv split-track${NUM}.flac "${ARTIST} - ${NUM} - ${TRACK_NAME}".flac;
COUNT=$(($COUNT+1));
done
#---
- Set some variables:
CUE_FILE=<full path name to the CUE file>
#---
# assuming that the APE/FLAC file has the same name as the CUE file
APE_FILE="`basename \"${CUE_FILE}\" .cue`.ape"
WAV_FILE="`basename \"${CUE_FILE}\" .cue`.wav"
FLAC_FILE="`basename \"${CUE_FILE}\" .cue`.flac"
#---
- Convert APE file to WAV and to FLAC (if instead of an APE file it is a FLAC file you should skip this step):
#---
mac "${APE_FILE}" "${WAV_FILE}" -d
flac --best "${WAV_FILE}" "${FLAC_FILE}"
rm -f "${WAV_FILE}"
#---
- Break and convert to flac:
#---
cuebreakpoints "${CUE_FILE}" | shnsplit -o flac "${FLAC_FILE}"
#---
- Rename single tracks into music names, based on CUE file:
[UPDATE]
This script does NOT check character set validity. It means that it may not work for some particular case (or the general case in some languages). A simple example would be a CUE file in French in ISO-8859-1 (Windows default) and a Linux in Unicode (UTF-8). Oder problem also related with character set is the protection for non-valid character like ":" or "/", which may not be used within a file name. In any case the script will simply not rename the file (which will be left to the user to do). So, in the worst case, you will need to rename the failed files by hand. Useful for that will be to run the following command:
#---
grep -e "^[[:space:]]\+TITLE" "${CUE_FILE}"
#---
[UPDATE]
#---
COUNT=1;
## the first TITLE is for the album name, discard it
grep -e "^[[:space:]]\+TITLE" "${CUE_FILE}" \
| sed -e "s/.*\"\(.*\)\".*/\1/g" \
| while read TRACK_NAME;
do \
## just a little fine tune to have track names like
### "artist - 01 - track.flac" and "artist - 10 - track.flac"
if [ ${COUNT} -lt 10 ];
then \
NUM="0${COUNT}";
else \
NUM="${COUNT}";
fi;
ARTIST=`grep -e "^[[:space:]]\+PERFORMER" "${CUE_FILE}" \
| head -${COUNT} | tail -1 | \
sed -e "s/.*\"\(.*\)\".*/\1/g"`
## rename in the format: "<artist> - <track number> - <track name>.flac"
mv split-track${NUM}.flac "${ARTIST} - ${NUM} - ${TRACK_NAME}".flac;
COUNT=$(($COUNT+1));
done
#---
Wednesday, November 28, 2007
Java... what a hell?!?
Recently I experience a problem with Java (both 1.5 and 1.6, up to update 3), which throws the following message error in your face:
The error is: xcb_xlib.c:50: xcb_xlib_unlock: Assertion 'c->xlib.lock'
It does not affects all Java programs (my Eclipse was still running) but some. Not weirdly enough it seems actually a Java problem instead of a Fedora problem. Anyway, to workaround the problem the procedure is even more weird (extracted from here):
sed -i 's/XINERAMA/FAKEEXTN/g' /usr/java//jre/lib/i386/xawt/libmawt.so
The error is: xcb_xlib.c:50: xcb_xlib_unlock: Assertion 'c->xlib.lock'
It does not affects all Java programs (my Eclipse was still running) but some. Not weirdly enough it seems actually a Java problem instead of a Fedora problem. Anyway, to workaround the problem the procedure is even more weird (extracted from here):
sed -i 's/XINERAMA/FAKEEXTN/g' /usr/java/
Wednesday, November 21, 2007
[updated3] My Fedora 8 road map
- Basic system setup
-- Adjust [/etc/resolv.conf]
-- Adjust [/etc/fstab]
-- Adjust [/etc/sysconfig/network-scripts/ifcfg-eth0]
- Add repositories:
-- Freshrpms
-- Adobe (flash plugin)
-- Livna
-- Correct conflict between livna and freshrpms (in favor of freshrpms):
Edit your [/etc/yum.repos.d/livna.repo] file to look like this:
...
#mirrorlist=http://rpm.livna.org/mirrorlist-7
exclude=vlc*,mplayer,libdvbpsi*,ffmpeg*,mencoder*
enabled=1
...
-- Update your system:
#---
yum -y upgrade
#---
- Install additional software:
-- Multimedia:
#---
yum -y install \
mplayer \
mencoder \
mplayerplug-in\
vlc \
grip \
ogle \
flash-plugin \
k3b \
k3b-extras-nonfree \
bittorrent \
bittorrent-gui
#---
-- Email with sylpheed-claws
#---
yum -y install \
bogofilter \
claws-mail \
claws-mail-plugins \
#---
-- XMMS with its most precious plug-ins
#---
yum -y install \
xmms \
xmms-libs \
xmms-skins.noarch \
xmms-mp3 \
xmms-faad2 \
xmms-flac \
xmms-wma \
xmms-cdread \
xmms-arts \
xmms-esd \
xmms-musepack \
xmms-acme
#---
-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-encryption \
pidgin-guifications \
pidgin-otr
#---
-- For kernel modules
#---
yum -y install \
kernel-devel \
kernel-headers
#---
-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-flac-converter \
nautilus-extensions
#---
-- Misc
--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
graphviz \
dia \
gv \
xfig \
xpdf \
eog \
gnuplot \
grace
#---
--- Editors and related
#---
yum -y install \
gvim \
kile \
diction
#---
--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---
--- Unrar and related programs
#---
yum -y install \
unrar \
p7zip
#---
--- My beloved debugging program
#---
yum -y install \
ddd
#---
- Install and setup third-part programs
-- VirtualBox/VMware
-- Skype
-- Acrobat Reader
-- Real Player
-- Sun Java
-- Eclipse
P.S.: For Real Player you will need to install the following package (broken dependency on Real Player RPM):
#---
yum -y install \
compat-libstdc++-33
#---
- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---
- Some issues:
Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---
-- Adjust [/etc/resolv.conf]
-- Adjust [/etc/fstab]
-- Adjust [/etc/sysconfig/network-scripts/ifcfg-eth0]
- Add repositories:
-- Freshrpms
-- Adobe (flash plugin)
-- Livna
-- Correct conflict between livna and freshrpms (in favor of freshrpms):
Edit your [/etc/yum.repos.d/livna.repo] file to look like this:
...
#mirrorlist=http://rpm.livna.org/mirrorlist-7
exclude=vlc*,mplayer,libdvbpsi*,ffmpeg*,mencoder*
enabled=1
...
-- Update your system:
#---
yum -y upgrade
#---
- Install additional software:
-- Multimedia:
#---
yum -y install \
mplayer \
mencoder \
mplayerplug-in\
vlc \
grip \
ogle \
flash-plugin \
k3b \
k3b-extras-nonfree \
bittorrent \
bittorrent-gui
#---
-- Email with sylpheed-claws
#---
yum -y install \
bogofilter \
claws-mail \
claws-mail-plugins \
#---
-- XMMS with its most precious plug-ins
#---
yum -y install \
xmms \
xmms-libs \
xmms-skins.noarch \
xmms-mp3 \
xmms-faad2 \
xmms-flac \
xmms-wma \
xmms-cdread \
xmms-arts \
xmms-esd \
xmms-musepack \
xmms-acme
#---
-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-encryption \
pidgin-guifications \
pidgin-otr
#---
-- For kernel modules
#---
yum -y install \
kernel-devel \
kernel-headers
#---
-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-flac-converter \
nautilus-extensions
#---
-- Misc
--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
graphviz \
dia \
gv \
xfig \
xpdf \
eog \
gnuplot \
grace
#---
--- Editors and related
#---
yum -y install \
gvim \
kile \
diction
#---
--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---
--- Unrar and related programs
#---
yum -y install \
unrar \
p7zip
#---
--- My beloved debugging program
#---
yum -y install \
ddd
#---
- Install and setup third-part programs
-- VirtualBox/VMware
-- Skype
-- Acrobat Reader
-- Real Player
-- Sun Java
-- Eclipse
P.S.: For Real Player you will need to install the following package (broken dependency on Real Player RPM):
#---
yum -y install \
compat-libstdc++-33
#---
- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---
- Some issues:
Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---
Tuesday, November 20, 2007
How to get language switch in pidgin
To get language switch in pidgin you need a plugin called switch-spell, which does not come in a RPM package (as far as I know). This means that you need to get the sources (here, in download) and compile it. To make the job easier here goes the necessary packages:
dbus-devel
dbus-glib-devel
libpurple-devel
aspell-devel
gtkspell-devel
pidgin-devel
And the yum command:
#---
yum -y install \
dbus-devel \
dbus-glib-devel \
libpurple-devel \
aspell-devel \
gtkspell-devel \
pidgin-devel
#---
After that just extract the sources and compile:
#---
./configure
make && make install
#---
Have fun!
P.S.: Just remember the previous post, if you get a "fails sanity check" error.
dbus-devel
dbus-glib-devel
libpurple-devel
aspell-devel
gtkspell-devel
pidgin-devel
And the yum command:
#---
yum -y install \
dbus-devel \
dbus-glib-devel \
libpurple-devel \
aspell-devel \
gtkspell-devel \
pidgin-devel
#---
After that just extract the sources and compile:
#---
./configure
make && make install
#---
Have fun!
P.S.: Just remember the previous post, if you get a "fails sanity check" error.
Funny thing: "fails sanity check"
Ok that is a very funny error and I have never got it, until today. But why should I get such an error trying to compile something if I do have GCC and any other prereq whatsoever? The point is, and do not ask me why, GCC package does not requires glibc-headers. So you may get that following funny, and for me cryptic message, even though I have had "/lib/cpp" (go figure!):
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
Anyway, just install the package and everything will go as you expect.
#---
yum -y install glibc-headers
#---
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
Anyway, just install the package and everything will go as you expect.
#---
yum -y install glibc-headers
#---
Tuesday, November 13, 2007
Fedora 8 screw big time
For those who got the "Invalid Module Format" trying to install/configure any module after installing Fedora 8 here is why. (It affects VMware (version Workstation 6.0.2 build-59824) and VirtualBox (version 1.5.2) BIG TIME!)
1. You have installed "kernel-devel" afterwards using yum (that is what I used);
2. Fedora 8 install kernel.i586 and yum (version 3.2.7) kernel-devel.i686 (notice the difference in the architecture?);
3. You can NOT upgrade your kernel to a i686 version.
How do I fixed the problem?
1. Install the "kernel-xen" and boot your box with it;
2. Remove ALL kernel instances (NOT kernel-xen, which your are using now);
2.1. You will need to remove 2 more packages too:
rpm -e xorg-x11-drv-nouveau xorg-x11-drivers
rpm -e kernel.i586 kernel-devel
3. Re-install the kernel:
yum -y install kernel.i686 kernel-devel.i686 xorg-x11-drv-nouveau xorg-x11-drivers
4. Reboot with the new kernel
5. Recompile the modules or, in case of vmware and virtual box, setup:
vmware-config.pl
/etc/init.d/vboxdrv setup
6. Enjoy!
For those who got the "Invalid Module Format" trying to install/configure any module after installing Fedora 8 here is why. (It affects VMware (version Workstation 6.0.2 build-59824) and VirtualBox (version 1.5.2) BIG TIME!)
1. You have installed "kernel-devel" afterwards using yum (that is what I used);
2. Fedora 8 install kernel.i586 and yum (version 3.2.7) kernel-devel.i686 (notice the difference in the architecture?);
3. You can NOT upgrade your kernel to a i686 version.
How do I fixed the problem?
1. Install the "kernel-xen" and boot your box with it;
2. Remove ALL kernel instances (NOT kernel-xen, which your are using now);
2.1. You will need to remove 2 more packages too:
rpm -e xorg-x11-drv-nouveau xorg-x11-drivers
rpm -e kernel.i586 kernel-devel
3. Re-install the kernel:
yum -y install kernel.i686 kernel-devel.i686 xorg-x11-drv-nouveau xorg-x11-drivers
4. Reboot with the new kernel
5. Recompile the modules or, in case of vmware and virtual box, setup:
vmware-config.pl
/etc/init.d/vboxdrv setup
6. Enjoy!
Labels:
fedora8,
kernel,
virtualbox,
vmware,
yum
Thursday, June 14, 2007
[updated] Some life changing (g)VI(M) scripts
Ok first I need to say that I use gvim for both text, using LaTeX, and code, mainlly C/C++, writting. So the focus is on both aspects.
LaTeX:
. LaTeX-Suite: here and here
- ~/vimrc:
filetype plugin on
set grepprg=grep\ -nH\ $*
- Comments: it works only if you start vim with a ".tex" file.
. Instead of vimspell use the native VIM spell-checker (for VIM 7.0 or greater, Fedora 8 or greater).
- ~/vimrc:
nmap <F10> :setl spell spl=de_de<CR>
nmap <F11> :setl spell spl=en_gb<CR>
nmap <F12> :setl spell spl=<CR>
- Comments: the out-of-the-box VIM come just with the English US dictionary, so to add more dictionaries, with your special flavour, just execute manually (once per language) the fallowing command in VIM:
:setl spell spl=xx_xx
Where "xx_xx" is the language you want to use, for instance: pt_br, es_es, es_mx, en_gb, en_ca, de_de, de_ch, for Brazilian Portuguese, Spanish Spanish, Mexican Spanish, British English, Canadian English, German German, Switzer German.
The languages supported are all languages present in OpenOffice.
[DEPRECATED]
. vimspell: here
- ~/vimrc:
" VimSpell settings
highlight SpellErrors ctermfg=Red guifg=Red
\ cterm=underline gui=underline term=reverse
au VimEnter * SpellAutoEnable
let spell_update_time = 2000
" file types to allow correction on
let spell_auto_type = "all"
" on-the-fly type correction
let spell_insert_mode = 0
" which corrector to use
let spell_executable = "aspell"
" languages
let spell_language_list = "en_GB,de_DE,pt_BR"
let spell_auto_jump = 0
- Comments: It is a must for every one that writes something besides code without comments :-)
[DEPRECATED]
Programming:
. csupport: here, but usually already on vim/gvim package.
- ~/vimrc:
let g:C_AuthorName = 'Your name'
let g:C_Email = 'your.email@your.provider'
- Comments: It helps, A LOT!
. Tags menu: here
- ~/vimrc:
let Tmenu_ctags_cmd = '/usr/bin/ctags'
let Tmenu_max_submenu_items = 20
let Tmenu_max_tag_length = 10
let Tmenu_sort_type = "name"
- Comments: it creates, using gvim, a menu item called "Tags" with the current file tags.
. taglist: here
- ~/.vimrc:
nnoremap <silent> <F8> :TlistToggle<CR>
- Comments: This is THE killer tag browser and that map above makes it reachable by pressing <F8>. Check it out.
Related posts: gVim revisited.
LaTeX:
. LaTeX-Suite: here and here
- ~/vimrc:
filetype plugin on
set grepprg=grep\ -nH\ $*
- Comments: it works only if you start vim with a ".tex" file.
. Instead of vimspell use the native VIM spell-checker (for VIM 7.0 or greater, Fedora 8 or greater).
- ~/vimrc:
nmap <F10> :setl spell spl=de_de<CR>
nmap <F11> :setl spell spl=en_gb<CR>
nmap <F12> :setl spell spl=<CR>
- Comments: the out-of-the-box VIM come just with the English US dictionary, so to add more dictionaries, with your special flavour, just execute manually (once per language) the fallowing command in VIM:
:setl spell spl=xx_xx
Where "xx_xx" is the language you want to use, for instance: pt_br, es_es, es_mx, en_gb, en_ca, de_de, de_ch, for Brazilian Portuguese, Spanish Spanish, Mexican Spanish, British English, Canadian English, German German, Switzer German.
The languages supported are all languages present in OpenOffice.
[DEPRECATED]
. vimspell: here
- ~/vimrc:
" VimSpell settings
highlight SpellErrors ctermfg=Red guifg=Red
\ cterm=underline gui=underline term=reverse
au VimEnter * SpellAutoEnable
let spell_update_time = 2000
" file types to allow correction on
let spell_auto_type = "all"
" on-the-fly type correction
let spell_insert_mode = 0
" which corrector to use
let spell_executable = "aspell"
" languages
let spell_language_list = "en_GB,de_DE,pt_BR"
let spell_auto_jump = 0
- Comments: It is a must for every one that writes something besides code without comments :-)
[DEPRECATED]
Programming:
. csupport: here, but usually already on vim/gvim package.
- ~/vimrc:
let g:C_AuthorName = 'Your name'
let g:C_Email = 'your.email@your.provider'
- Comments: It helps, A LOT!
. Tags menu: here
- ~/vimrc:
let Tmenu_ctags_cmd = '/usr/bin/ctags'
let Tmenu_max_submenu_items = 20
let Tmenu_max_tag_length = 10
let Tmenu_sort_type = "name"
- Comments: it creates, using gvim, a menu item called "Tags" with the current file tags.
. taglist: here
- ~/.vimrc:
nnoremap <silent> <F8> :TlistToggle<CR>
- Comments: This is THE killer tag browser and that map above makes it reachable by pressing <F8>. Check it out.
Related posts: gVim revisited.
Sunday, June 10, 2007
Almost a year
That's it: this blog was dead for almost a year and is time to do some catch up, if I still have any reader. But anyway this is more for me than for you and I can also practice my English (as you can see need a lot of improvements).
Nevertheless here comes some things that I'm very excited about:
- CDT 4.0 RC3 for Eclipse 3.3
- Fedora 7
First why is CDT to be excited about, because it has a refactoring tool that actually works. Ok it is just a renaming tool, so what? That means that they are really into keeping track of your code, including documentation. So I believe that they are bringing all those cool refactoring tools, like move, in no time. Then a C/C++ programmer can have all those nice things about Java IDE in a C/C++ free IDE.
And what about Fedora 7, there is nothing REALLY new on it. Well, first they are free from the RH packaging tools, which means that hopefully there will be some Fedora "the way I wanted" 7. But here some critics about Fedora: they should be more careful about the RPMs, which have broken dependencies, like VLC. We are talking about VLC, which is a major end-user application. The new version has also some stability issues, specially xorg. But the new xorg is kicking asses!!! If you don't saw it, please DO.
The new xorg is already with the 3D Desktop concept in it. They must polish some rough edges, like maximizing, but it looks good, very good. It is a mixture of OSX (with that very nice+ behaviour) with 3D Desktop environment. But has I said, it needs some refinement, maybe on the next major upgrade.
Nevertheless here comes some things that I'm very excited about:
- CDT 4.0 RC3 for Eclipse 3.3
- Fedora 7
First why is CDT to be excited about, because it has a refactoring tool that actually works. Ok it is just a renaming tool, so what? That means that they are really into keeping track of your code, including documentation. So I believe that they are bringing all those cool refactoring tools, like move, in no time. Then a C/C++ programmer can have all those nice things about Java IDE in a C/C++ free IDE.
And what about Fedora 7, there is nothing REALLY new on it. Well, first they are free from the RH packaging tools, which means that hopefully there will be some Fedora "the way I wanted" 7. But here some critics about Fedora: they should be more careful about the RPMs, which have broken dependencies, like VLC. We are talking about VLC, which is a major end-user application. The new version has also some stability issues, specially xorg. But the new xorg is kicking asses!!! If you don't saw it, please DO.
The new xorg is already with the 3D Desktop concept in it. They must polish some rough edges, like maximizing, but it looks good, very good. It is a mixture of OSX (with that very nice
Subscribe to:
Posts (Atom)