Archive pour September 2007

BitDefender for Linux

Wednesday 26 September 2007

A free antivirus, quite useful if you play dual boot with windows… Some links:

  • Home of BitDefender.
  • RPM download. This is a Makeself shell script. Extract and install by using
    sh ./BitDefender-scanner-7.5-4.linux-gcc3x.i586.rpm.run.
    BTW you can fetch the “real” RPM by tweaking the script:
    sh ./BitDefender-scanner-7.5-4.linux-gcc3x.i586.rpm.run --confirm --keep --nox11 --target NewDirectory.
    Then answer “n” when requested OK to execute: ./install.sh.
    This way in NewDirectory you will find the RPM file.
  • Request the Free license for BitDefender Antivirus Scanner for Unices.
  • Don’t forget to read the Documentation :)
  • Customize the configuration file:
    /etc/BitDefender-scanner/bdscan.conf.
  • Some contribs are described in:
    /opt/BitDefender-scanner/share/doc/examples.

Which RPMs are requiring another one

Friday 21 September 2007

Try the small rpmwhatrequires.sh script.

Example use:

$ rpmwhatrequires.sh rpm

Gives:

man-1.6e-3.fc7
createrepo-0.4.10-1.fc7
rpmorphan-1.0-1.EL.fc7
rpm-libs-4.4.2.1-2.EL.fc7
rpm-build-4.4.2.1-2.EL.fc7
rpm-python-4.4.2.1-2.EL.fc7
yum-3.2.5-1.fc7

Hibernate (aka Suspend To Disk) on a laptop

Friday 21 September 2007

In Gnome, create a launcher, on the desktop or in the panel to the following script (Hybernate.sh):

#!/bin/sh
icon="/usr/share/icons/hicolor/scalable/apps/gpm-hibernate.svg"
zenity --window-icon $icon --title "" --question --text "Are you sure you want to hibernate?"
if [ $? -eq 0 ]
then
dbus-send --session   --dest=org.gnome.PowerManager   --type=method_call   --print-reply
--reply-timeout=2000   /org/gnome/PowerManager   org.gnome.PowerManager.Hibernate
fi

Small trick for managing Server Layout with gdm

Friday 21 September 2007

This is a follow-up to the previous post.
Now you need to be able to choose from gdm which server layout you want to use.

Set this small script (xorg_conf.sh) in /etc/X11, and add this to your /etc/gdm/custom.conf file :

# Custom commands
[customcommand]
CustomCommand0=/etc/X11/xorg_conf.sh dual
CustomCommandLabel0=Écran _Double
CustomCommandLRLabel0=Affichage en Écran _Double
CustomCommandText0=Voulez vous vraiment redémarrer en écran Double ?
CustomCommandTooltip0=Redémarre en écran Double
CustomCommandIsPersistent0=true

CustomCommand1=/etc/X11/xorg_conf.sh single
CustomCommandLabel1=Écran _Simple
CustomCommandLRLabel1=Affichage en Écran _Simple
CustomCommandText1=Voulez vous vraiment redémarrer en écran Simple ?
CustomCommandTooltip1=Redémarre en écran Simple
CustomCommandIsPersistent1=true

The script xorg_conf.sh is simply creating a link from xorg.conf.dual or xorg.conf.single to /etc/X11/xorg.conf. Each of these 2 files are equal only Option "DefaultServerLayout" is different (See the example xorg.conf in previous post).

Xorg configuration IBM T30 with pseudo xinerama

Friday 21 September 2007

The following xorg.conf file is working on an IBM Thinkpad T30 [Radeon Mobility 7500] and permits the use of a second screen connected to the laptop in the ATI pseudo-xinerama mode.

Two server layouts are available (that can be chosen with the option -layout name), one with the internal TFT screen (SingleLayout layout) and another one when you have an additional screen connected (DualLayout layout).

In this second case you have a virtual screen of 2304×1024:

  • 1280×1024 for the external screen (disposed on the left in my configuration file),
  • and 1024×768 for the internal TFT.
  • In this case a small part of the virtual screen is not available (virtually, the part below your TFT screen).
  • It has to be noted that in this configuration no DRI is available…

IBM T30 modprobe configuration

Friday 21 September 2007

My modprobe.conf, maybe this can be interesting:

### Anaconda guesses
alias eth0 e100
alias scsi_hostadapter ata_piix
alias scsi_hostadapter1 usb-storage
alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
options snd-intel8x0 index=0

### Disable IPv6
alias net-pf-10 off
#alias ipv6 off
install sit0 /bin/true

### IBM specific
options thinkpad_acpi experimental=1 hotkey=enable,0xffff

### Disable PC speaker
install pcspkr :

### Internal IrDA
alias irda0 nsc-ircc
options nsc-ircc dongle_id=0x09  irq=3 dma=3 io=0x2f8
install nsc-ircc /bin/setserial /dev/ttyS1 uart none port 0 irq 0; /sbin/modprobe --ignore-install nsc-ircc

Using xine on a DVD rip (or your own temporary DVD tree)

Friday 21 September 2007

This is an interesting feature of xine (used for example by the DVDStyler tool).
If a DVD structure is available in a directory, xine understands MRL of this type: MRL = dvd://path

This means you can visualize your DVD (with menus) by using the command:
xine dvd:/the_full_path

Mandatory before burning the DVD !

Video output control on ThinkPad T30

Friday 21 September 2007

This feature allows control over the devices used for video output - LCD, CRT or DVI (if available). The following commands are available:

echo lcd_enable > /proc/acpi/ibm/video
echo lcd_disable > /proc/acpi/ibm/video
echo crt_enable > /proc/acpi/ibm/video
echo crt_disable > /proc/acpi/ibm/video
echo dvi_enable > /proc/acpi/ibm/video
echo dvi_disable > /proc/acpi/ibm/video
echo auto_enable > /proc/acpi/ibm/video
echo auto_disable > /proc/acpi/ibm/video
echo expand_toggle > /proc/acpi/ibm/video
echo video_switch > /proc/acpi/ibm/video

cccache

Friday 21 September 2007

When compiling on Fedora, gcc is now (?) using ccache by default…
$ which gcc
/usr/lib/ccache/gcc

A directory ~/.ccache is created for speeding up all compilations and is populated by cccache.

Show cache summary:
ccache -s

Clear the cache:
ccache -C

Important is the ’set maximum size of cache’ which is quite high by default (976.6 Mbytes) : don’t forget to change it if you have not so much disk space:
ccache -M 50M # For a 50 Mbytes cache

Check available RPM groups on Fedora

Friday 21 September 2007

Time to write new posts…. I’ve not added anything since too long …

Now the easy answer… If you’re creating your own RPMs (like I do), you sometimes wonder what RPM groups are available. The answer is easy, check in the rpm doc directory:
cat /usr/share/doc/rpm-*/GROUPS
It should give you something like this:

Amusements/Games
Amusements/Graphics
Applications/Archiving
Applications/Communications
Applications/Databases
Applications/Editors
Applications/Emulators
Applications/Engineering
Applications/File
Applications/Internet
Applications/Multimedia
Applications/Productivity
Applications/Publishing
Applications/System
Applications/Text
Development/Debuggers
Development/Languages
Development/Libraries
Development/System
Development/Tools
Documentation
System Environment/Base
System Environment/Daemons
System Environment/Kernel
System Environment/Libraries
System Environment/Shells
User Interface/Desktops
User Interface/X
User Interface/X Hardware Support