Fedora Linux Support Community & Resources Center
  #1  
Old 12th May 2010, 03:15 PM
year4e Offline
Registered User
 
Join Date: Apr 2010
Location: VIZAG, ANDHRA PRADESH, INDIA
Age: 31
Posts: 169
linuxopera
Question How can i run installed program from terminal

How can i run installed program say "Firefox" from terminal?
__________________
LAPTOP HCL ME B3863 @Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20 GHz, 4GB RAM, 320 HDD,GeForce 8200M G (GPU 0),GRAPHICS BY NVIDIA
Fedora Release 14 ,Kernel Linux 2.6.35.6-48.fc14.x86_64,GNOME 2.32.0 NVIDIA DRIVER VERSION: 260.19.12
Reply With Quote
  #2  
Old 12th May 2010, 03:23 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 7,346
linuxfedorafirefox
Re: How can i run installed program from terminal

Usually, by just typing in "firefox" on the command line.

There are things to know - is the command line presented as a window?
The firefox application assumes that the X window system is running. This is not
necessarily the case if you are using a console terminal for command entry.

If you are using a terminal window, then just typing "firefox" at the command line
will work - it will open additional windows for interacting with the firefox application.

Are you, by any chance, trying to learn how Linux works?
Reply With Quote
  #3  
Old 12th May 2010, 03:29 PM
year4e Offline
Registered User
 
Join Date: Apr 2010
Location: VIZAG, ANDHRA PRADESH, INDIA
Age: 31
Posts: 169
linuxopera
Re: How can i run installed program from terminal

yes i am learning
can you say me in which directory of linux binary executable of installed program stayes?
__________________
LAPTOP HCL ME B3863 @Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20 GHz, 4GB RAM, 320 HDD,GeForce 8200M G (GPU 0),GRAPHICS BY NVIDIA
Fedora Release 14 ,Kernel Linux 2.6.35.6-48.fc14.x86_64,GNOME 2.32.0 NVIDIA DRIVER VERSION: 260.19.12
Reply With Quote
  #4  
Old 12th May 2010, 03:33 PM
10sdassarma Offline
Registered User
 
Join Date: Feb 2010
Posts: 86
linuxfirefox
Re: How can i run installed program from terminal

if you
Code:
echo $PATH
you'll get a list of paths(or directories, as you call them). If you want a specific executable's path, type
Code:
which command
at the prompt, and it will tell you.
Reply With Quote
  #5  
Old 12th May 2010, 05:08 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 7,346
linuxfedorafirefox
Re: How can i run installed program from terminal

The linux system is modelled after UNIX, though there are a lot of internal differences,
and some external differences.

All files reside within a directory tree - the tree contains data, executables and references to devices. This directory tree is based on a "root" directory which is
where all directory paths start. This "root" directory has no name - it is represented
by a "/" at the beginning of a path. Under the root directory are additional directories
Code:
/          - the root of the directory tree
/bin       - where basic executables are put
/boot      - where the system usually resides (this is different that unix)
/dev       - where device references are put
/etc       - basic system configuration files (logins, network configurations...)
/home      - usually where user login "home" directories are put
/lib          - contains general system libraries, or directories with more libraries..
/lib64      - systems using 64 bit processors keep 64 bit versions of libraries
/lost+found - used for filesystem recovery, and not generally useful for anything else
/media      - where linux tends to mount removable devices (CD, memory sticks, cameras...)
/mnt     - usually used for temporary mounts, testing things, also where disk/memory sticks may be mounted
/opt      - one of the places applications may reside
/proc     - a special directory tree containing internal system references (processes, active devices, dynamic kernel parameters...)
/root      - the home directory for the system administrator (a login named "root")
/sbin      - executables that are usually reserved for use during boot. Normally, these
            binaries do not use libraries so that they may be used in a "reduced
            functionality" mode to allow the administrator to recover/fix sever problems.
/selinux  - used in Linux for an enhance security operation
/sys      - another special directory used for internal use
/tmp       - a general read/write area that is not guaranteed to hold data across boots
/usr       - a directory used to hold libraries, executables, and configuration files for
          applications available after the system is operational.
/var      - a workspace directory used for log files, audit trails, and some applications
Each of these directories may have additional directories contained within.

The complete directory tree can be quite extensive. The directory tree is usually
divided up into "filesystems" where a filesystem contains closely related files.

A filesystem is "mounted", which means that a link is made between an existing
directory (such as /boot), and a filesystem which is outside the existing directory
tree. I choose /boot for this example because it contains all files that are necessary
to boot the linux kernel. The system is not ready for use at this time, but can be
made usable afterwards. The files within this filesystem are for the kernel, and the
initial boot of Linux. There are configuration files there and the kernel itself.

The "root" of the filesystem contains files like
Code:
onfig-2.6.30.10-105.2.16.fc11.x86_64
config-2.6.30.10-105.2.23.fc11.x86_64
config-2.6.30.10-105.2.4.fc11.x86_64
efi
grub
initrd-2.6.30.10-105.2.16.fc11.x86_64.img
initrd-2.6.30.10-105.2.23.fc11.x86_64.img
initrd-2.6.30.10-105.2.4.fc11.x86_64.img
lost+found
System.map-2.6.30.10-105.2.16.fc11.x86_64
System.map-2.6.30.10-105.2.23.fc11.x86_64
System.map-2.6.30.10-105.2.4.fc11.x86_64
vmlinuz-2.6.30.10-105.2.16.fc11.x86_64
vmlinuz-2.6.30.10-105.2.23.fc11.x86_64
vmlinuz-2.6.30.10-105.2.4.fc11.x86_64
xen-3.3.gz
xen-syms-3.3
(This is from my system - yours may have different files, but they should
have similar names)

The reason /boot is frequently a filesystem is that it allows for a relatively
small disk (or partition of a disk) to be used to initialize a system. It also
separates the most critical files from accidents.

The basic steps the system takes to become operational (and this is NOT
an exhaustive sequence, and the details can get complex) is not generally
that complicated -
1. the BIOS loads a program that understands filesystems - this problem
in Fedora is called "grub". This program understands several Linux file
systems, but not all. For this reason, booting linux requires a filesystem
that is known to the grub program.

2. Grub copies the linux kernel into memory (passing some basic kernel
options) and load a basic filesystem with it (the "initrd-" file associated
with the kernel). The linux kernel then creates a memory resident
filesystem, and unpacks/restores the data in the "initrd-..." file. This
filesystem is strictly temporary, as it allows for small applications in
the filesystem to examine the hardware, and initialize drivers. It also
mounts what is identified as the "root" filesystem for operational use.

3. Now that the root filesystem is mounted, the temporary memory
resident filesystem can be removed and the memory is reused for
general system memory. The boot process continues by running
the first general process - init. At this point, the system is roughly
equivalent to having turned on a printer. It is running (sort of), but is
not yet ready to do anything.

4. There are two processes actually active - 0 (the idle task) and 1 (init).
If the init process ever terminates, the idle task can/will halt the system.
This was the original way to shutdown a UNIX system - just kill the init
process. The reason this halts processing is that the init process has
several things to do -
a. start any additional processes necessary
b. "clean up" and release any resources taken by processes that
terminate.

One of the things the init process does is to execute scripts that mount
additional filesystems - traditionally, /home has been a separate filesystem
to reduce possible interactions between users, and the files of the system.
Some other tasks are - loading special device drivers, starting system
daemons (such as sshd, network utility daemons) and loading security
modules.
One of the last things it does will be to start an X login utility, or start
terminal initialization utilities for console login.

When you login at a console terminal, the login utility takes your given
login name, and matches your provided password against files in
/etc (specifically, /etc/passwd, /etc/shadow). These files also define
the base for your login - what command shell you will use, where your
home directory is, and what capabilities you will be given. Once this
information is set, the login program will execute your shell (I will assume
this will be bash).

When the shell starts, it will read configuration/initialization parameters
from several places - system provided ones from /etc/profile, personal
provided ones (home directory file .bash_profile) then, and only then
will a prompt be presented.

The shell will interpret command line entry by taking the command line
entry and splitting it up into "words". The first word begins with the
first nonblank, and continuing until the first following blank/tab. This
word is used as the application name.

There are several characters that can be used to control how this word
is interpreted. If the first character starts with a "/" then it is taken as
the absolute path to the application. The application name follows the
last "/" character in the word. If there is no "/" then the word is looked
up in a list of locations to find the application. If the shell can't find one
then an error message (such as "bash: xyzzy: command not found" is
printed, and you are prompted for another command.

This list of locations can be defined by the system (the /etc/profile), or
by the users .bash_profile. The shell maintains this list in an "environment"
parameter/variable. The shell maintains two lists of such parameters, one
list is used by the current process, another list (the exported list) is passed
to applications. Don't forget, the shell itself is just an application. This
variable is named "PATH", and by default it will include the basic locations
of where applications are: /bin, /usr/bin, /usr/local/bin... there can be
a lot of entries.

You will be able to find out a lot more at
http://www.doc.ic.ac.uk/~wjk/UnixIntro/

But I hope this just gets you started.
Reply With Quote
  #6  
Old 12th August 2017, 04:09 AM
southmost Offline
Registered User
 
Join Date: Aug 2017
Location: Brownsville, Texas
Posts: 3
linuxfedorafirefox
Re: How can i run installed program from terminal

When trying to run firefox from the command line I get this error message :
[root@localhost bin]# google-chrome-stable
No protocol specified

(google-chrome-stable:4085): Gtk-WARNING **: cannot open display: :0
[root@localhost bin]# ^C
[root@localhost bin]#



Anyone know how to launch firefox or any other application from the terminal. I don't want to use it in the terminal, I just want it to launch as a GUI application.
Reply With Quote
  #7  
Old 12th August 2017, 05:59 AM
ocratato Online
Registered User
 
Join Date: Oct 2010
Location: Canberra
Posts: 2,593
linuxfirefox
Re: How can i run installed program from terminal

In somewhat simplified terms what has happened is that the display system is running on behalf of the user that logged in. When you change user (even to root) you are no longer allowed access to the user's display.

You should try to avoid using GUI programs (other than simple editors) as the root user. These programs include a lot of libraries that may not be very secure.

You should never run a browser as root. The most likely vector for a virus is the browser, and giving it a direct path to all your system files is asking for trouble.
__________________
Has anyone seriously considered that it might be turtles all the way down?
That's very old fashioned thinking.
The current model is that it's holographic nested virtualities of turtles, all the way down.
Reply With Quote
  #8  
Old 12th August 2017, 03:09 PM
lsatenstein Offline
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,168
linuxfedorafirefox
Re: How can i run installed program from terminal

Adding to what Ocratato posted.

Are you using Wayland or X (gnome or gnome-xorg)?

if with gnome alone you are using Wayland. Wayland will not allow you to run firefox from the command line. gnome-xorg will allow that action. Log in as gnome.org (refer to the "gear" on the logon page after you select your logon id).

If in pure terminal mode (example ctl+alt+f4) you have no terminal going. You could execute startx to open a second graphical session and subsequently run firefox.

Second!, as root, you should not be using a browser. That action opens the door to receiving a virus, and then if unlucky, your system may pull in a virus compromising your system.

If your system is compromised, you may be sending out compromised (virus infected) emails, even if later after leaving the root account, you are running as a regular user.
.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #9  
Old 12th August 2017, 04:11 PM
hiGuys Offline
Registered User
 
Join Date: Jun 2013
Location: USA
Posts: 360
linuxfirefox
Re: How can i run installed program from terminal

Quote:
Originally Posted by southmost View Post
Anyone know how to launch firefox or any other application from the terminal. I don't want to use it in the terminal, I just want it to launch as a GUI application.</b>
Log in as your regular user, not root.
Code:
$ firefox
or
Code:
$ firefox &
which will send it to the background so in case you Ctrl-C or close the terminal window it will not kill Firefox.
__________________
Mind the gap.
Reply With Quote
Reply

Tags
firefox, installed, program, run, terminal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Alt+F2 to execute program from terminal kjartani Using Fedora 9 21st October 2009 01:19 PM
Command to end associations between program and terminal 1jackjack Using Fedora 3 29th June 2007 10:23 AM
open using default program in terminal mlissner Using Fedora 3 12th November 2006 12:47 PM
Logging in to terminal run program Chipper Using Fedora 4 12th July 2006 06:45 PM


Current GMT-time: 08:03 (Thursday, 17-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat