# How to install a browser



## commanderwill (Sep 24, 2010)

I'm new to BSD and am trying to install a browser, I've installed the firefox package but I'm not sure how to run it. I've also installed the Opera browser, but when I type opera into the command it says,

opera: cannot connect to X server
opera: Fatal error on creating Qt application object


----------



## jb_fvwm2 (Sep 24, 2010)

One configures/installs xorg 
(xorg, xorg-lite, xorg-minimal or something)
then configures it (may take a while)
(screen resolution, mouse, video card, etc)
then installs and configures a window manager, though
I think twm maybe is default with Xorg.
then if /xterm/ or /roxterm/ or /aterm/ or another
is installed, one can type
"opera" etc into the terminal with the X-server
background, and the browser should start, and connect
if your network is up.

I might have missed a few steps.


----------



## commanderwill (Sep 24, 2010)

hmm, I tried working the xorg thing, but all i get is a black screen and the computer becomes unresponsive, is there any way to run a browser without xorg?


----------



## Hinata (Sep 24, 2010)

Xorg is the base to have a graphical browser like firefox and/or opera
to install xorg read this:
http://www.freebsd.org/doc/handbook/x-install.html
to configure it this can be usefull:
http://www.freebsd.org/doc/handbook/x-config.html

don't forget to start hald and dbus so your x can respond to your keyboard and your mouse ^ ^


----------



## commanderwill (Sep 24, 2010)

looks like i'm gonna have to try to fix xorg first. My problem is when I run startx the screen goes black and I no longer have use of my keyboard or mouse, I have to turn it off manually, I'm using a usb keyboard and mouse so I don't know if hald and dbus will work.


----------



## Hinata (Sep 24, 2010)

add this to /etc/rc.conf

```
hald_enable="YES"
dbus_enable="YES"
```


----------



## commanderwill (Sep 24, 2010)

I did, with the same results. Black screen no response from the keyboard.


----------



## wblock@ (Sep 24, 2010)

commanderwill said:
			
		

> I did, with the same results. Black screen no response from the keyboard.



Please read the Handbook section on X11 Configuration shown by Hinata.  It will save you time.

Those services only get started after a reboot.  You can start them manually:
`# service dbus start`
`# service hald start`


----------



## Hinata (Sep 24, 2010)

Your probably want to make sure you installed video drivers for your video card too


----------



## commanderwill (Sep 24, 2010)

I've read the manuals thoroughly, it must be the drivers I'll see if I can find them. It has an Intel 855gm card. Thanks for the help so far.


----------



## Hinata (Sep 24, 2010)

the port you probably want is x11-drivers/xf86-video-intel


----------



## commanderwill (Sep 24, 2010)

Thanks, looks like a lot of people who have the intel 855GM have the same problem, they said they used VESA to get it to somewhat work, I'm not quite sure how to get that to work, do you know?


----------



## kpa (Sep 24, 2010)

x11-drivers/xf86-video-intel is a dependency of x11/xorg so it's probably already installed. The black screen when starting X can be perfectly normal as described in the handbook:



> The next step is to test the existing configuration to verify that Xorg can work with the graphics hardware on the target system. In Xorg versions up to 7.3, type:
> 
> 
> ```
> ...


----------



## commanderwill (Sep 24, 2010)

Well I edited the xorg.conf.new file and set it to use the vesa driver instead and now xorg works!


----------



## commanderwill (Sep 24, 2010)

Ok now that I have xorg working, how do I start a window manager? 
I've tried TWM and it said unable to open dispaly


----------



## jb_fvwm2 (Sep 24, 2010)

```
xinit /usr/local/lib/xinit/xinitrc -- /usr/local/bin/Xorg -ignoreABI -retro -nolisten tcp -dpi 110
```
You want at least 
...
xterm &
exec twm 
...
in that xinitrc file.  (if xterm is installed)
Some of that long command is unnecc.
I might have left out something...


----------



## Beastie (Sep 24, 2010)

All X applications need an XServer running to run atop of. When an application says it cannot open the display, it means no XServer is already running.

All you need is a valid ~/.xinitrc file, so create one and type:

```
xterm &
twm
```

After that,
`% xinit`
will suffice.


----------



## wblock@ (Sep 24, 2010)

jb_fvwm2 said:
			
		

> ```
> xinit /usr/local/lib/xinit/xinitrc -- /usr/local/bin/Xorg -ignoreABI -retro -nolisten tcp -dpi 110
> ```



Both --ignoreABI and -dpi 110 should only be used if necessary.  It's easier to just edit ~/.xinitrc and run startx(1).


----------

