[Contribute Advice] 在脚本中调用deepin-terminal终端显示脚本执行的问题
Tofloor
poster avatar
酷谷的谷子
deepin
2023-06-29 05:06
Author

在脚本中调用deepin-terminal终端显示脚本执行的问题

当然这些改变不是必须的,不过能改一下子会更好看一点

配合桌面启动器文件使用很舒服

这个是 Mint 脚本调用终端显示, mate-terminal 的参数很显示正常,

#!/bin/bash
#/opt/i8520/lock/DockerRUN 是进入容器的脚本
#--hide-menubar 不显示控件(窗口栏)
#--geometry 122x29 窗口大小(相当于996x614像素)
#--title "宝塔面板"  打开终端窗口的名字
mate-terminal --geometry 122x29 --title "宝塔面板" \
--hide-menubar -x bash -c "/opt/i8520/lock/DockerRUN;exit;"

Mint 显示效果

2023-06-28 20-45-42 创建的截图.png

这个是 Deepin 脚本调用终端显示 deepin-terminal 的参数都无效

在虚拟机中还容易引起任务栏重启 导致黑屏 可能是应为启动容器的原因 ,也有可能是我物理机显卡是AMD的缘故

#!/bin/bash
#--hide-menubar 不支持
#--geometry 125x35 没有效果
#--title "宝塔面板" 没有效果
# -e "bash -c /opt/i8520/lock/DockerRUN;bash" 很别扭
deepin-terminal --geometry 125x35 --title "宝塔面板" -e "bash -c /opt/i8520/lock/DockerRUN;bash"

Deepin 显示效果

截图_deepin-terminal_20230628205740.png

Reply Favorite View the author
All Replies
donaldsebleung
deepin
2023-06-29 17:37
#1

原本想说看看 deepin-terminal --help 输出提及哪些选项:

load translate "/usr/share/deepin-terminal/translations/deepin-terminal_en"
Usage: deepin-terminal [options]
Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.

Options:
  -h, --help                      Displays help on commandline options.
  --help-all                      Displays help including Qt specific options.
  -v, --version                   Displays version information.
  -w, --work-directory      Set the work directory
  -e, --execute          Execute a command in the terminal
  -q, --quake-mode                Run in quake mode
  -m, --window-mode   Set the window mode on starting (normal,
                                  maximum, fullscreen, splitscreen)
  --keep-open                     Keep terminal open when command finishes
  -C, --run-script *       Run script string in the terminal
deepin-terminal --help-all
load translate "/usr/share/deepin-terminal/translations/deepin-terminal_en"
Usage: deepin-terminal [options]
Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.

Options:
  -h, --help                           Displays help on commandline options.
  --help-all                           Displays help including Qt specific
                                       options.
  -v, --version                        Displays version information.
  -w, --work-directory           Set the work directory
  -e, --execute               Execute a command in the terminal
  -q, --quake-mode                     Run in quake mode
  -m, --window-mode        Set the window mode on starting (normal,
                                       maximum, fullscreen, splitscreen)
  --keep-open                          Keep terminal open when command finishes
  -C, --run-script *            Run script string in the terminal
  --qmljsdebugger               Activates the QML/JS debugger with a
                                       specified port. The value must be of
                                       format port:1234[,block]. "block" makes
                                       the application wait for a connection.
  --platform   QPA plugin. See QGuiApplication
                                       documentation for available options for
                                       each plugin.
  --platformpluginpath           Path to the platform plugins.
  --platformtheme               Platform theme.
  --plugin                     Additional plugins to load, can be
                                       specified multiple times.
  --qwindowgeometry          Window geometry for the main window,
                                       using the X11-syntax, like 100x100+50+50.
  --qwindowicon                  Default window icon.
  --qwindowtitle                Title of the first window.
  --reverse                            Sets the application's layout direction
                                       to Qt::RightToLeft (debugging helper).
  --session <session>                  Restores the application from an earlier
                                       session.
  --display <display>                  Display name, overrides $DISPLAY.
  --name <name>                        Instance name according to ICCCM
                                       4.1.2.5.
  --nograb                             Disable mouse grabbing (useful in
                                       debuggers).
  --dograb                             Force mouse grabbing (even when running
                                       in a debugger).
  --visual <id>                        ID of the X11 Visual to use.
  --geometry <geometry>                Alias for --qwindowgeometry.
  --icon <icon>                        Alias for --qwindowicon.
  --title <title>                      Alias for --qwindowtitle.
</code></pre>
<p>但是刚才试了往 <code>--qwindowgeometry</code> 、<code>--qwindowtitle</code> 选项输入不同的参数,的确一点效果都没有,看来是 <code>deepin-terminal</code> 的 bug,等官方修复吧<img alt="ok" class="emoji" src="assets/image/raccoon/[ok].gif" title="ok"></p>
<p>系统信息(供官方参考):</p>
<p><img src="https://storage.deepin.org/thread/202306290936519935_Screenshot_dde-control-center_20230629093603.png" alt="Screenshot_dde-control-center_20230629093603.png"></p>
</div>
Reply View the author
ArchieMeng
deepin
2023-06-29 18:40
#2

了解,有空再看看啥情况。

Reply View the author
owen_337
deepin testing team
2023-06-29 18:58
#3
donaldsebleung

原本想说看看 deepin-terminal --help 输出提及哪些选项:

load translate "/usr/share/deepin-terminal/translations/deepin-terminal_en"
Usage: deepin-terminal [options]
Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.

Options:
  -h, --help                      Displays help on commandline options.
  --help-all                      Displays help including Qt specific options.
  -v, --version                   Displays version information.
  -w, --work-directory      Set the work directory
  -e, --execute          Execute a command in the terminal
  -q, --quake-mode                Run in quake mode
  -m, --window-mode   Set the window mode on starting (normal,
                                  maximum, fullscreen, splitscreen)
  --keep-open                     Keep terminal open when command finishes
  -C, --run-script *       Run script string in the terminal
deepin-terminal --help-all
load translate "/usr/share/deepin-terminal/translations/deepin-terminal_en"
Usage: deepin-terminal [options]
Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.

Options:
  -h, --help                           Displays help on commandline options.
  --help-all                           Displays help including Qt specific
                                       options.
  -v, --version                        Displays version information.
  -w, --work-directory           Set the work directory
  -e, --execute               Execute a command in the terminal
  -q, --quake-mode                     Run in quake mode
  -m, --window-mode        Set the window mode on starting (normal,
                                       maximum, fullscreen, splitscreen)
  --keep-open                          Keep terminal open when command finishes
  -C, --run-script *            Run script string in the terminal
  --qmljsdebugger               Activates the QML/JS debugger with a
                                       specified port. The value must be of
                                       format port:1234[,block]. "block" makes
                                       the application wait for a connection.
  --platform   QPA plugin. See QGuiApplication
                                       documentation for available options for
                                       each plugin.
  --platformpluginpath           Path to the platform plugins.
  --platformtheme               Platform theme.
  --plugin                     Additional plugins to load, can be
                                       specified multiple times.
  --qwindowgeometry          Window geometry for the main window,
                                       using the X11-syntax, like 100x100+50+50.
  --qwindowicon                  Default window icon.
  --qwindowtitle                Title of the first window.
  --reverse                            Sets the application's layout direction
                                       to Qt::RightToLeft (debugging helper).
  --session <session>                  Restores the application from an earlier
                                       session.
  --display <display>                  Display name, overrides $DISPLAY.
  --name <name>                        Instance name according to ICCCM
                                       4.1.2.5.
  --nograb                             Disable mouse grabbing (useful in
                                       debuggers).
  --dograb                             Force mouse grabbing (even when running
                                       in a debugger).
  --visual <id>                        ID of the X11 Visual to use.
  --geometry <geometry>                Alias for --qwindowgeometry.
  --icon <icon>                        Alias for --qwindowicon.
  --title <title>                      Alias for --qwindowtitle.
</code></pre>
<p>但是刚才试了往 <code>--qwindowgeometry</code> 、<code>--qwindowtitle</code> 选项输入不同的参数,的确一点效果都没有,看来是 <code>deepin-terminal</code> 的 bug,等官方修复吧<img alt="ok" class="emoji" src="assets/image/raccoon/[ok].gif" title="ok"></p>
<p>系统信息(供官方参考):</p>
<p><img src="https://storage.deepin.org/thread/202306290936519935_Screenshot_dde-control-center_20230629093603.png" alt="Screenshot_dde-control-center_20230629093603.png"></p>
</div>

--qwindowgeometry--qwindowtitle选项使用 的是Qt 应用程序的一些常见命令行选项,

这些选项目前都没有效果,情况已经反馈了哈

Reply View the author
希声
deepin
2023-06-29 19:11
#4
donaldsebleung

原本想说看看 deepin-terminal --help 输出提及哪些选项:

load translate "/usr/share/deepin-terminal/translations/deepin-terminal_en"
Usage: deepin-terminal [options]
Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.

Options:
  -h, --help                      Displays help on commandline options.
  --help-all                      Displays help including Qt specific options.
  -v, --version                   Displays version information.
  -w, --work-directory      Set the work directory
  -e, --execute          Execute a command in the terminal
  -q, --quake-mode                Run in quake mode
  -m, --window-mode   Set the window mode on starting (normal,
                                  maximum, fullscreen, splitscreen)
  --keep-open                     Keep terminal open when command finishes
  -C, --run-script *       Run script string in the terminal
deepin-terminal --help-all
load translate "/usr/share/deepin-terminal/translations/deepin-terminal_en"
Usage: deepin-terminal [options]
Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.

Options:
  -h, --help                           Displays help on commandline options.
  --help-all                           Displays help including Qt specific
                                       options.
  -v, --version                        Displays version information.
  -w, --work-directory           Set the work directory
  -e, --execute               Execute a command in the terminal
  -q, --quake-mode                     Run in quake mode
  -m, --window-mode        Set the window mode on starting (normal,
                                       maximum, fullscreen, splitscreen)
  --keep-open                          Keep terminal open when command finishes
  -C, --run-script *            Run script string in the terminal
  --qmljsdebugger               Activates the QML/JS debugger with a
                                       specified port. The value must be of
                                       format port:1234[,block]. "block" makes
                                       the application wait for a connection.
  --platform   QPA plugin. See QGuiApplication
                                       documentation for available options for
                                       each plugin.
  --platformpluginpath           Path to the platform plugins.
  --platformtheme               Platform theme.
  --plugin                     Additional plugins to load, can be
                                       specified multiple times.
  --qwindowgeometry          Window geometry for the main window,
                                       using the X11-syntax, like 100x100+50+50.
  --qwindowicon                  Default window icon.
  --qwindowtitle                Title of the first window.
  --reverse                            Sets the application's layout direction
                                       to Qt::RightToLeft (debugging helper).
  --session <session>                  Restores the application from an earlier
                                       session.
  --display <display>                  Display name, overrides $DISPLAY.
  --name <name>                        Instance name according to ICCCM
                                       4.1.2.5.
  --nograb                             Disable mouse grabbing (useful in
                                       debuggers).
  --dograb                             Force mouse grabbing (even when running
                                       in a debugger).
  --visual <id>                        ID of the X11 Visual to use.
  --geometry <geometry>                Alias for --qwindowgeometry.
  --icon <icon>                        Alias for --qwindowicon.
  --title <title>                      Alias for --qwindowtitle.
</code></pre>
<p>但是刚才试了往 <code>--qwindowgeometry</code> 、<code>--qwindowtitle</code> 选项输入不同的参数,的确一点效果都没有,看来是 <code>deepin-terminal</code> 的 bug,等官方修复吧<img alt="ok" class="emoji" src="assets/image/raccoon/[ok].gif" title="ok"></p>
<p>系统信息(供官方参考):</p>
<p><img src="https://storage.deepin.org/thread/202306290936519935_Screenshot_dde-control-center_20230629093603.png" alt="Screenshot_dde-control-center_20230629093603.png"></p>
</div>

23实体机用着怎么样啊,严重bug多么?

20.9,idea 卡顿明显,配置vm改善不大

Reply View the author
owen_337
deepin testing team
2023-06-29 19:52
#5

情况已确认,

@酷谷的谷子 @donaldsebleung deepin-terminal目前设计为单例模型,也就是说,可以用其他终端对deepin-terminal进行设置哈

Reply View the author