Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Showing a new window just hangs in Linux
- By geo Date 2009-09-29 16:11
Hi guys!

I have this snippet:

require "rubygems"
require "gosu"

a = Gosu::Window.new(640,480,false)
a.show

Currently, on my Linux distribution, Backtrack 4 ( based on Ubuntu 8.10, I think ), the show line hangs my whole script. Nothing happens, the window doesn't appear. I followed the instructions written @ http://code.google.com/p/gosu/wiki/GettingStartedOnLinux .
What details should I provide you? ruby -v gives this :

ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
- By banister Date 2009-09-29 17:24
what happens when you run the example programs?
- By geo Date 2009-09-29 19:05
The same. The window still isn't showing.
- By disciplex Date 2009-09-29 19:10
Do you not get any error messages?
- By geo Date 2009-09-29 19:29
No output. Nothing.
- By jlnr (dev) Date 2009-10-01 03:25
It's perfectly normal that "show" blocks forever, but it should still open a window :(

Are you using some kind of compositing WM like Compiz? If so, can you try it without that one? That's the only troubleshooting option that regularly worked for me…
- By erisdiscord Date 2009-10-01 18:37
We should probably find out whether it's doing its magic but not showing a window, or it's hanging in the window creation bit. Try running this and let us know what it prints, if anything:


require 'gosu'

class LookABug < Gosu::Window
  def show
    @last = 0;
    super
  end
 
  def update
    t = Gosu::milliseconds
    if @last < t - 1000
      puts "update"
      @last = t
    end
  end
end

puts "before main loop"
LookABug.new(100, 100, false).show


It should only print once per second so's not to flood you with update update update. I doubt this will be a useful diagnostic, but it's worth a shot.
- By geo Date 2009-10-03 15:05
Hey!

Sorry for the delay!

I ran the code you provided ( for a few seconds ) , and it generated this :

before main loop
update
update
update
update
update
update
update

Still, nothing shows on the screen.
- By erisdiscord Date 2009-10-03 16:01
Ah, so it's not actually hanging then. Like Julian said, are you running a compositing window manager, and have you tried turning off compositing?

Does other software that uses OpenGL work?
- By geo Date 2009-10-04 06:57
I searched on my computer for a compositing window manager, but I couldn't find one. I think I'm not running one. I searched for compiz, but I didn't find it. Could there be others? As for OpenGL, Blender seems to run fine.
- By AmIMeYet Date 2009-10-04 11:06
Is your desktop GNOME or KDE?
I think Backtrack 4 comes with KDE by default.

On Ubuntu, for me, gosu runs fine on GNOME with compiz.. so it may just be KDE..
Anyone else tried KDE with gosu before?
- By geo Date 2009-10-04 11:19
Yeah, KDE's the default.
- By geo Date 2009-10-10 14:58
Has anyone tried to run Gosu under KDE?
Up Topic Gosu / Gosu Exchange / Showing a new window just hangs in Linux

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill