From bc3c624e74d5ef955c664a424527b76566076d74 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Feb 2023 22:08:35 +0800 Subject: [PATCH 01/46] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Chao-zhi 本篇显然是用翻译工具草草翻译而成。 翻译工具是可以用的,但是你要做检查。你可以对比我做的校对,如果你能做到我的校对这样的程度,那就没问题。 --- ...ll GNOME Desktop in Arch Linux [Complete Guide].md | 106 +++++++++--------- 1 file changed, 55 insertions(+), 51 deletions(-) rename {translated/tech => published}/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md (62%) diff --git a/translated/tech/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md b/published/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md similarity index 62% rename from translated/tech/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md rename to published/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md index a37dcc275e..c262036263 100644 --- a/translated/tech/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md +++ b/published/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md @@ -3,22 +3,24 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "Chao-zhi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15537-1.html" -如何在 Arch Linux 中安装 GNOME 桌面 [完整指南] +如何在 Arch Linux 中安装 GNOME 桌面 ====== -**本指南解释了在 Arch Linux 中安装 GNOME 桌面所需的步骤。** +![][0] -本指南有两部分。第一部分是关于安装基本的 Arch 系统。第二部分是在 Arch Linux 基础上安装完整的 GNOME 桌面环境。 +> 本指南解释了在 Arch Linux 中安装 GNOME 桌面所需的步骤。 + +本指南有两部分:第一部分是关于安装基本的 Arch 系统;第二部分是在 Arch Linux 基础上安装完整的 GNOME 桌面环境。 ### 什么是 GNOME 桌面? -GNOME 是一个流行的桌面环境,是许多基于桌面的顶级 Linux 发行版的默认桌面选择,如 Ubuntu 和 Fedora。几乎所有的口味都提供了一个 GNOME 桌面选项。 +GNOME 是一个流行的桌面环境,是如 Ubuntu 和 Fedora 等许多基于桌面的顶级 Linux 发行版的默认桌面。几乎所有的定制版都提供了一个 GNOME 桌面版本。 -GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通、高级用户所青睐。如果你想要一个在你进行工作时保持隐形的桌面,GNOME 就是这样的。它在工作时不会妨碍到你。因此,尽管有许多关于 GNOME3(目前的迭代)速度慢、资源重等的争议,它仍然是许多人的流行和默认选项。 +GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通和高级用户所青睐。如果你想要一个在你进行工作时保持隐形的桌面,GNOME 就是这样的一个。它不会在你工作时妨碍你。因此,尽管有许多关于 GNOME 3(目前的版本)速度慢、资源重等争议,它仍然是许多人的流行和默认选择。 说了这么多,让我们来看看如何在裸机 Arch 中安装 GNOME 桌面。 @@ -28,23 +30,23 @@ GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通 如果你已经安装了 Arch Linux,你可以跳过这一步,直接进入下面安装 GNOME 桌面部分。 -要快速安装 Arch Linux 基础版,请遵循以下步骤。你也可以访问[该指南][1],了解如何将 Arch Linux 安装为双启动或在虚拟机中的完整教程。 +要快速安装 Arch Linux 基础版,请遵循以下步骤。你也可以访问 [该指南][1],了解如何将 Arch Linux 安装为双启动或在虚拟机中的完整教程。 -本文下面介绍的步骤是安装 Arch 的传统方式。新手请按照下面的指南链接,以更现代的方式使用 archinstall 脚本。完成后,回来通过[步骤 2](#第二部分在-arch-linux-中安装-gnome) 继续 GNOME 安装。 +本文下面介绍的步骤是安装 Arch 的传统方式。新手请按照下面的指南链接,以更现代的方式使用 `archinstall` 脚本。完成后,回来通过第二部分的步骤继续 GNOME 安装。 -[现代方法。使用 archinstall 脚本安装(推荐)][2]。 +> **[现代方式:使用 archinstall 脚本安装(推荐)][2]** -##### 传统的方法。下载 Arch Linux +##### 传统方式:下载 Arch Linux -从下面的链接下载 Arch Linux .iso。这里也提供磁力和种子链接。下载后,将 ISO 写入 USB 驱动器。然后从该驱动器启动。 +从下面的链接下载 Arch Linux 的 .iso 文件。它也提供了磁力链接和种子链接。下载后,将 ISO 写入 USB 驱动器。然后从该驱动器启动。 -[下载 Arch Linux][3] +> **[下载 Arch Linux][3]** -如果你打算通过 GNOME Boxes、virt-manager 把它安装成一个虚拟机镜像--那么你就不需要把它写入 U 盘。 +如果你打算通过 GNOME Boxes、virt-manager 把它安装成一个虚拟机镜像,那么你就不需要把它写入 U 盘。 ##### 启动和配置分区 -从 Arch Linux iso 启动后,你必须运行一系列的命令来安装基本系统。 +从 Arch Linux ISO 启动后,你必须运行一系列的命令来安装基本系统。 首先,运行下面的命令,找出设备标识符。 @@ -52,7 +54,7 @@ GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通 fdisk -l ``` -![先 fdisk -l][4] +![之前的 fdisk -l][4] 然后用设备标识符,运行下面的命令,开始对你的磁盘进行分区。请确保根据你的系统改变 `/dev/sda`。 @@ -62,7 +64,7 @@ cfdisk /dev/sda 在下一个提示中选择 `label type = dos`。 -选择自由空间,并从底部选择新的选项。在这个例子中,我将创建三个分区,如下图所示。 +选择自由空间,并从底部选择 “新建New” 选项。在这个例子中,我将创建三个分区,如下图所示: ``` /dev/sda1 - 1G - for /boot @@ -76,13 +78,13 @@ cfdisk /dev/sda 对大小为 5GB 的主根分区重复同样的步骤。 -![交换分区类型改变][6] +![改变为交换分区类型][6] -用同样的步骤创建一个大小为 1G 的交换分区(你可以根据你的需要改变它)。创建交换分区后,确保在底部选择类型,并将其标记为 "Linux Swap/Solaris "选项的交换分区。 +用同样的步骤创建一个大小为 1G 的交换分区(你可以根据你的需要改变它)。创建交换分区后,确保在底部选择 “类型Type”,并用 “Linux Swap/Solaris” 选项将其标记为交换分区。 ![cfdisk 中的最终分区列表][7] -一旦完成,使用底部的写入选项将变化写入磁盘。确保你在写入前做了备份,因为这是你系统中的一个永久性变化。 +一旦完成,使用底部的 “写入Write” 选项将变化写入磁盘。**确保你在写入前做了备份,因为这是你系统中的一个永久性变化。** 在你继续之前,运行下面的命令来检查。你可以看到在这个例子中,有三个分区被列出。 @@ -90,9 +92,9 @@ cfdisk /dev/sda fdisk -l ``` -![fdisk 中的最终分区列表][8] 。 +![fdisk 中的最终分区列表][8] -依次运行下面的命令,在上面新创建的分区中格式化并创建一个 ext4 文件系统。请确保你根据你的需要改变 `/dev/sda1` 和 `/dev/sda2`。 +依次运行下面的命令,在上面新创建的分区中格式化并创建一个 ext4 文件系统。请确保你根据你的需要改变 `/dev/sda1` 和 `/dev/sda2`: ``` mkfs.ext4 /dev/sda1 @@ -101,7 +103,7 @@ mkswap /dev/sda3 swapon /dev/sda3 ``` -完成后,装载系统并创建必要的目录。 +完成后,装载系统并创建必要的目录: ``` mount /dev/sda2 /mnt @@ -115,7 +117,7 @@ mount /dev/sda1 /mnt/boot ##### 安装基础系统 -我希望你已经连接到互联网了。如果没有,请尝试使用 USB 加密狗或 Arch 安装程序自动配置和检测的有线网络连接。如果你没有可用的有线连接,请按照[该指南][10] 使用 Arch Linux 安装程序配置一个无线或 wifi 网络。 +我希望你已经连接到互联网了。如果没有,请尝试使用 USB 网卡或 Arch 安装程序自动配置和检测的有线网络连接。如果你没有可用的有线连接,请按照 [该指南][10] 使用 Arch Linux 安装程序配置一个无线或 Wi-Fi 网络。 依次运行下面的命令,将基本系统安装到已安装的分区中。下载的大小约为 400MB。 @@ -134,44 +136,44 @@ genfstab -U /mnt >> /mnt/etc/fstab ##### 配置基础系统 -依次按照下面的命令来配置基本系统。这涉及到设置你的地域、语言、添加一个登录用户,以及设置互联网。 +依次按照下面的命令来配置基本系统。这涉及到设置你的地域、语言、添加一个登录用户,以及设置互联网: ``` arch-chroot /mnt nano /etc/locale.gen ``` -去掉开头的 #,取消对你所选择的 locale 的注释。在本指南中,我选择了 en_US.UTF-8 UTF-8. 按 CTRL+O、Enter 和 CTRL+X 退出 nano。 +通过去掉开头的 `#` 来取消对你所选择的 语言环境locale 的注释。在本指南中,我选择了 `en_US.UTF-8 UTF-8`,按 `CTRL+O`、回车和 `CTRL+X` 退出 nano。 ![本地化][12] -使用以下方法生成 locale。 +使用以下方法生成语言环境: ``` locale-gen ``` -如果你不想手动去 `/etc/locale.gen` 设置语言,也可以使用以下命令设置语言。 +如果你不想手动去 `/etc/locale.gen` 设置语言,也可以使用以下命令设置语言: ``` echo LANG=en_US.UTF-8 > /etc/locale.conf export LANG=en_US.UTF-8 ``` -设置当地的时区。 +设置当地的时区: ``` ln -s /usr/share/zoneinfo/America/New_York /etc/localtime ``` -同样,你可以根据你的需要来选择它们。你可以通过以下命令列出当地的时区。 +同样,你可以根据你的需要来选择它们。你可以通过以下命令列出当地的时区: ``` ls /usr/share/zoneinfo ls /usr/share/zoneinfo/America ``` -设置硬件时钟,创建一个主机名,并使用以下命令依次启用互联网的 DHCP。你可以根据你的愿望,将 `"arindam-pc"` 改为任何主机名。 +设置硬件时钟,创建一个主机名,并使用以下命令依次启用互联网的 DHCP。你可以根据你的想法,将 `arindam-pc` 改为任何主机名: ``` hwclock --systohc --utc @@ -179,9 +181,9 @@ echo arindam-pc > /etc/hostname systemctl enable dhcpcd ``` -下一步是设置根用户的密码,创建一个管理员用户,并在 sudoers 文件中添加该用户。 +下一步是设置根用户的密码,创建一个管理员用户,并在 `sudoers` 文件中添加该用户。 -依次按照下面的命令进行操作。请确保根据你的需要将用户名从 `debugpoint` 改为其他名称。 +依次按照下面的命令进行操作。请确保根据你的需要将用户名从 `debugpoint` 改为其他名称: ``` passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint @@ -189,13 +191,13 @@ passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint ![创建用户][13] -打开 sudoers 文件,添加以下几行。 +打开 `sudoers` 文件,添加以下几行: ``` nano /etc/sudoers ``` -添加以下几行。由于你已经创建了根用户,该条目应该在那里。 +添加以下几行。由于你已经创建了 `root` 用户,该条目应该已经有了: ``` root ALL=(ALL) ALL @@ -204,7 +206,7 @@ debugpoint ALL=(ALL) ALL ![更改 sudoer 文件][14] -安装 grub,设置初始 ramdisk 环境,依次使用下面的命令安装引导。 +依次使用如下命令安装 Grub,设置初始化 Ramdisk 环境,卸载系统: ``` grub-install /dev/sda @@ -213,7 +215,7 @@ mkinitcpio -p linux exit ``` -![配置 grub][15] 。 +![配置 Grub][15] 然后重新启动你的系统。如果你是在一个物理系统中安装的,在这一步要拔掉 USB 介质。 @@ -229,27 +231,25 @@ reboot #### 第二部分:在 Arch Linux 中安装 GNOME -重启后,从 grub 中选择 Arch Linux。在 Arch Linux 的提示符下,开始依次运行以下命令。这些命令安装 Xorg 服务器、显示管理器、GNOME 桌面组件、控制器包和其他应用程序。 +重启后,从 Grub 中选择 Arch Linux。在 Arch Linux 的提示符下,开始依次运行以下命令。这些命令安装 Xorg 服务器、显示管理器、GNOME 桌面组件、控制器包和其他应用程序。 所有的命令都使用默认值,即在要求时按回车。 -- **安装 Xorg 服务器。安装大小约为 80MB。** +安装 Xorg 服务器。安装大小约为 80MB: ``` sudo pacman -S --needed xorg ``` -- **安装显示管理器,GNOME 桌面。安装大小约为 300MB。** +安装显示管理器、GNOME 桌面。安装大小约为 300MB: ``` sudo pacman -S --needed gnome gnome-tweaks nautilus-sendto gnome-nettool gnome-usage gnome gnome-multi-writer adwaita-icon-theme xdg-user-dirs-gtk fwupd arc-gtk-theme seahosrse gdm ``` -上面的安装会要求提供几个软件包的选项。选择你想要的任何一个。如果你不确定,在询问时选择 jack、noto-sans 和 xdg-portal-desktop-gnome。 +上面的安装会要求提供几个软件包的选项。选择你想要的任何一个。如果你不确定,在询问时选择 “jack”、“noto-sans” 和 “xdg-portal-desktop-gnome”。 -- **安装应用程序** - -这只是一个参考。你也可以安装你所需要的。 +安装应用程序。这只是一个参考。你也可以安装你所需要的: ``` sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper @@ -262,25 +262,28 @@ systemctl enable gdm systemctl enable NetworkManager ``` -使用 reboot 命令重新启动系统。 +使用 `reboot` 命令重新启动系统: ``` reboot ``` -![Arch Linux 运行 GNOME 43 桌面][17] 。 +![Arch Linux 运行 GNOME 43 桌面][17] -如果一切顺利,你应该在 GNOME 桌面上看到一个漂亮的登录提示。使用你刚刚创建的凭证登录。迎接你的应该是 Arch Linux 中漂亮而干净的 GNOME 43 桌面。 +如果一切顺利,你应该在 GNOME 桌面上看到一个漂亮的登录提示。使用你刚刚创建的凭证登录。迎接你的应该是 Arch Linux 漂亮而干净的 GNOME 43 桌面。 我希望这个指南能帮助你在裸机 Arch 安装 GNOME 桌面。 -------------------------------------------------------------------------------- -通过。https://www.debugpoint.com/gnome-arch-linux-install/ +via: https://www.debugpoint.com/gnome-arch-linux-install/ -作者:[Arindam][a] 选题:[lkxed][b] 翻译者:[Chao-zhi](https://github.com/Chao-zhi)校对:[校对者ID](https://github.com/校对者ID) +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[wxy](https://github.com/wxy) -本文由[LCTT](https://github.com/LCTT/TranslateProject)原创编译,[Linux中国](https://linux.cn/)荣誉推出 +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.debugpoint.com/author/admin1/ [b]: https://github.com/lkxed @@ -301,3 +304,4 @@ reboot [15]: https://www.debugpoint.com/wp-content/uploads/2020/12/configure-grub-1024x639.jpg [16]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-is-installed.jpg [17]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-Linux-Running-GNOME-43-Desktop-1024x636.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202302/13/220203a5yb5xy24yer4atv.jpg \ No newline at end of file From cbe5dc84883dd404178fc1c3e433a794e311fe37 Mon Sep 17 00:00:00 2001 From: gpchn <99541536+gpchn@users.noreply.github.com> Date: Mon, 13 Feb 2023 22:21:03 +0800 Subject: [PATCH 02/46] gpchn translation completed --- ... Install DOSBox in Ubuntu to Play Old Games.md | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 translated/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md diff --git a/translated/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md b/translated/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md new file mode 100644 index 0000000000..91629ca867 --- /dev/null +++ b/translated/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md @@ -0,0 +1,168 @@ +[#]: subject: "How to Install DOSBox in Ubuntu to Play Old Games" +[#]: via: "https://www.debugpoint.com/install-dosbox-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "gpchn" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Ubuntu 中安装 DOSBox 玩老游戏 +====== + +**了解如何在 Ubuntu 中安装 DOSBox,并配置它来玩旧的 DOS 游戏。** + +DOSBox 是一个免费的开源操作系统模拟器,可以在现代 Linux 系统中运行。它有几个组件可以模仿旧的硬件,以运行旧程序和游戏。 + +这一切使得在现代 Linux 发行版中享受旧游戏和应用程序成为可能。 + +在本指南中,我将向您展示如何安装 DOSBox,配置它,并玩一个示例游戏。 + +### 在 Ubuntu 中安装 DOSBox + +DOSBox 的主软件包在所有主要的 Linux 发行版中都可用。 + +在 Ubuntu、Debian、LinuxMint 和相关发行版中,使用以下命令安装它: + +``` +sudo apt install dosbox +``` + +在 Fedora、CentOS、RHEL 和相关发行版中,使用以下命令安装它: + +``` +sudo dnf install dosbox +``` + +在 Arch Linux 中,使用以下命令安装它: + +``` +pacman -S --needed dosbox +``` + +这将结束安装。现在是配置和运行的时候了。 + +### 运行 DOSBox + +安装后,从终端键入以下内容: + +``` +dosbox +``` + +它将显示以下界面,这是 DOSBox 提示。第一次运行非常重要,因为它会创建 DOSBox 配置文件。 + +键入 `exit` 暂时关闭 DOSBox。 + +![DOSBox first time run][1] + +配置文件为您提供了几个调整设置的选项。在 Ubuntu 中,该文件创建在 `~/.dosbox/dosbox-[version].conf`。 + +在 Fedora 中,它从以下路径加载临时配置文件 `~/.config/dosbox/dosbox-staging.conf`. + +默认情况下,您可以使用默认配置。但是如果您愿意,您可以修改它。 + +例如,如果您想全屏启动 DOSBox,您可以启用或禁用相关设置。像这样: + +``` +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +``` + +您可以在官方文档中找到所有的设置选项 [documentation][2]. + +### 下载以及游玩老游戏 + +有许多网站提供旧的 DOS 游戏。我使用过下面的网站,它提供了一套可以在现代系统中玩的老游戏。 + +所以,访问下面的网站,下载您想要的任何游戏。 + +[下载 DOS 游戏][3] + +在您的 /home 目录下创建一个文件夹,并将其命名为 dosbox: + +``` +cd ~mkdir dosbox +``` + +现在,解压您下载的游戏(应该是一个 .exe 文件),在 `~/dosbox` 目录下创建一个单独的文件夹。 + +例如,我下载了游戏 “马里奥和路易吉(1994)”。我在 “dosbox” 文件夹中创建了一个名为 “mario” 的文件夹,并将游戏文件放进去。 + +![Keep the game in a separate folder][4] + +现在从终端启动 dosbox: + +``` +dosbox +``` + +并键入以下内容,将游戏挂载到虚拟的 C: 盘中: + +``` +mount c ~/dosbox/mario +``` + +以上命令完成后,将驱动器更改为 C:: + +``` +c: +``` + +现在,您可以输入游戏的文件名来运行游戏: + +``` +mario +``` + +![Running the game][5] + +![Mario running in DOSBox in Ubuntu][6] + +### 键盘或控制器映射 + +默认情况下,DOSBox 会自动检测键盘或您插入的控制器。但是,如果您想更改游戏按键绑定,可以从终端运行以下命令: + +``` +dosbox -startmapper +``` + +它将显示以下界面,每个键上都标记有事件。您可以点开任何一个键,根据自己的习惯进行更改。 + +![DOSBox keyboard and controller mapping][7] + +### 结论 + +我希望您在 Ubuntu 和其他发行版中安装了 DOSBox 之后,能够运行您最喜欢的 DOS 游戏。DOSBox 是最酷的软件之一,您可以使用它来运行任何程序,例如 [Turbo C][8] 等。 + +如果您有任何麻烦或问题,请在评论区告诉我。 + +享受游戏吧! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-dosbox-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[gpchn](https://github.com/gpchn) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBox-first-time-run.jpg +[2]: https://www.dosbox.com/wiki/Dosbox.conf#Sections +[3]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection +[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/Keep-the-game-in-a-separate-folder.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-the-game.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/Mario-playing-in-DOSBox-in-Ubuntu.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBOox-keyboard-and-controller-mapping.jpg +[8]: https://www.debugpoint.com/setting-up-dosbox-in-ubuntu-to-run-turbo-c/ From 3a67b2ad22452cdd30f4a289c37d596444fe1068 Mon Sep 17 00:00:00 2001 From: gpchn <99541536+gpchn@users.noreply.github.com> Date: Mon, 13 Feb 2023 22:21:46 +0800 Subject: [PATCH 03/46] gpchn translation completed --- ... Install DOSBox in Ubuntu to Play Old Games.md | 168 ------------------ 1 file changed, 168 deletions(-) delete mode 100644 sources/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md diff --git a/sources/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md b/sources/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md deleted file mode 100644 index a62fa5d750..0000000000 --- a/sources/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: subject: "How to Install DOSBox in Ubuntu to Play Old Games" -[#]: via: "https://www.debugpoint.com/install-dosbox-ubuntu/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "gpchn" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install DOSBox in Ubuntu to Play Old Games -====== - -**Learn how to install DOSBox in Ubuntu and configure it to play old DOS games.** - -DOSBox is a free and open-source operating system emulator that can run inside modern Linux systems. It has several components which emulate older hardware so that ancient programs and games can run. - -All these make it possible to enjoy the older games and applications in modern Linux distributions. - -In this guide, I will show you how to install DOSBox, configure it and play a sample game. - -### Install DOSBox in Ubuntu - -The main package of DOSBox is available in all the major repo of Linux distributions. - -For Ubuntu, Debian, Linux Mint and related distributions use the following command to install it: - -``` -sudo apt install dosbox -``` - -For Fedora, CentOS, RHEL and related distributions use the following: - -``` -sudo dnf install dosbox -``` - -Arch Linux users, use the following command to install it. - -``` -pacman -S --needed dosbox -``` - -That will conclude the installation. Now it’s time to configure and run. - -### Running DOSBox - -After installation, type the following from the terminal. - -``` -dosbox -``` - -It will show you the following screen showing the DOSBox prompt. This first-time run is essential because it creates the DOSBox configuration file. - -Type `exit` to close DOSBox for now. - -![DOSBox first time run][1] - -The configuration file gives you several options to tweak settings. The file is created at your home directory path `~/.dosbox/dosbox-[version].conf` for Ubuntu. - -For fedora, it loads the staging config file from this path`~/.config/dosbox/dosbox-staging.conf`. - -By default, you can keep the configuration unchanged. However, if you want, you can change it. - -For example, if you want to start DOSBox fullscreen, you can enable and disable the switch. Here’s a sample: - -``` -fullscreen=false -fulldouble=false -fullresolution=original -windowresolution=original -output=surface -autolock=true -sensitivity=100 -waitonerror=true -``` - -You can find all the settings in the official [documentation][2]. - -### Download old games and run - -There are many websites which provide old DOS games. I have used the following website, which provides a fair set of old games which can be played in the modern system. - -So, visit the following page and download any game you want. - -[Download DOS games][3] - -Create a directory in your /home folder and name it dosbox. - -``` -cd ~mkdir dosbox -``` - -Now, extract the game which you downloaded (it should be a .exe file) and create a separate folder inside `~/dosbox`. - -For example, I downloaded the game “Mario & Luigi (1994)”. And I created a folder called “mario” inside the “dosbox” folder. And placed the game file inside it. - -![Keep the game in a separate folder][4] - -Now launch dosbox from the terminal. - -``` -dosbox -``` - -And type the following to mount the game in a virtual C: drive. - -``` -mount c ~/dosbox/mario -``` - -After the above command is complete, change the drive to C:. - -``` -c: -``` - -And now, you can type the game’s file name to run the game. - -``` -mario -``` - -![Running the game][5] - -![Mario running in DOSBox in Ubuntu][6] - -### Keyboard or controller mapping - -By default, DOSBox should detect the keyboard or any controller you may have plugged in. However, if you want to change game keybindings, you can run the below command from the terminal. - -``` -dosbox -startmapper -``` - -It will give you the following screen with the events tagged to each key. You can click on any key and change it according to your taste. - -![DOSBox keyboard and controller mapping][7] - -### Conclusion - -I hope you managed to run your favourite dos game after installing dosbox in Ubuntu and other distros. DOSBox is one of the coolest pieces of software you can use to run any program, such as [Turbo C][8] and others. - -If you have any trouble or questions, let me know in the comment box. - -Enjoy! - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/install-dosbox-ubuntu/ - -作者:[Arindam][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lkxed -[1]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBox-first-time-run.jpg -[2]: https://www.dosbox.com/wiki/Dosbox.conf#Sections -[3]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection -[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/Keep-the-game-in-a-separate-folder.jpg -[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-the-game.jpg -[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/Mario-playing-in-DOSBox-in-Ubuntu.jpg -[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBOox-keyboard-and-controller-mapping.jpg -[8]: https://www.debugpoint.com/setting-up-dosbox-in-ubuntu-to-run-turbo-c/ From 25bc2d78c5db34dd781fdd5bc79dc599315e870b Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Mon, 13 Feb 2023 22:26:27 +0800 Subject: [PATCH 04/46] Update and rename sources/talk/20220204 How we hired an open source developer.md to translated/talk/20220204 How we hired an open source developer.md translated by XiaotingHuang22. --- ...4 How we hired an open source developer.md | 104 ------------------ ...4 How we hired an open source developer.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 104 deletions(-) delete mode 100644 sources/talk/20220204 How we hired an open source developer.md create mode 100644 translated/talk/20220204 How we hired an open source developer.md diff --git a/sources/talk/20220204 How we hired an open source developer.md b/sources/talk/20220204 How we hired an open source developer.md deleted file mode 100644 index bfdefe20a0..0000000000 --- a/sources/talk/20220204 How we hired an open source developer.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: "How we hired an open source developer" -[#]: via: "https://opensource.com/article/22/2/how-we-hired-open-source-developer" -[#]: author: "Mike Bursell https://opensource.com/users/mikecamel" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How we hired an open source developer -====== -My team opted out of the standard algorithm coding exercise for a -process that yielded more relevant results. -![people in different locations who are part of the same team][1] - -As the CEO and co-founder of [Profian][2], a start-up security company, I've been part of our effort to hire developers to work on [Enarx][3], a security project that deals with confidential computing, written almost exclusively in [Rust][4] (with a bit of Assembly). Profian has now found all the people it was looking for in this search, with a couple of developers due to start in the next few weeks. However, new contributors are absolutely welcome to Enarx, and if things continue to go well, the company will definitely want to hire more folks in the future. - -Hiring people is not easy, and Profian had a set of specialized requirements that made the task even more difficult. I thought it would be useful and interesting for the community to share how we approached the problem. - -### What were we looking for? - -These are the specialized requirements I'm talking about: - - * **Systems programming:** Profian mainly needs people who are happy programming at the systems layer. This is pretty far down the stack, with lots of interactions directly with hardware or the OS. To create client-server pieces, for instance, we have to write quite a lot of the protocols, manage the crypto, and so forth, and the tools for this aren't all very mature (see "Rust" below). - - * **Rust:** Almost all of the project is written in Rust, and what isn't is written in Assembly language (currently exclusively x86, though that may change as we add more platforms). Rust is new, cool, and exciting, but it's still quite young, and some areas don't have all the support you might like or aren't as mature as you'd hope—everything from cryptography through multithreading libraries and compiler/build infrastructure. - - * **Distributed team:** Profian is building a team of folks where we can find them. Profian has developers in Germany, Finland, the Netherlands, North Carolina (US), Massachusetts (US), Virginia (US), and Georgia (US). I'm in the United Kingdom, our community manager is in Brazil, and we have interns in India and Nigeria. We knew from the beginning that we wouldn't have everyone in one place, and this required people who would be able to communicate and collaborate with people via video, chat, and (at worst) email. - - * **Security:** Enarx is a security project. Although we weren't specifically looking for security experts, we need people who can think and work with security top of mind and design and write code that is applicable and appropriate for the environment. - - * **Git:** All of our code is stored in git (mainly [GitHub][5], with a bit of GitLab thrown in). so much of our interaction around code revolves around git that anybody joining us would need to be very comfortable using it as a standard tool in their day-to-day work. - - * **Open source:** Open source isn't just a licence; it's a mindset and, equally important, a way of collaborating. A great deal of open source software is created by people who aren't geographically co-located and who might not even see themselves as a team. We needed to know that the people we hired, while gelling as a close team within the company, would be able to collaborate with people outside the organisation and embrace Profian's "open by default" culture, not just for code, but for discussions, communications, and documentation. - - - - -### How did we find them? - -As I've mentioned elsewhere, [recruiting is hard][6]. Profian used a variety of means to find candidates, with varying levels of success: - - * LinkedIn job adverts - * LinkedIn searches - * Language-specific discussion boards and hiring boards (e.g., Reddit) - * An external recruiter (shout out to Gerald at [Interstem][7]) - * Word-of-mouth/personal recommendations - - - -It's difficult to judge between these sources in terms of quality, but without an external recruiter, we'd certainly have struggled with quantity (and we had some great candidates from that pathway, too). - -### How did we select them? - -We needed to measure all of the candidates against all of the requirements noted above, but not all of them were equal. For instance, although we were keen to hire Rust programmers, someone with strong C/C++ skills at the systems level would be able to pick up Rust quickly enough to be useful. On the other hand, a good knowledge of using git was absolutely vital, as we couldn't spend time working with new team members to bring them up to speed on our way of working. - -A strong open source background was, possibly surprisingly, not a requirement, but the mindset to work in that sort of model was, and anyone with a history of open source involvement is likely to have a good knowledge of git. The same goes for the ability to work in a distributed team: So much of open source is distributed that involvement in almost any open source community was a positive indicator. Security, we decided, was a "nice-to-have" qualification. - -We wanted to keep the process simple and quick. Profian doesn't have a dedicated HR or People function, and we're busy trying to get code written. This is what we ended up with (with slight variations), and we tried to complete it within 1-2 weeks: - - 1. Initial CV/resume/GitHub/GitLab/LinkedIn review to decide whether to interview - 2. 30-40 minute discussion with me as CEO, to find out if they might be a good cultural fit, to give them a chance to find out about us, and to get an idea if they were as technically adept as they appeared in Step 1 - 3. Deep dive technical discussion led by Nathaniel, usually with me there - 4. Chat with other members of the team - 5. Coding exercise - 6. Quick decision (usually within 24 hours) - - - -The coding exercise was key, but we decided against the usual approach. Our view was that a pure "algorithm coding" exercise beloved by many tech companies was pretty much useless for what we wanted: to find out whether a candidate could quickly understand a piece of code, fix some problems, and work with the team to do so. We created a GitHub repository with some almost-working Rust code in it (in fact, we ended up using two, with one for people a little higher up the stack), then instructed candidates to fix it, perform some git-related processes on it, and improve it slightly, adding tests along the way. - -An essential part of the test was to get candidates to interact with the team via our chat room(s). We scheduled 15 minutes on a video call for setup and initial questions, two hours for the exercise ("open book" – as well as talking to the team, candidates were encouraged to use all resources available to them on the Internet), followed by a 30-minute wrap-up session where the team could ask questions, and the candidate could reflect on the task. This conversation, combined with the chat interactions during the exercise, allowed us to get an idea of how well the candidate was able to communicate with the team. Afterwards, the candidate would drop off the call, and we'd most often decide within 5-10 minutes whether we wanted to hire them. - -This method generally worked very well. Some candidates struggled with the task, some didn't communicate well, some failed to do well with the git interactions – these were the people we didn't hire. It doesn't mean they're not good coders or might not be a good fit for the project or the company later on, but they didn't meet the criteria we need now. Of the developers we hired, the level of Rust experience and need for interaction with the team varied, but the level of git expertise and their reactions to our discussions afterwards were always sufficient for us to decide to take them. - -### Reflections - -On the whole, I don't think we'd change a huge amount about the selection process—though I'm pretty sure we could do better with the search process. The route through to the coding exercise allowed us to filter out quite a few candidates, and the coding exercise did a great job of helping us pick the right people. Hopefully, everyone who's come through the process will be a great fit and produce great code (and tests and documentation and …) for the project. Time will tell! - -* * * - -This article originally appeared on [Alice, Eve and Bob – a security blog][8] and is republished with permission. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/2/how-we-hired-open-source-developer - -作者:[Mike Bursell][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mikecamel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) -[2]: https://profian.com/ -[3]: https://enarx.dev/ -[4]: https://opensource.com/article/21/3/rust-programmer -[5]: https://github.com/enarx/ -[6]: https://aliceevebob.com/2021/11/09/recruiting-is-hard/ -[7]: https://www.interstem.co.uk/ -[8]: https://aliceevebob.com/ diff --git a/translated/talk/20220204 How we hired an open source developer.md b/translated/talk/20220204 How we hired an open source developer.md new file mode 100644 index 0000000000..c63ba8ad9a --- /dev/null +++ b/translated/talk/20220204 How we hired an open source developer.md @@ -0,0 +1,103 @@ +[#]: subject: "How we hired an open source developer" +[#]: via: "https://opensource.com/article/22/2/how-we-hired-open-source-developer" +[#]: author: "Mike Bursell https://opensource.com/users/mikecamel" +[#]: collector: "lujun9972" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我们如何聘请开源开发人员 +====== +我的团队不再采用标准的算法编程练习,而是采用一套能够产出更多相关成果的流程。 +![同一团队里来自不同地方的人][1] + +作为初创安全公司 [Profian][2] 的首席执行官和联合创始人,我参与了我们聘请开发人员从事 [Enarx][3] 的工作。Enarx是一个处理机密信息计算的安全项目,几乎完全用 [Rust语言][4] 编写(少部分用Assembly)。 Profian 现在已经在这次招聘找到了所有要找的人,一些开发人员将在接下来的几周内开始工作。然而,Enarx 绝对欢迎新的贡献者,如果事情继续顺利,公司将来肯定会雇用更多的人。 + +招聘人员并不容易,加上Profian还有一系列特别的要求,这让招人变得更加困难。因此我认为分享我们如何解决这个问题应该还蛮有意思的,而且也会对社区有帮助。 + +### 我们寻找什么样的人才? + +以下就是我前文提到的特别要求: + +* **系统编程:** Profian主要需要那些喜欢系统层编程的人。这一层面的编程已经处于栈的底层,有很多直接与硬件或操作系统的交互。例如,要创建客户端-服务器部分,我们必须编写相当多的协议、管理加密等等,而这方面的工具还不是很成熟(请参阅下面的“Rust”)。 + +* * **Rust:** 几乎所有项目都是用 Rust 语言编写的,那些不是的则是用Assembly写的(目前只有 x86,尽管随着我们添加更多平台情况可能会有所改变)。 Rust是一门很新、很酷同时也令人兴奋的编程语言,但它同时也很年轻,并且一些领域没有你想要的所有支持或者没有你希望的那么成熟——从多线程库的密码学到编译器/构建基本架构。 + +* **分散各地的团队:** Profian正在建立一个能够及时通讯联系的团队。 Profian 在德国、芬兰、荷兰、北卡罗来纳州(美国)、马萨诸塞州(美国)、弗吉尼亚州(美国)和乔治亚州(美国)都有开发人员。我在英国,我们的社区经理在巴西,我们有来自印度和尼日利亚的实习生。从一开始我们就知道团队很难聚集在一个地方工作,因此我们需要能够通过视频、聊天和(最不济的情况下)电子邮件与人交流和协作的成员。 + +* * **安全:** Enarx 是一个安全项目。虽然我们并不是在寻找安全专家,但我们需要能够将安全放在首位去思考和工作,并设计和编写适用于安全环境的代码的人。 + +* * **Git:** 我们所有的代码都存储在 git 中(主要是 [GitHub][5],还有一些存在 GitLab)。我们围绕代码的大部分交互都是围绕git进行的,因此任何加入我们团队的人都需要能自如使用它作为日常工作中的标准工具。 + +* **开源:** 开源不仅仅是许可;更是一种心态,同等重要的,这也是一种合作方式。大量开源软件是由不同地域的人创建的,他们甚至可能不认为彼此身处于一个团队。我们需要知道我们招的人不仅能在公司内部凝聚成一个紧密的团队,同时也能够与组织外部的人员协作,并接受 Profian 的“默认开放”文化,这里的开放不仅仅限于代码,还要有开放的讨论、沟通和文档。 + + + +### 我们是如何找到人才的? + +正如我在其他地方提到的,[招聘很困难][6]。Profian 使用多种方式寻找候选人,它们取得了不同程度的成功: + + * 领英招聘广告 + * 领英搜索 + * 特定语言的讨论板和招聘板(例如,Reddit) + * 外部招募人员(特别致敬来自[Interstem][7]公司的Gerald) + * 口口相传/个人推荐 + + + +虽然很难从质量方面判断这些来源如何,但如果没有外部招聘人员,我们肯定会在数量上苦苦挣扎(我们也有一些来自该途径的优秀候选人)。 + +### 我们如何筛选出想要的人才? + +我们需要按照上述的所有要求衡量所有候选人,但并非所有要求都是同等重要的。例如,虽然我们热衷于雇用 Rust 程序员,但那些在系统级别具有强大 C/C++ 技能的人也能成为团队里有用的一份子,因为她们能够很快掌握 Rust 语言。另一方面,熟悉使用 git 是至关重要的,因为我们无法花时间去培养新团队成员,让他们跟上我们的工作方式。 + +你可能会觉得很惊讶,但强大的开源背景并不是必需的要求,但在类似模式中工作的心态是必需的,而任何有开源参与历史的人都可能对 git 有很好的了解。同理,在一个分散各地的团队中工作的能力这一条件上,我们认为有过任意开源社区的参与经历都会是个积极的指标,因为有如此多的开源项目都是由分散各地的人们完成的。至于安全这一条件,我们则一致决定只是一个“锦上添花”的条件。 + +我们想让这个过程简单快捷。 Profian没有设置专门的人力资源部门或人力职能,因为我们正忙于编写代码。以下是我们最终使用的招聘流程(实际流程中可能略有不同),我们试图在 1-2 周内完成招聘: + + 1. 初审:个人履历/简历/GitHub/GitLab/领英主页,决定是否面试 + 2. 我作为CEO和候选人进行一场30-40分钟的讨论,了解他们是否适合我们团队的文化,同时让他们有机会了解我们,并了解他们是否真的像在初审提交的材料中所说的那样精通技术 + 3. 由 Nathaniel 领导的有关技术方面的深入讨论,通常我也在场 + 4. 与团队其他成员谈话 + 5. 编码练习题 + 6. 快速决策(通常在24小时内) + + + +编码练习题很关键,但我们决定不采用通常的方法。 我们的观点是,许多科技公司钟爱的纯“算法编码”练习对我们想要的几乎毫无用处:考察候选人是否可以快速理解一段代码,解决一些问题,并与团队合作完成以上的工作。我们创建了一个 GitHub 存储库,其中包含一些几乎可以正常运行的 Rust 代码(事实上,我们最终使用了两个,其中一个用于技术栈上层的人),然后让候选人修复它,在上面执行一些与 git 相关的过程,并稍作改进,在此过程中添加测试。 + +测试中一个必不可少的部分是让候选人通过我们的聊天室与团队互动。我们安排了 15 分钟的视频通话时间用于设置和初始问题,两个小时用于做习题(“开卷”——以及与团队交谈,鼓励候选人使用互联网上所有可用的资源),然后是 30 分钟的总结会议,在这个会议上团队可以提出问题,候选人可以反思任务。这次谈话,结合练习期间的聊天互动,让我们了解了候选人与团队沟通的能力。候选人挂断电话之后我们通常会在5-10分钟内决定是否要雇用他们。 + +这种方法通常效果很好。一些候选人在任务上遇到困难,一些人沟通不畅,一些人在git交互方面做得不好——这些是我们没有雇用的人。 这并不意味着他们不是优秀的程序员或者不适合未来的项目或公司,但他们不符合我们现在需要的标准。在我们聘用的开发人员中,他们的Rust经验水平和与团队互动的需求各不相同,但git专业知识水平以及他们在和我们讨论之后的反应始终足以让我们决定接受他们。 + + +### 反思 + +总的来说,我认为我们不会对筛选过程进行大量更改——尽管我很确定我们可以在搜寻过程环节做得更好。通过编码习题测试,我们可以筛选掉相当多的候选人,而且很好地帮了我们挑选合适的人。希望通过了这次选拔的每个人都很适合这个项目并且产出出色的代码(以及测试和文档等等)。时间会证明一切! + +* * * + +本文最初出现在 [Alice、Eve 和 Bob – 安全博客][8] 上,经许可后重新发布。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/how-we-hired-open-source-developer + +作者:[Mike Bursell][a] +选题:[lujun9972][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mikecamel +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) +[2]: https://profian.com/ +[3]: https://enarx.dev/ +[4]: https://opensource.com/article/21/3/rust-programmer +[5]: https://github.com/enarx/ +[6]: https://aliceevebob.com/2021/11/09/recruiting-is-hard/ +[7]: https://www.interstem.co.uk/ +[8]: https://aliceevebob.com/ From 7be64af5c91595fc1cc922f51d21e5773fe80d15 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Feb 2023 08:49:26 +0800 Subject: [PATCH 05/46] translated --- ...ry OS 7 Installation Guide with Screenshots.md | 117 ------------- ...ry OS 7 Installation Guide with Screenshots.md | 157 ++++++++++++++++++ 2 files changed, 157 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md create mode 100644 translated/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md diff --git a/sources/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md b/sources/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md deleted file mode 100644 index 6757bebe6f..0000000000 --- a/sources/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: subject: "Elementary OS 7 Installation Guide with Screenshots" -[#]: via: "https://www.linuxtechi.com/elementary-os-7-installation-guide/" -[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Elementary OS 7 Installation Guide with Screenshots -====== - -Hello techies, in this post, we will cover how to Install Elementary OS 7 step by step with screenshots on laptop or desktop. It is based on latest and stable Ubuntu 22.04 LTS. - -Elementary OS 7 with code name “Horus” released with lot of improvements like : - -- Improved AppCenter and install all application that one need. -- Improved sideloading and alt store (Flathub) experience -- Latest GNOME Web 43 support for creating web apps. -- Getting OS and Applicate Updates quickly -- Power Profile Management -- Improvement in App Description - -##### System Requirements for Elementary OS 7 - -- Dual Core 64-bit processor -- 4 GB RAM or more -- 32 GB hard disk -- Internet Access -- Bootable USB Flash Drive ( 4 GB Storage) - -Without any further delay, let’s jump into the installation steps - -### 1) Download Elementary OS 7 - -Use below official URL to download ISO file, - -- Download Elementary OS 7 ISO - -Once ISO file is downloaded then burn it into USB flash drive and make it bootable. - -On Windows operating use “Rufus” software to make bootable USB drive using ISO file. In Linux, refer the following URL: - -- How to Create Bootable USB Drive on Ubuntu / Linux Mint - -### 2) Boot the system with bootable media - -Now boot the target system with bootable USB drive. From bios settings change the boot medium from hard disk to USB. When the system boots up with USB drive then we will get the following screen, - -### 3) Select Language for Installation - -Choose your preferred language and then click select, - -### 4) Choose Keyboard Layout - -In this step, you will be requested to choose keyboard layout and then click on ‘Select’ - -### 5) Try or Install elementary OS - -We will be presented the beneath screen, where we must our choose installation type. It gives us following options, - -- Try Demo Mode – Try Elementary OS 7 without installing -- Erase disk and Install – Installer will erase the whole disk and will create required partitions automatically. -- Custom Install (Advanced) – It will give us the option to create custom partitions. - -In this post, I will go with the 2nd option (Erase disk and install). - -Click on “Erase Disk and Install” - -In the following screen, select the drive on which OS will be installed and then click on “Erase and Install” - -If you want to encrypt the device’s drive, then click on “Choose Password” else click on “Don’t Encrypt”. - -### 6) Installation Progress - -As we can see below, installation got started and is in progress. - -Once the installation is completed, installer will prompt to reboot the system. - -Click on “Restart Device” and don’t forget to change boot medium from bios settings so that it boots up with the disk. - -### 7) Create Local User and Set Hostname - -When the system boots up after the installation, you will be prompted to enter local user details and hostname of your system. - -Specify the details as per your requirement, - -Click on “Finish Setup”. - -In the following screen, you will be prompted to enter your local user credentials that you have created above, - -After entering the credentials, hit enter - -### 8) Elementary OS 7 Welcome Screen - -We will get the beneath welcome screen, - -Choose “Skip All” - -Click “Get Started” and then we will get following desktop screen, - -Great, it confirms that you have successfully installed Elementary OS 7 on your system. That’s all from this guide, explore this exciting Linux distribution and have fun 😊. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/elementary-os-7-installation-guide/ - -作者:[Pradeep Kumar][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linuxtechi.com/author/pradeep/ -[b]: https://github.com/lkxed - diff --git a/translated/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md b/translated/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md new file mode 100644 index 0000000000..e8f7d012c5 --- /dev/null +++ b/translated/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md @@ -0,0 +1,157 @@ +[#]: subject: "Elementary OS 7 Installation Guide with Screenshots" +[#]: via: "https://www.linuxtechi.com/elementary-os-7-installation-guide/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Elementary OS 7 安装指南及截图 +====== + +你好,技术人员,在这篇文章中,我们将介绍如何在笔记本电脑或台式机上一步一步地安装 Elementary OS 7,并附有截图。它是基于最新和稳定的 Ubuntu 22.04 LTS。 + +Elementary OS 7 的代号为 “Horus”,并带来了很多改进,例如: + +- 改进了 AppCenter 和安装所有需要的应用。 +- 改进了 Sideload 和可选商店 (Flathub) 的体验。 +- 最新的 GNOME Web 43,支持创建网络应用。 +- 快速获得操作系统和应用的更新 +- 电源配置文件管理 +- 应用描述的改进 + +##### Elementary OS 7 的系统要求 + +- 双核 64 位处理器 +- 4GB 内存或更多 +- 32GB 硬盘 +- 互联网接入 +- 可启动的 USB 驱动器(4GB 存储空间) + +闲话少说,让我们进入安装步骤 + +### 1)下载 Elementary OS 7 + +使用下面的官方网址来下载 ISO 文件。 + +- [下载 Elementary OS 7 ISO][1] + +ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动。 + +在 Windows 操作系统中,用 “Rufus” 制作可启动的 USB 驱动器。在 Linux 中,请参考以下网址: + +- [如何在 Ubuntu/Linux Mint 上创建可启动的 USB 驱动器][2] + +### 2)用可启动媒体启动系统 + +现在用可启动的 USB 驱动器启动目标系统。从 bios 设置中把启动介质从硬盘改为 USB。当系统用 USB 驱动器启动时,我们将看到以下页面。 + +![][3] + +### 3)选择安装语言 + +选择你喜欢的语言,然后点击“选择”。 + +![][4] + +### 4)选择键盘布局 + +在这一步,你将被要求选择键盘布局,然后点击“选择”。 + +![][5] + +### 5) 尝试或安装 elementary OS + +我们将看到下面的页面,在这里我们必须选择安装类型。它给了我们以下选项: + +- 试用演示模式 – 试用 Elementary OS 7 而不安装 +- 擦除磁盘并安装 – 安装程序将擦除整个磁盘并自动创建所需分区。 +- 自定义安装(高级)– 它将给我们一个选项来创建自定义分区。 + +在这篇文章中,我将使用第二个选项(擦除磁盘并安装)。 + +![][6] + +点击“擦除磁盘并安装”。 + +在下面的屏幕上,选择要安装操作系统的驱动器,然后点击“擦除并安装”。 + +![][7] + +如果你想对设备的驱动器进行加密,那么点击“选择密码”,否则点击“不加密”。 + +![][8] + +### 6)安装进度 + +正如我们在下面看到的,安装已经开始,并且正在进行中。 + +![][9] + +安装完成后,安装程序将提示重启系统。 + +![][10] + +点击“重启设备”,不要忘记从 bios 设置中改变启动介质,以便用磁盘启动。 + +### 7)创建本地用户并设置主机名 + +当系统在安装后启动时,系统会提示你输入本地用户的详细信息和系统的主机名。 + +根据你的要求指定这些细节。 + +![][11] + +点击“完成设置”。 + +在下面的页面中,你将被提示输入你在上面创建的本地用户凭证。 + +![][12] + +输入凭证后,点击回车。 + +### 8)Elementary OS 7 欢迎页 + +我们将看到下面的欢迎页。 + +![][13] + +选择“跳过所有”。 + +![][14] + +点击“开始使用”,然后我们会看到下面的桌面。 + +![][15] + +很好,这表明你已经成功地在系统上安装了 Elementary OS 7。这就是本指南的全部内容,请探索这个令人兴奋的 Linux 发行版并享受其中的乐趣吧😊。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/elementary-os-7-installation-guide/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://elementary.io/ +[2]: https://www.linuxtechi.com/create-bootable-usb-disk-dvd-ubuntu-linux-mint/ +[3]: https://www.linuxtechi.com/wp-content/uploads/2023/02/BootScreen-elementaryOS7.png?ezimgfmt=ng:webp/ngcb22 +[4]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Keyboard-Layout-ElementaryOS7-Installation.png?ezimgfmt=ng:webp/ngcb22 +[5]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Keyboard-Layout-ElementaryOS7-Installation.png?ezimgfmt=ng:webp/ngcb22 +[6]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Installation-Type-ElementaryOS7.png?ezimgfmt=ngcb22/notWebP +[7]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Select-Drive-for-elementaryOS7-Installation.png?ezimgfmt=ng:webp/ngcb22 +[8]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Encryption-Drive-ElementaryOS7-Installation.png?ezimgfmt=ng:webp/ngcb22 +[9]: https://www.linuxtechi.com/wp-content/uploads/2023/02/ElementaryOS7-Installation-Progress.png?ezimgfmt=ng:webp/ngcb22 +[10]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Restart-Device-After-elementaryOS7-Installation.png?ezimgfmt=ng:webp/ngcb22 +[11]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Create-Local-Account-ElementaryOS7.png?ezimgfmt=ng:webp/ngcb22 +[12]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Login-screen-elementaryos7.png?ezimgfmt=ng:webp/ngcb22 +[13]: https://www.linuxtechi.com/wp-content/uploads/2023/02/ElementaryOS7-Welcome-Screen.png?ezimgfmt=ng:webp/ngcb22 +[14]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Get-Started-ElementaryOS7.png?ezimgfmt=ng:webp/ngcb22 +[15]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Desktop-Screen-ElementaryOS7-After-Installation.png \ No newline at end of file From 6b322b02d5f446e7dba3f3d73da0929679e18775 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Feb 2023 08:55:22 +0800 Subject: [PATCH 06/46] translating --- ...ing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20221118.0 ⭐️⭐️ Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md b/sources/tech/20221118.0 ⭐️⭐️ Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md index 45b626bd9d..9e5294515c 100644 --- a/sources/tech/20221118.0 ⭐️⭐️ Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md +++ b/sources/tech/20221118.0 ⭐️⭐️ Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/" [#]: author: "Abhishek Prakash https://itsfoss.com/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 62e63ca65c982bac71b400eaddb222bca5f9ec1f Mon Sep 17 00:00:00 2001 From: Xiaoting Huang <1912890545@qq.com> Date: Tue, 14 Feb 2023 12:42:42 +0800 Subject: [PATCH 07/46] Update 20220616 -It-s time to contribute to open source-.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译任务申领 --- .../talk/20220616 -It-s time to contribute to open source-.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20220616 -It-s time to contribute to open source-.md b/sources/talk/20220616 -It-s time to contribute to open source-.md index 9d4e58d4d6..be8175978d 100644 --- a/sources/talk/20220616 -It-s time to contribute to open source-.md +++ b/sources/talk/20220616 -It-s time to contribute to open source-.md @@ -2,7 +2,7 @@ [#]: via: "https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/" [#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From cd0c7cb2341e36a275a3526229e00aa1e1a2af10 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Feb 2023 14:29:05 +0800 Subject: [PATCH 08/46] RP @gpchn https://linux.cn/article-15538-1.html --- ... Install DOSBox in Ubuntu to Play Old Games.md | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) rename {translated/tech => published}/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md (65%) diff --git a/translated/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md b/published/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md similarity index 65% rename from translated/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md rename to published/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md index 91629ca867..d0defcde55 100644 --- a/translated/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md +++ b/published/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md @@ -3,20 +3,22 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "gpchn" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15538-1.html" 如何在 Ubuntu 中安装 DOSBox 玩老游戏 ====== -**了解如何在 Ubuntu 中安装 DOSBox,并配置它来玩旧的 DOS 游戏。** +![][0] -DOSBox 是一个免费的开源操作系统模拟器,可以在现代 Linux 系统中运行。它有几个组件可以模仿旧的硬件,以运行旧程序和游戏。 +> 了解如何在 Ubuntu 中安装 DOSBox,并配置它来玩旧式 DOS 游戏。 + +DOSBox 是一个自由开源的操作系统模拟器,可以在现代 Linux 系统中运行。它有几个组件可以模仿旧的硬件,以运行旧的程序和游戏。 这一切使得在现代 Linux 发行版中享受旧游戏和应用程序成为可能。 -在本指南中,我将向您展示如何安装 DOSBox,配置它,并玩一个示例游戏。 +在本指南中,我将向你展示如何安装 DOSBox,配置它,并玩一个示例游戏。 ### 在 Ubuntu 中安装 DOSBox @@ -40,7 +42,7 @@ sudo dnf install dosbox pacman -S --needed dosbox ``` -这将结束安装。现在是配置和运行的时候了。 +安装就结束了。现在是配置和运行的时候了。 ### 运行 DOSBox @@ -50,19 +52,19 @@ pacman -S --needed dosbox dosbox ``` -它将显示以下界面,这是 DOSBox 提示。第一次运行非常重要,因为它会创建 DOSBox 配置文件。 +它将显示以下界面,这是 DOSBox 提示符。第一次运行非常重要,因为它会创建 DOSBox 配置文件。 键入 `exit` 暂时关闭 DOSBox。 ![DOSBox first time run][1] -配置文件为您提供了几个调整设置的选项。在 Ubuntu 中,该文件创建在 `~/.dosbox/dosbox-[version].conf`。 +配置文件为你提供了几个调整设置的选项。在 Ubuntu 中,该文件创建在 `~/.dosbox/dosbox-[version].conf`。 在 Fedora 中,它从以下路径加载临时配置文件 `~/.config/dosbox/dosbox-staging.conf`. -默认情况下,您可以使用默认配置。但是如果您愿意,您可以修改它。 +默认情况下,你可以使用默认配置。但是如果你愿意,你可以修改它。 -例如,如果您想全屏启动 DOSBox,您可以启用或禁用相关设置。像这样: +例如,如果你想全屏启动 DOSBox,你可以启用或禁用相关设置。像这样: ``` fullscreen=false @@ -75,25 +77,26 @@ sensitivity=100 waitonerror=true ``` -您可以在官方文档中找到所有的设置选项 [documentation][2]. +你可以在 [官方文档][2] 中找到所有的设置选项。 ### 下载以及游玩老游戏 有许多网站提供旧的 DOS 游戏。我使用过下面的网站,它提供了一套可以在现代系统中玩的老游戏。 -所以,访问下面的网站,下载您想要的任何游戏。 +所以,访问下面的网站,下载你想要的任何游戏。 -[下载 DOS 游戏][3] +> **[下载 DOS 游戏][3]** -在您的 /home 目录下创建一个文件夹,并将其命名为 dosbox: +在你的 `/home` 目录下创建一个文件夹,并将其命名为 `dosbox`: ``` -cd ~mkdir dosbox +cd ~ +mkdir dosbox ``` -现在,解压您下载的游戏(应该是一个 .exe 文件),在 `~/dosbox` 目录下创建一个单独的文件夹。 +现在,解压你下载的游戏(应该是一个 .exe 文件),在 `~/dosbox` 目录下创建一个单独的文件夹。 -例如,我下载了游戏 “马里奥和路易吉(1994)”。我在 “dosbox” 文件夹中创建了一个名为 “mario” 的文件夹,并将游戏文件放进去。 +例如,我下载了游戏 “马里奥和路易吉(1994)”。我在 `dosbox` 文件夹中创建了一个名为 `mario` 的文件夹,并将游戏文件放进去。 ![Keep the game in a separate folder][4] @@ -115,7 +118,7 @@ mount c ~/dosbox/mario c: ``` -现在,您可以输入游戏的文件名来运行游戏: +现在,你可以输入游戏的文件名来运行游戏: ``` mario @@ -127,21 +130,21 @@ mario ### 键盘或控制器映射 -默认情况下,DOSBox 会自动检测键盘或您插入的控制器。但是,如果您想更改游戏按键绑定,可以从终端运行以下命令: +默认情况下,DOSBox 会自动检测键盘或你插入的控制器。但是,如果你想更改游戏按键绑定,可以从终端运行以下命令: ``` dosbox -startmapper ``` -它将显示以下界面,每个键上都标记有事件。您可以点开任何一个键,根据自己的习惯进行更改。 +它将显示以下界面,每个键上都标记有事件。你可以点开任何一个键,根据自己的习惯进行更改。 ![DOSBox keyboard and controller mapping][7] ### 结论 -我希望您在 Ubuntu 和其他发行版中安装了 DOSBox 之后,能够运行您最喜欢的 DOS 游戏。DOSBox 是最酷的软件之一,您可以使用它来运行任何程序,例如 [Turbo C][8] 等。 +我希望你在 Ubuntu 和其他发行版中安装了 DOSBox 之后,能够运行你最喜欢的 DOS 游戏。DOSBox 是最酷的软件之一,你可以使用它来运行任何程序,例如 [Turbo C][8] 等。 -如果您有任何麻烦或问题,请在评论区告诉我。 +如果你有任何麻烦或问题,请在评论区告诉我。 享受游戏吧! @@ -152,7 +155,7 @@ via: https://www.debugpoint.com/install-dosbox-ubuntu/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[gpchn](https://github.com/gpchn) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -166,3 +169,4 @@ via: https://www.debugpoint.com/install-dosbox-ubuntu/ [6]: https://www.debugpoint.com/wp-content/uploads/2023/02/Mario-playing-in-DOSBox-in-Ubuntu.jpg [7]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBOox-keyboard-and-controller-mapping.jpg [8]: https://www.debugpoint.com/setting-up-dosbox-in-ubuntu-to-run-turbo-c/ +[0]: https://img.linux.net.cn/data/attachment/album/202302/14/142608nsoov2vory2nipiv.jpg \ No newline at end of file From 0f040d20a0f209cb17c2f12c34a65950a43e6c64 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Feb 2023 14:49:51 +0800 Subject: [PATCH 09/46] RP @Chao-zhi https://linux.cn/article-15539-1.html --- ...️ Learn zip Command in Linux Using Examples.md | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) rename {translated/tech => published}/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md (67%) diff --git a/translated/tech/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md b/published/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md similarity index 67% rename from translated/tech/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md rename to published/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md index 20ac21e44f..6d04f8d7d8 100644 --- a/translated/tech/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md +++ b/published/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md @@ -3,50 +3,52 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "Chao-zhi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15539-1.html" -通过实例学习Linux中的zip命令 +zip 命令的解释与示例 ====== -**这里是关于理解 Linux 中的 zip 命令的初学者指南,并附有一些例子。** +> 这是一份关于理解 Linux 中的 zip 命令的初学者指南,并附有一些例子。 ![][1] +这篇文章是 [Linux 命令][4]学习系列的一部分。 + zip 文件是一个包含一个或多个文件的压缩档案。它作为一种无损数据压缩技术被广泛使用。由于压缩,它占用的磁盘空间更少,在计算机网络上传输时需要的数据也更少。 -这些压缩文件可以在 Linux、Windows 和 macOS 中轻松提取。有各种支持压缩文件的软件,也提供提取它们的功能。 +这些压缩文件可以在 Linux、Windows 和 macOS 中轻松提取。有各种支持压缩 zip 文件的软件,也提供提取它们的功能。 由于它很流行,几乎所有的操作系统都内置了这个功能。 在本教程中,我们将谈论几种基于终端的方法来压缩 Linux 中的文件。 -### Linux 中的 Zip 命令,例子: +### Linux 中的 Zip 命令示例 #### 语法 -在 Linux 中,你需要使用的压缩文件的程序名称是`zip`。下面是基本的语法。 +在 Linux 中,你需要使用的压缩文件的程序名称是 `zip`。下面是基本的语法: -``` sh +``` zip [压缩文件名] file1 file2 file3 ``` -这里是官方的语法。 +以下是正式的语法: -``` sh +``` zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list] ``` -理想情况下,zip 命令应该被安装在所有主要的 Linux 发行版中。如果没有,使用下面的命令来安装它。 +理想情况下,`zip` 命令应该被安装在所有主流的 Linux 发行版中。如果没有,使用下面的命令来安装它。 -#### 在 Debian, Ubuntu and 相关发行版上安装 +#### 在 Debian、Ubuntu 和相关发行版上安装 ``` sudo apt install zip ``` -#### 在 Fedora, 基于 RHEL 的系统上安装 +#### 在 Fedora、基于 RHEL 的系统上安装 ``` sudo dnf install zip @@ -58,17 +60,17 @@ sudo dnf install zip pacman -S zip ``` -让我们继续看一些例子 +让我们继续看一些例子。 #### 如何压缩文件和文件夹 -我的测试目录中有以下三个文件。它们是 file1.txt、file2.txt 和 file3.txt。如果我想用 zip 压缩三个文件,并创建一个 myfiles.zip 的压缩包,用下面的命令就可以了。 +我的测试目录中有以下三个文件。它们是 `file1.txt`、`file2.txt` 和 `file3.txt`。如果我想用 zip 压缩三个文件,并创建一个 `myfiles.zip` 的压缩包,用下面的命令就可以了。 ``` zip myfiles.zip file1.txt file2.txt file3.mp3 ``` -输出。 +输出: ``` adding: file1.txt (stored 0%) @@ -81,12 +83,12 @@ adding: file3.mp3 (deflated 13%) 这里你应该记住几个要点。 - 当创建一个 zip 文件时,你应该有对当前目录的修改权限。 -- zip 文件格式不包含权限,即读(4),写(2),和执行(1)。所以,创建该文件的用户成为该文件的所有者。 -- 如果你想使用有权限的 zip,可以尝试使用 `tar` 命令(将在后面的教程中解释)。 +- zip 文件格式不包含权限,即读(4)、写(2),和执行(1)。所以,创建该文件的用户成为该文件的所有者。 +- 如果你想使用带有权限的 zip,可以尝试使用 `tar` 命令(将在后面的教程中解释)。 - 在上面的输出中,`zip` 命令显示了被添加到存档中的文件名和压缩方法。 - 在目标文件名中指定 .zip 文件名的扩展名并不是必须的。如果你省略了 .zip,`zip` 会在最后加上 .zip。 -当你有成百上千的文件在运行时,可以在终端中减少输出。你可以使用 `-q` 参数来抑制 `zip` 命令中的输出。 +当你操作成百上千的文件时,为了减少终端中的输出,你可以使用 `-q` 参数来抑制 `zip` 命令中的输出: ``` zip -q myfiles.zip file1.txt file2.txt file3.txt @@ -96,13 +98,13 @@ zip -q myfiles.zip file1.txt file2.txt file3.txt `zip` 命令的 `-r` 选项使你能够囊括所有子目录。这个选项会递归地遍历到一个目录结构的最后一个子目录,并将它们全部加入到压缩文件中。 -下面的命令创建了一个包含 my_folder 内所有内容和子目录的压缩文件。 +下面的命令创建了一个包含 `my_folder` 内所有内容和子目录的压缩文件: ``` zip -r myfolder.zip my_folder ``` -你也可以使用通配符(*)在你的压缩文件中包含特定类型的文件。 +你也可以使用通配符(`*`)在你的压缩文件中包含特定类型的文件: ``` zip -0 my_movies.zip *.mp4 @@ -118,9 +120,9 @@ zip -r myfiles.zip file1.txt file2.txt file3.txt my_folder1 my_folder2 ### 压缩算法 -zip 压缩的默认输出包含两个不同的词,即 deflate 和 store。zip 默认使用的压缩方法是 deflate。如果它成功地压缩了文件,那么输出显示 deflate。而当它不能压缩一个文件时,它只是将它们原封不动地存储在 .zip 文件中。这些文件的输出显示为 store。 +zip 压缩的默认输出包含两个不同的词,即 `deflate` 和 `store`。zip 默认使用的压缩方法是 `deflate`。如果它成功地压缩了文件,那么输出显示 `deflate`。而当它不能压缩一个文件时,它只是将它们原封不动地存储在 .zip 文件中。这些文件的输出显示为 `store`。 -目前有许多压缩算法。其中一种是 bzip2 压缩法,它在 Linux 中被 `zip` 命令所支持。你可以指定压缩算法作为一个命令选项来使用。使用选项 `-Z`,后面跟上算法名称,如下所示。 +目前有许多压缩算法。其中一种是 bzip2 压缩法,在 Linux 中的 `zip` 命令支持它。你可以指定压缩算法作为一个命令选项来使用。使用选项 `-Z`,后面跟上算法名称,如下所示: ``` zip -r -Z bzip2 myfolder.zip my_folder @@ -138,7 +140,7 @@ zip -9 -r myfolder.zip my_folder #### 用密码保护一个压缩文件 -你也可以用下面的 `-e` 选项对压缩文件进行密码保护。 +你也可以用下面的 `-e` 选项对压缩文件进行密码保护: ``` zip -e -r myfolder.zip my_folder @@ -146,7 +148,7 @@ zip -e -r myfolder.zip my_folder 运行该命令后,它将要求输入密码。 -> 注意。尽量不要使用 zip 命令来对压缩文件进行密码保护。zip 的加密算法是使用流密码的 PKZIP。而它很容易被破解。如果你想保护你的文件,请使用 7-Zip 或其他高级工具。 +> 注意。尽量不要使用 zip 命令来对压缩文件进行密码保护。zip 的加密算法是使用流式加密的 PKZIP。而它很容易被破解。如果你想保护你的文件,请使用 7-Zip 或其他高级工具。 #### 分割较大的压缩文件 @@ -160,9 +162,8 @@ zip -s 1g -r myfolder.zip my_folder 你学到了一些 `zip` 命令的基本知识。它对大多数本地情况很有用,在这些情况下,你需要通过即时压缩来进行快速备份。然而,对于更高级的选项,你应该使用 7-Zip 或其他命令,我将在接下来的几篇文章中分享。 -同时,你可以在 [zip 手册][3]中了解更多。 +同时,你可以在 [zip 手册][3] 中了解更多。 -_这篇文章是 [Linux 命令][4]学习系列的一部分。_ -------------------------------------------------------------------------------- @@ -171,7 +172,7 @@ via: https://www.debugpoint.com/zip-command-linux-examples/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[Chao-zhi](https://github.com/Chao-zhi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4a80be24fb7ccee8b573380d28c3a25f01c77732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Tue, 14 Feb 2023 20:08:12 +0800 Subject: [PATCH 10/46] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][te?= =?UTF-8?q?ch]:=2020230213.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Lear?= =?UTF-8?q?n=20Expect=20by=20writing=20and=20automating=20a=20simple=20gam?= =?UTF-8?q?e.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Expect by writing and automating a simple game.md | 251 ++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 sources/tech/20230213.0 ⭐️⭐️ Learn Expect by writing and automating a simple game.md diff --git a/sources/tech/20230213.0 ⭐️⭐️ Learn Expect by writing and automating a simple game.md b/sources/tech/20230213.0 ⭐️⭐️ Learn Expect by writing and automating a simple game.md new file mode 100644 index 0000000000..362c2ac6c8 --- /dev/null +++ b/sources/tech/20230213.0 ⭐️⭐️ Learn Expect by writing and automating a simple game.md @@ -0,0 +1,251 @@ +[#]: subject: "Learn Expect by writing and automating a simple game" +[#]: via: "https://opensource.com/article/23/2/learn-expect-automate-simple-game" +[#]: author: "James Farrell https://opensource.com/users/jamesf" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Learn Expect by writing and automating a simple game +====== + +While trying to automate my workflow, I hit upon a configuration utility that defied meaningful automation. It was a Java process that didn't support a silent installer, or support `stdin`, and had an inconsistent set of prompts. Ansible's `expect` module was inadequate for this task. But I found that the `expect` command was just the tool for the job. + +My journey to learn Expect meant [learning a bit of Tcl][1]. Now that I have the background to create simple programs, I can better learn to program in Expect. I thought it would be fun to write an article that demonstrates the cool functionality of this venerable utility. + +This article goes beyond the typical simple game format. I plan to use parts of Expect to create the game itself. Then I demonstrate the real power of Expect with a separate script to automate playing the game. + +This programming exercise shows several classic programming examples of variables, input, output, conditional evaluation, and loops. + +### Install Expect + +For Linux based systems use: + +``` +$ sudo dnf install expect +$ which expect +/bin/expect +``` + +I found that my version of Expect was included in the base operating system of macOS: + +``` +$ which expect +/usr/bin/expect +``` + +On macOS, you can also load a slightly newer version using brew: + +``` +$ brew install expect +$ which expect +/usr/local/bin/expect +``` + +### Guess the number in Expect + +The number guessing game using Expect is not that different from the base Tcl I used in my [previous article][1]. + +All things in Tcl are strings, including variable values. Code lines are best contained by curly braces (Instead of trying to use line continuation). Square brackets are used for command substitution. Command substitution is useful for deriving values from other functions. It can be used directly as input where needed. You can see all of this in the subsequent script. + +Create a new game file `numgame.exp`, set it to be executable, and then enter the script below: + +``` +#!/usr/bin/expect + +proc used_time {start} { + return [expr [clock seconds] - $start] +} + +set num [expr round(rand()*100)] +set starttime [clock seconds] +set guess -1 +set count 0 + +send "Guess a number between 1 and 100\n" + +while { $guess != $num } { + incr count + send "==> " + + expect { + -re "^(\[0-9]+)\n" { + send "Read in: $expect_out(1,string)\n" + set guess $expect_out(1,string) + } + + -re "^(.*)\n" { + send "Invalid entry: $expect_out(1,string) " + } + } + + if { $guess < $num } { + send "Too small, try again\n" + } elseif { $guess > $num } { + send "Too large, try again\n" + } else { + send "That's right!\n" + } +} + +set used [used_time $starttime] + +send "You guessed value $num after $count tries and $used elapsed seconds\n" +``` + +Using `proc` sets up a function (or procedure) definition. This consists of the name of the function, followed by a list containing the parameters (1 parameter `{start}`) and then followed by the function body. The return statement shows a good example of nested Tcl command substitution. The `set` statements define variables. The first two use command substitution to store a random number and the current system time in seconds. + +The `while` loop and if-elseif-else logic should be familiar. Note again the particular placement of the curly braces to help group multiple command strings together without needing line continuation. + +The big difference you see here (from the previous Tcl program) is the use of the functions `expect` and `send` rather than using `puts` and `gets`. Using `expect` and `send` form the core of Expect program automation. In this case, you use these functions to automate a human at a terminal. Later you can automate a real program. Using the `send` command in this context isn't much more than printing information to screen. The `expect` command is a bit more complex. + +The `expect` command can take a few different forms depending on the complexity of your processing needs. The typical use consists of one of more pattern-action pairs such as: + +``` +expect "pattern1" {action1} "pattern2" {action2} +``` + +More complex needs can place multiple pattern action pairs within curly braces optionally prefixed with options that alter the processing logic. The form I used above encapsulates multiple pattern-action pairs. It uses the option `-re` to apply regex processing (instead of glob processing) to the pattern. It follows this with curly braces encapsulating one or more statements to execute. I've defined two patterns above. The first is Is intended to match a string of 1 or more numbers: + +``` +"^(\[0-9]+)\n" +``` + +The second pattern is designed to match anything else that is not a string of numbers: + +``` +"^(.*)\n" +``` + +Take note that this use of `expect` is executed repeatedly from within a `while` statement. This is a perfectly valid approach to reading multiple entries. In the automation, I show a slight variation of Expect that does the iteration for you. + +Finally, the `$expect_out` variable is an array used by `expect` to hold the results of its processing. In this case, the variable `$expect_out(1,string)` holds the first captured pattern of the regex. + +### Run the game + +There should be no surprises here: + +``` +$ ./numgame.exp +Guess a number between 1 and 100 +==> Too small, try again +==> 100 +Read in: 100 +Too large, try again +==> 50 +Read in: 50 +Too small, try again +==> 75 +Read in: 75 +Too small, try again +==> 85 +Read in: 85 +Too large, try again +==> 80 +Read in: 80 +Too small, try again +==> 82 +Read in: 82 +That's right! +You guessed value 82 after 8 tries and 43 elapsed seconds +``` + +One difference you may notice is the impatiencethis version exhibits. If you hesitate long enough, expect timeouts with an invalid entry. It then prompts you again. This is different from `gets` which waits indefinitely. The `expect` timeout is a configurable feature. It helps deal with hung programs or during an unexpected output. + +### Automate the game in Expect + +For this example, the Expect automation script needs to be in the same folder as your `numgame.exp` script. Create the `automate.exp` file, make it executable, open your editor, and enter the following: + +``` +#!/usr/bin/expect + +spawn ./numgame.exp + +set guess [expr round(rand()*100)] +set min 0 +set max 100 + +puts "I'm starting to guess using the number $guess" + +expect { + -re "==> " { + send "$guess\n" + expect { + "Too small" { + set min $guess + set guess [expr ($max+$min)/2] + } + "Too large" { + set max $guess + set guess [expr ($max+$min)/2] + } + -re "value (\[0-9]+) after (\[0-9]+) tries and (\[0-9]+)" { + set tries $expect_out(2,string) + set secs $expect_out(3,string) + } + } + exp_continue + } + + "elapsed seconds" +} + +puts "I finished your game in about $secs seconds using $tries tries" +``` + +The `spawn` function executes the program you want to automate. It takes the command as separate strings followed by the arguments to pass to it. I set the initial number to guess, and the real fun begins. The `expect` statement is considerably more complicated and illustrates the power of this utility. Note that there is no looping statement here to iterate over the prompts. Because my game has predictable prompts, I can ask `expect`to do a little more processing for me. The outer `expect` attempts to match the game input prompt of `==>` . Seeing that, it uses `send` to guess and then uses an additional `expect` to figure out the results of the guess. Depending on the output, variables are adjusted and calculated to set up the next guess. When the prompt `==>` is matched, the `exp_continue` statement is invoked. That causes the outer `expect` to be re-evaluated. So a loop here is no longer needed. + +This input processing relies on another behavior of Expect's processing. Expect buffers the terminal output until it matches a pattern. This buffering includes any embedded end of line and other unprintable characters. This is different than the typical regex line matching you are used to with Awk and Perl. When a pattern is matched, anything coming after the match remains in the buffer. It's made available for the next match attempt. I've exploited this to cleanly end the outer `expect` statement: + +``` +-re "value (\[0-9]+) after (\[0-9]+) tries and (\[0-9]+)" +``` + +You can see that the inner pattern matches the correct guess and does not consume all of the characters printed by the game. The very last part of the string (elapsed seconds) is still buffered after the successful guess. On the next evaluation of the outer `expect` , this string is matched from the buffer to cleanly end (no action is supplied). Now for the fun part, let's run the full automation: + +``` +$ ./automate.exp +spawn ./numgame.exp +I'm starting to guess with the number 99 +Guess a number between 1 and 100 +==> 99 +Read in: 99 +Too large, try again +==> 49 +Read in: 49 +Too small, try again +==> 74 +Read in: 74 +Too large, try again +==> 61 +Read in: 61 +Too small, try again +==> 67 +Read in: 67 +That's right! +You guessed value 67 after 5 tries and 0 elapsed seconds +I finished your game in about 0 seconds using 5 tries +``` + +Wow! My number guessing efficiency dramatically increased thanks to automation! A few trial runs resulted in anywhere from 5-8 guesses on average. It also always completed in under 1 second. Now that this pesky, time-consuming fun can be dispatched so quickly, I have no excuse to delay other more important tasks like working on my home-improvement projects :P + +### Never stop learning + +This article was a bit lengthy but well worth the effort. The number guessing game offered a good base for demonstrating a more interesting example of Expect processing. I learned quite a bit from the exercise and was able to complete my work automation successfully. I hope you found this programming example interesting and that it helps you to further your automation goals. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/2/learn-expect-automate-simple-game + +作者:[James Farrell][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jamesf +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/2/learn-tcl-writing-simple-game + From 48ca1adfbc59007d4955ae78822bbe028aaed29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Tue, 14 Feb 2023 20:09:19 +0800 Subject: [PATCH 11/46] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][ta?= =?UTF-8?q?lk]:=2020230213.1=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F?= =?UTF-8?q?=E2=AD=90=EF=B8=8F=20A=2010-step=20guide=20for=20a=20successful?= =?UTF-8?q?=20hackathon.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...⭐️ A 10-step guide for a successful hackathon.md | 305 ++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 sources/talk/20230213.1 ⭐️⭐️⭐️ A 10-step guide for a successful hackathon.md diff --git a/sources/talk/20230213.1 ⭐️⭐️⭐️ A 10-step guide for a successful hackathon.md b/sources/talk/20230213.1 ⭐️⭐️⭐️ A 10-step guide for a successful hackathon.md new file mode 100644 index 0000000000..5514488bd7 --- /dev/null +++ b/sources/talk/20230213.1 ⭐️⭐️⭐️ A 10-step guide for a successful hackathon.md @@ -0,0 +1,305 @@ +[#]: subject: "A 10-step guide for a successful hackathon" +[#]: via: "https://opensource.com/article/23/2/hackathon-guide" +[#]: author: "Tiffany Long https://opensource.com/users/tiffany-long" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A 10-step guide for a successful hackathon +====== + +Hackathons are easy. How much thought do you need to put into them anyway? Just set a date, and people will show up. Well, that is not quite true! + +While you may get lucky with that approach, the reality is that hackathons are a keystone experience in the tech industry, and attendees have specific expectations. Not only that, but your organization also has certain needs and should set goals for a hackathon. So, how do you ensure that a hackathon works for your organization and attendees? + +A successful hackathon depends on several decisions that tend to be recursive. Decisions about what you want to achieve will impact what resources you allot and how you want to communicate. Those decisions affect whether you go virtual or in person, and that decision will once again impact the resources you need and how you communicate. Alignment when planning hackathons is not just about getting people to agree. You will have a whole suite of decisions that must internally align. For example, a technically difficult hackathon might not be able to attract a large audience (ask me how I know!) and will require a specialized recruitment strategy that requires different resources. + +I've done many hackathons over the years, including just a few months back, when my organization hosted a hackathon that led to new features that we will incorporate into the next version of our open source product, Traefik Proxy 3.0. So, trust me when I say planning a hackathon that will enrich attendees and create valuable outcomes for your project is about more than hope, pizza, and chaos. + +This article uses the most recent Traefik Labs Hackathon as a blueprint. I share a checklist, tips, and tricks to help you identify your objectives, plan, manage the contest and compensation, share your results, and manage the long tail of the hackathon (the work isn't over when the hackathon ends!) + +This guide serves as a model for you to outline best practices so that you, too, can hold a successful hackathon with a sizable target audience that delivers results! + +- [Three questions to determine your goals][1] +- [Why are you doing this?][2] +- [Who is your audience?][3] +- [How are you measuring goals?][4] +- [Decide on in-person vs. virtual][5] +- [Build your communication strategy][6] +- [Decide on the prizes][7] +- [Swag it up][8] +- [Get the word out][9] +- [Managing the long tail][10] + +**[ Get a PDF and EPUB version of this article. [Download it here.][11] ]** + +### 1. Three questions to determine your goals + +The first and most crucial step is to set your goals. But this is no simple affair. Before you set goals, you need to coordinate internally on multiple fronts and ask questions such as: + +- Why do you want to do a hackathon? +- Who do you want to attend? +- How are you going to measure your success? + +#### Identify your internal stakeholders and set expectations + +**Hackathons are cross-functional**. No hackathon is run by a community person alone. It is important to ensure everyone is aligned on the goals, what is required to achieve them, and that the necessary resources are committed. This probably sounds super corporate, but these functions exist even within the smallest projects. A project needs adoption and code. It also needs value decisions based on who will be using it. And, of course, projects need passionate contributors. + +**Hackathons require cross-functional resources**. One team with a single set of resources cannot successfully run a hackathon. The organization must make various resources available, including: + +- Marketing for planning and outreach. +- Product Management for product and industry-specific insight. +- Engineering for deep technical knowledge and community engagement. + +For these reasons, hackathons usually support cross-functional goals. Your Community Team, for example, might want to build ownership and convert users to active community members. The Marketing Team might want to enhance awareness and court new users. The Engineering Team might need new perspectives on specific needs or challenges. The Product Team might have goals or no-go areas the community should be aware of. + +And last but not least, the hackathon budget is cross-functional. I am sorry to inform you, but hackathons ain't free! Your largest expense is always the dedicated time of your team. + +### 2. Why are you doing this? + +Setting your goals is the most important part of a successful hackathon. If you don't know what you want to do or why a hackathon is important, at best, it will have a ton of wasted potential and be a disconnected mess at worst. + +Communities feed off of ownership. Decide what you need from your community and what ownership stake you want community members to have. Without a clear understanding of this, your hackathon might not reach its full potential in empowering your community. + +Be very careful with your hackathon design and goals. Different types of hackathons appeal to different skill levels. If the code you're looking for is very advanced, take the extra time to court the right audience and accept that it will include less overall attendance. Cast a wide net if the contributions can vary in skill and experience. + +#### Are you hosting a hackathon to get code and build your project? + +- Sometimes, projects hit a critical juncture or acquire a lot of excitement around them, and you want to harness the energy to build something together. A hackathon is a great way to achieve this! +- If you have an active community of users, a hackathon can bring everyone together at the same time to harness that excitement to feed the creative energy of your group. + +**Note:** This is more easily achievable with smaller groups who know each other and have a shared experience with the project. You also need to carefully evaluate the skills required to build your project. + +#### Are you hosting a hackathon to build your community or re-engage them? + +- Maybe you are just building your community or noticed that your community needs a little juice. Hackathons are exciting, and they can help bring that back. +- Above, I said, "Communities feed off of ownership." If your community members do not feel they have a stake or that their needs and voices matter, they will drift away. This is common when projects grow and become more formalized. As the barrier to entry rises, the ability for community members to feel ownership falls, and the project becomes like a product to the user. One way to enhance community membership is by creating events that engage users and lower the bar for entry: Bug round-ups, light requests, and longer timelines. +- Perhaps your user community is growing, but the contributor community is becoming more specialized as your tech becomes more complex. In this case, you need to court sophisticated technologists who understand your tech and the use cases. Look for community members who use your tech in their jobs—especially at companies with large or complex deployments. These people are more likely to understand the needs of users and of the tech itself. They will also have suggestions for significant and valuable enhancements. +- You are free to choose goals that build your community and match your team and community members' energy and time. For example, at Traefik Labs, a hackathon aimed at enthusiastic folks with a small time commitment might target our Plugin Catalog. However, when looking for larger contributions or contributions that take significant expertise, we might target advanced technologists–especially those we know. + +#### Are you hosting a hackathon to celebrate something? + +- Hackathons are a great way to celebrate a new launch and hype your community. For example, that is exactly why we hosted the [Traefik Proxy 3.0 Hackaethon][12]. +- Hackathons are also great for getting the word out about a new product capability. The [Traefik Plugin Hackaethon][13] is an excellent example here. +- Maybe you want to organize an event to celebrate your top contributors. Do it with a hackathon! Take a look at [this hackathon organized by HackerOne][14]. And if you're thinking, "but this is not about open source software (OSS), how can it be a hackathon?" I've got news for you—hackathons are not just for OSS! Hackathons are for creating with a large community. + +#### Are you hosting a hackathon to build awareness? + +Hackathons are a great place to begin if you are just starting and want to build awareness around your product/brand. However, there are a few conditions. + +- Laser-focused goals and big contributions are unlikely to happen at this stage. Go for a softer, broader focus, and minimize the work required by attendees. +- Reach out to new community members, less experienced users, and users with less exposure to your specific project. + +#### Are you hosting a hackathon to connect to users? + +I can think of no better way to connect new users to your project than a hackathon. Not only will your users become intimately familiar with your project, but hackathons also have a unique way of engendering a sense of ownership, rarely achievable through other types of events. + +### 3. Who is your audience? + +Assuming you have pinpointed why you want to host a hackathon and what you want to achieve, it's time to assess the characteristics that a participant needs to be successful. Use your decisions about your goals to identify your audience to ask what type of community member can help you achieve your objectives. Use the list of comparisons below: + +- Highly-skilled vs. mixed-skilled vs. low-skilled +- Specialized vs. generalized skill +- Intensive time vs. less intensive time +- Individual contributions vs. group contributions + +Your most active community members must look a bit like your target audience. + +You might rethink your goals if your target audience doesn't align with at least 80% of the people you know you can attract. Accurately identifying your target audience will go a long way to making your communication strategy around the hackathon and the hackathon itself more successful. + +### 4. How are you measuring goals? + +Perfect, now that you answered the first two big questions and have your goals laid down, it's time for the third big question—how will you measure those goals? Inspiring your internal teams and your community to work together in building the future of your project, engendering ownership, and increasing engagement are awesome, but you can't determine success if you can't measure your goals. + +#### What does success look like immediately after the event? + +- A major sign of success is whether attendees connect and engage with each other, co-educate, and build teams during their hackathon. +- Were mentorships built? Through partnership, did several newer users grow into skilled mid-level users, or did mid-level users evolve into expert-tier users? This is the gold ring of success indicators. +- Did your partner organizations (maybe universities) request future hackathons or other events? + +- Clearly, the first sign of success is that your attendees had an overall good experience and are motivated to engage more with your project. +- If you are looking for outreach, set a quantity of participants to shoot for and a number of participants who return to contribute more after the event or in three months. +- If building awareness, you might also look for successful follow-up chatter. Who wrote blog posts? Were attendees talking about it on social media? +- If you are looking for contributions, did they work for you? Are these the contributions you want? Did they impact how your team thinks about the problems they face? Will you have ongoing collaborations with these contributors? + +#### What will denote success three months after the event? + +Defining benchmarks for long-term success is just as important. Here are a few examples of what could indicate long-term success: + +- Your hackathon should increase the number of returning contributors to your project. The goal is to get people hooked. If people new to your project came from the hackathon and stayed as users, or if your existing users became more active, you know you won. +- Hackathons are great as self-contained events, but they are supremely valuable as marketing content. They build trust in the community, showing you are responsive and value community input. They are fun loci of activity that let community members bond and look forward to the future, and they are aspirational. People love to see others celebrated and plan to achieve that celebration in the future. +- When you build marketing content around your hackathon (or better yet, others build content around your hackathon), you can expand your reach among second-degree connections. +- Tall poppy syndrome is a shame. Hackathons are a great opportunity to gather those participants who stood out and galvanize them to do other cool things and spread the word about your project. + +### 5. Decide on in-person vs. virtual + +I know what you're thinking—is in-person even a consideration? We've all gotten so used to doing everything virtually in the post-covid world. So, are the days of in-person gone? I would argue no, they are not. With care and safety measures in place, in-person events are the heart and soul of hackathons. + +- In-person means no distractions, lots of pizza, and energy drink-fueled friendship. +- In-person fuels group participation rather than individual contributor participation. +- In-person works well at scale and in miniature: Organizing in-person hackathons for large groups brings high energy and rewards. But they can get quite costly. If you want to organize a large-scale hackathon, you'll be more successful if you target less experienced developers (students, clubs, new careerists) because these folks have the most time and the most to gain when demonstrating their skill and passion. +- In-person also works well for small groups and is great for intense planning and iteration—long nights with new and old friends, usually over food and beer! + +And while many pros come with in-person hackathons, it doesn't mean that the virtual experience only comes with cons. Granted, nothing replaces that feeling of late nights with pizza, off-the-cuff remarks that end up changing your entire project, and a friendly set of eyes over your shoulder as you test or debug. But... + +- Virtual means you can get a wider group of participants at a significantly lower cost. +- Virtual respects disability. +- Virtual is geolocation friendly. +- Virtual allows for higher individual contributor participation. +- Virtual offers more flexibility in the style and length of the event – you cannot have a month-long in-person event! + +#### Timelines of virtual hackathons + +Did you decide to do a virtual hackathon? Great! Now, you need to determine the type of virtual hackathon you want. Do you envision a prolonged or intensive timeline? Keep in mind that the type of [virtual hackathon][15] you choose will determine, to some extent, your target audience and communication strategy. + +**Extended timeline:** + +- Allows after-hours tinkering and enables developers to attend without taking time off from work. +- Provides more time to solicit contributions. +- Requires fewer resources for both the organizer and the participants. +- Extended timelines require fewer real-time resources. + +**Intense timeline:** + +- Recreates that feeling of intensity usually experienced in in-person hackathons. +- Requires a high amount of resources for a short period of time. +- Requires tight management and a communication platform. +- Requires clear one-on-one communication, but also fosters group-to-group or intra-community communication. + +### 6. Build your communication strategy + +Speaking of communication, once you have your goals, you must decide **who** communicates with participants and **how**. It's common to choose between the popular apps of the day. Your choice impacts the event's feel. Different [chat applications][16] and [collaboration platforms][17] have their own cultures and strengths. The decision you made early on about how to host your hackathon (in-person or virtual, prolonged or intense timeline) is likely to have the most significant impact on your communication strategy. + +#### In-person communication plan + +If you are running an in-person hackathon, consider it a genuine event—it feels almost like a conference. In-person hackathons often include the following: + +- **Workshops/round tables:** Meant to educate and develop new industry standards/best practices for the concerns of the day. These sessions can function as proctored time-bound conversations amongst 6-10 individuals, where they agree upon findings and take notes that are made public to all participants. +- **Planning sessions:** Often used for projects with non-code outcomes, like developing updated standards. +- **Coding sessions:** Used for code-based projects which require work to maintain and enhance. + +Each of the above has different communication needs: + +- People prepared to facilitate, but not lead, conversations in workshops. +- Note takers and people to make sure that the notes are turned into a publishable product. +- Project managers to ensure the above tasks are done. + +- General communication for running the event (food, cleaning, management of resources). +- Masters of ceremonies to move through the agendas. +- For workshops: + +Making this all happen requires the resources and specialized knowledge from your Community, Product Managers, and teach-savvy teams. From past experience, it took a team of community members and staff to manage an event of this scope. To be successful, your team will need specialized people as well. + +You also need to decide what types of communication you want to foster and who is responsible for it: + +- Multiple teams will need to take shifts to perform general support. +- A DevRel, engineering, or support team will need to manage technical communication between triage and participants. +- Community Teams usually spend extensive time connecting participants to help build strong groups by reinforcing skills or points of view. This is one way to ensure that hackathon magic. +- Community Teams also need to support marketing efforts to engage participants and manage follow-up. + +#### Virtual communication plan + +For virtual hackathons, the choice of a communication platform depends heavily on the outcome you want to achieve, the timeline you've chosen for your hackathon (prolonged or intensive), and the type of communication you wish to facilitate (synchronous or asynchronous). + +**Using Pull Requests and Issues on Git hosts (asynchronous):** + +- Choosing to communicate through Git pull requests and Issues on your project directly frees up technical staff resources because it keeps the conversations about projects in your current process and allows your team to be responsive rather than instigating communication. +- This approach is great if the team for your hackathon is small or if the expected contributions are relatively small and you do not plan to help participants form teams. +- Using your existing processes is especially great for prolonged hackathons as they do not require additional moderation or require your team to monitor an additional app. +- The downside is that you will only facilitate communication with the individual contributor or group of contributors already working together. It's difficult to connect participants who are working separately. Participants can't find each other as easily on their own, so you lose some of the magic that happens when hackathon participants organically talk to each other in open threads. + +**Using a chat application (synchronous):** + +- Choosing dedicated chat servers is required for intense hackathons. +- Chat facilitates the team formation and communication necessary for complex projects with fast timelines and sparks the brainstorming that preludes an awesome contribution. +- Additionally, your goal is to build community. People want to join communities where they have ownership, have friends, and feel comfortable. You need a place for participants to feel connected to each other if you want them to return. +- Chat servers can outlast an event, allowing for continued community engagement. + +Regardless of which platform you choose, you need a communication plan that identifies when every person on your team is available. Managing a virtual hackathon can get quite tricky, primarily due to the different timezones—people can participate whenever they want, from wherever they want. You must plan to accommodate participants across all time zones and for every occasion. Draw up a plan with who is responsible (and when) for the following: + +- Determining response SLAs. +- Animating your virtual space (a dead space guarantees poor communication). +- Encouraging team building. +- Responding to technical questions. +- Checking in on participants. +- Moderating the space to ensure the safety of your participants. + +### 7. Decide on the prizes + +Is your hackathon a contest? Hackathon participants are often content with grand prizes and "swagpaloozas" for top contributions. But before you decide on the fun stuff (the actual awards), you must determine what your contest values. + +- What differentiates a good contribution from a great contribution? If your attendees know how you feel about this, they are more likely to hit it out of the park. +- What do you value? This is your chance to tell participants what you want to see submitted by attaching a prize to it. For example, during the last Traefik Hackaethon, we offered bounties for the most-wanted features. These were, indeed, the ones most people worked on. +- Are there categories of contributions? You need to decide on prizes for each category. +- Create a rubric (a chart or grid defining and ranking achievements, [like this example][18]). This way, participants know what you value and how they are judged. This was one way we improved submissions at HackerOne. + +On the other hand, some may argue that competition is overrated. If your goal is participation, feel free to reward every single one of your participants for simply giving back! [Hacktoberfest][19] is a great example of this approach. + +### 8. Swag it up + +Everyone loves swag! And your participants would certainly appreciate a token to remember this event, whether virtual or in person. Swag has two purposes: + +- Swag shows your appreciation: The contributors took their time to engage with you in an intense way; thank them with a gift that shows you value their contributions. +- Swag builds awareness: Gifting swag to your participants helps them spread the love and build awareness of your community by sharing their loot and experience. + +The community loves swag, but they don't love boring swag! You probably distributed your existing t-shirts and stickers during another event. Make your hackathon memorable and go for new, exciting, and exclusive designs. Shirts are great, and hoodies reign supreme. But think about cool swag participants may not have already. Think of something that could become their new staple item, like backup batteries or hats (both popular at HackerOne). Personally, my own home features some towels and slippers from hackathons! + +### 9. Get the word out + +Setting your goals and deciding on amazing grand prizes and swag are all important steps. But how will anyone know your hackathon is happening if you don't get the word out? You need to investigate the available channels carefully, and you need to be bold with your promotion. I'm talking blogs, vlogs, emails, social media—anything you can get your hands on. + +However, depending on your defined goals, you need to invest in the appropriate channel. Where you advertise depends on who you want to invite to your hackathon. + +- IIf you want to attract more experienced users, target big organizations where your project is used. LinkedIn and email promotion would be most effective here. +- If you want to bring in new and less experienced users, you're better off targeting universities and boot camps. Promoting the event on community-based media, like Mastodon, Matrix, Mattermost, Reddit, Discourse, Discord, and any place your target audience hangs out is a better choice. + +### 10. Managing the long tail + +Yay, the hackathon is over! Now all hackathon-related activities can stop, and we no longer need to pull resources, right? Wrong! Think of hackathons as only one step of the road in a series of events in your software development and community building. To deem your hackathon a success, you must be prepared to engage in post-event activities. + +- Communicating your results: Don't forget to communicate hackathon outcomes internally and externally. Demonstrate the ownership the community members gained during the hackathon to grow trust in your community and project. +- Building community: Lean on your hackathon participants for future community activity. +- Putting together the retrospective: What went well, what went terrible, what was meh, what surprised you? This analysis is how you grow, change, and iterate. Don't forget to do a blameless retro as soon as possible so it is all fresh in your mind. + +### Wrap up + +If you started reading this article thinking that hackathons aren't that hard to pull off, I'm sorry to have burst your bubble! And although I sincerely believe hackathons are a great way to engage and communicate with your community on so many levels, having just the intention does not guarantee the results. + +For a hackathon to be successful, you need to be meticulous and prepared to invest significant resources and effort to plan and execute it properly. + +Thank you for reading, and I hope this checklist helps you successfully organize your next hackathon! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/2/hackathon-guide + +作者:[Tiffany Long][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/tiffany-long +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/2/hackathon-guide#set-your-goals +[2]: https://opensource.com/article/23/2/hackathon-guide#why-are-you-doing-this +[3]: https://opensource.com/article/23/2/hackathon-guide#who-is-your-audience +[4]: https://opensource.com/article/23/2/hackathon-guide#how-are-you-measuring-goals +[5]: https://opensource.com/article/23/2/hackathon-guide#decide-on-in-person-vs-virtual +[6]: https://opensource.com/article/23/2/hackathon-guide#build-your-communication-strategy +[7]: https://opensource.com/article/23/2/hackathon-guide#decide-on-the-prizes +[8]: https://opensource.com/article/23/2/hackathon-guide#swag-it-up +[9]: https://opensource.com/article/23/2/hackathon-guide#get-the-word-out +[10]: https://opensource.com/article/23/2/hackathon-guide#managing-the-long-tail +[11]: https://opensource.com/downloads/hackathon-guide +[12]: https://traefik.io/blog/announcing-traefik-proxy-3-0-hackaethon/ +[13]: https://traefik.io/blog/announcing-the-inaugural-traefik-hackaethon-2020-in-october/ +[14]: https://www.youtube.com/watch?v=9VZCD9TirCg&list=PLxhvVyxYRvibM_KJBPtPsfEcjnP5oGS8H +[15]: https://opensource.com/article/20/8/virtual-hackathon +[16]: https://opensource.com/alternatives/slack +[17]: https://opensource.com/article/21/9/alternatives-zoom +[18]: https://www.isothermal.edu/about/assessment/assets/rubric-present.pdf +[19]: https://hacktoberfest.com/ From 21bfac5921be3aaaf200c8eddb9e1149dd7f0693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Tue, 14 Feb 2023 20:10:46 +0800 Subject: [PATCH 12/46] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][te?= =?UTF-8?q?ch]:=2020230214.0=20=E2=AD=90=EF=B8=8F=E2=AD=90=EF=B8=8F=20Crea?= =?UTF-8?q?te=20a=20modern=20user=20interface=20with=20the=20Tkinter=20Pyt?= =?UTF-8?q?hon=20library.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... user interface with the Tkinter Python library.md | 337 ++++++++++++++++++ 1 file changed, 337 insertions(+) create mode 100644 sources/tech/20230214.0 ⭐️⭐️ Create a modern user interface with the Tkinter Python library.md diff --git a/sources/tech/20230214.0 ⭐️⭐️ Create a modern user interface with the Tkinter Python library.md b/sources/tech/20230214.0 ⭐️⭐️ Create a modern user interface with the Tkinter Python library.md new file mode 100644 index 0000000000..1e62dd5d37 --- /dev/null +++ b/sources/tech/20230214.0 ⭐️⭐️ Create a modern user interface with the Tkinter Python library.md @@ -0,0 +1,337 @@ +[#]: subject: "Create a modern user interface with the Tkinter Python library" +[#]: via: "https://opensource.com/article/23/2/user-interface-tkinter-python" +[#]: author: "Patrik Dufresne https://opensource.com/users/patrik-dufresne" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Create a modern user interface with the Tkinter Python library +====== + +Python's Tkinter library isn't exactly known for its good looks. I've developed a library to help create a modern graphical user interface for Python. + +I spent a lot of time searching for a simple but modern GUI toolkit before developing a new library called TKVue that creates graphical interfaces for desktop applications. Through my research, I realized that there were [several different libraries][1] to create graphical interfaces. However, most involve adding new dependencies to bind with graphical libraries. For example, there's a library for Qt, another for wxWidgets, and a third for GTK. None are native to Python or entirely coded in Python. That's a problem. If you want to code a GUI with Qt, it's necessary to compile the Qt source code on each platform you want to support. I wanted to target the three leading platforms: Linux, Windows, and Mac. + +The big advantage of Tkinter is that it's embedded in Python. There's no need for new dependencies or to compile new libraries. Everything's already done for you. + +In short, it is best to use Tkinter to create something portable. + +### Tkinter with a modern theme + +Creating a GUI with Tkinter is easy, but there's no denying that by default, it looks like a GUI from the 1980s. In addition to creating graphical interfaces that aren't very pleasing to the eye, the programming methodology is also from the 1980s: Programming the Tkinter graphical interface is not declarative. + +Motivated by Tkinter's portability, I was determined to use it to create a professional and modern graphical interface. My research led me to discover a whole system for modifying Tkinter's appearance using [themes][2]. Tkinter themes are similar to the CSS file of a web page. They allow you to configure the appearance of the components that make up the graphical interface by declaring new styles. The creation of these styles requires some work, but the system is flexible enough to allow the creation of a modern-looking graphical interface. This work is similar to customizing a CSS theme in web development. If you create a web page without CSS, the appearance is not modern, and a lot of work is needed to improve it. This is why CSS libraries such as bootstrap are used to speed up the creation of the graphic interface. + +In the Tkinter universe, there is no CSS library. Some pre-existing themes exist, but it's preferable for any project to customize the color palette to match your product branding and give it a web look-and-feel. + +To achieve that, the most important element in creating a modern interface with Tkinter is changing the background color and the buttons' appearance. + +Once properly personalized to your liking, the result is a clean and visually attractive graphical interface. + +Here is the "default" theme: + +![Default theme][3] + +The "clam" theme looks like this: + +![Clam theme][4] + +Then with my personalization: + +![Personalized theme][5] + +**TKVue:** + +``` +import tkvue +import tkinter.ttk as ttk + +tkvue.configure_tk(theme="clam") + + +class RootDialog(tkvue.Component): + template = """ + + +