2021-02-25

dmdba用户设置了DISPLAY环境变量但还是无法调用图形化界面

[root@localhost ~]# xhost +
access control disabled, clients can connect from any host
[root@localhost ~]# echo KaTeX parse error: Expected 'EOF', got '#' at position 30: …ot@localhost ~]#̲ su - dmdba 上一… cat .bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

PATH= P A T H : PATH: PATH:HOME/.local/bin:$HOME/bin:/dm8/bin:/dm8/tool
export DISPLAY=:0
export PATH

export LD_LIBRARY_PATH=" L D L I B R A R Y P A T H : / d m 8 / b i n " e x p o r t D M H O M E = " / d m 8 " [ d m d b a @ l o c a l h o s t   ] LD_LIBRARY_PATH:/dm8/bin" export DM_HOME="/dm8" [dmdba@localhost ~] LDLIBRARYPATH:/dm8/bin"exportDMHOME="/dm8"[dmdba@localhost ]
[dmdba@localhost ~]# echo $DISPLAY
:0
这样看来,的确应该是没有问题了,但是在实际调用时却报“吐核”的错,无法打开图形化界面。

[root@localhost ~]# su - dmdba
上一次登录:日 2月 21 21:18:19 CST 2021pts/0 上
[dmdba@localhost ~]$ manager
No protocol specified

(Manager:18811): GLib-GObject-WARNING **: 09:28:03.212: invalid (NULL) pointer instance

(Manager:18811): GLib-GObject-CRITICAL **: 09:28:03.212: g_signal_connect_data: assertion ‘G_TYPE_CHECK_INSTANCE (instance)’ failed

(Manager:18811): Gtk-CRITICAL **: 09:28:03.212: IA__gtk_settings_get_for_screen: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gtk-WARNING **: 09:28:03.263: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window

(Manager:18811): Gtk-WARNING **: 09:28:03.263: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_display: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_display_get_pointer: assertion ‘GDK_IS_DISPLAY (display)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_monitor_at_point: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gtk-WARNING **: 09:28:03.263: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_n_monitors: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gtk-WARNING **: 09:28:03.263: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_monitor_geometry: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_default_colormap: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_colormap_get_visual: assertion ‘GDK_IS_COLORMAP (colormap)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_default_colormap: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_root_window: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_screen_get_root_window: assertion ‘GDK_IS_SCREEN (screen)’ failed

(Manager:18811): Gdk-CRITICAL **: 09:28:03.263: IA__gdk_window_new: assertion ‘GDK_IS_WINDOW (parent)’ failed

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007fdad82da2c7, pid=18811, tid=140578067654400

JRE version: 6.0_26-b03

Java VM: Java HotSpot™ 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)

Problematic frame:

C [libgdk-x11-2.0.so.0+0x7b2c7] __float128+0x7

An error report file with more information is saved as:

/home/dmdba/hs_err_pid18811.log

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

/dm8/tool/manager: 行 17: 18811 已放弃 (吐核)“ J A V A H O M E / b i n / j a v a " − X X : + P e r f D i s a b l e S h a r e d M e m − D D M H O M E = " JAVA_HOME/bin/java" -XX:+PerfDisableSharedMem -DDM_HOME=" JAVAHOME/bin/java"XX:+PerfDisableSharedMemDDMHOME="DM_HOME” -Djava.library.path=“ D M H O M E / b i n " − D d a m e n g . l o g . f i l e = " DM_HOME/bin" -Ddameng.log.file=" DMHOME/bin"Ddameng.log.file="TOOL_HOME/log4j.xml” -DeclipseHome=“ T O O L H O M E " − D o s g i . n l = " TOOL_HOME" -Dosgi.nl=" TOOLHOME"Dosgi.nl="INSTALL_LANGUAGE” -Ddameng.dts.explorer.root=“ T O O L H O M E / w o r k s p a c e / l o c a l / d t s " − D d a m e n g . i s q l . e x p l o r e r . r o o t = " TOOL_HOME/workspace/local/dts" -Ddameng.isql.explorer.root=" TOOLHOME/workspace/local/dts"Ddameng.isql.explorer.root="TOOL_HOME/workspace/local/isql” -Duse_bak2=true -Dapp.name=manager -XX:MaxPermSize=256m -jar “ T O O L H O M E / p l u g i n s / o r g . e c l i p s e . e q u i n o x . l a u n c h e r 1 . 1.1. R 36 x v 2010112 2 1 400. j a r " − o s l i n u x − w s g t k − a r c h x 8 6 6 4 − s h o w s p l a s h " TOOL_HOME/plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar" -os linux -ws gtk -arch x86_64 -showsplash " TOOLHOME/plugins/org.eclipse.equinox.launcher1.1.1.R36xv201011221400.jar"oslinuxwsgtkarchx8664showsplash"TOOL_HOME/manager.bmp” -data " T O O L H O M E / w o r k s p a c e / m a n a g e r " − p r o d u c t c o m . d a m e n g . m a n a g e r . p r o d u c t − n a m e M a n a g e r [ d m d b a @ l o c a l h o s t   ] TOOL_HOME/workspace/manager" -product com.dameng.manager.product -name Manager [dmdba@localhost ~] TOOLHOME/workspace/manager"productcom.dameng.manager.productnameManager[dmdba@localhost ] echo D I S P L A Y : 0 [ d m d b a @ l o c a l h o s t   ] DISPLAY :0 [dmdba@localhost ~] DISPLAY:0[dmdba@localhost ] xhost +
No protocol specified
xhost: unable to open display “:0”
可以看到,经过环境变量已经生效但是依旧报错。这个时候我们在dmdba用户中执行了xhost +却报错No protocol specified、xhost: unable to open display “:0”。

这个时候我们先在root用户中执行xhost +,然后再切回到dmdba中执行xhost +。

[root@localhost ~]# xhost +
access control disabled, clients can connect from any host
[root@localhost ~]# su - dmdba
上一次登录:一 2月 22 09:36:48 CST 2021pts/2 上
[dmdba@localhost ~]$ xhost +
access control disabled, clients can connect from any host
[dmdba@localhost ~]$
[dmdba@localhost ~]$ manager

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值