Monday, September 19, 2005

Multimedia Keys on Fluxbox (Gentoo)

initially we need to find the "keycode" of the keys, for this use a program called "xev"

when that's opened, press and release the key you want to map, in the terminal, you will see output like this:

KeyRelease event, serial 31, synthetic NO, window 0x2800001,
root 0x7d, subw 0x0, time 2792224, (-22,86), root:(565,101),
state 0x10, keycode 153, same_screen YES,
XLookupString gives 0 bytes:


This is what i got mor my "Next Track" button. We heed to know from this the "keycode" which in this case is "153"

after that we need to setup xmodmap

open an editor and put something like:
keycode 153 = XF86AudioNext
i found that it HAD to be:
XF86AudioNext to weork for the next track button.

Once you have setup all these in xmodmap, save it as ~/.Xmodmap (note CAPITAL X)

Then edit the ~/.flusbox/keys file to look like:

None XF86AudioNext :ExecCommand beep-media-player -f

here, the XF86AudioNext key is bound to the beep-media-player -f (next track) command.

Restart X and there you go, sorted :D

Saturday, July 23, 2005

Firefox NOT using GCC4 (Gentoo)

Firstly, firefox doesn't compile properly on gcc-3.x when the gcc4 patch
is applied. So...
cd /usr/portage/www-client/mozilla-firefox
then you need to edit the most recent ebuild file.
nano -w mozilla-firefox-.ebuild
in here, look for
# GCC4 compile fix, bug #87800
epatch ${FILESDIR}/mozilla-firefox-1.0.4-gcc4.patch

This is the gcc4 patch being applied. (the part that's causing issues)
in order to remove the patch, simply comment the second line of these 2
(the first is commented already) so you have:
# GCC4 compile fix, bug #87800
#epatch ${FILESDIR}/mozilla-firefox-1.0.4-gcc4.patch

The problem with this.....
Now running
emerge mozilla-firefox
will cause an error
!!! Digest verification Failed:
!!!
/usr/portage/www-client/mozilla-firefox/mozilla-firefox-1.0.6-r1.ebuild
!!! Reason: Filesize does not match recorded size

>>> Please ensure you have sync'd properly. Please try 'emerge sync' and
>>> optionally examine the file(s) for corruption. A sync will fix most
cases.

emerge --sync does NOT fix this, since we have manually edited the
ebuild file. instead, we need to remake the digest with:
ebuild
/usr/portage/www-client/mozilla-firefox/mozilla-firefox-.ebuild
digest

this will remake the digest, causing the verification to succeed.
Completed.

PHP4 with apache2 (Gentoo)

Install all the relevent packages:
emerge apache dev-php/php mod_php mysql
mysql for mysql aswell hehe

nano -w /etc/conf.d/apache2
change the line:
#APACHE2_OPTS="-D SSL"
FIRSTLY (the one thing i forget to do) UNCOMMENT THIS LINE!!
Then change to:
APACHE2_OPTS="-D SSL -D PHP4"
then
nano -w /etc/apache2/conf/apache2.conf
Insert:
LoadModule php4_module extramodules/libphp4.so
iirc (That's it)
restart apache
/etc/init.d/apache2 restart
and there you have it

Reinstalling GRUB to the MBR after reinstalling windows (SuSE)

Firstly you will need a SuSE install CD to boot off. If you have the full set of install CD's, only CD1 should be needed, if you have none, download the latest FTP install ISO (u wont need the net for this, just the boot cd).

Once windows is installed (booooo, why u wanna do that?!) boot off the SuSE install CD.

Choose
Manual Install
then when that's loaded choose:
Boot from Hard Disk
or
Boot Installed System
(I cant remember which one off the top of my head)

Then when it asks you which partition, choose the relevent partition that is your / partition.

This will set off the boot sequence for your SuSE system.
NOTE: services WILL fail in this boot, but IGNORE them.

Once up, load up YaST (probably the Command line one is easier)

In YaST choose:

System
then
Boot Loader Configuration


In this boot loader configuration select the
Replace Code In MBR
option, and click/choose
edit"
Check the box, so it DOES reqrite the MBR.

Choose Finish

Close YaST, and reboot.

Now you will have your old GRUB back. If you have changed any partitions, you will probably have to change them when your in the grub config. But if you've literally just reinstalled windows over an original install, all will be good. :)

Changing GTK themes (Gentoo)

Firstly find a suitable gtk theme. Gnome-look might give you a good start.

Then, after downloading and extracting the theme, you need to find it's gtkrc file.

On my computer, all my GTK2 themes are located in:
/usr/share/themes/
with there being a folder for each theme name here.


To install your theme here, copy the downloaded tarball there:
cp theme.tar.gz /usr/share/themes
then cd there:
cd /usr/share/themes
now extract it:
tar xzvf theme.tar.gz

Now, assuming your theme was called "theme" your gtkrc path will be something like:

/usr/share/themes/theme/gtkrc

Once you have done this, test it out with:

GTK2_RC_FILES=/usr/share/themes/theme/gtkrc gaim
for example to start gaim using the new theme

If this works, set it as an environment variable like this:

export GTK2_RC_FILES=/usr/share/themes/theme/gtkrc

then, again, try running a gtk app (this time normally) eg:
gaim

if that works run:

echo "GTK2_RC_FILES=/usr/share/themes/theme/gtkrc" >> ~/.bashrc

Next time you reload the config (restart X) it'll be the default. you can check with:

echo $GTK2_RC_FILES

Now whenever you start an app that used GTK2, it'll use that theme ;)

Thursday, July 21, 2005

Playing with Portage (Gentoo)

Having made a script to keep my gentoo box up to date, i came across a problem.

The script runs:

  • ## Stage 1 - Check if they used -p insteda of -a.

  • ## Stage 2 - Check what flags they specified. (-y or -p).

  • ## Stage 3 - Gather information as to what the user wants to do.

  • ## Stage 4 - Uninstall applications

  • ## Stage 5 - Install requested applications

  • ## Stage 6 - emerge --depclean

  • ## Stage 7 - Fix broken dependencies from emerge --depclean

  • ## Stage 8 - Update the system (Only done after a manual --sync)



The problem with this came with cedega.

since emerge didn't register it in /var/lib/portage/world, the emerge --depclean, saw cedega as an unneeed dependency. The solution was to:
echo "app-emulation/cedega" >> /var/lib/portage/world

PROBLEM 2!

doing this does in fact solve the issue with --depclean, it's not listed. BUT when running the emerge -NuD world, it sees newer versions, so tries to update them. Solution:

echo ">app-emulation/cedega-4.2.1" >> /etc/portage/package.mask

This masks any version of cedega later than 4.2.1 (the version i have), thus meaning that emerge -NuD world will see these newer versions as "unstable" and therefore not install them. Sorted!

Saturday, April 09, 2005

Coppermine Gallery (SuSE)

Downloaded latest release of coppermine to install.

Needed to log into phpMyAdmin to manually create the database (as it couldn't manage that for me)

Uploading of files not working at the moment..... working on it :)

Also notice Passwords are not encrypted into database.... working on that too.

Monday, March 14, 2005

TV-Out on Geforce FX 5200 (Gentoo)

Bought a Geforce FX 5200 this weekend, slapped it in, and booted gentoo.... just worked :) No driver updates or anything.
Linux hardware guide to setup tv-out (untested as yet)

Update: 15/03/05 - TV-Out works. Edited xorg.conf file to inslude dual head stuff and TV-Out stuff.
to clone monitor to TV:


Section "Device"
Identifier "GraphicForceGF2MX400"
Driver "nvidia"
# VideoRam 65536
# Insert Clocks lines here if appropriate
Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
Option "TwinView" "1"
Option "SecondMonitorHorizSync" "30-50"
Option "SecondMonitorVertRefresh" "60"
Option "MetaModes" "1280x1024, 640x480; 1024x768, 640x480; 800x600, 640x480$
Option "TVStandard" "PAL-I"
Option "Xinerama" "0"
Option "TwinViewOrientation" "Clone"
Option "ConnectedMonitor" "CRT,TV"
Option "UseInt10Module" "true"
EndSection


to have dual screen setup change
Option "TwinViewOrientation" "Clone"
to:
Option "TwinViewOrientation" "RightOf"

VT's screw up tho, solution in waiting

Friday, March 11, 2005

FTP install of SuSE linux (Part 1, Getting to the YaST Installer)

Guide to installing SuSE 9.2 using the FTP install method

For different versions siply change any references to "9.2" to the version you want e.g. 9.1, 9.0 etc.

In order to complete this, a few things are required. These are shown here:

- Note of Network Card manufacturer/name (e.g. SIS 900-Based PCI Fast Ethernet Adapter)
- Boot CD


First of all we need to download and write the SuSE FTP install iso image. This is about 20MB in size.

First of all check the SuSE mirrors list for your nearest mirror of the SuSE FTP site, if there's a 'complete' one, use that one.

Once in the FTP site, go into the /pub/suse/i386/9.2/boot directory, in there is a file called: boot.iso, this is the CD boot image we need.

Download this and burn it to disk using your favourite CD-Burning software, and make sure you burn it as an image, not as a data file on the CD.

Once this is written, we need to boot off the CD. But first we will check the Network card name etc. If you have windows installed, just look at the network card properties. If you have linux, on your computer, the output of lsmod should tell you the module you need. if not, look through dmesg and it should tell you what module is loaded for the network card. For mine it's the sis900 module.

Now to start the install.

Put the CD into the computer to install SuSE on, and boot it from the CD (May need some BIOS settings changing in order to do this.

Once it has booted, you should have a menu asking what you want to do:

- Boot from Hard Disk
- Installation
- Manual Installation

are a few options.

for the FTP install, we want to use the Manual installation. Select this and hit enter to start the namual installation. It will load the Linux Kernel (a very basic one that will see us through the installation process) after a short time you should be provided with a Language option, choose the language you want to use.

After this you will have the Manual installation Main Menu.

- Settings
- System Information
- Kernel Modules (etc etc.)
Select the Kernel modules as we will want to install it over the network card to do the FTP install, and choose 'Load Network card modules'.

Scroll down the list to find the network card you have in that computer, choose it and press ok.


You will be asked to enter the Parameters for the card, leave it blank and press enter.

You will then get a confirmation of wether or not the module was loaded ok. If not, try a different network module, a common one is the 'RTL8139too' module.

ok, so the network card module is loaded, so we can communicate with the FTP server, go back out of the module menu into the main menu. and choose 'Start Installation / System'.

Then choose 'Start Installation / Update'

As we are doing an FTP install, choose 'Network', and then 'FTP'.

You will then be asked to setup the network card so it has an IP address and gateway etc.

Enter a valid IP for the network card (i used 192.168.0.100) and subnet mask (usually 255.255.255.0) and any gateway used to access the internet. If you have DNS servers, put one of them in the DNS box.

Enter the IP address of the FTP server, and choose Anonymous ftp login, and no HTTP proxy.

It will then connect to the server, and assuming no problems, will ask for the directory on the server. enter all of what you had after the ftp://ftp.domain.com/ part (including the first /)

If that is ok, it will then Load data needed to run YaST into the ramdisk (about 60MB).

Once this has completed, it should load up YaST for you


from here, simply continue as though you were installing direct from the CD

I will try and work on an install guide from this point, but that will be very limited as most of it is straightforward anyway.

Also, feel free to leave comments.

Wednesday, March 09, 2005

Installing drip(Gentoo)

Tried to emerge drip today...... failed...

required autoconf >=2.50, but had 2.59

emerge -a drip

issue unresolved as yet.

Solution suggestions:

emerge --sync
emerge portage -u
aclocal


none worked so far...... updates coming

Update
Speaking with loft-306 on IRC channel, decided that drip install was borked, so opted got ogmrip instead which 'had a nice frontend'
emerge ogmrip
succeeded :)
though no front end...... now to work out CLI ogmdemux to do everything instead

Tuesday, March 08, 2005

Iriver H340 (Gentoo)

Iriver arrived today.....
edited fstab to include:

#USB Mass Storage Devices
/dev/sda1 /mnt/iriverh340 vfat noauto,users 0 0

and added /mnt/iriverh340 fstab entries to gkrellm to allow clickable mounting/umounting

Monday, March 07, 2005

Pico/Nano (SuSE 9.2)

Got annoyed with not having nano on server, but pico instead, so removed pico (using YaST) and installed nano (from sources at Nano-editor.org)

./configure
make
make install


needed ncurses-devel from yast too.

GIMP (Gentoo)

Got Gimp up and running today...

emerge gimp gimp-print

Installing Printer/Scanner (Gentoo)

Installed HP PSC 1205 Printer/scanner. Downloaded hpinkjet sources from sourceforge.net and compiled it.
./configure
make
make install


Printer setup:
emerge cups
open http://localhost:631/ in firefox.
setup printer through web based interface


Scanner Setup

Compile Kernel
cd /usr/src/linux
make menuconfig
Device Drivers --->
USB support --->
<*> EHCI HCD (USB 2.0) support
<*> OHCI HCD support <- guide said to take out, but left in for webcam to work
<*> UHCI HCD (most Intel and VIA) support
cat /proc/bus/usb/devices

make note of product id and vendor id
made sure USE flags include USB
edit /etc/make.conf USE="" line to include usb
install libusb, sane-backends and hotplug (already installed)
emerge libusb sane-backends
check sane-backends was merged with usb support
equery u sane-backends
should look like following:
[ Searching for packages matching sane-backends... ]
[ Colour Code : set unset ]
[ Legend : Left column (U) - USE flags from make.conf ]
[ : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for media-gfx/sane-backends-1.0.15 ]
U I
+ + usb : Adds USB support to applications that have optional USB support (e.g. cups)
+ + gphoto2 : Adds digital camera support
+ + ipv6 : Adds support for IP version 6

add
# HP PSC 1205
usb 0x03f0 0x2f11

to /etc/sane.d/hp.conf
restart hotplug
/etc/init.d/hotplug stop
/etc/init.d/hotplug start
sane-find scanner

should show scanner in output
emerge -a xsane
edit /etc/groups
scanner:x:408:root,
xsane should work :)

New Blog

My Blog:

This is my new blog, it will trace what i do with my computers, for my reference and anyone else that wants to follow progress :)

any code used will be placed in RED
and things to note will be BLUE