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
Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat
I'm trying to get "inadyn" a dynamic DNS updater to work. http://inadyn.ina-tech.net/
I unzipped the files to my box, but I can't figure out the command. The help file isn't very good. It just says the executeable is in bin/linux/inadyn, but I can't figure out how to actually run it.

Adbot
ADBOT LOVES YOU

Dr. Hourai
Dec 4, 2004
More tea!
That didn't go so well. I tried fetching the drivers from the terminal, but when I restarted Ubuntu it just crashed. Weird.

jaymack
Nov 27, 2007
ok

Ericcorp posted:

I'm trying to get "inadyn" a dynamic DNS updater to work. http://inadyn.ina-tech.net/
I unzipped the files to my box, but I can't figure out the command. The help file isn't very good. It just says the executeable is in bin/linux/inadyn, but I can't figure out how to actually run it.
From a terminal, cd to wherever you extracted inadyn to, then:
cd bin/linux
./inadyn

So if you extracted it to /home,
cd /home/inadyn/bin/linux
./inadyn

Dr. Hourai posted:

That didn't go so well. I tried fetching the drivers from the terminal, but when I restarted Ubuntu it just crashed. Weird.
Uninstall them and try compiling them from source.

The drivers are here. Extract them, cd to the directory you extracted them to, and run
./configure
make
sudo make install

ribena
Nov 24, 2004

Hag.
Right, I just got Gutsy working fairly well, but there's one problem which is going to really annoy me if I don't get it sorted. When I'm playing videos (only tried in VLC, don't know if it happens in other players too), the display will shut off after 10 minutes. Now this is odd because in "power management" the setting is for 40 minutes. I guess this is known but I can't find anything about it on google. Anyone got a fix?

teapot
Dec 27, 2003

by Fistgrrl

ribena posted:

Right, I just got Gutsy working fairly well, but there's one problem which is going to really annoy me if I don't get it sorted. When I'm playing videos (only tried in VLC, don't know if it happens in other players too), the display will shut off after 10 minutes. Now this is odd because in "power management" the setting is for 40 minutes. I guess this is known but I can't find anything about it on google. Anyone got a fix?

There are separate settings in "Screensaver". Also on Linux gxine >> VLC.

teapot
Dec 27, 2003

by Fistgrrl

Ericcorp posted:

I'm trying to get "inadyn" a dynamic DNS updater to work. http://inadyn.ina-tech.net/
I unzipped the files to my box, but I can't figure out the command. The help file isn't very good. It just says the executeable is in bin/linux/inadyn, but I can't figure out how to actually run it.
If you use Debian or Ubuntu, just install its package from repositories. Yes, it's already there.

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat

teapot posted:

If you use Debian or Ubuntu, just install its package from repositories. Yes, it's already there.

Heh. I've only used Linux for about four hours total. I have no idea how to do this.

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat

jaymack posted:

From a terminal, cd to wherever you extracted inadyn to, then:
cd bin/linux
./inadyn

So if you extracted it to /home,
cd /home/inadyn/bin/linux
./inadyn
Uninstall them and try compiling them from source.

code:
root@eric-desktop:/# cd /etc/inadyn/bin/linux/
root@eric-desktop:/etc/inadyn/bin/linux# ./inadyn
Returns:

code:
-bash: ./inadyn: Permission denied
I simply unzipped the zip, and dragged it into the bin folder using WinSCP from my Windows laptop. Maybe that's not the right way to do it?

ribena
Nov 24, 2004

Hag.

Ericcorp posted:

Heh. I've only used Linux for about four hours total. I have no idea how to do this.

System -> Administration -> Synaptic - Install it from there. Then you should be able to run it using the terminal.

teapot posted:

There are separate settings in "Screensaver". Also on Linux gxine >> VLC.

OK cool I've turned off the screensaver there. Irritating that VLC can't/won't disable it though.

Z-Bo
Jul 2, 2005
more like z-butt
what would be a use case for:

run-parts --reverse /some/directory

Dr. Hourai
Dec 4, 2004
More tea!

jaymack posted:

From a terminal, cd to wherever you extracted inadyn to, then:
cd bin/linux
./inadyn

So if you extracted it to /home,
cd /home/inadyn/bin/linux
./inadyn
Uninstall them and try compiling them from source.

The drivers are here. Extract them, cd to the directory you extracted them to, and run
./configure
make
sudo make install
Ok, I'm sorry if I'm completely Linux-retarded, but I've never done this before. It just says ./configure no such file or directory

covener
Jan 10, 2004

You know, for kids!

Z-Bo posted:

what would be a use case for:

run-parts --reverse /some/directory

You've rigged the dependencies w/ explicit ordering per-script, when you're recalling each script on some kind of shutdown you want to do it LIFO to respect the dependencies.

think sysvinit w/o separate symlinks (separate ordering) for S/K, LIFO is the most natural way to want things to run w/o the complication.

teapot
Dec 27, 2003

by Fistgrrl

Z-Bo posted:

what would be a use case for:

run-parts --reverse /some/directory

Stopping services or reversing changes that were done by scripts that do/start something and undo/stop it when given different arguments.

teapot
Dec 27, 2003

by Fistgrrl

Dr. Hourai posted:

Ok, I'm sorry if I'm completely Linux-retarded, but I've never done this before. It just says ./configure no such file or directory

This is how you install from sources unpacked from a tarball.
code:
tar xvzf someprogram-0.1.tar.gz
(tar unpacks the files, shows them all in someprogram-0.1 directory)
code:
cd someprogram-0.1
./configure
(configure script configures the package, producing Makefile among other files)
code:
make
(program is built)
code:
sudo make install
(files are installed, by default in directories under /usr/local )

More "modern" version of this will be:
code:
tar xvzf someprogram-0.1.tar.gz
cd someprogram-0.1
./configure --prefix=/usr
make
sudo checkinstall
It builds a program to be installed in a "normal" location (directories under /usr) and produces a package, so package manager is aware of this program's existence, and is capable of installing and upgrading it. You need checkinstall package to be installed for it to work.

Since a packaged version of inadyn is already in repository, there is no point in doing it because

code:
sudo apt-get install inadyn
or
code:
sudo aptitude install inadyn
or selecting it for installation in Synaptic and clicking "Apply"

will install everything from a package that was built already.

teapot
Dec 27, 2003

by Fistgrrl

Ericcorp posted:

code:
root@eric-desktop:/# cd /etc/inadyn/bin/linux/
root@eric-desktop:/etc/inadyn/bin/linux# ./inadyn
Returns:

code:
-bash: ./inadyn: Permission denied
I simply unzipped the zip, and dragged it into the bin folder using WinSCP from my Windows laptop. Maybe that's not the right way to do it?

First of all, don't install binaries into /etc.

Second, you have to make the file executable before you can run it:

code:
chmod +x inadyn
or

code:
chmod 755 inadyn
Also for anything installed on a Unix-like system you should use tar instead of zip -- tar archives preserve permissions (though if a tar file is unpacked by a non-root user, files from it become owned by that user and not by whatever is in the file, what is usually the intended result).

Z-Bo
Jul 2, 2005
more like z-butt

teapot posted:

Stopping services or reversing changes that were done by scripts that do/start something and undo/stop it when given different arguments.

I kind of figured this, but what I am really trying to find is a concrete example where this is actually done. I mean, I understand that "run-parts" is intended to run scripts in chunks, and so the scripts are likely to be different only by a character or two, probably a digit. But, why would I want switch back and forth from scriptchunk1 to scriptchunk9, and from scriptchunk9 to scriptchunk1.

teapot
Dec 27, 2003

by Fistgrrl

Z-Bo posted:

I kind of figured this, but what I am really trying to find is a concrete example where this is actually done. I mean, I understand that "run-parts" is intended to run scripts in chunks, and so the scripts are likely to be different only by a character or two, probably a digit. But, why would I want switch back and forth from scriptchunk1 to scriptchunk9, and from scriptchunk9 to scriptchunk1.
Usually it's 00script-start-everything 10script-foo, 12script-bar ... 99script-dont-you-dare-do-anything-after-me, zzscript-screw-whoever-used-99-i-had-to-add-something-in-the-end

They may be dependent services (like init scripts) that should be stopped in the reverse order, patches that can be only applied and reversed in order because they may match the results of previous patches, parts of the build process that generate configuration and run build scripts then clean the build tree and reverse the configuration to rebuild the same target with other options...

teapot fucked around with this message at 01:39 on Nov 28, 2007

Dr. Hourai
Dec 4, 2004
More tea!

teapot posted:

Code about VIA-stuff
Thanks, that went well until the last step (make install)

/bin/mkdir: cannot create directory `/usr/local/lib/xorg': Permission denied
make[2]: *** [install-openchrome_drv_laLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/geir/ho/xf86-video-openchrome-0.2.900/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/geir/ho/xf86-video-openchrome-0.2.900/src'
make: *** [install-recursive] Error 1


is what it says

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Dr. Hourai posted:

Thanks, that went well until the last step (make install)

/bin/mkdir: cannot create directory `/usr/local/lib/xorg': Permission denied
make[2]: *** [install-openchrome_drv_laLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/geir/ho/xf86-video-openchrome-0.2.900/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/geir/ho/xf86-video-openchrome-0.2.900/src'
make: *** [install-recursive] Error 1


is what it says

Did you do "sudo make install"?

Dr. Hourai
Dec 4, 2004
More tea!

Zuph posted:

Did you do "sudo make install"?
Doh! I only wrote make install. Now I typed sudo make install and it worked. Do I have to reboot for the drivers to start working?

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Dr. Hourai posted:

Doh! I only wrote make install. Now I typed sudo make install and it worked. Do I have to reboot for the drivers to start working?

Technically, you only have to restart your X Server, but it's easier to tell newbies to reboot.

Rayn
Jun 21, 2004

Prepare to receive the true Lord!
I'm trying to setup a MythTV user job to encode my recorded programs to xvid using mencoder (Too many problems with ffmpeg, even after a recompile from the latest CVS -- the divx files it produces have huge, random colored blocks all over the recording, no idea why)

It has been working nicely, but the file size of the output files is completely random and unpredictable. Sometimes an hour show is about 350 MB (well, 44 minutes minus the commercials) and sometimes it's 900 MB ... all using the same settings. It seems like the variable bit rate function is wildly unpredictable. I tried to set it up using a constant bit rate, but the command line it generates for mencoder is wrong (it adds the bitrate to the lameopts paramater instead of the xvidopts or whatever it is so the job crashes out) ..

Looking at the output of two files created by the job right now in windows explorer here's file one:
Duration: 00:48:51
Data Rate 302kbps
File size: 867 MB

and here's another encoded a few hours before:

Duration: 00:41:33
Data Rate: 116kbps
File Size: 283 MB

I'm happy with the quality of the second file, and there's no way I can archive 1 GB for a 45 minute video, that's just ridiculous. Is this due to the achieved bit rate fluctuating heavily for VBR? Is there a way I can fix it to make it closer to what I request (I'm looking for 1296). If not, is there a way to make nuvexportrc-xvid with using a CBR? Failing either of those options, I'd be perfectly happy to try ffmpeg if I could figure out why my divx encodings have those huge artifacts. I can't seem to find a resource online that works for me.

This is my xvid nuvexportrc set up:
code:
<XviD>
Edit: Running Gutsy.
    vbr          = yes   # Enable vbr to get the multipass/quantisation options
                         # (enabling multipass or quantisation automatically enables vbr)
    multipass    = yes   # You get either multipass or quantisation; multipass will override
    quantisation = 4   # 4 through 6 is probably right...  1..31 are allowed (lower is better quality)

    a_bitrate    = 144   # Audio bitrate of 256 kbps
    v_bitrate    = 1296   # Remember, quantisation overrides video bitrate

    width        = 512   # Height adjusts automatically to width, according to aspect ratio
    height       = auto

</XviD>

Rayn fucked around with this message at 03:13 on Nov 28, 2007

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat

ribena posted:

System -> Administration -> Synaptic - Install it from there. Then you should be able to run it using the terminal.

I really need to do it from terminal. My employer will not let me run a graphical linux on any of our machines we have in the field. I only have graphical Ubuntu for my dev server to learn on, but I want to use the graphical options as little as possible.

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat

teapot posted:

First of all, don't install binaries into /etc.

Second, you have to make the file executable before you can run it:

code:
chmod +x inadyn
or

code:
chmod 755 inadyn
Also for anything installed on a Unix-like system you should use tar instead of zip -- tar archives preserve permissions (though if a tar file is unpacked by a non-root user, files from it become owned by that user and not by whatever is in the file, what is usually the intended result).

Thanks for the help. I made it an executable and it's working fine now. I just need to figure out how to make it run at start up.

jaymack
Nov 27, 2007
ok

Ericcorp posted:

Thanks for the help. I made it an executable and it's working fine now. I just need to figure out how to make it run at start up.
Edit the following and save it as /etc/init.d/inadyn. You can use sudo nano -w /etc/init.d/inadyn if you want to stick to a terminal.
code:
#!/bin/sh
/path/to/executable/inadyn
Make it executable with:
sudo chmod +x /etc/init.d/inadyn

And make it run at startup with:
sudo update-rc.d inadyn defaults


I'm pretty sure that'll work, but I use FreeBSD, so I can't be entirely sure.

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

Ericcorp posted:

I really need to do it from terminal. My employer will not let me run a graphical linux on any of our machines we have in the field. I only have graphical Ubuntu for my dev server to learn on, but I want to use the graphical options as little as possible.
Then just run 'sudo aptitude' or 'sudo apt-get'.

ribena
Nov 24, 2004

Hag.
One more question:

Does anyone know how to get grep to list the matches like normal, but also output the count at the end? So:

code:
$ grep -c<someotherflag?> pattern file
foo
bar
baz
3
Alternatively, can this can be done with something like (pseudobash)?:

code:
$ grep pattern file | echo && wc -l
foo
bar
baz
3
I've been pissing around for a little while and can't get this. :(.

Vanadium
Jan 8, 2005

code:
grep somepattern somefile | tee resultsfile ; wc -l resultsfile ; rm resultsfile
:shobon:

Rayn
Jun 21, 2004

Prepare to receive the true Lord!
Ok this one should be easy.

I have a number of samba shares mounted to various directories in my file system in my fstab. Upon system boot, theses shares are not automatically mounted. So, I wrote a script and added it to my /etc/init.d/ directory that calls 'mount -a'. Still no love. So, everytime I reboot, I need to term in and type mount -a, then everything works fine.

Is there a way I can have this happen on boot properly?

GuyGizmo
Feb 26, 2003

stupid babies need the most attention
I'm writing a bash shell script where I want to take the contents of a variable, remove any periods in it, and then put the result in another variable. But I have no idea what command can do that because I know very little about unix shells. Can someone help me with this?

admiraldennis
Jul 22, 2003

I am the stone that builder refused
I am the visual
The inspiration
That made lady sing the blues

GuyGizmo posted:

I'm writing a bash shell script where I want to take the contents of a variable, remove any periods in it, and then put the result in another variable. But I have no idea what command can do that because I know very little about unix shells. Can someone help me with this?

Is this what you want?
code:
XA="this.is.some.text\nyes.it.is"
XB=${XA//./}
echo -e $XB
output:
code:
thisissometext
yesitis

Marinmo
Jan 23, 2005

Prisoner #95H522 Augustus Hill

Rayn posted:

I have a number of samba shares mounted to various directories in my file system in my fstab. Upon system boot, theses shares are not automatically mounted. So, I wrote a script and added it to my /etc/init.d/ directory that calls 'mount -a'. Still no love. So, everytime I reboot, I need to term in and type mount -a, then everything works fine.
You did a sudo update-rc.d (scriptname) default? Asking because it's so easy to forget.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
My computer locked up and I had to switch of the power supply. I knew something bad was going to happen, but I had no other way to access it.

When it came back up it rebuilt the journal (ext3) on my external drive and on my raid array. The raid array appears to be okay, but the external drive doesn't have anything on it anymore, but the space shows up as used with df.

I tried to run fsck on the drive, but it runs out of memory and stops. Apparantly it tries to load all the inodes into memory or something. I thought, okay, and hooked up a spare external drive, and set it to be swap. I now had 80 gigs of swap space, it can't run out of memory.

Well, when i ran it again it did run out of memory. So I did some googling and it looks like there's a limit to how much memory one process can allocate on an i386 system, and fsck is reaching that.

My plan is to bring the drive into work where I have linux machines with x86_64 os. This should work right? Is there an easier way for me to repair this drive?

mawrucre
Feb 8, 2004
I have a Sun SparcStation 4 that I am going to be selling. Before I sell it I want to zero the drive and if possible, install a distro of linux or BSD on it.

So what I'm looking for is a bootable floppy or small set of floppies that will first allow me to zero the drive completely, then install a very basic rudimentary copy of linux or BSD. Or if there is a distro of linux or BSD that runs completely from the floppy that would be OK too.

Caveats: It has no cd drive so only floppies. I only have a wireless connection so nothing that downloads a bunch of packages from the net.

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

commonbrick posted:

I have a Sun SparcStation 4 that I am going to be selling. Before I sell it I want to zero the drive and if possible, install a distro of linux or BSD on it.
DBAN's beta version has some support for Sun SPARC. You could try that.

DEAD MAN'S SHOE
Nov 23, 2003

We will become evil and the stars will come alive
Why does every network monitor I find return its values in kilobytes? Isn't it rather arbitrary after rounding and so forth?

In an attempt to get a precise figure I am parsing /proc/net/dev but I am uncertain how correct my math is, or how proper using sleep between readings is, either.

code:
i=eth1; 
w=1 ; 
l=$(cat /proc/net/dev | grep $i | sed s/\\s\\s$i://); 
d1=$(echo $l | cut -d " " -f1); 
u1=$(echo $l | cut -d " " -f9);  
sleep $w;  
l=$(cat /proc/net/dev | grep $i | sed s/\\s\\s$i://); 
d2=$(echo $l | cut -d " " -f1); 
u2=$(echo $l | cut -d " " -f9); 
echo `echo down: $(((((d2-d1)*8)/1000)/$w)) Kbit/s \| up: $(((((u2-u1)*8)/1000)/$w)) Kbit/s over $w seconds | sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta'`
any ideas?

DEAD MAN'S SHOE fucked around with this message at 19:32 on Dec 2, 2007

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat
One question, my home PBX is doing pretty well, I've managed to install Asterisk, and get it configured, I'm now making calls inside my own little phone system, but I have one general linux question.

I keep getting stuck in prompts. Some times I don't have the answer the prompt wants, how do I return to the root prompt? Exit or quit, or CTRL something?

covener
Jan 10, 2004

You know, for kids!

Ericcorp posted:

One question, my home PBX is doing pretty well, I've managed to install Asterisk, and get it configured, I'm now making calls inside my own little phone system, but I have one general linux question.

I keep getting stuck in prompts. Some times I don't have the answer the prompt wants, how do I return to the root prompt? Exit or quit, or CTRL something?

control-Z and the shell built-in 'fg' are the simplest way to suspend a prompt from an interactive shell script.

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat

covener posted:

control-Z and the shell built-in 'fg' are the simplest way to suspend a prompt from an interactive shell script.

Thanks.

Now for Ubuntu, to make something run at start up, I make a file called "asterisk"
and in the file I have this text:

# Asterisk Boot up
start on runlevel-2
stop on shutdown

respawn
//usr/sbin/asterisk

I don't know if this is right, or if I need to "exec" before the last line.

Adbot
ADBOT LOVES YOU

teapot
Dec 27, 2003

by Fistgrrl

Ericcorp posted:

One question, my home PBX is doing pretty well, I've managed to install Asterisk, and get it configured, I'm now making calls inside my own little phone system, but I have one general linux question.

I keep getting stuck in prompts. Some times I don't have the answer the prompt wants, how do I return to the root prompt? Exit or quit, or CTRL something?

Where do you get any prompts when working with Asterisk? Asterisk runs as a server, its scripts run in its own interpreter, and its console is completely asynchronous. The only program with prompts I used with Asterisk is a voice messages generator script I wrote as a frontend to Festival.

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