Author Topic: X11 problems with FEAP 8.2 installation on Ubuntu 12.04  (Read 25215 times)

rrpedersen

  • New Member
  • *
  • Posts: 1
X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« on: November 01, 2012, 03:55:42 AM »
I would like to install FEAP 8.2 on a linux machine (ubuntu 12.04)


I am able to compile and the program seems to run properly.
However, I am not able to visualize the results. I get the error message:


X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  45 (X_OpenFont)
  Serial number of failed request:  87388
  Current serial number in output stream:  87389




Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #1 on: November 01, 2012, 09:11:41 AM »
This occurs when your X installation is missing some fonts.

In unix/x11u.c you will see that we load fonts *helvetica-...* .

Code: [Select]
if ( Min ( dw->x_len , 1.27*dw->y_len ) < 440 )
     nfont        = XLoadFont(disp,"*helvetica-medium-r-normal--8*");
  else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 600. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--10*");
  else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 760. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--12*");
  else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 920. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--14*");
  else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 1080. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--18*");
  else
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--20*");

You have two options: 

(1) install these fonts on your system; should be easy.

(2) change the fonts requested in unix/x11u.c.  To see what you already have loaded, type 'xlsfonts' at the command prompt.  From this list pick a fixed width font that has the appropriate font sizes.

Juan

  • Jr. Member
  • **
  • Posts: 20
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #2 on: March 14, 2013, 07:08:36 AM »
Hello all,

I am starting using FEAP and I am going through the examples provided (e.g.IEX1). The
file seems to compile and run fine (it even creates the OEX1 file) but it is not able to
plot the results in FEAP directly. I am getting the same error as the following:
 
"
 X Error of failed request:  BadName (named color or font does not exist)
   Major opcode of failed request:  45 (X_OpenFont)
   Serial number of failed request:  288
   Current serial number in output stream:  289
 "
 
I thought it was related to not having the font "Helvetica" installed in my Linux but
after installing it the error continues. I tried changing the name "Helvetica" inside
the "UNIX/X11u.c" file but nothing has worked so far.
 
Could anyone please provide any guidance on this error?
 
I am using a 64bit machine with a Linux installed in the VirtualMachine of my Windows
laptop.
 
Thank you very much indeed,

Juan G.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #3 on: March 14, 2013, 08:34:30 AM »
Things to try: (1) make sure the font you have listed shows in xlsfonts.
(2) make sure that you rebuild your archive and executable after making any changes.
(3) Try running in the debugger so you can trap which line is causing the error, perhaps it is a color and not a font issue.

Juan

  • Jr. Member
  • **
  • Posts: 20
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #4 on: March 18, 2013, 03:43:50 PM »
Thank you for replying. I have tried using one of the fonts listed in the "xlsfonts" corresponding to the same size (or closer) as required in the "X11u.c"

I did build the fonts archive in my linux (fc-cache -fv) as well as the FEAP archive and executable.

I am not sure about how to address your suggestion (3). How could I change the color config.?

Thanks,

Juan

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #5 on: March 20, 2013, 10:30:04 PM »
The reason for my comment was that the text you posted suggest colors a being a possible issue.

First use gdb to see exactly which command is causing the problem.  That will help debug the problem faster.

Stephenpotato

  • New Member
  • *
  • Posts: 6
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #6 on: August 17, 2016, 09:45:58 AM »
The error "X Error of failed request:  BadName (named color or font does not exist)" occurs mostly when the X window lack the helvetica in proper version, and it will be easily solved by installing packages xfonts-100dpi and xfonts-75dpi.


femiller

  • New Member
  • *
  • Posts: 1
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #7 on: October 07, 2020, 11:28:39 PM »
Hello all,

I am starting using FEAP and I am going through the examples provided (e.g.IEX1). The
file seems to compile and run fine (it even creates the OEX1 file) but it is not able to
plot the results in FEAP directly. I am getting the same error as the following:
 
"
 X Error of failed request:  BadName (named color or font does not exist)
   Major opcode of failed request:  45 (X_OpenFont)
   Serial number of failed request:  288
   Current serial number in output stream:  289
 "
 
I thought it was related to not having the font "Helvetica" installed in my Linux but
after installing it the error continues. I tried changing the name "Helvetica" inside
the "UNIX/X11u.c" file but nothing has worked so far.
 
Could anyone please provide any guidance on this error?
 
I am using a 64bit machine with a Linux installed in the VirtualMachine of my Windows laptop.
 
Thank you very much indeed,

Juan G.

Same issue here, Any help?
« Last Edit: August 19, 2023, 10:35:11 PM by femiller »

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #8 on: October 08, 2020, 12:01:55 AM »
maybe you are just missing the font packages. have you installed libx11-dev, xfonts-100dpi and xfonts-75dpi?

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #9 on: October 08, 2020, 12:36:09 AM »
If you are using the WSL system then the problem is that you actually have to install the fonts for the Xserver.  Assuming you installed Xming as your X11 server then you also need to install the Xming fonts.

Go to https://sourceforge.net/projects/xming/files/Xming-fonts/7.7.0.10/ and download and install Xming-fonts-7-7-0-10-setup.exe.
Then restart your computer, start Xming, start Ubuntu and try to run FEAP.  It should now work.  I just went through the same process earlier tonight on a new Windows 10 machine.

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #10 on: October 08, 2020, 12:47:02 AM »
Is FEAP and ParFEAP working in WSL?

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #11 on: October 08, 2020, 12:57:07 AM »
Yes, FEAP works with WSL.

I have never tried parFEAP in WSL. It is a good question.  Looking around on message boards it seems like Petsc should install in WSL and thus I would expect parFEAP to work out of the box.  I'm not sure what the performance hit will be using the VM but it is work a try.

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: X11 problems with FEAP 8.2 installation on Ubuntu 12.04
« Reply #12 on: October 08, 2020, 01:22:48 AM »
Maybe there is hope for Windows users to get a performance boost in comparison to serial FEAP... :P