Starting Openbox and X

I just installed FreeBSD and then installed x11/xorg and x11-wm/openbox. I placed exec openbox-session in ~/.xinitrc. When I hit exec openbox-session, it fails de to 'an error in the display variable' when I try startx I am left staring at a blank gray screen with no means of any input.

If it matters, its 9.0-release and I installed all packages using the pkg_add -r command.
 
For the heck of it tried running this:

[cmd=]startx exec openbox-session[/cmd]

And something happend. Now I'm stearing a bit lighter gray with no input and a motionless cursor sitting there, mocking me.
 
You may want to browse the forum for a few xorg.conf and test them in /etc/X11. And/or, start X(org) with a tweaked command line [1] (And/or, place commands in a /usr/local/lib/X11/xinit/xinitrc... or a combination of them.
It sometimes takes a number of days on a machine with different hardware til I synch them all to work together.
[1] I currently run the following from a .sh to start X, but that's only part of the total configuration...
Code:
xinit /usr/local/lib/X11/xinit/xinitrc -- /usr/local/bin/Xorg -ignoreABI -retro -nolisten tcp -dpi 130 -deferglyphs 16 
# originally from when Xorg drastically updated, causing many people to resort to similar commnands
to run it like it used to ...
 
I personnally add to ~/.xinitrc
Code:
exec openbox-session
and these lines to /etc/rc.conf
Code:
hald_enable="YES"
dbus_enable="YES"
This means you have to check that both hald and dbus are installed. With this your mouse should move and you should be abble to access to the menu.
There are many usefull programms to add to enhance Openbox. I use slim, tint2, wbar, obmenu, obconf, feh.
 
formateur_fou said:
I personnally add to ~/.xinitrc
Code:
exec openbox-session
and these lines to /etc/rc.conf
Code:
hald_enable="YES"
dbus_enable="YES"
This means you have to check that both hald and dbus are installed. With this your mouse should move and you should be abble to access to the menu.
There are many usefull programms to add to enhance Openbox. I use slim, tint2, wbar, obmenu, obconf, feh.

So your saying services that I need to run the mouse may be disabled? That would make alot of sense. I'l try it when I get home. I already have obmenu, obconf and feh, and I'll likley set up tint2 once I can start openbox
 
Problem. Obmenu wouldn't launch saying that .config/openbox/menu.xml didn't exist. Thats fine, I created the files and folders and made a simple menu to launch xterm so I could launch obmenu.

Code:
<openbox_menu>
  <item label="terminal">
    <action name=xterm>
      <execute>
        xterm
      </execute>
    </action>
  <item>
</openbox_menu>

but openbox greets me with a syntax error. 'extra content' lat error line 9 (which doesn't help me, as the menu is only 9 lines long) click ok then right click and 'failed to access root menu: does not exist' if it doesn't exist, whats with the error? Whats wrong with my menu.xml?
 
Sorry for double post... The forum messed up my syntax. Each line started two spaces farther in then the line before it.
 
There is a sample menu you can paste :
Code:
% cp /usr/local/etc/xdg/openbox/menu.xml ~/.config/openbox/
And from there you can adapt it to you need. Most of the time, I edit the file myself as I found obmenu to make a few mistakes.

In fact, there are a few files you need to configure Openbox. You can paste them as the previous one :
Code:
%ls -l /usr/local/etc/xdg/openbox/
total 44
-r-xr-xr-x  1 root  wheel    473 29 mar 17:40 autostart
-r-xr-xr-x  1 root  wheel    379 29 mar 17:40 environment
-r--r--r--  1 root  wheel   9617 29 mar 17:40 menu.xml
-r--r--r--  1 root  wheel  23147 29 mar 17:40 rc.xml

You should have a look at the FreeBSD Handbook, often it answers a lot of questions you haven't asked yet. This was the case for your mouse/keyboard problem.
Have a look at the Openbox Wiki too.
I hope you'll enjoy Openbox, it requires some time, but once it is set up, it can make an efficient and beautiful desktop. (The same is true for FreeBSD)
 
Thanks, that worked great. I have run openbox before on debian, and love editing my menu.xml, but with so many thing to add off a first install i'm oig to try getting it setup with obmenu first.
 
it all works! posting from my new freebsd system. one problem. if I install a package, in this case transmission and geany, it won't open after install I pkg_add -r it, it is all installed. then $ geany and it says command not found. then, when I think the install failed and run pkg_add -r again, it says already installed. :\ some step I
m missing here?
 
works now... don't know why. is there some time delay? or maybe I had to restart x (which I did)?
 
problem. editing my menu.xml I'm met with nothing but errors. then it boots up fine, but when I right click just a small white box forms, as if theres nothing in the menu. but there is. added xterm as a keyboard shortcut to launch xterm to launch firefox to post this. if you know openbox, please give it a look :)

Code:
<?xml version="1.0" encoding="UTF-8"?>

<openbox_menu>
  
<menu id="apps-net-menu" label="Internet">
  <item label="Firefox">
    <action name="Execute">
      <command>firefox</command>
      <startupnotify>
        <enabled>yes</enabled>
        <wmclass>Firefox</wmclass>
      </startupnotify>
    </action>
  </item>
  <item label="Transmission">
    <action name="Execute">
      <command>transmission</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
 <item label="Thunderbird">
    <action name="Execute">
      <command>thunderbird</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="apps-office-menu" label="Office">
  <item label="OpenOffice Base">
    <action name="Execute">
      <command>ooffice -base</command>
    </action>
  </item>
  <item label="OpenOffice Calc">
    <action name="Execute">
      <command>ooffice -calc</command>
    </action>
  </item>
  <item label="OpenOffice Draw">
    <action name="Execute">
      <command>ooffice -draw</command>
    </action>
  </item>
  <item label="OpenOffice Impress">
    <action name="Execute">
      <command>ooffice -impress</command>
    </action>
  </item>
  <item label="OpenOffice Math">
    <action name="Execute">
      <command>ooffice -math</command>
    </action>
  </item>
  <item label="OpenOffice Writer">
    <action name="Execute">
      <command>ooffice -writer</command>
    </action>
  </item>
</menu>

<menu id="apps-graphics-menu" label="Graphics">
  <item label="Gimp">
    <action name="Execute">
      <command>gimp</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="inkscape">
    <action name="Execute">
      <command>gimp</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  
<menu id="system-menu" label="System">
  <item label="Obconf">
    <action name="Execute">
      <command>obconf</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
  <item label="Terminal">
    <action name="Execute">
      <command>xterm</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
  <item label="PCMan File Manager">
    <action name="Execute">
      <command>pcmanfm</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="root-menu" label="Openbox 3"/>
  <menu id="apps-net-menu"/>
  <menu id="apps-office-menu"/>
  <menu id="app-graphics-menu"/>
  <menu id="system-menu"/>
  <separator />
  <item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
    </action>
  </item>
</menu>

</openbox_menu>

uurrg. again the forums ruins the syntax. but you get the idea of the file
 
ah, I don't get what you mean. however, I discovered a missing </menu> in my graphics tab so I'm restarting x to see if that changes anything
 
ah will. do. added that did nothing. heres an updated post

Code:
<openbox_menu>
  
<menu id="apps-net-menu" label="Internet">
  <item label="Firefox">
    <action name="Execute">
      <command>firefox</command>
      <startupnotify>
        <enabled>yes</enabled>
        <wmclass>Firefox</wmclass>
      </startupnotify>
    </action>
  </item>
  <item label="Transmission">
    <action name="Execute">
      <command>transmission</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
 <item label="Thunderbird">
    <action name="Execute">
      <command>thunderbird</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="apps-office-menu" label="Office">
  <item label="OpenOffice Base">
    <action name="Execute">
      <command>ooffice -base</command>
    </action>
  </item>
  <item label="OpenOffice Calc">
    <action name="Execute">
      <command>ooffice -calc</command>
    </action>
  </item>
  <item label="OpenOffice Draw">
    <action name="Execute">
      <command>ooffice -draw</command>
    </action>
  </item>
  <item label="OpenOffice Impress">
    <action name="Execute">
      <command>ooffice -impress</command>
    </action>
  </item>
  <item label="OpenOffice Math">
    <action name="Execute">
      <command>ooffice -math</command>
    </action>
  </item>
  <item label="OpenOffice Writer">
    <action name="Execute">
      <command>ooffice -writer</command>
    </action>
  </item>
</menu>

<menu id="apps-graphics-menu" label="Graphics">
  <item label="Gimp">
    <action name="Execute">
      <command>gimp</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
  <item label="inkscape">
    <action name="Execute">
      <command>gimp</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>
  
<menu id="system-menu" label="System">
  <item label="Obconf">
    <action name="Execute">
      <command>obconf</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
  <item label="Terminal">
    <action name="Execute">
      <command>xterm</command>
      <startupnotify><enabled>yes</enabled></startupnotify>
    </action>
  </item>
  <item label="PCMan File Manager">
    <action name="Execute">
      <command>pcmanfm</command>
      <startupnotify>
        <enabled>yes</enabled>
      </startupnotify>
    </action>
  </item>
</menu>

<menu id="root-menu" label="Openbox 3"/>
  <menu id="apps-net-menu"/>
  <menu id="apps-office-menu"/>
  <menu id="app-graphics-menu"/>
  <menu id="system-menu"/>
  <separator />
  <item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
    </action>
  </item>
</menu>

</openbox_menu>
 
thanks all working! just one question, I used pkg_add to install multiple programs but well fetching some dependences network was lost. now it has stalled. should I close it? what to do now? whats the freebsd version or aptitude install -f?
 
Back
Top