LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Starting gftp (https://www.linuxquestions.org/questions/linux-newbie-8/starting-gftp-651831/)

deputybill 06-26-2008 10:19 AM

Starting gftp
 
What do I need to type at the command line to start gftp. I have already installed it but when I try to run it I get that is is disabled.

Thank you.

Bill Mann

acid_kewpie 06-26-2008 12:04 PM

gftp can't be "disabled", it's just an ftp client. what actually happens? if you're typing in "gftp" in a console then copy and paste here the whole console activity.

deputybill 06-27-2008 09:58 AM

gftp-text has been disabled
 
[root@ip-72-167-52-157 username]# gftp
Sorry, gftp-text has been disabled.
[root@ip-72-167-52-157 username]#

colucix 06-27-2008 10:20 AM

It looks like gftp can't open in the current X environment (if any) and tries to run in text mode. On recent distributions the text mode has been disabled, so the only option is to compile from source. Anyway, are you trying to run gftp on a remote machine? What is the output of
Code:

echo $DISPLAY

acid_kewpie 06-27-2008 03:56 PM

hmm, I would have thought you'd have gotten an X refusal as well as any fall out if it was trying to do that. maybe your as yet unnamed distro has an additional package like gftp-gtk like ubuntu does.

colucix 06-27-2008 04:07 PM

Don't know for other distros, but on fedora the gftp command is a shell wrapper which checks for DISPLAY and launches the gtk or the text version accordingly:
Code:

#!/bin/sh

if [ "$DISPLAY " != " " ] && [ -f /usr/bin/gftp-gtk ]; then
        exec /usr/bin/gftp-gtk ${1+"$@"}
elif [ -f /usr/bin/gftp-text ]; then
        exec /usr/bin/gftp-text ${1+"$@"}
else
        echo "Error: Can't find gFTP binaries installed in /usr/bin"
fi

When X is not available, I think the only advantage for using text-based gftp is the ability to download an entire directory, even if the same can be accomplished using wget over ftp with recursion.

acid_kewpie 06-27-2008 04:24 PM

ahh, yeah that makes sense. wonder where that actual message would come from then? surely you'd just not have the check in the first place... developers eh?

jailbait 06-27-2008 04:29 PM

Quote:

Originally Posted by colucix (Post 3197302)

Don't know for other distros, but on fedora the gftp command is a shell wrapper which checks for DISPLAY and launches the gtk or the text version accordingly:

I wrote some documentation for gftp in 2002. What you describe is the way that gftp comes from the author. Here is what I had to say about gftp text and gtk versions:

Quote:

gftp-gtk is a the name of the GUI version of gFTP. The command gftp is actually a script which decides whether, under the circumstances, to launch gftp-text or gftp-gtk. If gftp does not launch the version that you want you can use gftp-text or gftp-gtk.

acid_kewpie said:
Quote:

ahh, yeah that makes sense. wonder where that actual message would come from then? surely you'd just not have the check in the first place... developers eh?
I would check deputybill's script in /usr/bin/gftp. Most likely somebody (what distribution is deputybill using?) changed the gftp script to give an error message instead of starting gftp-text. When I start gftp from the console I get gftp-gtk. When I start gftp-text from the console I get gftp-text. am using Debian 4.0

---------------
Steve Stites

colucix 06-27-2008 04:40 PM

Quote:

Originally Posted by acid_kewpie (Post 3197318)
ahh, yeah that makes sense. wonder where that actual message would come from then?

It comes from the (disabled) gftp-text script itself... ;)
Code:

#!/bin/sh

echo "Sorry, gftp-text has been disabled."

Quote:

If gftp does not launch the version that you want you can use gftp-text or gftp-gtk.
Nevertheless, it seems the OP has not an X-server available. If he runs on a remote machine, he should enable X11 forwarding.

acid_kewpie 06-28-2008 01:44 AM

i'd guess at running as root meself.

deputybill 06-29-2008 08:10 AM

gftp-gtk
 
When I run gftp-gtk I get the following:

(gftp-gtk:5412): Gtk-WARNING **: cannot open display:

Does this shed more light on the problem?

Thank you.

Bill

acid_kewpie 06-29-2008 10:09 AM

not really, we know that that would be the error if you ran it directly, but you've not confirmed how you are running it to comment further. My money is still on you incorrectly trying to run it as root when you've logged into X with a normal user account, in xhost case "xhost +localhost" will sot you out, but better still, don't run any user applications as root.

frakman1 03-12-2012 11:23 AM

I am running into the same exact problem. I am running it as user (not root). I hope the log below is clear and answers any of your previous questions.
My system is a Red Hat Fedora: 2.6.27.38-170.2.113.fc10.i686


[alnaumf@fraklinux bin]$ gftp
Sorry, gftp-text has been disabled.
[alnaumf@fraklinux bin]$ cat ./gftp
#!/bin/sh

prefix=/usr
exec_prefix=/usr

if [ "$DISPLAY " != " " ] && [ -f /usr/bin/gftp-gtk ]; then
exec /usr/bin/gftp-gtk ${1+"$@"}
elif [ -f /usr/bin/gftp-text ]; then
exec /usr/bin/gftp-text ${1+"$@"}
else
echo "Error: Can't find gFTP binaries installed in /usr/bin"
fi

[alnaumf@fraklinux bin]$ gftp-gtk

(gftp-gtk:15738): Gtk-WARNING **: cannot open display:

acid_kewpie 03-12-2012 05:02 PM

please do not hijack dead threads.


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