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
JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
Every once in a while at work I end up with massive cache or log directories full of millions of tiny files. "rm -rf *" takes forever to get rid of these - is there any tool that'll speed this up?

(I just realized if I rename the directory to something else, I can at least move it out of the way and then delete it in the background while I do other tasks, but I'd still like to free up space a bit faster.)

Adbot
ADBOT LOVES YOU

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

DevastatorIIC posted:

wc -l filename | awk '{print $1}'

Edit: I've always used awk. What's the difference between awk and cut? When should you use one over the other? And you're welcome :)

cut's simpler and more limited. If you already know awk, just use that. I can never remember how it works since I use it so rarely, so I just use cut.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

hooah posted:

I can't seem to figure out how to use Wine. I went through the start-up guide and I think I configured it properly (mostly defaults), but when I right-click on an executable and choose "Open with Wine Windows Emulator," nothing happens. There's a vino instance running that I found with the top command, but it never actually starts the Windows program.

What happens if you type "wine /full/path/to/windows/executable.exe" at the command line?

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

hooah posted:

Ok, now Wine can't find a .dll that's in the system32 directory, which I've told it to use.

In an unrelated incident, how do I get Firefox to play flash files? I've installed the flash plugin, but I'm still getting big blank boxes where flash stuff's supposed to be. Except for the ads. Those load just fine.

First, type "about :plugins" and see if Flash is really installed. It might have put it in the wrong directory or something.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

hooah posted:

Yup, it tells me Gnash is installed and enabled.

Also, what about this Wine .dll problem?

Well, then, I got nothing. For either of these.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

nbv4 posted:

how do you get gnome-terminal to launch with a specific dimension?

--geometry works for pretty much every X app.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

GeneralZod posted:

I've tried it with the old shell (that I used to do the apt-get install fusestuff) and started up a new shell, too, and neither worked :/

If by "started up a new shell" you mean "opened a new terminal", that's not enough - it needs to be a login shell. Try "sudo -u GeneralZod sh" to start a new shell using sudo (which is generally used to temporarily log you in as someone else; this time you're just logging in as yourself again, but you're forcing it to redo the login and not just reuse existing resources).

Which reminds me - is there a way to have it reread things that are usually set on login (mainly groups) without logging out and back in? Having to log out of the entire X session, or else remember to start a new login shell in every single terminal, is really drat annoying.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
Is this on a networked filesystem? Is it a Windows filesystem or other non-Solaris, non-Linux filesystem?

If it's networked, you may not have permission to delete even if you're root on the local machine. If it's a non-native filesystem it may not deal correctly with unlinking files that are in use, so it would complain about deleting files in use the way Windows does instead of just making them invisible and getting rid of them when the last app closes them like Unix does.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Gvaz posted:

is there any linux program that saves in .doc or something that isnt OO or am i gonna have to be stuck to .rtf files?

kword (KDE) and abiword (Gnome) should work okay - the more complicated the .doc, the more chances it'll be garbled. I'm not sure, but my gut feeling tells me abiword should be less resource heavy.

I tend to stick to .rtf for files I create anyway, just out of paranoia.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

68k posted:

Does anyone know of a program that will allow me to schedule my computer to record an internet radio show at a given time when I am not at home to manually hit the record button?

"cron". One of the cornerstones of Linux. Google for a howto.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Zuph posted:

"sudo apt-get install xserver-xorg-video-openchrome"

Standard correction: "sudo aptitude install", not apt-get. aptitude is a drop-in replacement, and it's better.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Smackbilly posted:

The MS-DOS EDIT program does not exist in linux. I don't know what the "edit" executable on your system is, but it seems like it has to do with e-mail, which is not what you want.

"mailcap" is confusing here - I think "edit" is a wrapper that's trying to check the MIME type of the file and launch the appropriate editor, and failing because none is set for "application/*" (which is a fallback for "unknown type"). The db file it's checking is called "mailcap" because MIME types were first used for email attachments, but there's no reason to limit it to that.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

phystrr tuat posted:

I have an NTFS hard drive with a bunch of music on it. Some of the songs have random characters which my Debian box doesn't like (u+umlaut is being converted to an underscore). Ideally I would like it to recognize the characters and display them as they are currently, but I've been searching and I haven't found a good solution to that. Right now I'm about to rename all the files with weird characters, but I figured I'd run it by SH/SC first to see if anyone has a better, simpler suggestion. It's about 100 files/folders that I'd have to rename, so if anyone has a less time consuming option please fire away.

Debian's assuming the filenames are in UTF8, but they're in some Windows codepage. Find out which (it depends on the country the version of Windows it was created with was set up for, so unless you got this hard drive from someone in a foreign country it should be easy to find the default by googling). Then add "nls=<that code page>" to the options to "mount" - I'm not sure the exact format of the code page names. Again, you should be able to find more details by googling now that you know what to look for.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Peanutmonger posted:

But to answer your question, the error wasn't saying the library was missing from that spot, but that the executable "lt-glib-genmarshal" was linked against "libiconv.so.2" and it can't find it at the path it was originally linked to (probably /usr/lib/libiconv.so.2). You could run "ldd /home/skyler/Desktop/Libs/glib-2.15.0/gobject/.libs/lt-glib-genmarshal" and you'd be able to find what it thinks the path to the shared library is, and you could copy the library there, but that's a dirty way to solve the problem. If this binary was compiled during your installation, I would suggest running configure with an option that includes /usr/local/lib in the library path, something like "LDFLAGS=-L/usr/local/lib ./configure". I would think configure would include that by default, but maybe not. If this doesn't fix it, then it must have been a binary that came along with the package and symlinks/copying the library may be the way to go so long as it's only needed for building and you clean it up after. This could also be solved with LD_LIBRARY_PATH instead of symlinks/copying, but using that is stepping upon a dark and dangerous path to ruin...

Adding it to LDFLAGS isn't the problem - I presume configure already did that. The problem is that the libtool script (spit) isn't finding it at runtime. (And if you get it compiled, your apps will give you the same error when you try to run them.) You'd need to set an RPATH.

I always just add "/usr/local/lib" (which is where he said he had it installed) to /etc/ld.so.conf (and then run "ldconfig" so that the linker reads the change). I can't figure out why distros never include it by default - isn't that the accepted place for installing software that's compiled by hand and not handled by the package manager?

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
Sounds like it's shipped in a half-configured state - you need to run "automake" or "autoconf" or "aclocal" or something before ./configure.

EDIT: if you think this is way too much work just to build a drat program, you're right! This is why autoconf sucks such incredible amounts of rear end.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Anunnaki posted:

None of those commands worked.

You probably don't have them installed. You're not supposed to need them just to build and install a source tarball, only for creating the tarball to distribute.

I googled for "install-sh missing" and decrypting the cryptic comments make me think it's automake. Install automake (using yum or aptitude or whatever for your distro) and then type "automake".

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
I believe this is your answer.

quote:

If you use Debian or Ubuntu, do yourself a favour. Run this command:

apt-get install winbind

Then edit your /etc/nsswitch.conf and change the line that looks like this:

hosts: files dns

To this:

hosts: files dns wins

Now even if your computer is on a network with fantastically stupid DNS, you can be happy like Windows users already are: your programs will do broadcast/wins lookups to find a hostname if it's not found in DNS.

(I had a really hard time finding out from google how to do this, so if you'll forgive me some redundancy: winbindd is part of samba. It can use WINS for hostname lookups (to augment or replace DNS). It provides nss_wins (libnss_wins) for NSS. It finds Windows hostnames automatically using samba on your Linux system.)

I don't know what the CentOS equivalent of the "winbind" package is - maybe you'll be lucky and it's even named the same thing - but it shouldn't be hard to figure out.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
Every time I shut down my computer without disconnecting FreeNX, next time I connect to that host I get a session list with the option to resume or terminate a running session. I usually just terminate, but I'm pretty sure resuming worked when I tried it.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

fatcat posted:

Yeah, this works for me too, but what I would really like to do is be able to keep my stuff running (IRC client, Pidgin, other stuff) on my main display and attach the FreeNX client to it. Unfortunately I guess that isn't possible.

Oh, I see. You could FreeNX to localhost.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
Sounds like your ipod's been renamed to something that has either a newline or a / in the name.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

BiohazrD posted:

Also, for some reason I can't do poo poo like
code:
mdadm
instead I have to

code:
cd /sbin
./mdadm
What the gently caress?

First of all, you can just do "/sbin/mdadm". Secondly, check your PATH environment variable ("echo $PATH") - it probably has /bin but not /sbin in it. That's because /sbin is for system tools that most users don't need to use every day, so it's not in the default PATH.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Mysterious Aftertaste posted:

Yeah, sorry. That's what I meant...

user@server$ cd up<tab>
would fill it in to say "cd updates"

But I also just realized I was in the wrong directory, and the file I was trying to <tab> to complete didn't even exist... :downsgun:

That or I wasn't using proper case. Either way, I'm retarded.

Just to clarify this: the behaviour of the tab key has nothing to do with ssh - it just relays your keypresses to the server and relays the server response back to you. (Apart from things like deciding how to represent the Delete and Backspace keys.) If you press tab and nothing happens, that's the fault of whatever program is on the other side, which is probably bash. Tab will work the same whether you're logged into a local console or logged in through ssh (assuming you're using the same user account with the same config files and everything).

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

rugbert posted:

Can someone tell me what virtual packages are?

It's a package that doesn't contain anything, it just has a list of dependencies on "real" packages that installed at the same time.

For instance, a lot of media players can use different engines for actually playing the videos, so you get packages like "totem-mplayer", "totem-xine", "totem-gstreamer", etc. - Totem is the UI, file management, media library, etc, and it uses either MPlayer or Xine or GStreamer or whatever to actually decode the video and play it in the window. The user probably doesn't care which, they care more about what the player looks like, so they install the "totem" virtual package and it picks one more-or-less at random.

Another example is things like "kde-desktop", which is just a virtual package that depends on every single piece of software that's part of KDE, so you can install the whole thing just by installing one package - or, if you're less lazy and more picky, you can pick and choose individual packages (ie. skip all the games, or don't install KOffice because you use OpenOffice instead).

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

lord funk posted:

Thanks! Turns out Apache was running, so I killed that.

With a little more research, it looks like Darwin Streaming Server will not allow the port set below 1024 unless you are running as root. How can I do that? I've read that you can't login as root in the graphical interface.

Nothing allows ports below 1024 unless you're running as root. 1024 is supposed to be for system services, and 1025+ for user stuff.

(I'm not a Mac guy, so I don't have an answer for you, but that's just some background.)

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
I'd recommend Xubuntu, because it uses XFCE which is a more light-weight desktop than Gnome or KDE. (It probably won't do stuff like power management or automatically detecting and mounting USB devices as well, but it sounds like you don't care much about that.)

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

sund posted:

XFCE handles automounting USB devices just fine.

It didn't for me, but I installed it on a system that had been running Gnome for ages instead of on a new system, so maybe it just didn't switch over the settings correctly or something.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

fletcher posted:

I have a shell script and at the end of it I want it to echo the time it took to run, how would I do that?

Just run "time ./scriptname.sh" instead of just "./scriptname.sh"

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

bootleg robot posted:

I have a basic question about installing from source. I downloaded an application from subversion (svn co url). Then configured, compiled, then installed it. Now, suppose there is a new revision up. The correct way to retrieve it is "svn update", right? What do I do from there in terms of configuring, compiling, and installing? Do I need to uninstall the old version first?

Like the guy said, "make uninstall" first, if you're lucky. If not, the jackass who wrote it didn't bother coding "make uninstall" and you'll have to just "make install" the new version on top of the old one and hope nothing gets hosed up.

"checkinstall" is an awesome program to use in the future (too late now, though). It basically does the "make install" step into a scratch directory, and turns the result into an RPM or Debian package (plus about a hundred lesser-known formats, I believe) so you can use your standard package-management tools to install and uninstall it.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

chryst posted:

A relatively easy way around this is by using the --prefix switch on configure.

./configure --prefix=/opt/new_software/ will put everything under that directory. Uninstallation should be a simple matter of deleting it at that point.

Then you have to add /opt/new_software/bin to your path, and /opt/new_software/lib to your library path, and... Like it or not, /opt just isn't the Linux way.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

There Will Be Penalty posted:

Not if you use GNU Stow.

Which is again a separate tool outside of "make; make install; make uninstall", so why not just use checkinstall?

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

CUMGUARD posted:

This brings me to my main questions. First of all, I´ve tried installing the rt2500 and the rt2x00 wireless drivers, but you have to compile them from source, which I´m fine with, and feel fairly comfortable doing, except for one thing. Dependencies. The first and only dependency I´ve run into so far with this driver is GTK+ 2.6. The reason I say that´s the only one I´ve run into so far is because I still cannot get all its dependencies satisfied. Everything I try to compile has more and more dependencies. So basically, I was wondering if anyone has an easy way to do this, i.e. build their own dependency tree and install everything easily.

Are you trying to install all the dependencies from source, too? You don't need to do that - you just need the "-dev" version of every package you're compiling with. So if GTK+ 2.6 is in "libgtk2", to compile things using it you need to also install "libgtk2-dev". (I'm not at a Ubuntu computer right now so I can't check if I got the names right.) You can install them through "aptitude" at the command line, or the Synaptic UI, or whatever.

If there's a Debian/Ubuntu package of your driver, it's best to get it with "apt-get source <packagename>", which will download all the Debian/Ubuntu-tweaked source to the current directory. The most important thing this gets is the debian/control file, which includes a list of build dependencies. I believe there's an aptitude command to automatically install all the build dependencies of a given package, but I can't remember what it is.

If you've just downloaded a source tarball, still check if it's got a "debian" subdirectory - if so, that's the instructions for building a .deb from the source, so as long as it's up-to-date it'll have the dependency list too.

Finally, you can build a .deb from source with "dpkg-buildpackage -rfakeroot", which lets you install it through the package manager after you've built it, which will save you tons of headache later when you want to upgrade or uninstall.

If this driver simply doesn't have any Debian packages available (source or precompiled), I strongly suggest using "checkinstall" to create a .deb anyway. Google can tell you more about that.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

thebruce posted:

# Uncomment if you want the apt-get source function to work
#deb-src http://http.us.debian.org/debian stable main contrib non-free
#deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free

"Uncomment" means to remove the #. You want:

quote:

# Uncomment if you want the apt-get source function to work
deb-src http://http.us.debian.org/debian stable main contrib non-free
deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Harokey posted:

I meant I'm not sure why the speaker falls onto the computer. I just find it strange that the filesystem on my external drive has failed several times now when the filesystem on the internal drives have been just fine, and they have gone through the same things.

Not a mystery at all - the drive mounting in an external HD enclosure is completely different from and internal one. The internal one has the whole computer shell for padding. Cheap external enclosures especially are notorious for being fragile.

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.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

BIG CRACKER posted:

It's rather big to copy paste, and I don't have any hosting :(

http://www.megaupload.com/?d=WVCJKSVU

Protip: When looking at x.org config files, search for "(EE)" to find the errors. (The different tags are described at the start of the file.) In your case the problem is

code:
(EE) RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM
Googling for that error gave me pages and pages of potential solutions, mostly from older versions of Ubuntu so they might not apply anymore, but worth a try.

BIG CRACKER posted:

On a side note - should just installing xorg-driver-fglrx and not even doing anything gently caress my computer up? I was just messing around, 'apt-get install'-ed it, then when I had to restart my session due to nautilus being rear end, didn't touch any config files or do anything other than installing, and I got the black screen. The GDM still appeared fine though, so I went into gnome failsafe, un installed the package, and it was fine again.

Yeah, that doesn't surprise me. It might have installed some libraries that conflict with the working libraries you have, but earlier in the search path so they get used automatically, or it might make automatic changes to the config files that get removed when you uninstall the package. Most Ubuntu stuff is set up to activate as soon as you install it.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

unleash the unicorn posted:

What would be the best way to install Linux, WinXP AND Windows Vista on a computer?

I'd like to have a nice bootmanager that lets me choose what I want to boot.


I know I should have three partitions and probably a FAT partition to swap files between them.


What's the best order to install them? What's the best bootmanager? Is there a different thread I should have posted in? Am I a human being?

If you don't need super performance from all the OS's (ie. you just plan to use them to test cross-platform programs or web pages), install the one you'll use most of the time normally and then run the others under VMware.

A FAT partition isn't really necessary anymore - Linux can write to NTFS now. (I don't know if Vista has a new and incompatible version of NTFS or anything, so you might have to go through the XP filesystem to transfer files - all 3 OS's should be able to read and write from that.)

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

tehk posted:

Can anyone recommend a distro that still only supports python2.4 but has sqlalchemy0.4 in its repositories? I need to test an python module that uses sqlalchemy 0.4 and pysqlite(sqlite2). I know it works perfectly with python2.5 and its included sqlite3 bindings

It's not hard to install an older version of python from source if you need to.

That said, Ubuntu (and, I assume, Debian) includes python2.4 and python2.4-sqlalchemy packages. I'm too lazy to check the version number on sqlalchemy right now, though.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
First step is just to connect through smbclient to make sure your password and everything work. "smbclient -L hostname" gives you the list of shares available so you can be sure you've got it right, then "smbclient -L \\\\hostname\\share" (note the doubled \'s) connects to one. Once you've done that, you can check that the settings in fstab match what you just used.

Also, I dunno if Gnome has an automatic Samba handler, but in KDE you can just open Konqueror and type "smb://hostname" without having to worry about mounting it or anything. (Although since it doesn't mount it, you can only see the share in Konqueror and possibly other KDE apps.)

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

blitrig posted:

I'm a Linux neophyte more or less, so this question may be retarded but here goes:

I have a headless box running Ubuntu (Gutsy) on my network. I normally SSH into it, but recently I've had some use for a desktop environment, preferably KDE, that I can VNC into. I don't want KDE running constantly as it eats up resources.

Try FreeNX - it's a special client & server optimized for X but with modern compression and optimizations, so it's faster than X-over-SSH or VNC. The extra speed isn't needed if you're just working on a LAN, but if you ever want to connect from somewhere else it's invaluable, and it's pretty easy to set up and handles the details of starting KDE etc. for you.

(It's actually a commercial product, with I believe a free-as-in-beer client and pay server, but FreeNX clones the server portion. Or I could have that backwards.)

Adbot
ADBOT LOVES YOU

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.
You've got lots of options for this.

If the program only uses $HOME for its config files, you can probably start it with "HOME=$HOME/.config appname". You might be able to use chroot to make it run completely in its own directory. Or you could write a library that redefines the "open" system call (at least) and load it with LD_PRELOAD. Or if you want to install one daemon which monitors everything system-wide, try libFAM. (That's a higher-level wrapper around inotify - use that instead of using the kernel directly. I don't know too much about it so I'm not sure if it's completely suitable.)

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