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
Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Sorry if this has been brought up in a previous thread, but how does flasg run for you guys? What version of flash and what linux distro are you using?

I ask because I am on a FreeBSD machine which doesn't have native flash support so I have to use the hacked up linux versions in ports that have trouble with video and audio gettings out of sync.

Adbot
ADBOT LOVES YOU

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
I didn't see anything about this in the thread, but forgive me if this has been covered.

Is there a way to replace the Ubuntu logo with the Footprint logo of GNOME?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

JoeNotCharles posted:

Where exactly do you mean? In the boot splash screen, login screen, Gnome splash screen, Gnome menu...?

Sorry, I wasn't clear. In the upper left hand corner where the 'Applications' menu is. The reason I want to change it is because I am not a big fan of the brown/orange/whatever theme on Ubuntu, but when I change it to something like a blue theme, the Ubuntu logo stands out.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

JoeNotCharles posted:

EDIT: don't do this yet, I made dangerous mistakes. Testing and will update in a minute.

By all means, don't put your own computer at risk. I was just curious if there was a sure fire way of doing this.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Why are fonts so sexy in Firefox for Ubuntu, but are so ugly (and jagged) in Firefox for Gentoo or FreeBSD?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

200th Poster posted:

Does this mean that fluxbox is the only WM that weighs in at under a gigabyte? I'm confused by your response.

I don't know for sure, but I think OpenBox (which I prefer to all other WMs) may also.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
With the SA search feature disabled right now I find it hard to search for my query:

Is there a way to create a simple script that allows me to connect to an SSH session WITHOUT prompting for a password (hardcoded into the script?)?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

L posted:

You can do something like this
code:
#!/usr/bin/expect -f
spawn ssh -l <username> <host>
expect "*password:*"
send -- "<password>\r"
interact
But setting up RSA authentication and a key with no password would work too and be better if your server's configuration will let you do that.

Hmm, this looks like it will work, except, what do I do with it? Does it need to be in a certain directory? CHMOD'd to a certain permission?

Thanks for your help.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Has anyone ever had luck running or compiling zdoom on their Ubuntu machine? I have tried several tutorials and HOWTOs on how to do so (for Linux distros in general, not particularly Ubuntu) and they always fail somewhere during compilation.

I am not sure what I am doing wrong soa ny insight would be appreciated.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
I read the man page for echo, but could not find the answer to my question. What I am looking for is a command that disables output from a script.

code:
#!/usr/bin/expect -f
spawn ssh -l user the.domain.org
expect "Password:"
send  "password\r"
interact
I have that in /bin/ and chmod +x. What I want is for it to not echo what it is doing until it connects to the computer.

Thanks in advance.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

Don't use passwords and expect when you can use ssh keys. Generate your own key, and copy the public key into .ssh/authorized_keys so it will allow you to login without password.

Okay, but what if I have a script almost exactly like that for logging into a different computer for FTP access? How would I get rid of the echoing of what it is doing?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

To stop logging to user you only have to place "log_user 0" before the section you want to stop logging, and "log_user 1" after it. The problem that you may have to face is that the program you are calling may still produce output after the last string is sent to it, so to make sure that this output is not passed to the user you have to match it. For example, if the script runs shell and passes the first command to it, you would see the command's echo unless you match the shell prompt that will be produced after the command is finished (and then you will have to re-send it to the user):

code:
#!/usr/bin/expect -f
log_user 0
spawn /bin/sh
expect "$ "
send "ls / >> /tmp/ls-output.txt\r"
expect "$ "
log_user 1
send_user "$ "
interact

Thank ya kindly :)

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
I am almost done creating a script (for Mplayer/Mencdoder) to rip my DVDs for my HTPC and was looking for some help with the script I made.

What I need to know is if anyone knows how I would go about getting 128, 137, 130, and 131 from these lines (I'm assuming using either sed or cut?)

code:
audio stream: 0 format: ac3 (5.1) language: en aid: 128.
audio stream: 1 format: dts (5.1) language: en aid: 137.
audio stream: 2 format: ac3 (stereo) language: es aid: 130.
audio stream: 3 format: ac3 (stereo) language: fr aid: 131.
I looked at the man pages and tutorials on the internet trying to figure out exactly how I would do this, but I guess I am just too thick headed :(

Also, it doesn't have to grab the numbers from those lines all at once, it can do them one at a time.

Oh, and one more thing, these numbers (128, 137, 130, and 131) as well as things like ac3, dts, stereo, mono, en, es, and fr all change depending upon the DVD.

Thanks a bunch!

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

If you really need a comma-separated list with a newline at the end:

code:
sed -e 's/^.* language: //' -e 's/^.*: //' -e 's/\. *$//' | tr '\012' , | sed 's/,$/\n/'

No no, I don't need a comma separated list. Sorry that was my fault for not clarifying. Really, I only need to know how to get the last three numbers on each line, sans the period at the end.

I'll try yours and see if I can tweak it to get what I need though. Thanks.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Can anyone help me suppress the INPUT that occurs within this script?

code:
#!/bin/bash -x
gedit ~/.list > /dev/null 2>&1;
for EP in $(cat ~/.list);
do
mkdir ~/$EP > /dev/null 2>&1;
cd ~/$EP > /dev/null 2>&1;
mplayer dvd://$EP -v -dumpstream -dumpfile $EP.vob > /dev/null 2>&1;
mplayer $EP.vob -ao pcm:file=$EP.wav -vc dummy -aid 128 -vo null > /dev/null 2>&1;
normalize-audio $EP.wav > /dev/null 2>&1;
faac $EP.wav -w -q 100 > /dev/null 2>&1;
mencoder -v\
	$EP.vob\
	-ofps 24000/1001\
	-sws 9\
	-vf scale=720:-3,pullup,softskip,harddup\
	-ovc x264 -x264encopts subq=4:bframes=3:b_pyramid:weight_b:threads=auto:turbo=1:pass=1:psnr:bitrate=1000\
	-oac copy\
	-of rawvideo\
	-o pass1.264 > /dev/null 2>&1;
mencoder -v\
	$EP.vob\
	-ofps 24000/1001\
	-sws 9\
	-vf scale=720:-3,pullup,softskip,harddup\
	-ovc x264 -x264encopts subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b:threads=auto:pass=2:psnr:bitrate=1000\
	-oac copy\
	-of rawvideo\
	-o pass2.264 > /dev/null 2>&1;
MP4Box -add pass2.264 -add $EP.m4a -fps 23.976023976 $EP.mp4 > /dev/null 2>&1;
done
Another small request, does anyone know why it is that when the 'mencoder' lines are processed, their outputs are still displayed in the terminal? Also, why does adding ' > /dev/null 2>&1' error on the 'for EP in $(cat ~/.list)' line?

Eventually, I will add echo lines into the script (once this input/output problem has been solved) to make it only read what I say in 'echo ""'.

This would be a huge help and is very much appreciated.

Edit: Not sure why bitrate is starting on a new line in the box, but it is all one line in the script.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

Steve French posted:

Can anybody tell me why the hell this is happening and/or how to fix it?



(Yes, the drive is actually 465.8GB)

EDIT: Nevermind, figured it out, there was somehow 250 gb of poo poo in the trash folder.

Pacman!

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
This is probably a very simple question, but what is the easiest way to grab the number when executing:

code:
wc -l <filename>
Is there a better way to go about doing this?

Edit: Right now, I get:

code:
<number of lines> <filename>

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

DevastatorIIC posted:

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

Works like a charm. Thank ya kindly :)

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Is there any other way to identify the processor name other than:
code:
cat /proc/cpuinfo | grep "model name"
This returns the name twice, where as I only want it to show up once.

Edit: In case there was any question, it is because I have a dual core processor:
code:
matthew@matthew-desktop:~$ cat /proc/cpuinfo | grep "model name"
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 5600+
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 5600+
Edit 2: head -n5

Crush fucked around with this message at 10:21 on Oct 5, 2007

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
I seem to be having trouble understanding sgrep.

Say I have a file that might read
code:
duration: 2
duration: 3
duration: 2
duration: 3
duration: 2
etc..
I want to make sure that said file alternates between duration: 2 and duration: 3 at least once. How would I go about doing this? Is there a better tool than sgrep for the job?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

"make sure" <- Do you mean "determine if"?

Yes

teapot posted:

"alternate" <- Do you mean "contains the sequence: one occurence of one of the strings followed by one occurence of the other string", "contains the sequence: one occurence of one of the string followed by one occurence of the other string, then the occurence of the first string", of any of the remaining half a dozen possible definition of "alternate"?

Essentially, I want to make sure that
code:
duration: 2
duration: 3
happens at least once (but it would most likely happen A LOT).

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

The simpliest way to check for it (assuming that "-" in place of newline does not produce something that may be also present in the file):

code:
tr '\n' - < [i]infile[/i] | grep "duration: 2-duration: 3"

Interesting, will give this a try.

Edit: Ok, I ran this and it instantly just went back to the prompt without saying anything. I then changed the 3 to a random number like 1223432432 and ran it again and the same thing happened. What am I to do with this? Thanks for your help by the way.

Crush fucked around with this message at 06:17 on Oct 8, 2007

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

Ilya posted:

Here's the best (or at least most proper) way of doing it:

code:
xargs < test.txt | grep "(2 duration: 3\|3 duration: 2)*"		
xargs "flattens" the multiple lines into one, which you want to do because what you are trying to accomplish is not to filter certain lines, but really check whether a single string fits a pattern.

And then the pattern you are looking for is obvious: either string 1 followed by string 2, or string 2 followed by string 1.

teapot posted:

It checks specifically for those strings, so you have to keep spaces/capitalization/... the same in matching strings and in the file you test. If it returned nothing, it means, nothing matched, otherwise it returns a string that will be the whole file with dashes instead of newlines. For the use in scripts it's more important that return value of grep is 0 if it matched, nonzero if it didn't.

Ahh, it looks like for whatever reason my file had additional spaces in it; must have had something to do with the way I ripped that information .

In any event, they both work, but now I am a little confused as to how I could use this in a conditional. If this criteria is met (the pattern of duration: 2 duration: 3) then do this Else do this.

I have done conditionals for bash scripts before, but they were simple:
code:
if [ "wc -l < file" \> "1"  ]
then
echo "Something"
else
echo "Something Else"
fi

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

code:
if grep something somefile
  then
    echo "Found something"
  else
    echo "Found nothing"
  fi
In your example you forgot backticks arount "wc -l <file", you don't need quotes around numeric values, and \> should bee -gt (it looks like ">" compares strings, so "5" > "100"). So the versio that actually works is:

code:
if [ `wc -l < file` -gt 1 ]
then
echo "Something"
else
echo "Something Else"
fi
"[" is actually a command, and "]" is its last parameter. It's the same as:

code:
if test `wc -l < file` -gt 1 
then
echo "Something"
else
echo "Something Else"
fi

Awesome, thanks to both you and Ilya. Nice tips on the conditionals, too.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Is it possible to go through a file and find the highest (greatest) first number, and of those lines find the highest second number, and of those lines find the lowest third number and then finally the lowest fourth number?

Like, would I be able to find '720 352 0 62' out of the file below? Say it goes through the file and sees that 720 is the greatest first number on a line, then of the lines that have 720 as the highest first number, it sees that 352 is the highest number in the second column, and of those lines, it finds the lowest third number, and of those lines the lowest fourth number.

code:
-704 -464 714 474
-704 -464 714 474
-704 -464 714 474
0 0 358 212
64 0 328 210
96 80 320 168
176 160 288 124
304 240 236 84
368 288 202 68
432 320 180 66
464 352 170 62


592 352 126 62
624 352 90 62
640 352 76 62
656 352 58 62
688 352 32 62
704 352 16 62
704 352 14 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
704 352 10 62
720 352 0 62
720 108 0 62
i know this sounds confusing :smithicide:

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
AWESOME! Worked. Thanks!

Crush fucked around with this message at 22:02 on Oct 9, 2007

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

Steve French posted:

That doesn't handle the following, if I'm reading the question right:
code:
100 99 99 99
100 100 99 99
100 100 99 100
100 100 100 99
100 100 100 100
Your solution gives:
code:
100 100 100 100
100 100 100 99
100 100 99 100
100 100 99 99
100 99 99 99
Seems to me he would instead want the following order:
code:
100 100 99 99
100 100 99 100
100 100 100 99
100 100 100 100
100 99 99 99
And specifically, the line he wants is "100 100 99 99".

This is correct, thanks to everyone though for the help. Accipiter's works fine for me

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

Scaevolus posted:

Battle for Wesnoth gets pretty high ratings, although turn-based games aren't my type.

http://happypenguin.org has information on games for Linux, browse through the highest ranked ones and try a few out.

Ever heard of Cube2/Sauerbraten?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

rookieone posted:

They're fun even though they are pretty limited community/players wise. It's like a Quake1/Quake2 style quick online game. Graphics look good though and you always have to applaud their efforts for putting out a real crossplatform game.

But with Quake3 running in Linux without a problem (same counts for UT, its successors and all other Quake1/2/3 engine games) there isn't much sense in playing Cube/Sauerbraten games.

Actually there are quite a few deathmatch style games for linux out there if you look around a bit (say on linuxgaming etc.)

I don't know why, but I thought he meant free games.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

covener posted:

Net, 32-bit will have less potential headaches. Unlikely any tanginle benefit of running a 64-bit kernel or applications.

I've heard things such as video encoding can improve up to 40%, is this true?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
How can I make an image of a CD/DVD? I have tried
code:
dd if=/dev/sda1 of=NAME.ISO bs=4096
code:
dd if=/media/cdrom0 of=NAME.ISO bs=4096
and
code:
dd if=/media/cdrom of=NAME.ISO bs=4096
The first I was testing on a DVD I own and just kept going until I finally cut it off at the 20GB mark. The other two would make 16MB files of the same DVD. Is there a better (command line, if at all possible) way of doing this?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

Crush fucked around with this message at 02:10 on Oct 23, 2007

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

dfn_doe posted:

You want to do something like
code:
dd if=/dev/cdrom of=~/cdromimage.iso
Where /dev/cdrom is the device node for your cdrom/dvdrom drive and ~/cdromimage.iso is the image file you are outputting. The bs portion of your command isn't really neccessary and your last two commands you are trying to dump mountpoint directories, not the device contents.

See I get this when I do that command verbatim.
code:
matthew@matthew-desktop:~$ dd if=/dev/cdrom of=~/cdromimage.iso
dd: reading `/dev/cdrom': Input/output error
31456+0 records in
31456+0 records out
16105472 bytes (16 MB) copied, 7.14411 seconds, 2.3 MB/s

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

dfn_doe posted:

Stop copy/pasting commands from the forums... What device is your cdrom drive? that needs to be the if "input file".... "reading `/dev/cdrom': Input/output error" leads me to believe that /dev/cdrom isn't a valid node or symlink to a node on your system. Also, your first post indicated that you were doing /dev/sda1 which dumped over 20gb, which leads me to likewise believe you have copied/pasted that from somewhere else and you're actually dumping from a hard drive which sda1 happens to be on your system.

run a dmesg and look for something like this
code:
[   35.620400]  [b]sdb[/b]:sr0: scsi3-mmc drive: 1x/48x writer cd/rw xa/form2 cdda tray
[   35.624962] Uniform CD-ROM driver Revision: 3.20
[   35.625020] sr 1:0:0:0: Attached scsi CD-ROM sr0
[   35.628220] sr1: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray
[   35.628275] sr 1:0:1:0: Attached scsi CD-ROM sr1
[   35.636841]  sdb1
[   35.636919] sd 2:0:0:0: [b][sdb][/b] Attached SCSI disk
[   35.645607] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   35.645645] sr 1:0:0:0: Attached scsi generic sg1 type 5
[   35.645682] sr 1:0:1:0: Attached scsi generic sg2 type 5
[   35.645722] sd 2:0:0:0: Attached scsi generic sg3 type 0

I was only typing what you told me to try. Otherwise I always try for whatever is specific to my problem...I have (obviously) already tried cdrom, cdrom0, dvd, and dvdrw. All have the same problem. This apparently isn't working for me which is why in my original post I asked for an alternative to doing it this way. I appreciate your help, but there is no need to assume (which seem to do a lot) anything. It doesn't help, only makes things worse.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

dfn_doe posted:

Heh, funny that you accuse me of making assumption when you clearly say "I was only typing what you told me to try" when I already pointed out that you need to use the correct device node when doing the dd command. Also you never asked for an alternative way, you asked if there was something better than what you were doing (which, would be a working command line as opposed to your close but no cigar attempts)... which I then outlined for you and again in that post "I do that command verbatim." which sure sounds like copy/pasting. You sure got your panties in a bunch about the perceived assumption on my part. This bit here is loving stellar too, "I have (obviously) already tried," when there is nothing obvious about what you have or haven't tried...

Your first 3 attempts were pretty close to what you should be doing, but you are not making the last little logical leap; one which I've tried to walk you through. Instead you've chosen to lash out because you can't figure out a simple command. Maybe you'd be better off with a point and click gui program like k3b or it's ilk and instead of asking for help and then acting like a total retard when someone actually goes out of their way to try and help you learn something you can go read a loving man page instead of wasting other peoples' time being dense.

I said I don't make a habit of copying and pasting, but in this case did. Also you tend to not be able to grasp that I had already tried any other device nodes available. I guess I figured you'd ASSUME I had already tried it since you seem to know everything.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

Can you, please, post the results of dmesg and ls -l /dev/cdrom ?

Yeah, sorry.
code:
matthew@matthew-desktop:~$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 3 2007-10-21 22:11 /dev/cdrom -> hda
Forgot that it was an PATA/IDE/whatever drive and tried hda to no avail.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

"tried hda to no avail" <- WTF does it mean???!! What exactly did you run, and what was the result. I am also still waiting for the answer about the actual data being on that CD, DVD or whatever other thing you have in that drive. What is it? Is it readable when you mount it?

A DVD thatis several GBs large. dd if=/dev/hda of=NAME.ISO. Yes it is readable. Please believe I would at least know that before trying to accomplish this. Also, I have tried this on s few different DVDs and CDs.

Everyone in this thread needs to chill the gently caress out :colbert:

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

teapot posted:

Data or video?

Movie DVDs, however I just tried again with an older data CD and it worked fine. My only guess is some sort of encryption on the DVDs?

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

waffle iron posted:

Oh lord I haven't laughed so hard in a while.

Care to enlighten us as to why?

Edit: So I asked in a couple linux channels on irc and the only reply I got was that it is because they are encrypted. Oh well. Thanks anyways, teapot.

Crush fucked around with this message at 05:49 on Oct 22, 2007

Adbot
ADBOT LOVES YOU

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

Kinch posted:

Almost all commercial DVDs are encrypted.
http://en.wikipedia.org/wiki/Content-scrambling_system
http://en.wikipedia.org/wiki/DeCSS

k9copy and xdvdshrink can backup movie DVDs, if that's what you want, though I have not used either.

Thanks, Kinch. Good to know.

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