LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-22-2005, 09:27 AM   #1
Fillys6
Member
 
Registered: Mar 2005
Posts: 31

Rep: Reputation: 15
"ftp: u: unknown option" when script runs through VNC viewer, but is ok on console


If I run a script in GNOME on the console using bash, it runs fine.

If I run the same exact script in GNOME through VNC using bash, I get a "ftp: u: unknown option".

Any ideas?

Thanks!

Last edited by Fillys6; 12-22-2005 at 09:34 AM.
 
Old 12-22-2005, 10:08 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I can't think of any reason VNC should change things. Have you run it with the bash -x option?
 
Old 12-22-2005, 10:50 AM   #3
Fillys6
Member
 
Registered: Mar 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Matir
I can't think of any reason VNC should change things. Have you run it with the bash -x option?
Thanks for your reply Matir.

No. I am just right-clicking on the file and selecting "Open with > bash". How would I start a file called "script" from the command line using the bash -x option?
 
Old 12-22-2005, 11:09 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you open your terminal and go to the directory containing the script with the 'cd' command, you can run 'bash -x script', where script is the name of your script. This will display the commands bash is executing as it does so, which will enable one to see the command being passed to the 'ftp' program.
 
Old 12-22-2005, 01:35 PM   #5
Fillys6
Member
 
Registered: Mar 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Matir
If you open your terminal and go to the directory containing the script with the 'cd' command, you can run 'bash -x script', where script is the name of your script. This will display the commands bash is executing as it does so, which will enable one to see the command being passed to the 'ftp' program.
It worked!! This is great, thanks Matir.

Any idea why I have to use the -x switch when going through VNC? Just to confirm my original post (and for my sanity), I tested it again through VNC the way I normally do (right click then select bash) and it errored out. Tried it directly on the console and it worked fine. So I went back to VNC and ran "bash -x script" and it worked fine.
 
Old 12-22-2005, 02:13 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Now that's really odd. The -x wasn't supposed to make it work, just make it show us how it breaks. Can you post the output of 'set' both through vnc and your normal desktop?
 
Old 12-22-2005, 03:46 PM   #7
Fillys6
Member
 
Registered: Mar 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Ok I take that back.

If I run the commands MANUALLY from a terminal using VNC, it works fine. If I let the script run the command it will give me the error.

Can I create a file that I can double click on that will execute the following code:

bash /directory/filename


Right now what I am doing is right clicking the the file and going to "Open with > bash".
 
Old 12-22-2005, 07:11 PM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You could create a file to do that, but I would suggest it would be better to try and fix it from the get go. Is there any chance you can post the script here? Feel free to obfuscate IPs or Passwords, but I'd like to test it on my machine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
rpm -bp command not working says "-bp: unknown option" Niceman2005 Linux - Software 2 11-08-2004 01:36 AM
dns named.conf: "view" unknown option rioguia Linux - Networking 16 11-02-2004 11:04 AM
anging "Protocol" option to "IMPS/2" in XF86Config-4 causes problems zstingx Linux - General 2 10-27-2003 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration