Alpine Linux:如何配置GUI的图形桌面环境:x Desktop Environment

时间:2022-08-26 12:19:59

alpine linux 真是不错。小巧、迅捷!

官方的各个版本的alpine镜像内没有带图形环境的。那我们如何构建自己的桌面图形环境呢?

其实:这个问题,在起官网的wiki内有指南,我们根据那些相关文档就可以自己搭建!

--------------------------------------------------------------------

step 1:

localhost:~# setup-xorg-base 
fetch http://mirrors.cloud.tencent.com/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://mirrors.cloud.tencent.com/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
Executing busybox-1.31.1-r9.trigger
Executing eudev-3.2.9-r1.trigger1025-r0)
OK: 101 MiB in 60 packageslibs (3.6.2-r1)
(1/63) Installing libevdev (1.8.0-r0)
(2/63) Installing mtdev (1.1.5-r2)
(3/63) Installing libinput-libs (1.14.3-r0)
(4/63) Installing xf86-input-libinput (0.29.0-r0)
(5/63) Installing encodings (1.0.5-r0)
(6/63) Installing font-alias (1.0.3-r1)
(7/63) Installing libfontenc (1.1.4-r0)
(8/63) Installing libbz2 (1.0.8-r1)
(9/63) Installing libpng (1.6.37-r1)
(10/63) Installing freetype (2.10.1-r0)
(11/63) Installing mkfontscale (1.2.1-r1)
(12/63) Installing expat (2.2.9-r1)
(13/63) Installing fontconfig (2.13.1-r2)
(14/63) Installing pkgconf (1.6.3-r0)
(15/63) Installing util-macros (1.19.2-r1)
(16/63) Installing font-misc-misc (1.1.2-r1)
(17/63) Installing font-cursor-misc (1.0.3-r1)
(18/63) Installing xkeyboard-config (2.28-r0)
(19/63) Installing libxau (1.0.9-r0)
(20/63) Installing libbsd (0.10.0-r0)
(21/63) Installing libxdmcp (1.1.3-r0)
(22/63) Installing libxcb (1.13.1-r0)
(23/63) Installing libx11 (1.6.9-r0)
(24/63) Installing libxkbfile (1.1.0-r0)
(25/63) Installing xkbcomp (1.4.2-r0)
(26/63) Installing libxext (1.3.4-r0)
(27/63) Installing libice (1.0.10-r0)
(28/63) Installing libsm (1.2.3-r0)
(29/63) Installing libxt (1.2.0-r0)
(30/63) Installing libxmu (1.1.3-r0)
(31/63) Installing xauth (1.1-r0)
(32/63) Installing libmount (2.34-r1)
(33/63) Installing libsmartcols (2.34-r1)
(34/63) Installing findmnt (2.34-r1)
(35/63) Installing mcookie (2.34-r1)
(36/63) Installing xmodmap (1.0.10-r0)
(37/63) Installing mcpp-libs (2.7.2-r1)
(38/63) Installing mcpp (2.7.2-r1)
(39/63) Installing xrdb (1.2.0-r0)
(40/63) Installing xinit (1.4.1-r0)
(41/63) Installing mesa (19.2.7-r0)
(42/63) Installing libxdamage (1.1.5-r0)
(43/63) Installing libxfixes (5.0.3-r2)
(44/63) Installing libxxf86vm (1.1.4-r2)
(45/63) Installing libpciaccess (0.16-r0)
(46/63) Installing libdrm (2.4.100-r0)
(47/63) Installing mesa-glapi (19.2.7-r0)
(48/63) Installing libxshmfence (1.3-r0)
(49/63) Installing mesa-gl (19.2.7-r0)
(50/63) Installing libxfont2 (2.0.4-r0)
(51/63) Installing libepoxy (1.5.4-r0)
(52/63) Installing libffi (3.2.1-r6)
(53/63) Installing wayland-libs-server (1.17.0-r0)
(54/63) Installing mesa-gbm (19.2.7-r0)
(55/63) Installing pixman (0.38.4-r0)
(56/63) Installing xorg-server (1.20.6-r0)
(57/63) Installing xf86-video-modesetting (0.9.0-r6)
(58/63) Installing libgcc (9.2.0-r3)
(59/63) Installing libstdc++ (9.2.0-r3)
(60/63) Installing libxml2 (2.9.10-r1)
(61/63) Installing llvm9-libs (9.0.0-r1)
(62/63) Installing mesa-xatracker (19.2.7-r0)
(63/63) Installing xf86-video-vmware (13.3.0-r0)
Executing busybox-1.31.1-r9.trigger
Executing mkfontscale-1.2.1-r1.trigger
Executing fontconfig-2.13.1-r2.trigger
OK: 190 MiB in 123 packages
 * Caching service dependencies ...                                                         [ ok ]
 * Starting udev ...                                                                        [ ok ]
 * Generating a rule to create a /dev/root symlink ...                                      [ ok ]
 * Populating /dev with existing devices through uevents ...                                [ ok ]
 * Waiting for uevents to be processed ...                                                  [ ok ]
localhost:~#

step 2:

localhost:~# apk add xf86-input-keyboard xf86-input-mouse xf86-video-vmware xf86-input-vmmouse
(1/3) Installing xf86-input-keyboard (1.9.0-r1)
(2/3) Installing xf86-input-mouse (1.9.3-r1)
(3/3) Installing xf86-input-vmmouse (13.1.0-r4)
Executing busybox-1.31.1-r9.trigger
Executing eudev-3.2.9-r1.trigger
OK: 191 MiB in 128 packages
localhost:~#

step 3:

localhost:~# apk add dbus
(1/3) Installing dbus-libs (1.12.16-r2)
(2/3) Installing dbus (1.12.16-r2)
Executing dbus-1.12.16-r2.pre-install
(3/3) Installing dbus-openrc (1.12.16-r2)
Executing busybox-1.31.1-r9.trigger
OK: 192 MiB in 131 packages
localhost:~# rc-service  dbus start
 * Caching service dependencies ...                                                         [ ok ]
 * Starting System Message Bus ...
localhost:~# rc-update add dbus
* service dbus added to runlevel default

step 4:

localhost:~# apk add lightdm
(1/49) Installing libintl (0.20.1-r2)
(2/49) Installing pcre (8.43-r0)
(3/49) Installing glib (2.62.4-r0)
(4/49) Installing icu-libs (64.2-r0)
(5/49) Installing nspr (4.24-r0)
(6/49) Installing readline (8.0.1-r0)
(7/49) Installing mozjs60 (60.9.0-r0)
(8/49) Installing linux-pam (1.3.1-r1)
(9/49) Installing polkit (0.116-r0)
Executing polkit-0.116-r0.pre-install
(10/49) Installing accountsservice (0.6.55-r0)
(11/49) Installing ttf-cantarell (0.111-r0)
(12/49) Installing libxrender (0.9.10-r3)
(13/49) Installing cairo (1.16.0-r2)
(14/49) Installing libcroco (0.6.13-r1)
(15/49) Installing shared-mime-info (1.15-r0)
(16/49) Installing libjpeg-turbo (2.0.4-r0)
(17/49) Installing tiff (4.1.0-r0)
(18/49) Installing gdk-pixbuf (2.40.0-r0)
(19/49) Installing libxft (2.3.3-r0)
(20/49) Installing fribidi (1.0.8-r0)
(21/49) Installing graphite2 (1.3.13-r1)
(22/49) Installing harfbuzz (2.6.4-r0)
(23/49) Installing pango (1.44.7-r0)
(24/49) Installing librsvg (2.46.4-r0)
(25/49) Installing hicolor-icon-theme (0.17-r1)
(26/49) Installing gtk-update-icon-cache (2.24.32-r1)
(27/49) Installing libxcomposite (0.4.5-r0)
(28/49) Installing libxcursor (1.2.0-r0)
(29/49) Installing libxi (1.7.10-r0)
(30/49) Installing libxrandr (1.5.2-r0)
(31/49) Installing atk (2.34.1-r0)
(32/49) Installing avahi-libs (0.7-r4)
(33/49) Installing gmp (6.1.2-r1)
(34/49) Installing nettle (3.5.1-r0)
(35/49) Installing p11-kit (0.23.18.1-r0)
(36/49) Installing libtasn1 (4.15.0-r0)
(37/49) Installing libunistring (0.9.10-r0)
(38/49) Installing gnutls (3.6.10-r0)
(39/49) Installing cups-libs (2.2.12-r1)
(40/49) Installing gtk+2.0 (2.24.32-r1)
Executing gtk+2.0-2.24.32-r1.post-install
(41/49) Installing adwaita-gtk2-theme (3.28-r1)
(42/49) Installing gnome-themes-extra (3.28-r1)
(43/49) Installing adwaita-icon-theme (3.34.3-r0)
(44/49) Installing libgpg-error (1.36-r2)
(45/49) Installing libgcrypt (1.8.5-r0)
(46/49) Installing iso-codes (4.4-r0)
(47/49) Installing libxklavier (5.4-r5)
(48/49) Installing lightdm (1.30.0-r0)
Executing lightdm-1.30.0-r0.pre-install
(49/49) Installing lightdm-openrc (1.30.0-r0)
Executing busybox-1.31.1-r9.trigger
Executing dbus-1.12.16-r2.trigger
Executing fontconfig-2.13.1-r2.trigger
Executing shared-mime-info-1.15-r0.trigger
Executing gdk-pixbuf-2.40.0-r0.trigger
Executing gtk-update-icon-cache-2.24.32-r1.trigger
Executing mkfontscale-1.2.1-r1.trigger
OK: 332 MiB in 180 packages
localhost:~#
localhost:~# rc-service lightdm start
 * Caching service dependencies ...                                                         [ ok ]
 * /run/lightdm: creating directory
 * /run/lightdm: correcting owner
 * Starting Display Manager ...                                                             [ ok ]
localhost:~# rc-update add lightdm
 * service lightdm added to runlevel default
localhost:~#
localhost:/var/log/lightdm# apk add lightdm-gtk-greeter
(1/1) Installing lightdm-gtk-greeter (2.0.7-r0)
Executing busybox-1.31.1-r9.trigger
Executing gtk-update-icon-cache-2.24.32-r1.trigger
OK: 389 MiB in 235 packages
localhost:/var/log/lightdm#

step 5:

localhost:/etc/apk# apk add xfce4
(/) Installing libxfce4util (4.14.-r0)
(/) Installing exo-libs (0.12.-r0)
(/) Installing xcb-util (0.4.-r1)
(/) Installing startup-notification (0.12-r3)
(/) Installing xfconf (4.14.-r0)
(/) Installing libxfce4ui-gtk3 (4.14.-r0)
(/) Installing exo (0.12.-r0)
(/) Installing libxfce4ui (4.14.-r0)
(/) Installing garcon (0.6.-r0)
(/) Installing desktop-file-utils (0.24-r0)
(/) Installing libexif (0.6.-r3)
(/) Installing libgudev (-r0)
(/) Installing libnotify (0.7.-r0)
(/) Installing libxres (1.2.-r1)
(/) Installing libwnck3 (3.32.-r1)
(/) Installing xfce4-panel (4.14.-r0)
(/) Installing thunar (1.8.-r0)
Executing thunar-1.8.-r0.post-install
(/) Installing ca-certificates (-r0)
(/) Installing nghttp2-libs (1.40.-r0)
(/) Installing libcurl (7.67.-r0)
(/) Installing lcms2 (2.9-r1)
(/) Installing openjpeg (2.3.-r2)
(/) Installing poppler (0.82.-r1)
(/) Installing poppler-glib (0.82.-r1)
(/) Installing tumbler (0.2.-r1)
(/) Installing ttf-dejavu (2.37-r1)
(/) Installing xfce4-appfinder (4.14.-r0)
(/) Installing libusb (1.0.-r0)
(/) Installing upower (0.99.-r0)
(/) Installing xfce4-power-manager (1.6.-r0)
(/) Installing iceauth (1.0.-r0)
(/) Installing dbus-x11 (1.12.-r2)
(/) Installing xfce4-session (4.14.-r0)
(/) Installing xfce4-settings (4.14.-r0)
(/) Installing xfdesktop (4.14.-r0)
(/) Installing libxpresent (1.0.-r0)
(/) Installing xfwm4 (4.14.-r0)
(/) Installing xfce4 (.14_pre1-r0)
Executing busybox-1.31.-r9.trigger
Executing eudev-3.2.-r1.trigger
Executing fontconfig-2.13.-r2.trigger
Executing gtk-update-icon-cache-2.24.-r1.trigger
Executing mkfontscale-1.2.-r1.trigger
Executing desktop-file-utils-0.24-r0.trigger
Executing ca-certificates--r0.trigger
OK: MiB in packages
localhost:/etc/apk#

step 6:重启
step 7:在控制台中执行:startx 或 startxfce4

--------------------------------------------------------------------

http://wiki.alpinelinux.org/wiki/Tutorials_and_Howtos   之第5章 :  5 Desktop Environment

里面详细描述了以下桌面环境的安装配置,我们参照执行即可:

Desktop Environment

-------------------------------------------------------------------------------------------------------------------------------

我成功搭建了 mate、xfce4、remote desktop server (隐含 vino VNC 环境)环境。

提示:

1: 安装xfce4桌面环境,特别要注意需要安装 xfce4-notifyd 组件,否则应用的弹出信息看不到! 比如后续安装xrdp就一致无法成功,原因在此。

2:必须安装一个linux的x登录shell环境:如 lxdm,否则只能手工startx。todo:alpine内容如何直接执行startx代替默认的openrc 文本登录界面,待解决。

3:lxdm安装后,需要通过rc-update add lxdm服务,否则如同2,不能自动打开lxdm的登录界面

4:lxdm 如何让root或其他用户登录,并自动运行某些服务或程序?

修改:/etc/lxdm/lxdm.conf 文件实现自动用户登录

     

 [base]
## uncomment and set autologin username to enable autologin
autologin=root ## uncomment and set timeout to enable timeout autologin,
## the value should >=5
# timeout=10 ## default session or desktop used when no systemwide config
# session=/usr/bin/startlxde

## uncomment and set to set numlock on your keyboard
# numlock=0 ## set this if you don't want to put xauth file at ~/.Xauthority
# xauth_path=/tmp # not ask password for users who have empty password
# skip_password=1

  修改:/etc/lxdm/PostLogin 文件实现登录用户后,自动运行服务或程序。我自动开启xrdp服务的配置如下

#!/bin/sh
#
# Note: this is a sample and will not be run as is. rc-service xrdp restart
rc-service xrdp-sesman restart
rc-service vino restart

ok。到此结束!

 

Alpine Linux:如何配置GUI的图形桌面环境:x Desktop Environment的更多相关文章

  1. 为Ubuntu Server安装gnome图形桌面环境

    Ubuntu Server版默认都没有图形桌面(GUI),但是可以安装,以下共有两种安装方法. 一.安装全部Gnome桌面环境 Ubuntu系列桌面实际上有几种桌面应用程序,包括Ubuntu-desk ...

  2. Linux下sh文件运行及桌面环境双击运行sh文件

    sh文件运行: 1.修改为可执行权限: chmod u+x hello.sh 2.运行 ./hello.sh 3.不使用可执行权限修改,用sh直接运行 sh ./hello.sh 桌面环境双击运行sh ...

  3. 在linux下配置Nginx+Java+PHP的环境

    Apache对Java的支持很灵活,它们的结合度也很高,例如Apache+Tomcat和Apache+resin等都可以实现对Java应用 的支持.Apache一般采用一个内置模块来和Java应用服务 ...

  4. Linux用来抗衡Win的那些桌面环境

    作为一个 Linux 的爱好者,参加了 9 月 22 日 Linux Deepin 在北京举行的用户与开发者大会(给大家一个链接).名为参加会议,实为打酱油.但 Linux Deepin 团队的一些理 ...

  5. Linux系统之-文件系统,桌面环境

    文件系统 文件类型普通文件,目录文件,连接文件,设备与设备文件,套接字,管道 普通文件(regular file):就是一般存取的文件,由ls -al显示出来的属性中,第一个属性为 [-],例如 [- ...

  6. 抗衡Win Linux全凭这些桌面环境

    2012年01月25日 元老级桌面环境KDE     Linux操作系统最早使用在服务器上,而桌面操作系统并不是Linux的重点突围.但是,近几年Linux桌面操作系统有崛起的趋势,抢夺了部分桌面操作 ...

  7. Linux桌面“彩”起来:桌面环境及窗口管理器大盘点

    2011-02-22 11:49:50   看到这个标题,很多人一定认为桌面环境和窗口管理器是一回事,但严格来说窗口管理器和桌面环境是有区别的.桌面环境(Desktop Environments)是最 ...

  8. 桌面环境与桌面搜索Desktop Search tools

    最近一段时间工作重心都将放在Linux下Desktop search(桌面搜索)框架的研发上.因此对desktop search进行了初步的调研.本文将从下面三个方面展开: Linux桌面环境(Des ...

  9. 管理员技术(一):装机预备技能、安装一台RHEL7虚拟机、使用RHEL7图形桌面、Linux命令行基本操作

    一.装机预备技能 问题: 本例要求安装一台可用的KVM服务器:      1> RHEL与CentOS系统有什么关联?      2> 第2块SCSI硬盘的第3个逻辑分区,Linux如何表 ...

随机推荐

  1. mrp功能分类

    mrp主要有六大功能子系统:[工程管理子系统].[销售管理子系统].[计划管理子系统].[采购管理子系统].[库存管理子系统].[MRP运行管理子系统].[工程管理子系统]主要功能:产品/物料编码表. ...

  2. 使用JAVA对字符串进行DES加密解密(修正问题)

    http://blog.csdn.net/seraphwh/article/details/6801123

  3. WPF FileFolderDialog 和弹出子窗口的一些问题

    摘要:本文主要是WPF中 FileFolderDialog的相关问题,补充了关于在父窗口弹出子窗口,以及子窗口的相关属性(Data Binding)和命令绑定(Delegate Command)问题, ...

  4. Palindrome Permutation II 解答

    Question Given a string s, return all the palindromic permutations (without duplicates) of it. Retur ...

  5. SSM框架理解(转)

    SSM框架理解 最近两星期一直在学JavaEE的MVC框架,因为之前学校开的JavaEE课程就一直学的吊儿郎当的,所以现在真正需要掌握就非常手忙脚乱,在此记录下这段时间学习的感悟,如有错误,希望大牛毫 ...

  6. json数据交互

    springmvc 的json数据交互 - 哎幽的成长 - CSDN博客--和老师讲课相同http://blog.csdn.net/u012373815/article/details/4720818 ...

  7. [NOIp2018提高组]货币系统

    [NOIp2018提高组]货币系统 题目大意: 有\(n(n\le100)\)种不同的货币,每种货币的面额为\([1,25000]\)之间的一个整数.若两种货币系统能够组合出来的数是相同的的,那我们就 ...

  8. python3.7.2 pip 出现locations that require TLS/SSL异常处理方法

    centos7安装python3.7.2后,运行 pip3 install tornado 会报错 [root@localhost ~]# pip3 install tornado pip is co ...

  9. python直接下载图片到内存

    1. 使用requests(推荐) from PIL import Image import requests Image.open(requests.get(url, stream=True).ra ...

  10. RabbitMQ 远程 IP 访问 解决办法 -摘自网络

    刚刚安装的RabbitMQ-Server-3.3.5,并且也已经开启了Web管理功能,但是现在存在一个问题: 出于安全的考虑,guest这个默认的用户只能通过http://localhost:1567 ...