Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Networking & Wireless
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Networking & Wireless
Having problems getting connected to the internet or getting your wireless card to work? Ask here.

 
Thread Tools Display Modes
Old May 1st, 2007   #1
scottylans
A Carafe of Ubuntu
 
Join Date: May 2005
Location: Melbourne, AU
Beans: 123
Send a message via ICQ to scottylans
Arch compiled program won't execute? :(

EDIT: whole thing was badly worded.




Hi guys,

I can't 'run' a program I've compiled?
I type the name of it and nothing happens.
If I type the start of the name and try to tab complete it, it still won't work

I am fairly new to linux but I was under the impression when you download a tar file, you extract it (zxvf or zxcf, I can't recall)
Then once it's extracted you sudo make and sudo make install (or make / make install)

I'm trying to get aircrack-ptw woring and the 'executable' is coming up green in the shell when I do an ls
WTF have I missed? I'm dopey, sorry

Followed the instructions here too!?
http://www.wirelessdefence.org/Conte...rcrack-ptw.htmhttp://www.wirelessdefence.org/Conte...rcrack-ptw.htm

I didn't receive any errors when following those instructions either.

Any advice would be really appreciated.

Last edited by scottylans; May 2nd, 2007 at 08:30 AM..
scottylans is offline   Reply With Quote
Old May 1st, 2007   #2
scottylans
A Carafe of Ubuntu
 
Join Date: May 2005
Location: Melbourne, AU
Beans: 123
Send a message via ICQ to scottylans
Re: Argh compiled program won't execute? :(

No one?
scottylans is offline   Reply With Quote
Old May 2nd, 2007   #3
scottylans
A Carafe of Ubuntu
 
Join Date: May 2005
Location: Melbourne, AU
Beans: 123
Send a message via ICQ to scottylans
Re: Arch compiled program won't execute? :(

Sorry to bump again, I've re-written it so it might make some more sense.
scottylans is offline   Reply With Quote
Old May 2nd, 2007   #4
scottylans
A Carafe of Ubuntu
 
Join Date: May 2005
Location: Melbourne, AU
Beans: 123
Send a message via ICQ to scottylans
Re: Arch compiled program won't execute? :(

Here is a screenshot of the problem!
http://members.iinet.net.au/~scottylans/screen01.png
scottylans is offline   Reply With Quote
Old May 2nd, 2007   #5
chili555
Ubuntu addict and loving it
 
chili555's Avatar
 
Join Date: Aug 2005
Location: South Carolina, USA
Beans: 4,150
Ubuntu 9.10 Karmic Koala
Send a message via AIM to chili555
Re: Arch compiled program won't execute? :(

The HOWTO you referred us to suggests the command is
Code:
./aircrack-ptw
See steps 5 and 6. Put that little ./ in front and see if it works.
chili555 is offline   Reply With Quote
Old May 2nd, 2007   #6
scottylans
A Carafe of Ubuntu
 
Join Date: May 2005
Location: Melbourne, AU
Beans: 123
Send a message via ICQ to scottylans
Re: Arch compiled program won't execute? :(

Quote:
Originally Posted by chili555 View Post
The HOWTO you referred us to suggests the command is
Code:
./aircrack-ptw
See steps 5 and 6. Put that little ./ in front and see if it works.
I'm surprised to say that works?!
Is there any way that I can make it so it works like a normal executable though? I just type 'airc' and hit tab?

I can't even type airc(tab) in the same directory that it's located in!?
scottylans is offline   Reply With Quote
Old May 2nd, 2007   #7
chili555
Ubuntu addict and loving it
 
chili555's Avatar
 
Join Date: Aug 2005
Location: South Carolina, USA
Beans: 4,150
Ubuntu 9.10 Karmic Koala
Send a message via AIM to chili555
Re: Arch compiled program won't execute? :(

Quote:
I'm surprised to say that works?!
Surprised? Hey, 800+ beans has got to be worth something!

There might be some way to convert it to a "normal" executable, but I don't know it; maybe a 2,000 beaner will jump in!
chili555 is offline   Reply With Quote
Old May 2nd, 2007   #8
jfinkels
Iced Almond Soy Ubuntu, No Foam
 
jfinkels's Avatar
 
Join Date: Nov 2006
Location: Medford, MA
Beans: 1,186
Ubuntu 9.10 Karmic Koala
Re: Arch compiled program won't execute? :(

You can create a link to it in your /usr/bin directory. Type this command:
Code:
sudo ln -s ~/aircrack-ptw /usr/bin/aircrack-ptw
Just replace "~/aircrack-ptw" with the actual location of the file on your system

EDIT:

Let me explain what's going on here.

Typing "./commandname" will run a program whose executable is in your current directory.

To run a program without the "./" part, it has to be located in a directory that is in your $PATH environment variable. You can view the contents of your path by typing the following command:
Code:
echo $PATH
You can also put a 'symbolic link' to the actual location of the file in a directory in your path. That's what the command I gave you above does.

Last edited by jfinkels; May 2nd, 2007 at 07:59 PM..
jfinkels is offline   Reply With Quote
Old May 2nd, 2007   #9
scottylans
A Carafe of Ubuntu
 
Join Date: May 2005
Location: Melbourne, AU
Beans: 123
Send a message via ICQ to scottylans
Re: Arch compiled program won't execute? :(

Quote:
Originally Posted by jfinkels View Post
You can create a link to it in your /usr/bin directory. Type this command:
Code:
sudo ln -s ~/aircrack-ptw /usr/bin/aircrack-ptw
Just replace "~/aircrack-ptw" with the actual location of the file on your system

EDIT:

Let me explain what's going on here.

Typing "./commandname" will run a program whose executable is in your current directory.

To run a program without the "./" part, it has to be located in a directory that is in your $PATH environment variable. You can view the contents of your path by typing the following command:
Code:
echo $PATH
You can also put a 'symbolic link' to the actual location of the file in a directory in your path. That's what the command I gave you above does.


Good god I'm shocked confused and dazed! You must be joking!
I like Ubuntu but that has to be one of the most $!%^ING ridiculous things I've ever heard.

Let me get this straight.......

I'm an old dos guy.
I understand the theory of how a path works and what it does, it lets you run files in select directories even if you're not in them - makes sense!
HOWEVER if you're in a directory to an application and it's not in the path, you can still run that application because you happen to be in the directory for it, that's totally darn logical to me.

You're saying that Ubuntu won't execture an application I'm _IN_ the directory for, unless i put ./ infront of it or add it to the path? That is _truely_ bloody stupid!

Disclaimer: I hope I'm wrong, because I happen to like Ubuntu and I happen to like linux, sometimes people bash it for silly things and other times people bash it for things which it really does which is stupid but in this case, if I'm right, good lord is that really really REALLY illogical!

P.S Your help is appreciated, despite my rant!
scottylans is offline   Reply With Quote
Old May 3rd, 2007   #10
jfinkels
Iced Almond Soy Ubuntu, No Foam
 
jfinkels's Avatar
 
Join Date: Nov 2006
Location: Medford, MA
Beans: 1,186
Ubuntu 9.10 Karmic Koala
Re: Arch compiled program won't execute? :(

Ummm, I guess that's just the way it is. I can't tell you why or how, because I don't know. Using "./" to represent the current directory is a convention among other systems and languages. Doesn't seem like that much more of a hassle to me. Remember, Linux is not Windows (or DOS)!

I assume you understand the idea behind relative paths? "." means the current directory and ".." means the directory containing the current one. That's why it looks like "./command". To execute a command that is in the directory above the current one, you could run "../command".

I suppose that typing "./command" is more specific, so in case you had an executable in your path with the same name, typing just "command" would execute the one in the path, and typing "./command" would execute the one in the current directory.
jfinkels is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:59 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry