Centos 安装 codeblocks 及ssh tunneling 显示

来源:互联网 发布:淘宝客店铺商品采集 编辑:程序博客网 时间:2024/06/05 10:49

-1、vi /etc/ld.so.conf

include ld.so.conf.d/*.conf
.
/lib/
/usr/lib/
/usr/local/lib/

加入上面4个目录,每次源码安装后 执行ldconfig,保证动态库可以被其他程序搜索到,不懂的自行百度ld.so.conf

0、可以先去Codeblocks源码目录下./configure ,错误提示会告诉你系统缺少哪些东西,like this

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++提示你wxWidgets版本不够新

checking for wxWidgets version >= 2.8.8... no (version 2.8.1 is not new enough)
configure: error: 
                wxWidgets must be installed on your system.


                Please check that wx-config is in path, the directory
                where wxWidgets libraries are installed (returned by
                'wx-config --libs' or 'wx-config --static --libs' command)
                is in LD_LIBRARY_PATH or equivalent variable and
                wxWindows version is 2.8.0 or above.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1、yum安装GCC

2、yum安装GTK+,GTK+类似于win32的图形api,主要用于codeblocks窗口绘制

3、源码安装wxGTK-2.8.12,开源图形库,功能与2相同。CB12.11要求wxGTK版本必须在2.8.8及以上

4、源码安装codeblocks12.11

5、yum安装gdb,否则CB无法调试,并且需要在settings->Debugger->GDB/CDB debugger->Executable path设定gdb目录,gdb一般在/usr/bin/gdb

6、写hellobitch测试程序


7、在win7 通过ssh直接获得图形界面时(我用的xmanager里的xshell),ssh连接里敲codeblocks提示Error: Unable to initialize gtk, is DISPLAY set properly?

8、在Centos 先 export $DISPLAY=:0.0 Set wxUSE_GUI=0,然后还不行的话,重新ssh登陆的时候会告诉你X11转发被爆j菊,like this:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

WARNING! The remote SSH server rejected X11 forwarding request

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

9、在Centos 果敢的你 grep X11Forwarding /etc/ssh/sshd_config,发现bitch setting like this:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#X11Forwarding no
X11Forwarding no
# X11Forwarding no

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

man fuck these “no”  “no” “no”,so you change the second line bitch “no”  to “yes”

10、在Centos service sshd restart

11、在win7 xshell设置ssh tunneling (隧道)为 X11 forwarding中的xmanager,也就是xmanager自动帮你转发显示图形界面

12、在win7 xshell 敲codeblocks,开始加载IDE,同时提示Xlib:  extension "RANDR" missing on display "localhost:10.0".但是不影响,

图形界面加载过程慢成翔,可能因为sever在canada的缘故

13、关机一觉醒来,重新敲codeblocks,或者gedit,都提示Xlib:  extension "RANDR" missing on display "localhost:10.0".但是gedit能显示

而codeblocks不再显示,man fuck this bitch,不搞了,用vnc






0 0
原创粉丝点击