• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Running JForum on a headless linux box (no X)

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Crunge,

thanks for your contribution. There is another post related to this subject. You can check at https://coderanch.com/t/574500

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This isn't really a bug in JForum so much as a potential bug in one's system setup. I wanted to run JForum on a linux box that has no X windows system on it. Unfortunately, JForum uses some X libraries to tinker with images. When trying to access a JForum page, I got an error similar to the following:



I dug around and managed to solve the problem on my own without having to install X on the machine. The general technique is found here:

http://javatechniques.com/public/java/docs/hosting/headless-java-x11-libraries.html

In addition to the libs listed above, I needed the libXau.so* libs. Once these files where copied to /usr/X11R6/lib/ dir on my server, I had to add the line:

in the /etc/lib.so.conf file of the server. That complete, I had to run as root.

The final step was to edit the configuration of how tomcat (my containter of choice) was started. On gentoo, I had to put the line:

in my /etc/conf.d/tomcat file. Other gentoo users might want to run as root. The important thing, regardless of your linux distro, is that the -Djava.awt.headless=true option makes it to the command that launches java (launching tomcat). You may have to edit your catalina.sh if your distro doesn't provide a simple way to pass options to tomcat.

Last but not least, I had to restart tomcat: and everything was peachy. Hope this helps others. BTW: this install is using postgres as the back end. The newest sql setup scripts worked like a charm.

Crunge
[originally posted on jforum.net by Anonymous]
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic