how do i start a program from command line?


Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: how do i start a program from command line?

  1. #1
    Join Date
    Sep 2003
    Location
    Sacramento CA - USA
    Posts
    148

    how do i start a program from command line?

    i have messed with linux for some time but keep quiting over stuff i dont know how to do.

    but now im back to trying again.

    i installed debian last week and then downloaded firefox and installed it.

    but since i am a gui whore and cant find where the icon is to start the browser im kinda stuck. how do i get the program started from the command line?

    now will this work with any program or just firefox?

    thanks
    GNUoob.com Name says it all

    eek....I am a geek.....(attemptive)Linux user #328439

    My Puter: Hamster Processor/some rams/and 22 floppies in raid.

    My Folding@Home Stats

    THANK YOU JustLinux.com crew

  2. #2
    Join Date
    Jul 2002
    Location
    TN
    Posts
    1,009
    as long as it is registered in /usr/bin then all you you should need to do is type in the terminal without the quotes "nohup firefox" that way you can close the terminal without shutting down firefox.
    Linux reg. User # 298337

  3. #3
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Do you have X running at all? If not, Firefox definitely won't start.

    If you do, the command should be just firefox -- I don't see why Debian would be any different from any other distro. If you want to get a prompt back after starting Firefox, then add an ampersand (&) after the program name. You also need this in order to shut down the terminal without killing Firefox (along with nohup -- although the requirement for nohup seems to depend on the distro, because bash, running under Eterm, compiled according to the BLFS book (Beyond Linux From Scratch), does not require it).

    But no, using "firefox" won't work with any other program. For other stuff, you'll have to query the package system to find out what files got installed by what packages, and then look for files installed in either:

    /bin (programs used before the bootscripts mount all the filesystems listed in /etc/fstab)
    /sbin (as above, but programs intended to be run only by root)

    /usr/bin (almost all other programs -- packages install their programs into /usr)
    /usr/sbin (almost all other programs meant to be run by root -- packages install their programs into /usr)

    /usr/local/bin (programs you compile yourself)
    /usr/local/sbin (programs you compile yourself, that are intended to be run only by root)

    To query the package system, a "dpkg -S packagename" (at least according to somebody around here) will show all files installed by the package "packagename".

  4. #4
    Join Date
    Sep 2003
    Location
    Rochester, MN
    Posts
    3,604
    One possible problem is if you didn't use apt-get to install Firefox. I think the standalone installer defaults to installing in the firefox-installer directory (in fact I'm pretty sure of it), wherever you untarred that. For me that makes it not show up in my path by default.

    I don't know if it applies at all to you, but it might be a reason why it wouldn't work for you.

  5. #5
    Join Date
    Sep 2003
    Location
    Sacramento CA - USA
    Posts
    148

    still cant get it to work :(

    i tried ...
    nohup firefox
    firefox

    but its not starting from command line

    the system is now fedora 2
    but earlier it was deb3.0(6 months ago)

    any ideas?










    edit...
    http://tldp.org/cgi-bin/ldpsrch.cgi
    showed nothing that i can use
    Last edited by gnuoob; 08-30-2005 at 04:25 PM.
    GNUoob.com Name says it all

    eek....I am a geek.....(attemptive)Linux user #328439

    My Puter: Hamster Processor/some rams/and 22 floppies in raid.

    My Folding@Home Stats

    THANK YOU JustLinux.com crew

  6. #6
    Join Date
    Sep 2004
    Location
    /home/
    Posts
    1,204
    do a

    whereis firefox

    is you dont get a response it is either not installed or you manually installed it.

    im pretty sure FC2 didnt come with firefox so you probably installed it.

    if so look in the directory where you installed it.
    ie

    /home/user/firefox/firefox

    soule
    Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey

    IRC #linuxn00b

    Support your Distro.
    Slackware Store
    Archlinux Schwag

  7. #7
    Join Date
    Sep 2003
    Location
    Sacramento CA - USA
    Posts
    148
    found this for GNOME but not kde

    http://www.redhat.com/magazine/003ja...s/tips_tricks/
    start/-----------------------------------------
    To add a Firefox icon to your GNOME panel, use the following steps:

    1. Right click on a blank (available) area on your panel. A menu will appear with options like: Add to Panel, Properties, New Panel, Help, About Panels, and About GNOME.
    2. Select the Add to Panel option, then choose Launcher... — a Create Launcher window pops up.
    3. There are 2 important pieces to fill in, the Name and the Command. Use Firefox for the name, and use the location of the Firefox installation directory followed by the firefox command such as /usr/local/firefox/firefox for the command.
    4. The Type should be defaulted to Application in the drop-down menu. If not, change this to Application.
    5. To add an icon image, click on the No Icon box. The default location of /usr/share/pixmaps appears. To use the Firefox icon, select the Browse... button and browse to /usr/bin/firefox/icons. Choose the file icons/mozicon50.xpm from the Firefox installation directory.
    6. Click OK after you have completed the information in the Launcher Window. A new icon should appear on your GNOME panel.
    7. Test the Firefox icon by single clicking with the left mouse button.

    Hint: Need to find where the installation of Firefox is? Try the following sequence if you just installed Firefox and do not know the installation path. You can omit the updatedb command if your cron.daily tasks have completed. updatedb is run by default in a 04:00 am daily cronjob. From the command line:

    updatedb
    locate firefox-bin
    --------------------------------/end

    still doesnt answer howto do by command line but at least i learned of a database update adn did that
    GNUoob.com Name says it all

    eek....I am a geek.....(attemptive)Linux user #328439

    My Puter: Hamster Processor/some rams/and 22 floppies in raid.

    My Folding@Home Stats

    THANK YOU JustLinux.com crew

  8. #8
    Join Date
    Sep 2003
    Location
    Sacramento CA - USA
    Posts
    148

    Angry

    ./firefox

    thats it?

    how come nobody knew that?

    found my answer here... http://en.wikibooks.org/wiki/Using_Firefox:_Installatio

    so for any program just type ./name ???

    argghhhhh

    why is this so hard yet stupidly simple
    GNUoob.com Name says it all

    eek....I am a geek.....(attemptive)Linux user #328439

    My Puter: Hamster Processor/some rams/and 22 floppies in raid.

    My Folding@Home Stats

    THANK YOU JustLinux.com crew

  9. #9
    Join Date
    Nov 2002
    Location
    Dayton, OH
    Posts
    986
    Using ./firefox only works if the firefox binary is in the directory that you are currently in. So if you are in / and type ./firefox then that means firefox must be in /. So this will not work for any program from any folder.
    "After all you've seen, after all the evidence, why can't you believe?"

    IBM Thinkpad T21
    750 Mhz P3, 128 MB PC100 RAM, CD-ROM, 10 GB IDE HDD
    Ubuntu 9.04 Minimal

  10. #10
    Join Date
    Sep 2003
    Location
    Sacramento CA - USA
    Posts
    148
    ok thanks...thats good to know

    i did install it into
    /home/dave/MyInstalledStuff/firefox
    just so i knew where it was. maybe i caused my own problems that way?
    GNUoob.com Name says it all

    eek....I am a geek.....(attemptive)Linux user #328439

    My Puter: Hamster Processor/some rams/and 22 floppies in raid.

    My Folding@Home Stats

    THANK YOU JustLinux.com crew

  11. #11
    Join Date
    Jun 2003
    Location
    Burlington, ON (near Toronto)
    Posts
    630
    Quote Originally Posted by gnuoob
    ok thanks...thats good to know

    i did install it into
    /home/dave/MyInstalledStuff/firefox
    just so i knew where it was. maybe i caused my own problems that way?
    Why change where it's installed? Let it go where it wants to. Installing stuff to specific directories you create is Windows thinking.

  12. #12
    Join Date
    Sep 2003
    Location
    Sacramento CA - USA
    Posts
    148
    Quote Originally Posted by ions
    Why change where it's installed? Let it go where it wants to. Installing stuff to specific directories you create is Windows thinking.

    i beg to differ

    windows always puts stuff in
    c:\program files\your program

    ive always done it
    d:\games\ureal
    e:\internetstuff\winzip

    by you saying let it install itself thats letting it do the c:\program files\your program thing

    at least i know where my stuff is this way
    GNUoob.com Name says it all

    eek....I am a geek.....(attemptive)Linux user #328439

    My Puter: Hamster Processor/some rams/and 22 floppies in raid.

    My Folding@Home Stats

    THANK YOU JustLinux.com crew

  13. #13
    Join Date
    Dec 1999
    Location
    Fargo, ND
    Posts
    1,816
    There are actually a couple of reasons that you were told to just let it install where it wants to.

    1) You are a gui whore. You said that yourself.
    2) You don't have to manually add to your path statement for every program that you want to install, as the rpm will take care of it for you.
    3) You are a gui whore.
    4) Automagic updates of your menu's for most programs (Both debian and RH based systems do this for most programs)
    5) You are a gui whore.
    6) Less use of a terminal window to start your own programs
    7) You are a gui whore
    8) You don't need to make your own menu entries for each program you install.
    9) You are a gui whore.
    10) It's easier.

    HTH
    Knute

    You live, you die, enjoy the interval!

  14. #14
    Join Date
    Sep 2002
    Location
    Valencia, California
    Posts
    436
    The command to launch Firefox in Debian (and some other distros) is mozilla-firefox.

  15. #15
    Join Date
    Sep 2003
    Location
    Sacramento CA - USA
    Posts
    148
    Quote Originally Posted by knute
    There are actually a couple of reasons that you were told to just let it install where it wants to.

    1) I'm a attention whore.
    2) You don't have to manually add to your path statement for every program that you want to install, as the rpm will take care of it for you.
    3) I'm a attention whore.
    4) Automagic updates of your menu's for most programs (Both debian and RH based systems do this for most programs)
    5) I'm a attention whore.
    6) Less use of a terminal window to start your own programs
    7) I'm a attention whore.
    8) You don't need to make your own menu entries for each program you install.
    9) I'm a attention whore.
    10) It's easier.

    HTH
    answers
    1,3,5,7,9)
    ok, cool for you

    2)thats good to know, thanks

    4)good reason to maybe then reinstall using default, thanks. saves future problems.

    6)I'll have to take your word on that since im learning here.

    8)#4 again

    10)LINUX IS NOT ABOUT BEING EASY
    its about learning and getting frustrated and having fun
    if it was easy it would be called windoz

    now can you help me get the GUI working on my debian web server which im only able to login via ssh and using vi to get the apache going?
    granted apaches going and it works but my whorishness wants to see the GUI too at some point
    GNUoob.com Name says it all

    eek....I am a geek.....(attemptive)Linux user #328439

    My Puter: Hamster Processor/some rams/and 22 floppies in raid.

    My Folding@Home Stats

    THANK YOU JustLinux.com crew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •