xinit 混乱应用程序不工作
我构建了一个简单的杂乱测试应用程序:一个带有两个 ClutterText 演员的舞台,用于显示两个单词。当我从 gnome 中运行它时它工作正常,但使用 xinit my_app_binary 从 tty(不是 gnome-terminal 或 xterm)运行它时,我收到错误:
failed to create drawable
Unable to initialize Clutter: Unable to select the newly created GLX context
Window manager error: Unable to initialize Clutter
如果我运行 xinit gnome-terminal< /code> 来自同一个 tty 一切正常,gnome-terminal 显示在黑屏中。我想对我的应用程序执行同样的操作。 我能做些什么来克服这个错误吗?
以上所有内容均在 Linux Mint 12 中进行了测试。正常启动后,我切换到 tty (ALT-F1) 并停止 lightdm (sudo /etc/init.d/lightdm stop)。
谢谢!
编辑:以 root 身份运行一切正常,所以问题是:如何以普通用户身份运行它?
I've built a simple test app with clutter: A stage with two ClutterText actors to display two words. It works OK when I run it from within gnome but running it from the tty (not gnome-terminal or xterm) with xinit my_app_binary
I get an error:
failed to create drawable
Unable to initialize Clutter: Unable to select the newly created GLX context
Window manager error: Unable to initialize Clutter
If I run xinit gnome-terminal
from the same tty everything works, gnome-terminal shows up in a black screen. That's the same I want to do with my app.
Is there anything I can do to overcome this error?
All the above are tested in Linux Mint 12. After normal boot I switch to a tty (ALT-F1) and stop lightdm (sudo /etc/init.d/lightdm stop).
Thanks!
EDIT: running as root everything works, so the question is: how to run it as a regular user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保设置 DISPLAY-var - 将其添加到命令前面
有时这是一个访问权限问题 - 应用程序应该由启动 X-server 的用户启动
Be sure to set the DISPLAY-var - add it in front of your command
Sometimes this is an access-rights problem - the app should be started with the user who started the X-server