Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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