AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-743745

jupiterbjy's questions

Martin Hope
jupiterbjy
Asked: 2021-01-19 09:52:48 +0800 CST

在 WSL2 上禁用 zsh 真彩色?

  • 2

使用带有WSL2 ubuntu 20.04和Powerline10k的 Win10 的各种终端。

使用 python 模块丰富的测试颜色输出。

正如 Powershell 清楚地表明,Windows Terminal 可以输出 True-color。但奇怪的是,在 WSL2 上,zsh 无法打印真彩色,无论我尝试过 win10 上可用的终端。

$TERM正确报告 xterm-256color。

❯ env | grep TERM
TERM=xterm-256color

❯ zsh --version
zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)

并且没有 env $COLORTERM。

由于到目前为止我无法通过谷歌搜索找到任何修复,我假设这可能与 zsh 有关?

这是自动生成的.zshrc文件:

❯ cat ~/.zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="/home/nyarukoishi/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="powerlevel10k"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
source ~/powerlevel10k/powerlevel10k.zsh-theme

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

alias py=python3.9
windows-subsystem-for-linux
  • 1 个回答
  • 2751 Views
Martin Hope
jupiterbjy
Asked: 2018-11-07 23:31:16 +0800 CST

SFTP 工作时 FTP 连接失败

  • 0

编辑:想通了,我需要注释掉 SSL 的东西以使其成为 FTP。

问题:

我正在使用 vsftpd 运行带有 SSL 的 sFTP。

由于我无法在浏览器上访问 sFTP(没有扩展名),现在我想让 FTP 再次工作。

清除并重新安装 vsftpd 后,我发现 FTP 以默认设置运行(可以连接但不显示目录),而 sFTP 仍在使用以前的设置运行。所以我决定让 FTP 和 sFTP 同时运行。

然后我改变了 vsftpd.conf 如下:

listen=YES
listen_ipv6=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd_FTP
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
local_root=/home/upload/ftp/
force_local_data_ssl=NO
force_local_logins_ssl=NO

但是在更改 vsftpd.conf 后,FTP 现在又因“连接被拒绝”而死机,而 sFTP 仍然正常工作。

sFTP 之前使用的设置如下:

listen=YES
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
utf8_filesystem=YES
user_sub_token=$USER
local_root=/home/upload/ftp/ETC
allow_anon_ssl=YES
force_local_data_ssl=NO
force_local_logins_ssl=NO
listen_port=21
listen_port=22

问题:

  1. [已解决]我的配置文件的哪一部分导致“连接被拒绝”?

  2. 清除后 sFTP 如何仍在运行,它在哪里设置文件?

  3. [已解决]为什么 'local_root=/home/upload/ftp/' 选项什么都不做?

ftp sftp vsftpd
  • 1 个回答
  • 907 Views
Martin Hope
jupiterbjy
Asked: 2017-10-04 22:23:50 +0800 CST

具有持久性无法启动的 Live Linux [重复]

  • 1
这个问题在这里已经有了答案:
无法使用 casper-rw 持久分区启动 Ubuntu Live USB 闪存驱动器 8 个答案
4年前关闭。

我最近从 Windows 10 下载了 Lubuntu 17.04 并使用 Unetbootin 创建了 live USB。

我使用的方法是:

  • 在我的 Raspberry Pi B+ 上使用 Gparted 将 USB 分区分离到:OS(2GiB-FAT32) casper-rw(4GiB-ext4) home-rw(54GiB-ntfs)。

  • 在 Unetbootin 中设置 casper-rw 文件 100MB 并创建 live USB

  • 编辑了 grub.cfg 并添加了“persistent”(我不确定为什么persistent 已关闭)

  • 删除了 casper-rw 文件

但是启动它后,它会运行到busybox。没有单一的错误消息,只有'iniramfs>_'。

我听说在 grub.cfg 中使用“persistent”一词时 initrd.lz 本身存在问题,但没有任何答案,至少我搜索的是。. . . 所以,问题是:有什么解决方法吗?我需要这个 USB 来尽快运行 lubuntu。

而且,为什么 syslinux.cfg 有“persistent”这个词,但为什么 grub.cfg 没有这个词——尽管两者都是由 Unetbootin 使用 persistent 选项创建的?

请理解,我唯一可访问的 Linux 是使用 VNC 和 SSH 的无头 Raspberry pi。我已经在 Pi 和我的 PC 上安装了 U 盘。

编辑:我通过 YUMI 通用 USB 安装程序解决了这个问题。没有其他方法奏效。

lubuntu
  • 1 个回答
  • 689 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve