Showing posts with label gentoo. Show all posts
Showing posts with label gentoo. Show all posts

Saturday, March 14, 2009

automounting with HAL

Following the instructions at this page:
http://en.gentoo-wiki.com/wiki/HAL


> rc-update show
> rc-update add hald default
> lshal


Note that because I previously tried "ivman", I had to remove it,


> emerge -a --depclean ivman


otherwise it would conflict with HAL, and I couldn't right-click and "safely remove".

Tuesday, February 03, 2009

install new latex package

Download
2. move .sty file to ..textmf/tex/latex/package-name/
3. if no .sty file .run latex on the .ins file
4. type texhash

from: http://avizit.blogspot.com

Tuesday, January 20, 2009

Alsa: Device or resource busy

I have seen this prblem a couple of times, more or less randomly:


mplayer
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy


Today I solved it in this way:


lsof /dev/snd/*
[look at the pid's, excluding kmix]
kill pid's


I dont' know wether this always works, anyway...

Thursday, December 04, 2008

sd reader on hp laptop

Check what you have


~ $ /usr/sbin/lspci |grep "Card Reader"
02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)


make menuconfig and enable


Device Drivers --->
[*] Misc devices --->
-*- TI Flash Media interface support
<*> TI Flash Media PCI74xx/PCI76xx host adapter support

Device Drivers --->
<*> MMC/SD card support --->
<*> MMC block device driver
<*> TI Flash Media MMC/SD Interface support


then re-compile the kernel, reboot. When I insert
a SD card I see (dmesg)


tifm_core: MMC/SD card detected in socket 0:1
mmc0: new SD card at address b368
mmcblk0: mmc0:b368 SD 1997312KiB
mmcblk0: p1


finally


mount /dev/mmcblk0p1 /mnt/floppy/

Monday, October 27, 2008

dual monitor on my laptop

Using xrandr and the monitor sitting on my desk.

Edit xorg.conf and add the "virtual" line (if there is no xorg.conf and it's
using the guess-mechanism, copy the guess from /var/log/Xorg.0.log )


Section "Screen"
...
Subsection "Display"
...
Virtual 1280 1824
EndSubSection
EndSection

Then create the script "switchDual"

$ cat bin/switchDual
#!/bin/bash

if [ -e /var/lock/subsys/gerbaudo/dualOn ]
then
echo "turning off VGA screen..."
xrandr --auto --output LVDS --mode 1280x800 --output VGA --off
rm /var/lock/subsys/gerbaudo/dualOn
else
echo "turning on VGA screen..."
xrandr --auto --output VGA --mode 1280x1024 --above LVDS
touch /var/lock/subsys/gerbaudo/dualOn
fi


As root create the dir where the lockfile is stored


# mkdir /var/lock/subsys/gerbaudo
# chown gerbaudo:gerbaudo /var/lock/subsys/gerbaudo


and add an icon for it on the desktop


$ cat ~/Desktop/startDual.desktop
[Desktop Entry]
Comment=
Comment[en_US]=
Encoding=UTF-8
Exec[$e]='/home/gerbaudo/bin/switchDual'
GenericName=startDual
GenericName[en_US]=startDual
Icon=
MimeType=
Name=startDual
Name[en_US]=startDual
Path[$e]=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=


Voila

Saturday, October 25, 2008

gentoo - fuse

install the "fssh" stuff that you got from Justace--thanks man!

emerge sys-fs/sshfs-fuse

mkdir /rooms
mkdir /work

chmod /rooms --reference=/mnt/cdrom
chmod /work --reference=/mnt/cdrom

At this point--works as root--something wrong with permissions

groupadd fuse

usermod -a -G fuse gerbaudo

Try to reboot: still not working. Google around and try this:

chown gerbaudo:gerbaudo /rooms
chown gerbaudo:gerbaudo /work/


Now it works :-)

gentoo install root (disable cintex+reflex)

Something is wrong with compiling root5.20.00 on gentoo
(see this bug report)

add in /etc/portage/package.keywords

sci-physics/root ~x86

Then following this link
gerbaudo-hp ~ # ls /usr/portage/sci-physics/root/
ChangeLog files root-3.05.04.ebuild root-5.18.00d.ebuild root-5.20.00.ebuild
Manifest metadata.xml root-5.16.00.ebuild root-5.20.00-r1.ebuild
gerbaudo-hp ~ # mkdir /usr/local/portage
gerbaudo-hp ~ # mkdir /usr/local/portage/sci-physics
gerbaudo-hp ~ # mkdir /usr/local/portage/sci-physics/root
gerbaudo-hp ~ # cp /usr/portage/sci-physics/root/root-5.20.00.ebuild /usr/local/portage/sci-physics/root/
gerbaudo-hp ~ # cp -rp /usr/portage/sci-physics/root/files /usr/local/portage/sci-physics/root/

add one line in make .conf

gerbaudo-hp ~ # emacs -nw /etc/make.conf
gerbaudo-hp ~ # diff /etc/make.conf /etc/make.conf~
< PORTDIR_OVERLAY="/usr/local/portage"

gerbaudo-hp ~ # cd /usr/local/portage/sci-physics/root/

disable cintex and reflex from the ebuild

gerbaudo-hp root # emacs -nw root-5.20.00.ebuild
gerbaudo-hp root # diff root-5.20.00.ebuild root-5.20.00.ebuild~
142c142
< --disable-cintex \ --- > --enable-cintex \
148c148
< --disable-reflex \ --- > --enable-reflex \

and finally digest

gerbaudo-hp root # ebuild root-5.20.00.ebuild digest

Then

gerbaudo-hp root # emerge -av =root-5.20.00

Friday, October 24, 2008

wifi on gentoo

This is the wireless HW I have:

gerbaudo@gerbaudo-hp ~ $ /usr/sbin/lspci -v | grep Wireless
10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

First of all you need to enable the drivers in your .config
(or use the .config you have, or create it automagically).
These are the flags I have

#
# Wireless LAN
#
CONFIG_WLAN_80211=y
CONFIG_IWL3945=m
CONFIG_IWL3945_QOS=y
...
#
# Wireless
#
CONFIG_CFG80211=y
CONFIG_NL80211=y
CONFIG_WIRELESS_EXT=y
CONFIG_MAC80211=y

then build the kernel and try some debugging

ifconfig wlan0 up

then copy your old wpa_supplicant.conf and then

add in /etc/conf.d/net

config_wlan0=("dhcp")
modules=( "wpa_supplicant" )
mode_wlan0="managed"
wpa_supplicant_wlan0="-Dwext"


cd /etc/init.d ; ln -s net.lo net.wlan0


One further thing that I did (but I don't know whether
or not it's necessary) is :

wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

At the next reboot it tried eth0, timed-out, and connected on wlan0 :-)