Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Software

Journal Journal: Download source, unpack it, then compile later with Gentoo

http://forums.gentoo.org/viewtopic.php?t=5378

Get the full filename for the ebuild, and do the following:

# ebuild myebuild fetch (if you don't have it in distfiles)
# ebuild myebuild unpack (unpacked to /var/tmp/portage/packagename/something)
# ebuild myebuild compile
# ebuild myebuild install
# ebuild myebuild qmerge

This means truly the full path to the ebuild! So do this like so:

ebuild /usr/portage/media-sound/grip/grip-3.2.0.ebuild fetch

etc...

Software

Journal Journal: VIM tips

There are hundreds of tips over at vim.org.

Here are a few that I like, copied from the tips area... I keep them here (and other stuff in my journal) as it's a handy reference area.

:set expandtab | use spaces and not tabs
:set tabstop=n | number of spaces that is a tab
:set shiftwidth=n | spaces to indent in visual mode
:set ignorecase | case sensitivity
 
CTRL-N | word completion
* | search for word under cursor
 
:%!xxd | covert file to hexdump

User Journal

Journal Journal: Perl binding to Shout

Downloaded Shout-2.0.1.tar.gz, which is a Perl interface to the icecast server.

After decompressing it into Shout-2.0.1, I did:

perl Makefile.PL
make
make install

First time I installed a module without CPAN, and all of the work was still done for you...

Software

Journal Journal: Using Linux for one year.

It's been a year since I've been using Linux.

For me, using Linux has become a hobby. I've got a box next to me on the floor that's ripped apart still, happily ripping another of my CD collection to it's internal hard drive. It uses a $25 wirless card to go out and get album covers from the internet. I never have to type in a song or album name, it goes out to the CDDB and gets that info too.

The box that I type this from is a PIII 800, and it still runs so quickly that I don't see much reason to upgrade it.

I've learned Perl and some Python. I'm learning shell scripting. I've learned a lot about networking. I can install and maintain a webserver. The fact that thousands of people all work together on the different software packages is just too cool.

I haven't booted into Windows in months. In fact, I've considered using that hard drive for something useful.

There is one remaining open issue: Turbo Tax. Come tax time I may be forced to use Windows for that... I think they may offer an online version of their software? I'm not sure.

Hardware

Journal Journal: Old computers, Linux, and large hard drives

So far the Jukebox is a success. I've submitted about 5 bug reports (with fixes) to the project, as well as a couple of patches.

It seems, however, that the project might be dead. Still waiting for a response on any of the items.

I upgraded the disk from 6 GB --> 80 GB tonight.

At first, the old computer (P200) refused to recognize the disk. This is because the BIOS is old, and doesn't like large disks. Western Digital (and most other drive manufacturers, it seems) came up with a solution: Trick the BIOS into thinking that it's a small drive. It gets recognized and the computer will boot from it.

After finding the proper jumper settings at wdc.com, the computer booted nicely.

Linux doesn't care about what the BIOS returns as the drive type/size. Once the kernel is loaded, you've got a P200 with an 80GB hard disk. Cool.

Look through my Journal... It's been one year since I've started with Linux and I don't see any way back. I love it.

Wireless Networking

Journal Journal: DWL-520 E1 wireless card working...

I've got the D-Link DWL-520 (E1) wireless card working on the old Pentium 200 (jukebox) machine.

Some people are saying that a PCI 2.2 compliant motherboard is necessary, but I've got it working here on this old PC (BIOS from '97) with no issues.

This document, by Andrew Barr, was what helped me with most of the setup. It is one of the most complete how-to descriptions that I've ever read.

The biggest issue I had was trying to understand all of the various drivers out there.

I initially tried HostAP, but the kernel module would simply not load on my machine.

I also tried wlan-ng, which *did* load, but then I couldn't get it to download firmware to the card.

Later, I found that the version of HostAP that I was trying to use was quite old, and the newer one was masked in Gentoo. I emerged the masked version using the "ACCEPT_KEYWORDS" variable as I described earlier in this journal, and installed version 0.2.5. This version loaded up and I was able to flash the firmware onto the card with no issues.

I also changed the baselayout on this machine as described here on the Gentoo forums. This is slick. After installing the firmware, /etc/init.d/net.wlan0 start just "worked" and got an address from my router.

Get firmware uploading working as Andrew described in his document (configure the hostap_fw_load script)

To get the module and firmware to load at boot, I created a file called "wlan0" in /etc/modules.d/ with the following contents:

alias wlan0 hostap_pci
post-install hostap_pci /usr/sbin/hostap_fw_load wlan0

Do a modules-update and reboot. UPDATE 4/9/05: The location of some files has changed for the latest hostap-utils. I am moving to the 2.6 kernel and now my wireless card quit working...

Software

Journal Journal: Jukebox installation

I think I found the perfect solution:

gjukebox has a web interface and will even display the album covers. It is designed for server-side playback.

Before doing anything, I would suggest that you check out all of your USE flags, especially if this will be a console-only system like mine. Because of all the dependencies, I ended up with portage wanting to emerge a lot of things. Here are my flags now:

USE="-gtk -qt -gnome -kde -X -cups -opengl -truetype -xmms -xv -quicktime -pdflib -foomaticdb -arts -avi -gtk2"

On my fresh Pentium-200 Gentoo system, I did the following for installation:

emerge mysql
emerge mpg123
emerge wget
emerge bladeenc
emerge libcdaudio
emerge mod_php
emerge aumix
emerge cdparanoia
emerge mpeg-lib (necessary?)
emerge libogg (necessary?)
emerge libvorbis
emerge at
emerge xinetd
emerge vorbis-tools
emerge esound
emerge links (will need this later)
emerge unzip (for CPAN)
emerge ftp (for CPAN)
emerge ncftp (for CPAN)
emerge gpgme (for CPAN)
emerge gd (for coverart support)
emerge abcde (for playing with FLAC later, not necessary)

Moving to perl's CPAN:

bash$ perl -MCPAN -e shell
cpan>install Bundle::CPAN (recommended by CPAN)
cpan>install DBI
cpan>install MPEG::MP3Info
cpan>install MIME::Base64
cpan>install DBD::mysql (couldn't get tests to work, installed with portage below...)
cpan>install LWP::UserAgent
cpan>install Text::Metaphone
cpan>force install GD
cpan>install Apache::ImageMagick

Back to bash$

emerge DBD-mysql

Should I have used the portage installation method instead of going through CPAN? Dunno.

Following the instructions from here...

chmod a+r /dev/cdrom

Don't mess with the 4.1 release from Sourceforge, just get the latest version from CVS. Follow the instructions on sourceforge to download from CVS. /usr/src/ is a good place to put the downloaded source.

cd /usr/src/gjukebox/
./build

I modified the Apache configuration so that Apache runs as user/group: nobody/nobody.

Make sure that the nobody user is part of the cdrom and audio groups in /etc/group.

Changed the maximum upload filesize from 2M (default) to 10M in php.ini

Got the Gentoo startup script/config files from the patches area on Sourceforge, had to change one of the dependencies in the startup script from "apache" to "apache2" for my installation. This was one of my biggest problems -- I didn't have ripd.pl running and therefore I had issues trying to rip one of my CDs.

Software

Journal Journal: Console-based MP3 Ripper/Player

I'm looking for a MP3 Ripper/Player for Linux... I've got an old Pentium 200 that I plan to use as a standalone component in my stereo system.

Eventually I'd like to rip all of my CDs (must be close to 200 now) in order to have them conveniently stored and accessible.

Must-have features:

Console interface (this box will not run X11)

Easy-to-use playlist features (sorting, selecting, etc.)

Semi-automated ripping

Interface to CDDB

Nice-to-have features

Web interface so that it is controllable from a browser on another PC

Ability to show album covers (although this is probably not possible in a console app)

Software

Journal Journal: GNUCash

More than a month ago now, I ditched MS-Money in favor of GNUCash. I've used MS-Money for the past 10 years, getting hooked in college by using Money 2.0 that was bundled for free with a copy of MS-Works. Money 2001 was the last application that I booted into Windows to use.

GNUCash has a strange UI, and doesn't come with all of the bells & whistles that Money did, but it is working for me at the moment.

I continue to be amazed by Linux and the Linux community. I love the choices and the ability to "dig in" to any sources that you wish. While I do mention about that GNUCash doesn't have the bells & whistles that MS-Money did, it still meets my needs just fine.

Programming

Journal Journal: Bad interpreter error in Linux w/ python script from Windows

Found here: http://www.csoft.net/docs/faq.html.en

If the file is in DOS format, the line break character at the end of the shebang line may cause "bad interpreter" errors. Make sure the file is in UNIX format. You can convert a file from DOS to UNIX format using:

$ tr -d '\15\32' < dos-format-file > unix-format-file

This problem has been bothering me at least an hour now!!

Linux

Journal Journal: Free diskspace in Gentoo

Info summarized from the Gentoo forums:

/var/tmp/portage

Everything in here can be removed, although be careful if you are currently installing (emerging?) something, as this is where the source is extracted to. Generally this directory doesn't take up that much space unless you've had a few ebuilds that bombed... In this case all of the source will still be here.

/usr/portage/distfiles

All source code is stored in here, so you can simply delete everything in there to free up space. If you have a broadband connection, this probably won't be of concern. However, if you've got a dialup connection, you might want to burn these files to CD so that you don't have to download them again if you want to re-install something.

/usr/portage/packages

This is where the binary packages are located, if you downloaded any. You can blow these away also.

Linux

Journal Journal: Emerging masked ebuilds

Always learning. Today I wanted to emerge a newer package than portage would allow. This is simple with the "ACCEPT_KEYWORDS" variable:

bash-2.05b# ACCEPT_KEYWORDS="~x86" emerge mozilla-firebird-cvs

I wanted to emerge a newer version of rioutil, namely 1.4.4, because it seems that no one on SourceForge is having problems with it. This is the way that I emerged it, and it works fine on my machine.

Kim can finally use the MP3 player that I bought for her birthday. :)

User Journal

Journal Journal: Compiling a Linux kernel (Gentoo)

Become root
su

Switch to the source dir
cd /usr/src/linux

Use the kernel config tool
make menuconfig

Make dependencies (2.4)
make dep

Make the kernel (2.4)
make bzImage modules modules_install

Make the kernel/modules (2.6)
make && make modules_install

Mount the boot partition if you need to
mount /boot

Copy the kernel and other stuff there
cp arch/i386/boot/bzImage /boot/kernel-2.4.22
cp System.map /boot/System.map-2.4.22
cp .config /boot/config-2.4.22

Edit grub.conf
vi /boot/grub/grub.conf

Software

Journal Journal: MisterHouse more than what I need... Enter Heyu2!!

I've tried three of the available software packages for Linux that are able to communicate with the X10 CM11A:

MisterHouse

Turned out to be way more than what I need. MisterHouse has the capability to talk to a heck of a lot more devices than just X10, and integrates speech as well as voice commands. All of this is through Perl and a web-based interface. It is constantly writing device states to disk, and for timed control of lighting, requires that the PC be running all of the time. Slick, but I just wanted a method to program the CM11A. It will readily send basic commands through the CM11A, and I did have this working without a problem. If you want industrial-strength home automation software, MisterHouse is what you're looking for. Set up your PC as a web server and check status/control devices from anywhere in the world.

A.L.I.C.E.

Can be found on SourceForge under the name JHome. I found this package to be extremely buggy so far. The interface is confusing at first, but I think this will turn out to be a nice package when it's finished. It is completely written in Java and the GUI uses Swing components. Still needs a lot of work in my experience, but as of last week it was rated at 75% activity at SourceForge. (If anyone understand these ratings, please comment.)

Heyu

This is exactly what I was looking for. I am actually going to stick with an alpha version of heyu2, (but I also tried out the original heyu). Heyu2 is a command-line tool that lets you program the CM11A, create macros and triggers. Using your home latitude and longitude, it will calculate the dusk/dawn times for your house depending on calendar day. The macros, triggers, and timers are very easy to set up, thanks to the included example files. The macros are sweet, allowing you to create "virtual devices" if you want. For example, I have two quartz lamps in my basement that I would like to have automatically dimmed when I watch a movie. These lamps are both connected to a switch with ID "A3". I've got a macro stored that will allow me to dim them to the movie-watching level by turning on device A1. I highly recommend this program for Linux users wanting to simply control the CM11A. As it is written in C, I would guess that it could be ported to Win32 as well. Note: The author cautions against programming the device with Heyu2 and then using the X10 Windows software. The original Heyu has very similar functionality and development of heyu has been frozen.

Slashdot Top Deals

Always draw your curves, then plot your reading.

Working...