Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

Sunday, March 15, 2009

emacs readonly

The command `view-file' will open a file read-only; you could bind it to some convenient key in your .emacs.

C-x C-r open a file in read-only mode
C-x C-q toggle-read-only

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

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/

Wednesday, November 12, 2008

Access to serial port

In order to get rid of the error

you don't have +rw permission to access serial port

you need to add your user to the uucp group

> ls -l /dev/ttyS0
crw-rw---- 1 root uucp 4, 64 Nov 12 18:44 /dev/ttyS0

/usr/sbin/usermod -a -G uucp my_username

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 :-)

Monday, October 13, 2008

skype on SLC4

Tried to install skype on SLC4.
Can only get the latest version (2.0.0.72) from skype.com (cannot find older versions around).
Download the statically linked package from http://www.skype.com/go/getskype-linux-static
Unpack in /usr/local/share/skype; it complains about

/skype: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.4' not found

Need more recent stdc++ library (using gcc version 3.4.6 from /usr/bin/gcc);
get gcc-4.2.1 from http://gcc.gnu.org. Then configure; make; make install.
Change the symbolyc link so that it points to the new library

/usr/lib/libstdc++.so.6 -> /usr/local/lib/libstdc++.so.6.0.9

Now skype starts without much complaining. I can hear sounds, but
cannot speak. Kill artsd (don't know, might not be the problem),
change settings with alsamixer. Then from the skype settings switch
from the default audio device to the 4th one (otherwise
"Call Failed: Problem with Audio Playback" ).
Now it seems to work (can hear my voice back during test call), but I might
have to adjust the mic volume.

Note: set audio device different from the default one for input/output/ringing, not only for output

Saturday, April 19, 2008

connect to fnal from SLC4 laptop

kinit -A -f user@FNAL.GOV
ssh -2 -Y user@cmslpc.fnal.gov

Tuesday, September 18, 2007

how to know which linux distribution you're running

Few ways:
dmesg
cat /proc/version
cat /etc/issue

Friday, July 06, 2007

kubuntu systemsettings window

The "system settings" window on kubuntu is too big (doesn't fit on my screen 1024x768); this unpleasant feature (bug?) has been there since quite a long time.
Now I found a trick: rather than running "system settings" run "kcontrol": the same menus are available, but there's no problem with the window size.

H2 network

The wireless network in H2 doesn't support DHCP, so each user
has to pick his/her IP from a list and use it. For some reason the kubuntu
managment of the network via "control panel" doesn't work when I set
the "manual IP". What does work is WiFiRadar: click on the network
you're using (CERN), edit, change the IP to 137.138.203.112 and leave
everything else as is. Then disconnect-connect.

Wednesday, May 30, 2007

CMSSW cvs

  • from cern:
project CMSSW
kinit
cvs co UserCode/gerbaudo

  • from princeton:
setenv CVSROOT :kserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
kinit -cell CERN.CH
cvs co UserCode/gerbaudo

  • from fnal:
project CMSSW
kserver_init
(this method is suggested in https://twiki.cern.ch/twiki/bin/view/Main/CMSSWatFNALSETUP but now it doesn't work for me)
OR
setenv CVSROOT :ext:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
setenv CVS_RSH ssh
cvs co UserCode/gerbaudo

Friday, April 27, 2007

Printing on linux in Jadwin

Setup the printer on my pc in Jadwin:
~ > lpstat -s
... see the address of what you are interested in...
Add printer as Networked CUPS,
Server: phy-ag3.princeton.EDU:631
Path: /printers/hp395
Select as driver (generic) PostScript printer
Done!