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-132022

Jonathan's questions

Martin Hope
Jonathan
Asked: 2023-02-09 11:37:46 +0800 CST

.desktop 文件的正式格式

  • 5

我正在寻找 .desktop 文件的正式定义。我找到了很多展示示例的教程,但没有正式定义它的教程。

在哪里可以找到.desktop文件规格?

.desktop
  • 1 个回答
  • 29 Views
Martin Hope
Jonathan
Asked: 2019-09-29 07:19:52 +0800 CST

apache2 服务被屏蔽

  • 1

我在 ubuntu 19.04 桌面上安装了 Apache 2,并且能够通过 localhost 进行测试访问。然后我发现该服务被屏蔽了。我知道如何取消屏蔽它,但我不想这样做,直到我了解它被屏蔽的原因并纠正了任何错误情况。我应该如何解决这种情况?我是apache2的新手。附加 systemctl 的输出:

gossage@jgossage-XPS-8700:~$ sudo systemctl status apache2
● apache2.service
   Loaded: masked (Reason: Unit apache2.service is masked.)
   Active: inactive (dead)
apache2 19.04
  • 1 个回答
  • 3393 Views
Martin Hope
Jonathan
Asked: 2018-08-25 07:32:03 +0800 CST

在 18.04 上从命令行编辑 Gnome-Terminal 配置文件

  • 2

我正在尝试Gnome-Terminal使用从命令行编辑配置文件gsettings。为了使用,gsettings我需要知道每个配置文件中包含的键和值。我的问题是dconf-editor不显示这些。我可以dconf-editor用来查看所有内容/org/gnome/terminal/legacy/profiles/default。这会显示配置文件的 UUID,但不会显示配置文件中的任何键/值对。如何访问此信息以便我可以使用 编辑个人资料gsettings?

command-line gnome-terminal dconf gsettings 18.04
  • 1 个回答
  • 3831 Views
Martin Hope
Jonathan
Asked: 2018-02-22 10:23:14 +0800 CST

禁止默认登录

  • 0

我想在 Windows 10 主机的 VirtualBox VM 中运行 Ubuntu 16.04 服务器,而不提示登录,没有自动登录,最好没有 VirtualBox 提供的控制台。我希望与机器的所有维护交互都通过 ssh 进行。我一直找不到任何解释如何做到这一点的东西,任何建议都将不胜感激。

virtualbox login 16.04
  • 1 个回答
  • 36 Views
Martin Hope
Jonathan
Asked: 2017-06-17 11:55:48 +0800 CST

使用 UEFI 全新安装后如何解决 17.04 无法启动的问题

  • 0

我使用 Startup Disk Creator 在 GPT 格式的 USB 上创建了一个 17.04 安装程序,并使用它在 GPT 格式的 SSD 上创建了一个新的 17.04 安装程序。目的是新的 SSD 应该在 UEFI 模式下启动而不安全启动。

当我从这个 SSD 启动时,我只是得到一个空白屏幕,没有任何迹象表明 Grub2 已加载或执行任何操作。系统没有完全锁定,因为我可以使用 Ctrl-Alt-Delete 重新启动。

我已经验证没有明显的硬件问题,安装 USB 和新 SSD 都通过了 e2fsck 检查。

新 SSD 的 ESP 为 400Mb,内容似乎很合理。

我应该如何解决这种情况?我既想解决这个特定问题,又想提高我的故障排除技能,而后者是我的首要任务。

boot
  • 2 个回答
  • 586 Views
Martin Hope
Jonathan
Asked: 2016-10-28 13:35:03 +0800 CST

apt-get 在 16.04 或 18.04 安装 mongodb 时失败

  • 42

当我尝试使用https://docs.mongodb.com/getting-started/shell/tutorial/install-mongodb-on-ubuntu/16.04 上的说明安装 mongodb 时,我在安装步骤中得到以下结果:

jonathan@poseidon:~$ sudo apt-get install mongodb-org
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mongodb-org is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mongodb-org' has no installation candidate

我用 Wireshark 检查了 HTTP 流量,发现唯一的流量是列表的 HTTP GET 和 HTTP 304 响应,这表明问题出在我的本地配置文件中。我的 sources.list.d 文件包含以下条目:

mongodb-org-3.4.list

我需要做什么才能继续解决此问题?

编辑:我尝试在 VirtualBox 下新安装 16.04 时再次执行此操作。我检索了密钥,创建了列表文件,并sudo apt update得到了以下结果:

jonathan@Ubuntu-16:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
[sudo] password for jonathan: 
Executing: /tmp/tmp.uWYpRUWfjK/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv
0C49F3730359A14518585931BC711F9BA15703C6
gpg: requesting key A15703C6 from hkp server keyserver.ubuntu.com
gpg: key A15703C6: public key "MongoDB 3.4 Release Signing Key <packaging@mongodb.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
jonathan@Ubuntu-16:~$ echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse
jonathan@Ubuntu-16:~$ sudo apt update
Ign:1 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 InRelease
Get:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release [3 462 B]
Hit:3 http://mx.archive.ubuntu.com/ubuntu xenial InRelease               
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]                   
Get:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release.gpg [801 B]                      
Get:6 http://mx.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]           
Ign:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release.gpg                       
Get:7 http://mx.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB]                    
Reading package lists... Done      
W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927
E: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
jonathan@Ubuntu-16:~$ 

如您所见,检索到的密钥用于 Mongodb 3.4,而不是 Mongodb 3.2,这解释了 apt update 中的 GPG 失败。有谁知道在哪里可以得到正确的密钥?

apt
  • 9 个回答
  • 123935 Views
Martin Hope
Jonathan
Asked: 2016-05-25 14:22:09 +0800 CST

函数内部的 stdout 发生了什么?

  • 0
If I run the following command I get the expected output as shown.
jonathan@Aristotle:~/EclipseWorkspaces/AGI/ShellUtilities$ df --output=fstype,source $(pwd)
Type Filesystem
ext4 /dev/sdb1

如果我将相同的命令放在一个函数中并从命令行调用该函数,我看不到任何输出。标准输出去了哪里,为什么?

#
# Copyright © Jonathan Gossage, 2016
#
# getFileSystemInfo
#

function getFileSystemInfo {
    # Get an item of information related to the file system that contains a
    # specific file or directory.
    # $1 is the file or directory to be checked
    # $2 is the specific information type to be checked. See df(1) FIELD_LIST
    #    for full details. As in df you can get more than one type of
    #    information.
    # To access the information returned, capture stdout in your script.
    echo "We are in getFileSystemInfo"
    df --output=$2 "$1"
    return $?
}
jonathan@Aristotle:~/EclipseWorkspaces/AGI/ShellUtilities$ Sourced/getFileSystemInfo $(pwd) fstype,source
command-line
  • 1 个回答
  • 42 Views
Martin Hope
Jonathan
Asked: 2016-05-19 18:13:57 +0800 CST

Git 提交信息问题

  • 4

当我在 16.04 上使用来自 apt 存储库的 Git 2.7.4 发出以下命令时

git commit -sS --status

我得到以下结果:

Aborting commit due to empty commit message.

我已经配置了 Git 全局配置如下:

jonathan@Aristotle:~/EclipseWorkspaces/AGI$ git config --global -l
user.name=Jonathan Gossage
user.email=jgossage@gmail.com
core.editor=gedit

鉴于此配置,我希望 Git 会调出 gedit 编辑器以允许我输入提交消息。这是第一次提交到空存储库。git 状态作为附件包含在内。

git
  • 2 个回答
  • 1624 Views
Martin Hope
Jonathan
Asked: 2016-05-10 19:32:30 +0800 CST

查找不包括某些目录的文件

  • 1

我正在使用以下目录结构:

onathan@Aristotle:~/EclipseWorkspaces/ShellUtilities/ShellUtilities$ ls -R
.:
calculateTargetDay  CustomizeIso  ec  makeExecutable  Models  modifyElementList  Sourced  test file  Testing  valrelease

./Models:
testcase

./Sourced:
colors  stddefs  stdFunctions  SupportTesting

./Testing:
test  testCalculateTargetDay  testColors  testModifyElementList  testStddefs  testStdFunctions  testSupportTesting  tst

我想要做的是对顶级目录和目录Testing中的所有文件运行命令。我不想对Sourced和Models目录中的文件运行命令。为此,我运行了以下命令:

find . -name Sourced -prune -name Models -prune ! -name '\.*'  -execdir echo '{}' \;

此示例未针对目录结构中的任何文件运行该命令。

当我对相同的目录结构运行以下命令时:

find . ! -name '\.*'  -execdir echo '{}' \;

我得到以下结果

./calculateTargetDay
./CustomizeIso
./Testing
./testModifyElementList
./test
./testColors
./testStdFunctions
./testCalculateTargetDay
./testStddefs
./testSupportTesting
./tst
./test file
./modifyElementList
./ec
./Sourced
./stdFunctions
./stddefs
./SupportTesting
./colors
./valrelease
./Models
./testcase
./makeExecutable

如您所见,我可以对目录树运行一个命令并将其应用于所有文件,或者我可以尝试有选择性并最终不运行任何文件。我怎样才能有选择地应用我需要的命令?

command-line
  • 1 个回答
  • 240 Views
Martin Hope
Jonathan
Asked: 2016-04-25 06:29:58 +0800 CST

将文件的编辑内容写入标准输出

  • 1

我需要一个可以按如下方式使用的可视化文本编辑器 - 该示例不起作用,但说明了这一点。

gpg2 -d x.gpg | gedit -w - | gpg2 -e -o x.gpg

这个命令将允许我解密一个文件,编辑它并重新加密它,而不会使文件以未加密的形式存在于磁盘上。问题是找到一个可以将编辑后的内容保存到标准输出的编辑器。我能找到的唯一编辑器是 ed,它使用起来非常不友好。我更喜欢可视化编辑器。是否有可以执行此操作的编辑器,或者可以在编辑器中解密和加密文件?

command-line
  • 1 个回答
  • 208 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