如何在登录时启动终端


Answers:


35
  1. 超级键(Windows键)。
  2. 类型 “启动应用程序”
  3. 点击 Startup Applications选项
  4. 请点击 “添加”
  5. 在里面 “名称”字段中,键入Terminal
  6. 在里面 “命令”字段中,键入gnome-terminal
  7. 请点击 “添加”

大功告成!下次登录时,将启动终端应用程序。


最好使用x-terminal-emulator代替gnome-terminal,因此,如果用户update-alternatives用来切换到其他默认终端仿真器,则会使用它。介意我编辑这个吗?
Michael Hoffmann '18

6

如果您不想在每次登录时打开终端窗口,则有一种简单的方法可在需要时CTRLALTT立即获取它:立即打开终端窗口。


6
并不是我要找的答案。
ir-g

在Lubuntu上为我工作
Jeremy Hajek 2014年

嗯,这是打开终端的一种方法,但是OP希望在启动时自动启动它。
mtk 2015年

4

您可以在没有GUI的情况下执行此操作:

  1. 在您的终端上,导航到.config/autostart目录。.config/autostart可能在您的主目录中:

    cd ~/.config/autostart
    
  2. gnome-terminal.desktop用您喜欢的文本编辑器打开(新)文件。我用vi

    vi gnome-terminal.desktop
    
  3. 将以下代码粘贴到文件中。如果您愿意,请更新一些行,或者按原样使用:

    [Desktop Entry]
    Type=Application
    Exec=gnome-terminal
    Hidden=false
    NoDisplay=false
    X-GNOME-Autostart-enabled=true
    Name[en_NG]=Terminal
    Name=Terminal
    Comment[en_NG]=Start Terminal On Startup
    Comment=Start Terminal On Startup
    
  4. 保存文件,您就完成了。

如果您需要终端都启动和运行一个自定义的shell脚本命令,编辑gnome-terminal.desktop文件,并改变而来的线Exec=gnome-terminalExec=gnome-terminal --command "path/to/your/shell/script"


这种方法更清晰,更灵活。就像轻松地执行bash命令一样,也可以执行
`
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.