LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-21-2008, 03:39 PM   #1
nonis
Member
 
Registered: Jan 2007
Posts: 95

Rep: Reputation: 15
Running openbox on slack 12.1


Has anyone compiled and ran openbox one 12.1?

I just installed 12.1, with xfce and fluxbox, and wanted to go to my old favorite, openbox. I downloaded openbox 3.4.7.2, untared, configured, made, and make installed. Running openbox gives me the error

openbox: error while loading shared libraries: libobrender.so.21: cannot open shared object file: No such file or directory

Any help? I'm on a fresh, clean installation, so I haven't changed anything yet about the slackware installation. I remember running openbox on 12.0 last year, but I have been away from my dear linux for a while.

Thanks!
 
Old 05-21-2008, 03:46 PM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
One of the two main points there is impossible.
Either 1) you didn't compile openbox on your system, or 2) it's not a fresh clean installation.
 
Old 05-21-2008, 03:50 PM   #3
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Hahaha. Can't trick you, rworkman. You're right. It's fresh EXCEPT for my compilation and installation of openbox. That must be my problem right there! =P
 
Old 05-21-2008, 05:02 PM   #4
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Rep: Reputation: 190Reputation: 190
There is an openbox slackbuild at SlackBuilds.org BTW. Obconf is there as well. I can confirm both work as expected on 12.1.
 
Old 05-21-2008, 05:07 PM   #5
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
I may end up resorting to that, but I would rather fix this problem. It feels like my system is in some way broken if I can not compile openbox and use it myself. Nothing against packages, and I probably would have gotten the package had I thought of it first, but now that I know there is a problem I have a need to fix it rather than work around it. And if a new version comes out with features that I would like, I would like to be able to compile that myself.

Any ideas?
 
Old 05-21-2008, 05:13 PM   #6
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Rep: Reputation: 190Reputation: 190
Well, there is no openbox package at SlackBuilds.org, of course. SlackBuilds.org contains slackbuild scripts that you use to compile your own package for your own system that you can easily upgrade later on with upgradepkg. It's just like compiling only better. :-) It's the same way PV makes official Slackware packages. And since I'm the maintainer of the openbox and obconf SlackBuilds at SlackBuilds.org, they are updated with each new upstream release. Check out the HOWTO and the FAQ at SlackBuilds.org. I know this still doesn't answer your question, but I just wanted to touch on that.

Did you do a _full_ Slackware fresh install before compiling Openbox?
 
Old 05-21-2008, 05:36 PM   #7
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Oh, okay. I thought slackbuilds was a slackware package site. Did you have to do anything special to get openbox to build when creating your slackbuild?

I went through all the menus, but the only things that I excluded were a few kde applications like koffice and such, games, and the other windowmanagers besides xfce and fluxbox.
 
Old 05-21-2008, 05:50 PM   #8
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
If I build using the slackbuild I get this error when running openbox:

Openbox-Message: Failed to open the display from the DISPLAY environment variable.
 
Old 05-21-2008, 05:59 PM   #9
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by nonis
Oh, okay. I thought slackbuilds was a slackware package site. Did you have to do anything special to get openbox to build when creating your slackbuild?

I went through all the menus, but the only things that I excluded were a few kde applications like koffice and such, games, and the other windowmanagers besides xfce and fluxbox.
To see what was done, check out the SlackBuilds at slackbuilds.org -- they're just text files.
openbox: http://slackbuilds.org/slackbuilds/1...box.SlackBuild
obconf: http://slackbuilds.org/slackbuilds/1...onf.SlackBuild

To actually build the package using the SlackBuilds, you'll need the other files included with the SlackBuild -- they're all in the .tar.gz package linked to at the page for each SlackBuild (search slackbuilds.org for openbox and obconf).

Quote:
Originally Posted by nonis
I went through all the menus, but the only things that I excluded were a few kde applications like koffice and such, games, and the other windowmanagers besides xfce and fluxbox.
In the future, please include this information with your initial post -- without it, we have to assume you performed a full installation. It is entirely possible that the reason for future troubles is a missing dependency that is included in a full installation, and without disclosing that information no one would know to suggest that. It may not be the problem here, but just a note for the future.
Quote:
Originally Posted by nonis
Openbox-Message: Failed to open the display from the DISPLAY environment variable.
How are you launching openbox? I'm not sure if `xwmconfig` will find openbox or not to allow you to select it as the default window manager, but it's worth a shot. Otherwise, you should have a ~/.xinitrc file that launches openbox. There is an xinitrc.openbox file included with the SlackBuild that you should be able to move to your home directory and rename .xinitrc. Then try launching it with a simple `startx`.

If that IS what you are doing, make sure no other X sessions are running. Are you using runlevel 3 or 4? You can *try* launching it with `startx -- :0` but I can almost guarantee that won't work.
 
Old 05-21-2008, 06:16 PM   #10
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Alright...

If I build with the slackbuild and use the xinitrc included, it now runs. Thank you.

If I build from source myself and use the same xinitrc, it has the error I posted in the first post of this thread. So my original problem is not solved, but I do have a working openbox.

I don't think that the lack of a couple of optional kde packages broke some sort of openbox dependency, though.

Last edited by nonis; 05-21-2008 at 06:26 PM.
 
Old 05-21-2008, 07:36 PM   #11
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by nonis
If I build with the slackbuild and use the xinitrc included, it now runs. Thank you.

If I build from source myself and use the same xinitrc, it has the error I posted in the first post of this thread. So my original problem is not solved, but I do have a working openbox.
If it builds and works with the SlackBuild but not manually, then you're doing something wrong when you build it manually. The SlackBuild is simply a script -- you could perform every step manually if you want to accomplish the same result (and the app will build properly). It could be an option in ./configure that is not supported in a default Slackware setup or something like that. I'll break the SlackBuild down for you.
Code:
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
The above just makes sure that the correct permissions (root with 644 and 755) exist on all the files. If they're incorrect, and you install the package, it can really screw up your system (only certain users can access certain root directories like /etc or /usr). This is just preventing that from happening.
Code:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --enable-startup-notification \
  --build=$ARCH-slackware-linux \
  --host=$ARCH-slackware-linux
This is probably the key step that is preventing a proper build. The CFLAGS and CXXFLAGS variables optimize the build for your CPU architecture. For i486 (the default) CPUs, this means that both CFLAGS and CXXFLAGS are set to "-O2 -march=i486 -mtune=i686". The ./configure part is the most important. It determines where the compiled binaries are put, the location of any configuration directories, etc. Running `./configure --help` in the source directory should list all of the possible options. If you use the above options, it should work fine -- if you change the options, it *may* work depending on which options you choose and what you set them to.
Code:
make
make install DESTDIR=$PKG
This actually compiles the app and installs the binaries to the location specified by the $PKG variable. If you don't want to create a package and just want to install the files (I would discourage this, as it makes it more difficult to upgrade/uninstall the app should you ever wish to do so) you could remove the DESTDIR=$PKG option and it would just install the binaries to your system in the locations specified by the ./configure command.
Code:
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
This just strips the binaries, making them smaller. It shouldn't be necessary, but is almost always done (there is no need wasting space). It only VERY rarely has any negative impact on the binaries. Of course, this step cannot be easily done if you aren't using the DESTDIR variable, since the binaries will already be installed into your live system -- and therefore this command would either have no effect or try to strip every binary on your system (both of which are bad) depending on which directory you start the find commands in.
Code:
( cd $PKG/usr/man
  find . -type f -exec gzip -9 {} \;
  for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
This just gzips any `man` pages installed by the app. Again, this step is not as easily done if you didn't specify the DESTDIR option.
Code:
install -D -m 0755 $CWD/xinitrc.openbox $PKG/etc/X11/xinit/xinitrc.openbox
This command just copies the xinitrc.openbox file to the correct location in the package and sets the proper permissions. If you are installing the app WITHOUT the DESTDIR variable, you'd have to manually copy the xinitrc.openbox file to /etc/X11/xinit/xinitrc.openbox. Note that this xinitrc files is NOT included with openbox. A ~/.xinitrc file containing exactly the contents of this file should work.
Code:
# Optionally install xinitrc scripts for running Openbox in KDE or GNOME
# Move the scripts from /usr/bin if the xinitrc scripts are not installed.
if [ "$KXINIT" == "YES" ]; then
	install -D -m 0755 $CWD/xinitrc.kde-openbox $PKG/etc/X11/xinit/xinitrc.kde-openbox
else
	cat $PKG/usr/bin/openbox-kde-session > $PKG/usr/share/doc/$PRGNAM/openbox-kde-session
	rm -vf $PKG/usr/bin/openbox-kde-session
fi
if [ "$GXINIT" == "YES" ]; then
	install -D -m 0755 $CWD/xinitrc.gnome-openbox $PKG/etc/X11/xinit/xinitrc.gnome-openbox
else
	cat $PKG/usr/bin/openbox-gnome-session > $PKG/usr/share/doc/$PRGNAM/openbox-gnome-session
	rm -vf $PKG/usr/bin/openbox-gnome-session
fi
Just read the comments for that one -- it isn't required if you're using openbox as a standalone window manager. The rest of the SlackBuild is just package-specific (ie not required for a functional build), so I won't go through it.

If you perform the necessary steps outlined above (note that binary-stripping and compressing the man pages are probably not *required*, but are good form), you should create a functional openbox build. If you didn't specify a DESTDIR variable, it will be difficult to upgrade/remove openbox, but it should still work. I would still encourage creating packages.

For more information about writing SlackBuilds (my favourite compilation method, but even if you don't write SlackBuilds and want to type the commands manually without creating a package it'll still help to read the following) see here: http://slackwiki.org/Writing_A_SlackBuild_Script

The bottom line is that if you could create a working openbox package using the SlackBuild, your system isn't broken. There is no "magic" in this SlackBuild (some SlackBuilds for other apps need to have strange configuration options or odd commands to get stuff to work), so I can't see why a manual build wouldn't work properly if done right.

Last edited by T3slider; 05-21-2008 at 07:40 PM.
 
Old 05-22-2008, 02:57 AM   #12
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
I was not supplying any options to ./configure. Why is it necessary to change those directories? Why are the defaults not the correct ones for slackware 12.1?
 
Old 05-22-2008, 12:39 PM   #13
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by nonis View Post
I was not supplying any options to ./configure. Why is it necessary to change those directories? Why are the defaults not the correct ones for slackware 12.1?
Most software uses a default prefix of /usr/local. In general it is best to specify these environment variables because some devs use different default directories.

Sometimes it doesn't matter so much, but sometimes other programs/libraries are expected to be in a certain place, so it can matter a lot. It's best to be consistent.
 
Old 05-22-2008, 03:29 PM   #14
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
So in slackware is it best to always define the prefix as /usr?
 
Old 05-22-2008, 05:03 PM   #15
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by nonis
So in slackware is it best to always define the prefix as /usr?
That depends. The "official" Slackware apps are always installed in /usr, and so slackbuilds.org and most other repositories tend to install things in /usr as well. Some people like to keep all of their self-installed apps separate and choose to install things to /usr/local or /opt or something similar -- it depends on what you want to do. Installing to /usr/local should generally be fine anyway, but note that the ./configure options also included sysconfdir (/etc, the directory with system configurations) and localstatedir (/var), which may have made a difference.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slack up and running, but......... BobNutfield Slackware 7 03-10-2006 08:10 PM
Frozen-Bubble(from slack 8.2) Not Running in slack 9 bongski55 Slackware 8 01-02-2006 04:10 PM
Got Slack up and running -- now for configuring I need help vharishankar Slackware 51 02-18-2005 10:31 AM
Getting slack up and running - a few troubles. theMonkeY Slackware 6 09-04-2004 01:09 PM
Running Oroborus on Slack xgreen Slackware 4 07-03-2004 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration