I have a Qt application, I have added it to ~/.config/openbox/autostart.sh like this:

(sleep 5 && /home/user/UI/UI) &

When I start Openbox from terminal, the Qt application opens as a unusable gray box. If I launch xterm on Openbox and then manually start the Qt application, it works fine. What am I doing wrong?

  • 1
    Is this a java app? – Caleb Jun 16 '11 at 20:21
  • No it's not. It's just a simple Qt app with dependencies to Qt libraries only. – user44556 Jun 17 '11 at 1:30
  • Qt is a graphical toolkit that you use to create windows and widgets and stuff, but not a programming language. Any idea what language the program is written in? – Caleb Jun 17 '11 at 7:38
  • C++, compiled on the same system. Even with Hello World this problem occurs. – user44556 Jun 20 '11 at 2:59

In such a situation, it can be helpful to trace program execution. Two tools that can be used for this are strace and gdb:

  1. Use strace to log system calls, using -o file to write the log to a file. This will show you when the program hangs while executing a system call
  2. Use gdb to attach to the running process (via -p pid), and check the stack trace of all threads

This might give an idea of why the process hangs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.