ubuntu 18.04桌面版如何安装和运行x-windows

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
yihanli
帖子: 19
注册时间: 2011-05-02 9:51

ubuntu 18.04桌面版如何安装和运行x-windows

#1

帖子 yihanli » 2018-08-08 14:11

我的ubuntu18.04是桌面版,最近安装了一个计量经济学软件stata14 for linux,在运行该软件时,只能在终端运行stata命令进行计量模型估计,但无法运行图形分析,比如作散点图等常规图形,输入做图的stata命令后,无法显示图形。在终端也无法运行图形版stata,即xstata. 运行结果显示可能是ubuntu不能启动xwidows。启动xstata时,图形界面一闪而过,提示libpng运行错误,可能是没有设置unix 环境显示变量。 另外在终端输入sudo startx后,电脑黑屏。各位大侠看看有什么办法解决stata软件图形显示问题,谢谢。
上次由 yihanli 在 2018-08-08 18:16,总共编辑 1 次。
yihanli
帖子: 19
注册时间: 2011-05-02 9:51

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#2

帖子 yihanli » 2018-08-08 16:06

最终还是自己用crossover安装了一个windows版本的stata14,完美运行。
头像
astolia
论坛版主
帖子: 6396
注册时间: 2008-09-18 13:11

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#3

帖子 astolia » 2018-08-08 17:29

提示libpng错误更像是系统上没有指定版本的库文件,就跟wps for linux一样。
yihanli
帖子: 19
注册时间: 2011-05-02 9:51

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#4

帖子 yihanli » 2018-08-08 18:17

astolia 写了: 2018-08-08 17:29 提示libpng错误更像是系统上没有指定版本的库文件,就跟wps for linux一样。
那请问该怎么操作来解决libpng错误呢
头像
astolia
论坛版主
帖子: 6396
注册时间: 2008-09-18 13:11

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#5

帖子 astolia » 2018-08-08 19:46

我那个只是猜测,你把具体的错误信息贴出来看看
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#6

帖子 poloshiao » 2018-08-08 22:11

可能是ubuntu不能启动xwidows
1. 把下面指令 複製 貼進終端機 執行
1-1. sudo cat /etc/os-release
1-2. sudo lshw -numeric -class video
1-3. lsmod | grep -P "(video|drm)"
1-4. echo $DESKTOP_SESSION
1-5. echo $XDG_SESSION_TYPE
1-6. echo $XDG_CURRENT_DESKTOP
把指令及結果直接複製貼上來
yihanli
帖子: 19
注册时间: 2011-05-02 9:51

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#7

帖子 yihanli » 2018-08-09 3:08

poloshiao 写了: 2018-08-08 22:11
可能是ubuntu不能启动xwidows
1. 把下面指令 複製 貼進終端機 執行
1-1. sudo cat /etc/os-release
1-2. sudo lshw -numeric -class video
1-3. lsmod | grep -P "(video|drm)"
1-4. echo $DESKTOP_SESSION
1-5. echo $XDG_SESSION_TYPE
1-6. echo $XDG_CURRENT_DESKTOP
把指令及結果直接複製貼上來
下面是在终端执行上述指令得到的结果,请版主帮忙看看如何处理,谢谢!
lcj@lcj:~$ sudo cat /etc/os-release
[sudo] lcj 的密码:
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and- ... acy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

lcj@lcj:~$ sudo lshw -numeric -class video
*-display
description: VGA compatible controller
product: GM107M [GeForce GTX 960M] [10DE:139B]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a2
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:130 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
*-display
description: VGA compatible controller
product: HD Graphics 530 [8086:191B]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:126 memory:dd000000-ddffffff memory:a0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff


lcj@lcj:~$ lsmod | grep -P "(video|drm)"
uvcvideo 86016 0
videobuf2_vmalloc 16384 1 uvcvideo
videobuf2_memops 16384 1 videobuf2_vmalloc
videobuf2_v4l2 24576 1 uvcvideo
videobuf2_core 40960 2 uvcvideo,videobuf2_v4l2
videodev 184320 3 uvcvideo,videobuf2_core,videobuf2_v4l2
media 40960 2 uvcvideo,videodev
nvidia_drm 40960 4
nvidia_modeset 1110016 9 nvidia_drm
drm_kms_helper 172032 2 i915,nvidia_drm
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
drm 401408 8 i915,nvidia_drm,drm_kms_helper
video 45056 1 i915

lcj@lcj:~$ echo $DESKTOP_SESSION
ubuntu

lcj@lcj:~$ echo $XDG_SESSION_TYPE
x11

lcj@lcj:~$ echo $XDG_CURRENT_DESKTOP
ubuntu:GNOME

此外在终端输入指令sudo startx以试图启动x桌面,电脑黑屏,请版主指教如何解决,谢谢!
上次由 yihanli 在 2018-08-09 3:30,总共编辑 1 次。
yihanli
帖子: 19
注册时间: 2011-05-02 9:51

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#8

帖子 yihanli » 2018-08-09 3:11

astolia 写了: 2018-08-08 19:46 我那个只是猜测,你把具体的错误信息贴出来看看
在终端运行xstata,图形界面一闪而过,出现如下错误提示,请版主指教,谢谢!
lcj@lcj:~$ ./Stata14Linux64/xstata
lcj@lcj:~$ libpng error: Libpng jmp_buf still allocated

且这个指令运行一直没有结束,待我按下enter健后才结束。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#9

帖子 poloshiao » 2018-08-09 9:35

lcj@lcj:~$ echo $DESKTOP_SESSION
ubuntu
lcj@lcj:~$ echo $XDG_SESSION_TYPE
x11
lcj@lcj:~$ echo $XDG_CURRENT_DESKTOP
ubuntu:GNOME
1. 你已登入 Ubuntu 18.04 預設的 Ubuntu on Xorg 進程
1-1. 意思是 你已啟動了 X Windows 沒必要再一次啟動 X Windows
1-1-1. https://en.wikipedia.org/wiki/X.Org_Server
X.Org Server
X.Org Server is the free and open source implementation of the display server for the X Window System ...
此外在终端输入指令sudo startx以试图启动x桌面,电脑黑屏
2. Ubuntu 18.04 預設 gdm3 (GDM v3.0+) 為 Dispaly Manager
2-1. 開機 登入密碼 的畫面 就是 gdm3 的一部分
2-2. https://en.wikipedia.org/wiki/GNOME_Display_Manager
GNOME Display Manager (GDM) is a display manager (a graphical login program) for the windowing systems X11 and Wayland.
2-3. 沒有 安裝/使用 gdm3, 才需要使用 startx 啟動 x-windows
2-4. 意思是 如果你要使用 startx 啟動 x-windows 以前 需要先將 gdm3 關閉
2-5. https://wiki.debian.org/Xorg#Run_X
Run X
另外在终端输入sudo startx后
3. 試試 不要加 sudo 只要
startx
yihanli
帖子: 19
注册时间: 2011-05-02 9:51

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#10

帖子 yihanli » 2018-08-09 10:02

poloshiao 写了: 2018-08-09 9:35
lcj@lcj:~$ echo $DESKTOP_SESSION
ubuntu
lcj@lcj:~$ echo $XDG_SESSION_TYPE
x11
lcj@lcj:~$ echo $XDG_CURRENT_DESKTOP
ubuntu:GNOME
1. 你已登入 Ubuntu 18.04 預設的 Ubuntu on Xorg 進程
1-1. 意思是 你已啟動了 X Windows 沒必要再一次啟動 X Windows
1-1-1. https://en.wikipedia.org/wiki/X.Org_Server
X.Org Server
X.Org Server is the free and open source implementation of the display server for the X Window System ...
此外在终端输入指令sudo startx以试图启动x桌面,电脑黑屏
2. Ubuntu 18.04 預設 gdm3 (GDM v3.0+) 為 Dispaly Manager
2-1. 開機 登入密碼 的畫面 就是 gdm3 的一部分
2-2. https://en.wikipedia.org/wiki/GNOME_Display_Manager
GNOME Display Manager (GDM) is a display manager (a graphical login program) for the windowing systems X11 and Wayland.
2-3. 沒有 安裝/使用 gdm3, 才需要使用 startx 啟動 x-windows
2-4. 意思是 如果你要使用 startx 啟動 x-windows 以前 需要先將 gdm3 關閉
2-5. https://wiki.debian.org/Xorg#Run_X
Run X
另外在终端输入sudo startx后
3. 試試 不要加 sudo 只要
startx
在终端输入startx后,出现下面错误提示:
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
无法获取指向控制台的文件描述符

因此无法启用xwindows,不知怎么办

我想要在终端打开xstata,运行时图像界面一闪而过,出现错误提示: libpng error: Libpng jmp_buf still allocated,请问怎么处理。谢谢
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu 18.04桌面版如何安装和运行x-windows

#11

帖子 poloshiao » 2018-08-09 10:52

在终端输入startx后,出现下面错误提示:
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
1. 猜測 你是在圖形界面終端機執行 startx 意思是 你已啟動了一個 x windows
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
无法获取指向控制台的文件描述符
因此无法启用xwindows,不知怎么办
2. 在 Ubuntu 18.04 這個 Console 界面 又稱為 multi-user.target
2-1. 詳細指令 參閱
viewtopic.php?p=3206792#p3206792
sudo systemctl isolate multi-user.target
sudo systemctl isolate graphical.target
sudo systemctl set-default multi-user.target
sudo systemctl set-default graphical.target
因此无法启用xwindows,不知怎么办
3. 試試 切換到 multi-user.target
回复