"ftp: u: unknown option" when script runs through VNC viewer
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.