Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
parasyte
Aug 13, 2003

Nobody wants to die except the suicides. They're no fun.

Ice Blue posted:

I have a linux saavy friend help me and he can't even figure it out (he doesn't dual boot). The problem is Windows is on a separate hard drive. Despite Ubuntu being on sde (fifth hard drive on the list) it's still hd0, which makes it hard to figure out which hd? Window is on in that format since it's on sdc.


Check out device.map wherever your grub is installed, that'll be one thing helping you with which drive is which. You may need to edit it, actually, but I'm not sure when that's helpful.

Adbot
ADBOT LOVES YOU

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

covener posted:

This doesn't ensure new files are group writable and web content shouldn't be writable by the apache user/group.
Oh, oops. I meant 002 for read/write. It depends on what his web server is doing. If it's pure content, then I agree, and umask should be 022. If he's uploading files, or editing them in some way, then apache will need to write. I probably should have specified that tho.

Mysterious Aftertaste
May 20, 2004

So Marigold, my love, you've had too much to drink...

This is kind of on topic. 2.6.25 kernel released today.

Pakistani Brad Pitt
Nov 28, 2004

Not as taciturn, but still terribly powerful...



Everytime I bitch about my hardware difficulties on Linux, people often say I should research the hardware ahead of time for compatibility. Well today I finally have that chance to make an informed purchase! The internal wireless on my laptop has managed to fry itself, so I'm in the market for a PCMCIA Wireless-N card, and I'd like to make sure it works easily on linux.

I know its a somewhat obscure item with most people having built-in wireless these days, but any brand recommendations? Any good sites where I might be able to find out the linux compatibility status of various cards?

If it doesn't exist, I suppose I'd consider a USB dongle type Wireless N adapter, but I'm not too keen on having something protruding from the laptop like that.

yippee cahier
Mar 28, 2005

MrChupon posted:

Everytime I bitch about my hardware difficulties on Linux, people often say I should research the hardware ahead of time for compatibility. Well today I finally have that chance to make an informed purchase! The internal wireless on my laptop has managed to fry itself, so I'm in the market for a PCMCIA Wireless-N card, and I'd like to make sure it works easily on linux.

I know its a somewhat obscure item with most people having built-in wireless these days, but any brand recommendations? Any good sites where I might be able to find out the linux compatibility status of various cards?

If it doesn't exist, I suppose I'd consider a USB dongle type Wireless N adapter, but I'm not too keen on having something protruding from the laptop like that.
You can probably access your old network card through a panel on the back of your laptop and replace it, opening up your choices a little if the card frying didn't take other components with it.

Sits on Pilster
Oct 12, 2004
I like to wear bras on my ass while I masturbate?
Linux super-newbie checking in. I have a question that, from the little I know about Linux and its hardware pickiness (compared to Windows), I expect is going to be pretty machine-specific.

I have come into possession of an older Toshiba laptop, model Tecra A2-S336. To make a long story short, it is my computer inept roommate's old computer, and he just got a new MacBook because he got fed up with all the computer's spyware. So me, being the relatively computer savvy person that I am, decided I was just going to reformat and reinstall XP Pro to make my life easier.

Here's the catch: he has long since lost the OS cds that the computer game with, and I made the uneducated decision of assuming that because his computer had XP Pro installed already on it, I could simply use my copy of XP and his serial number and I would basically have myself a new-old computer. Guess what? I have the upgrade and I don't have $300 to shell out for a full version.

I've used Linux a very minimal amount at work, and have since really wanted to have a Linux machine that I could play around on, maybe learn the ropes a bit. I figured this would be my chance.

So, finally, we reach my request, specifically. I'd like some suggestions that will point me towards a free, relatively easy-to-use Linux distro that will work on the machine I mentioned before. I've done a bit of research on various sites on this question, and have had names like Ubuntu, Fedora and Mandrake come up, but I'm not sure how well these will work with the Tecra A2. I figured I'd put it out here, as I've never been let down by technical support questions answered by you smart SA folks.

Tecra A2-S336 Detailed Specs:
Intel Pentium M Processor 715 (1.50GHz, 2MB L2 Cache, 400MHz FSB)
15.0” XGA,
512MB (512MBx1)
60GB (5400 RPM)
Intel Extreme Graphics 2 (Intel 855GME)
DVD-CDRW SD-R2512
Intel 802.11g Wireless

I'm trying to find more detailed specification info, and will update this post as I find it. Thanks beforehand for any responses/suggestions.

Pakistani Brad Pitt
Nov 28, 2004

Not as taciturn, but still terribly powerful...



sund posted:

You can probably access your old network card through a panel on the back of your laptop and replace it, opening up your choices a little if the card frying didn't take other components with it.

It's actually a heat/engineering issue with certain HP Pavillion dv6000 laptops. They've replaced mine once already, but its starting to flake again. There is a class action lawsuit and a extended warranties and a big fuss, but the lost time is starting to bother me more than 50-100 bucks for a new wireless adapter would.
Unless I was really confident that my replacement was more heat resistant, I'd be concerned it was going to fry again. Finally it isn't 802.11N compatible, and I want to play with my new draft N router.

Oh, and I have a track record of destroying laptops beyond repair by unscrewing them for "easy" things. :smith:

I appreciate the thought, though.

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

Sits on Pilster posted:

Tecra A2-S336 Detailed Specs:
Intel Pentium M Processor 715 (1.50GHz, 2MB L2 Cache, 400MHz FSB)
15.0” XGA,
512MB (512MBx1)
60GB (5400 RPM)
Intel Extreme Graphics 2 (Intel 855GME)
DVD-CDRW SD-R2512
Intel 802.11g Wireless

I'm trying to find more detailed specification info, and will update this post as I find it. Thanks beforehand for any responses/suggestions.

Usually the problem with Linux on laptops is with power management. Will it suspend correctly, handle battery reporting, lid closing, etc? Sometimes it works, sometimes it needs tweaking, sometimes it's just broken. The second biggest problem is wireless. But if that's actually an intel chip, it should be fine out of the box. You'll want a wired connection to start with just in case tho.

Pop an ubuntu live-CD in. If everything's working, go ahead with install. If not, then back to Windows, and he'll probably have to buy/bootleg a new copy.

Sits on Pilster
Oct 12, 2004
I like to wear bras on my ass while I masturbate?

chryst posted:

Pop an ubuntu live-CD in. If everything's working, go ahead with install.

What do you mean by "if everything's working"? The HD is clean right now, so I'm going to be trying to install by booting from an install CD. How will I know if everything's working or not?

tehk
Mar 10, 2006

[-4] Flaw: Heart Broken - Tehk is extremely lonely. The Gay Empire's ultimate weapon finds it hard to have time for love.

Sits on Pilster posted:

What do you mean by "if everything's working"? The HD is clean right now, so I'm going to be trying to install by booting from an install CD. How will I know if everything's working or not?

Distros like Ubuntu use a LiveCD, this allows you to boot off of that CD to test a (unupdated and partially limited) Ubuntu system. So when you put the CD in you will be greeted with a desktop and a decent number of tools and apps instead of just an installer(like xp). Note that liveCD performance is not always gonna reflect a full install. Once you are in the Ubuntu LiveCD there is an application on the desktop that will install it if you would like.

Mysterious Aftertaste
May 20, 2004

So Marigold, my love, you've had too much to drink...

Sits on Pilster posted:

Linux super-newbie checking in. I have a question that, from the little I know about Linux and its hardware pickiness (compared to Windows), I expect is going to be pretty machine-specific.

I have come into possession of an older Toshiba laptop, model Tecra A2-S336. To make a long story short, it is my computer inept roommate's old computer, and he just got a new MacBook because he got fed up with all the computer's spyware. So me, being the relatively computer savvy person that I am, decided I was just going to reformat and reinstall XP Pro to make my life easier.

Here's the catch: he has long since lost the OS cds that the computer game with, and I made the uneducated decision of assuming that because his computer had XP Pro installed already on it, I could simply use my copy of XP and his serial number and I would basically have myself a new-old computer. Guess what? I have the upgrade and I don't have $300 to shell out for a full version.

I've used Linux a very minimal amount at work, and have since really wanted to have a Linux machine that I could play around on, maybe learn the ropes a bit. I figured this would be my chance.

So, finally, we reach my request, specifically. I'd like some suggestions that will point me towards a free, relatively easy-to-use Linux distro that will work on the machine I mentioned before. I've done a bit of research on various sites on this question, and have had names like Ubuntu, Fedora and Mandrake come up, but I'm not sure how well these will work with the Tecra A2. I figured I'd put it out here, as I've never been let down by technical support questions answered by you smart SA folks.

Tecra A2-S336 Detailed Specs:
Intel Pentium M Processor 715 (1.50GHz, 2MB L2 Cache, 400MHz FSB)
15.0” XGA,
512MB (512MBx1)
60GB (5400 RPM)
Intel Extreme Graphics 2 (Intel 855GME)
DVD-CDRW SD-R2512
Intel 802.11g Wireless

I'm trying to find more detailed specification info, and will update this post as I find it. Thanks beforehand for any responses/suggestions.

I have nearly the exact same specs on my IBM. I recommend Xubuntu. It does run Ubuntu, but it's about the speed XP was. Xubuntu is pretty blazing fast for such an old laptop. If not, get some more RAM, and Ubuntu will be good.

Sits on Pilster
Oct 12, 2004
I like to wear bras on my ass while I masturbate?

tehk posted:

Distros like Ubuntu use a LiveCD, this allows you to boot off of that CD to test a (unupdated and partially limited) Ubuntu system. So when you put the CD in you will be greeted with a desktop and a decent number of tools and apps instead of just an installer(like xp). Note that liveCD performance is not always gonna reflect a full install. Once you are in the Ubuntu LiveCD there is an application on the desktop that will install it if you would like.

I see. This clears up a bunch of questions I had about LiveCD, etc. I just burned the Ubuntu 7.10 iso onto a CD, so we'll see how that goes.

Mysterious Aftertaste posted:

I have nearly the exact same specs on my IBM. I recommend Xubuntu. It does run Ubuntu, but it's about the speed XP was. Xubuntu is pretty blazing fast for such an old laptop. If not, get some more RAM, and Ubuntu will be good.
Thanks for the tip... if regular Ubuntu performs slowly, I'll check out Xubuntu.

deong
Jun 13, 2001

I'll see you in heck!

Sits on Pilster posted:

I see. This clears up a bunch of questions I had about LiveCD, etc. I just burned the Ubuntu 7.10 iso onto a CD, so we'll see how that goes.

Thanks for the tip... if regular Ubuntu performs slowly, I'll check out Xubuntu.

At this point, you may as well just grab the newest : http://releases.ubuntu.com/releases/8.04/
With a week left till release, You'll have a fresh install that will have a ton of updates. I believe Hardy (8.04) was aimed at a lot of laptop feature fixes. You can read about it here : http://forums.somethingawful.com/showthread.php?threadid=2807583

other people
Jun 27, 2004
Associate Christ
When I ssh into my host and start mucking about with my site in vi, I can no longer highlight text in the session and then middle click somewhere else (locally) and paste.

I can highlight text in the session and middle click inside the session to paste into vi though, which is nice. But how do I copy things from the session and paste it locally?

This only happens inside vi. If I am just at the bash prompt and I highlight something I can then paste that locally.

Does that make any sense?

tehk
Mar 10, 2006

[-4] Flaw: Heart Broken - Tehk is extremely lonely. The Gay Empire's ultimate weapon finds it hard to have time for love.

Kaluza-Klein posted:

Does that make any sense?

That is very odd. Which term you are using? I tried this a few moments ago on both gnome's and xterm but it worked perfectly.

other people
Jun 27, 2004
Associate Christ

tehk posted:

That is very odd. Which term you are using? I tried this a few moments ago on both gnome's and xterm but it worked perfectly.

The one that comes with xfce4. The binary is just called terminal.

tehk
Mar 10, 2006

[-4] Flaw: Heart Broken - Tehk is extremely lonely. The Gay Empire's ultimate weapon finds it hard to have time for love.

Kaluza-Klein posted:

The one that comes with xfce4. The binary is just called terminal.

Ah xfce-terminal, you may want to try xterm(or gnomes) and see if the issue still occurs. X selections really shouldn't care or know that its a ssh session - or vi for that matter. That makes me think it might be xfce-terminal

Peanutmonger
Dec 6, 2002

Kaluza-Klein posted:

When I ssh into my host and start mucking about with my site in vi, I can no longer highlight text in the session and then middle click somewhere else (locally) and paste.

I can highlight text in the session and middle click inside the session to paste into vi though, which is nice. But how do I copy things from the session and paste it locally?

This only happens inside vi. If I am just at the bash prompt and I highlight something I can then paste that locally.

Does that make any sense?

That sounds like you have GPM support enabled in vim (or something along those lines). Get rid of that and it should leave your mouse clicks alone.

Peanutmonger fucked around with this message at 03:03 on Apr 20, 2008

other people
Jun 27, 2004
Associate Christ

Peanutmonger posted:

That sounds like you have GPM support enabled in vim (or something along those lines). Get rid of that and it should leave your mouse clicks alone.

I have never heard of this before. I found it in the vim documentation but um. . . I can't quite see how to turn it off. There must be something I can put in the vimrc?

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

Kaluza-Klein posted:

I have never heard of this before. I found it in the vim documentation but um. . . I can't quite see how to turn it off. There must be something I can put in the vimrc?
I don't quite follow what's going on, but see if this is any help:
http://www.vim.org/htmldoc/term.html#mouse-using

tripwire
Nov 19, 2004

        ghost flow
Can anyone tell me how I prevent a particular program from "blocking" the audio in Ubuntu Hardy? I'm running these batch programs which normally open an opengl surface and try to access /dev/dsp for audio output; however since I'm running this in batch I'm disabling graphics (which there is a handy command line option to do with this program).

However, as a side effect, youtube (any flash video for that matter, thanks to Adobe's lovely plugin I imagine), amarok or any other audio source will be unable to output anything while this batch program is running.

It's very frustrating because I want this batch process to be done in the background and not interrupt my normal use of the computer.

crazysim
May 23, 2004
I AM SOOOOO GAY
I don't use hardy but it looks like your answer begins with this quote from wikipedia

Wikipedia posted:

For OSS applications, PulseAudio provides the padsp utility, which substitutes device files such as /dev/dsp, tricking the applications into believing that they have exclusive control over the sound card. In reality, their output is rerouted through PulseAudio.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

tripwire posted:

However, as a side effect, youtube (any flash video for that matter, thanks to Adobe's lovely plugin I imagine), amarok or any other audio source will be unable to output anything while this batch program is running.

It's very frustrating because I want this batch process to be done in the background and not interrupt my normal use of the computer.

Behold, libnodsp, which transparently converts open("/dev/dsp") to open("/dev/null"):

code:
#define _GNU_SOURCE

#include <dlfcn.h>

int open(const char *pathname, int flags)
{
  int (*real_open)(const char *, int) = dlsym(RTLD_NEXT, "open");

  if (strcmp(pathname, "/dev/dsp") == 0)
    return real_open("/dev/null", flags);
  else
    return real_open(pathname, flags);
}
Compile with gcc -fPIC -shared -o libnodsp.so -ldl nodsp.c and then run your program with LD_PRELOAD=/full/path/to/libnodsp.so <command line>.

It should do more error handling, and there may be other ways of opening /dev/dsp to take care of (open64 on 64-bit systems; mmap) but this should at least get you started.

Smegmatron
Apr 23, 2003

I hate to advocate emptyquoting or shitposting to anyone, but they've always worked for me.
Perhaps someone can help with my iptables problem.

I have my router (192.168.1.17) running tomato, which means I can use iptables to do things with it. I also have a squid proxy running on a box (192.168.1.19)

I need a rule for the router which will take all port 80 and 443 traffic not from the squid box, and redirect it back into the proxy.

I've tried to use:

code:
iptables -t nat -A PREROUTING -i eth0 -s ! 192.168.1.19 -p tcp --dport http -j DNAT --to 192.168.1.19:8080
but it isn't doing anything. Squid logs show no access while using this.

plaz
Jul 25, 2006

Smegmatron posted:

I've tried to use:

code:
iptables -t nat -A PREROUTING -i eth0 -s ! 192.168.1.19 -p tcp --dport http -j DNAT --to 192.168.1.19:8080
but it isn't doing anything. Squid logs show no access while using this.

http://www.faqs.org/docs/Linux-mini/TransparentProxy.html#s6 ;)

Should cover pretty much everything you're trying to do.

You'll also need to make a couple of changes to your squid.conf - they're also detailed in that faq.

It's worth noting that this won't work for your port 443 traffic - for HTTPS connections to be proxied, the browser needs to know to hit the proxy first and make a 'CONNECT' request to it, rather than just starting to talk SSL immediately.

Some proxy servers can do SSL interception and inspection, but that's a lot more work, and I don't think any free products will do it for you.

plaz
Jul 25, 2006

Kaluza-Klein posted:

This only happens inside vi. If I am just at the bash prompt and I highlight something I can then paste that locally.

Open up your ~/.vimrc and see if you've got a line -

code:
set mouse=a
If so, remove it. If you don't have that line, chuck a new line down the bottom of the file -

code:
set mouse=
Once you've done that, vim should just let mouse actions be handled by your ssh client again.

If you've got 'set mouse=a' set, you can also hold down shift and then click and drag to select and copy text like you can in any other program.

tripwire
Nov 19, 2004

        ghost flow

JoeNotCharles posted:

Behold, libnodsp, which transparently converts open("/dev/dsp") to open("/dev/null"):

code:
#define _GNU_SOURCE

#include <dlfcn.h>

int open(const char *pathname, int flags)
{
  int (*real_open)(const char *, int) = dlsym(RTLD_NEXT, "open");

  if (strcmp(pathname, "/dev/dsp") == 0)
    return real_open("/dev/null", flags);
  else
    return real_open(pathname, flags);
}
Compile with gcc -fPIC -shared -o libnodsp.so -ldl nodsp.c and then run your program with LD_PRELOAD=/full/path/to/libnodsp.so <command line>.

It should do more error handling, and there may be other ways of opening /dev/dsp to take care of (open64 on 64-bit systems; mmap) but this should at least get you started.
Thanks a lot. I'll give this a shot later today.

Pope Hilarius
May 3, 2007

I have a simple question- how do I access a cd in ubuntu server?

plaz
Jul 25, 2006

Anonymity Returns posted:

I have a simple question- how do I access a cd in ubuntu server?

You should be able to just run 'mount /media/cdrom0' after inserting the disc - once you've done that, the files on the disc should be visible in /media/cdrom0 (or /cdrom, which should be a symlink to /media/cdrom0). If 'mount /media/cdrom0' doesn't work, try 'mount /cdrom'.

If that's not working, do you have a line like this in /etc/fstab?

code:
/dev/hdc        /media/cdrom0   iso9660 ro,user,noauto  0       0
The '/dev/hdc' at the beginning may be different - look for a line that says '/media/cdromX' or 'iso9660'.

If that line is there, but the second field is different, replace the '/media/cdrom0' in the command I gave you above with what you've got in the file.

If you can't see a line with 'iso9660' in it, chuck another post up here saying as much - we'll need to figure out what your cdrom device is.

zapateria
Feb 16, 2003
I have a problem.

On a linux server, I mount up a bunch of windows shares (samba). When some of the windows servers reboot, they will just time-out on the linux server and I need to manually "umount -l share" and mount it again (normal umount gives umount: share: device is busy). This is bad for many reasons, I have jobs running all the time that access the shares.

Errormessages when the share is mounted, but unavailable:

smb_lookup: find //[directory] failed, error=-5
smb_add_request: request [e8a27080, mid=26811] timed out!

What do I do? Can I make a script that poll the share and then run the umount/mount commands? Or are there any options to samba I could use so it updates when the share becomes available?

plaz
Jul 25, 2006
Yeah .. unfortunately smbmount isn't too graceful when it comes to servers being rebooted :(

You could try going with the script - something like this might do the trick -

code:
#!/bin/bash

# Test whether or not the filesystem is currently mounted
if ( mount | grep '^//server/sharename' > /dev/null 2>&1 ); then

  # It is mounted; find out if requests are timing out
  if [ ! -d /path/to/mountpoint/ ]; then

    # Unmount and remount the filesystem
    umount -l /path/to/mountpoint/
    smbmount -o foo,bar //server/share /path/to/mountpoint

  fi
else

    # The filesystem's not currently mounted - mount it
    smbmount -o foo,bar //server/share /path/to/mountpoint
fi
Note that I've not tried running that code - for all I know it might not work, or even parse. In particular, I'm not sure if '-d /path/' will return false if the SMB server has gone away. You may also find that it just hangs at the if statement waiting for the server to come back.

A cleaner solution might be to use something other than SMB to get the mounts done. Is installing additional software on the Windows servers an option? You could grab Microsoft Services for Unix and see if doing it with NFS is more reliable when the servers get bounced.

There Will Be Penalty
May 18, 2002

Makes a great pet!

Kaluza-Klein posted:

I have never heard of this before. I found it in the vim documentation but um. . . I can't quite see how to turn it off. There must be something I can put in the vimrc?

It's called "mouse reporting". You may wish to disable that feature in your terminal emulator, incase you ever start using another terminal application that supports it.

If you just want to disable it for vim and/or other specific applications, then do what that other poster said.

rugbert
Mar 26, 2003
yea, fuck you

Alowishus posted:

zope

Hey thanks for the Zope help, I couldnt get the search up because of some permission issues where it wouldnt let me search for object and the company that set it up is no more but Im still trying!



I ran df and noticed that /var isn't being backed up and I'm not sure why. Heres the code I put into the crontab:
code:
/bin/tar cpzf /backupmnt/full/sat/backup.tgz --exclude=/proc --exclude=/lost+found
 --exclude=/backupmnt --exclude=/mnt --exclude=/media --exclude=/sys /
edit - I think its because the /var/cache/apache2/mod_desk folder is always in flux so Ill add that as an exclude.

rugbert fucked around with this message at 22:17 on Apr 23, 2008

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

plaz posted:

A cleaner solution might be to use something other than SMB to get the mounts done. Is installing additional software on the Windows servers an option? You could grab Microsoft Services for Unix and see if doing it with NFS is more reliable when the servers get bounced.
NFS is definitely a more graceful way to handle it, but the MS NFS imlpementation is really, really slow.

You can try using cifs rather than smbfs. CIFS is MS's rebranding of the SMB protocol. IIRC, the cifs kernel module is actively maintained, and smbfs isn't. cifs should survive a reboot, and behave similarly to a NFS mounted "hard". (Assuming MS hasn't changed it again and cause it to break)

Ferg
May 6, 2007

Lipstick Apathy

Mysterious Aftertaste posted:

This is kind of on topic. 2.6.25 kernel released today.

I got into Linux about 6 years ago. I guess a year or two in I started rolling my own kernels almost daily on Gentoo and patching it with whatever super cool new patch was out. Man I'm glad I'm not doing that anymore :)

MrBlandAverage
Jul 2, 2003

GNNAAAARRRR
Is there any way to make dcraw put the EXIF info into the JPEGs it generates?

other people
Jun 27, 2004
Associate Christ

MrBlandAverage posted:

Is there any way to make dcraw put the EXIF info into the JPEGs it generates?

Use exiftool to copy the exif data from the original raw file. dcraw itself doesn't do this.

The commands you want are:

exiftool -overwrite_original -TagsFromFile input.raw output.jpg

-overwrite_original replaces the original jpg with a new jpg including exif data, otherwise you get a copy.


Are you batch processing at the command line? ufraw will output jpg's with exif data but it is a gtk app.

edit: I totally forgot that ufraw also has a command line component that will embed exif in jpgs unless you tell it not to. ufraw is based on dcraw.

other people fucked around with this message at 18:56 on Apr 24, 2008

Bohemian Stairbird
Aug 10, 2007

Alright gently caress the ubuntu forums, no one's helping me there. Maybe one of you guys can.

I'm trying to get MPD and Sonata to work together, and so far, it's all fine. I got my library, Sonata can access it, etc. But when I tried to actually play the music, it would start to, kind of (the song info would pop up and then go away immediately afterwards), and not play any music. I've already installed the dependencies necessary for it as far as I know. I've already installed the libao and zlib dependencies through synaptic, and all my music files are .mp3s, so I don't think I need any others for any other formats. So yeah, any idea?

JawnV6
Jul 4, 2004

So hot ...
My hard drive is dying. I have another of the exact same size already in the system, completely unused (I'm stupid like that). The biggest files on there are a 10G VM image and a bunch of dvd images that i don't feel like reripping.

My grand plan is to unplug the failing one, use the 8.04 Live CD to format the blank one, then attempt to boot with the live cd and the bad drive attached and do a full copy. Exactly how stupid is this to attempt or is there any better method?

Adbot
ADBOT LOVES YOU

MrBlandAverage
Jul 2, 2003

GNNAAAARRRR

Kaluza-Klein posted:

Are you batch processing at the command line? ufraw will output jpg's with exif data but it is a gtk app.
Yes. I've been building a perl script so I can periodically automatically make thumbnails of all 38000+ :gonk: RAW files on my fileserver. I'd also like to be able to run EXIF analysis tools on the result so I can get descriptive statistics about focal length, ISO, etc.

edit: here's what I have so far. I'm pretty new to perl so I wouldn't mind some helpful suggestions.
code:
#!/usr/bin/perl

use GD;
use Image::Resize;
use File::Find;
use Cwd;


$size = 320;
$dir = "/wd200/Photos/10D/07_09/";
$tempdir = "/usr/tmp/crw_process/";
$prefix = "thumb_";
$target = "/var/www/htdocs/thumbs/07_09/";                    # if intended thumbnail target is elsewhere

$base = getcwd;
$createtemp = "mkdir $tempdir";
$removetemp = "rm -r $tempdir";
#$target = $base;                                        # if intended thumbnail target is script directory


system($createtemp);                                    # create the temporary directory for processed RAW files
find(\&ResizeJPEG, $dir);                               # recursively find all jpg
find(\&ResizeCRW, $dir);                                # recursively find all CRW
system($removetemp);                                    # remove the temporary directory for processed RAW files


sub AvoidDuplicate {
    $filetocheck = $_[0];
    if (-e "$filetocheck") {
        $filetocheck = AvoidDuplicate(substr($target, 0, (length($target)-4)) . "_.jpg");
        return $filetocheck;
    } else {
        return $filetocheck;
    }
}


sub ResizeJPEG {
    /\.[Jj][Pp][Ee]?[Gg]$/ or return;                   # match any variation/capitalization of JPEG/JPG
    print "$_\n";
    $image = Image::Resize->new("$_");
    $gd = $image->resize($size, $size);                 # resize the image
    $filename = AvoidDuplicate("/$target/$prefix$_");
    open(FH, ">/$filename");                            # open thumbnail for writing
    print FH $gd->jpeg();                               # write thumbnail
    close(FH);                                          # close thumbnail
}


sub ResizeCRW {
    /\.[Cc][Rr][Ww]$/ or return;                        # match any capitalization of CRW
    print "$_\n";
    $rawFN = substr($_, 0, (length($_)-4));
    $rawJPEG = "$tempdir/$rawFN.jpg";
    $createJPEG = "dcraw -ca $_ | cjpeg > $rawJPEG";
    $removeJPEG = "rm -r $rawJPEG";
    system($createJPEG);                                # create temporary fullsize from CRW
    $image = Image::Resize->new("$rawJPEG");
    $gd = $image->resize($size, $size);                 # resize the image
    $filename = AvoidDuplicate("/$target/$prefix$rawFN.jpg");
    open(FH, ">/$filename");                            # open thumbnail for writing
    print FH $gd->jpeg();                               # write thumbnail
    close(FH);                                          # close thumbnail
    system($removeJPEG);                                # remove temporary fullsize from CRW
}

MrBlandAverage fucked around with this message at 07:03 on Apr 25, 2008

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply