From 2f2bc09f3bc813ea323f74883399cfde3f044016 Mon Sep 17 00:00:00 2001 From: Sense T Date: Mon, 3 Mar 2025 12:50:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=99=E4=B8=80=E6=AC=A1=E7=BB=88=E4=BA=8E?= =?UTF-8?q?=E5=88=9B=E6=88=90=E4=BA=86=EF=BC=8Ch3c=E5=A0=A1=E5=9E=92?= =?UTF-8?q?=E6=9C=BA=E9=A1=B5=E9=9D=A2=E5=8F=AF=E4=BB=A5=E6=89=93=E5=BC=80?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qzsec/access-client/access-client | 2 +- qzsec/access-client/access-client.desktop | 5 ++--- qzsec/access-client/package.nix | 9 +++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qzsec/access-client/access-client b/qzsec/access-client/access-client index 9b20e61..adb1e1c 100644 --- a/qzsec/access-client/access-client +++ b/qzsec/access-client/access-client @@ -40,4 +40,4 @@ TITLE=$(echo $ARGS | jq -r .st) echo "Will connect to $TITLE..." -passh -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-rsa -p $PORT_NUM $USERNAME@$HOSTNAME \ No newline at end of file +xdg-terminal-exec passh -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-rsa -p $PORT_NUM $USERNAME@$HOSTNAME \ No newline at end of file diff --git a/qzsec/access-client/access-client.desktop b/qzsec/access-client/access-client.desktop index a38e71f..67ab140 100644 --- a/qzsec/access-client/access-client.desktop +++ b/qzsec/access-client/access-client.desktop @@ -1,13 +1,12 @@ [Desktop Entry] Type=Application -Version=@VERSION Name=Access Client GenericName=Access Client Comment=Resource monitor that shows usage and stats for processor, memory, disks, network and processes Comment[zh_CN]=齐治、H3C 运维审计系统连接代理 -Terminal=true +Terminal=false Categories=System;ConsoleOnly; Keywords=system;h3c; NoDisplay=true Exec=@EXEC %u -MimeType=application/x-accessclient;x-scheme-handler/accessclient; \ No newline at end of file +MimeType=application/x-accessclient;x-scheme-handler/accessclient; diff --git a/qzsec/access-client/package.nix b/qzsec/access-client/package.nix index f827328..31ca058 100644 --- a/qzsec/access-client/package.nix +++ b/qzsec/access-client/package.nix @@ -1,6 +1,5 @@ { stdenv, - lib, jq, zlib-ng, @@ -8,6 +7,7 @@ coreutils, openssh, which, + xdg-terminal-exec, ... }: let @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { passh coreutils openssh + xdg-terminal-exec ]; nativeBuildInputs = [ @@ -35,13 +36,13 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin - sed "/^export PATH=/s|@PATH|${coreutils}/bin:${jq}/bin:${passh}/bin:${zlib-ng.bin}/bin:${openssh}/bin|" "${bin}" > $out/bin/${pname} + sed "/^export PATH=/s|@PATH|${coreutils}/bin:${jq}/bin:${passh}/bin:${zlib-ng.bin}/bin:${openssh}/bin:${xdg-terminal-exec}/bin|" "${bin}" > $out/bin/${pname} chmod +x $out/bin/${pname} mkdir -p $out/share/applications - sed "/^Version=/s|@VERSION|${version}|" "${desktop}" | sed "/^Exec=/s|@EXEC|$out/bin/${pname}|" > "$out/share/applications/${pname}.desktop" + cat "${desktop}" | sed "/^Exec=/s|@EXEC|$out/bin/${pname}|" > "$out/share/applications/${pname}.desktop" echo "PATH: $PATH" - which jq && which minideflate && which passh && which ssh || exit 1 + which jq && which minideflate && which passh && which ssh && which xdg-terminal-exec || exit 1 ''; }