zoukankan      html  css  js  c++  java
  • 如何在Linux桌面环境下自动启动程序?

    转自:http://os.51cto.com/art/201401/426464.htm

    有时候,当你登录进入到Linux桌面后,可能想自动启动某个程序。这类启动程序在你登录进入到桌面后,可以进行面向整个系统的配置(比如自动代理),或者针对特定用户的桌面定制(比如Conky)。

    大多数Linux桌面环境有各自的图形用户界面(GUI),让用户可以配置针对特定用户的自动启动程序或服务。

    我在本教程中将介绍如何在各种Linux桌面环境下,自动启动某个程序。

    GNOME桌面环境

    在终端中运行这个命令,启动"Startup Applications Preferences"(启动应用程序首选项)GUI。

    1. $ gnome-session-properties 
      1. $ gnome-session-properties 

      点击"Add"(添加)按钮,即可配置一个新的启动应用程序。分别往"Name"(名称)栏和"Command"(命令)栏里面键入该应用程序的名称和该应用程序的CLI命令。往"Comment"(注释)栏里面键入可选的描述。

      Unity桌面环境

      在Unity Dash中键入"startup"(启动)。一旦"Startup Application"(启动应用程序)图标出现,就点击该图标。

      一旦"Startup Applications Preferences"(启动应用程序首选项)窗口打开,输入"Name"(名称)、"Command"(命令)和"Comment"(注释),即可配置自动启动的某个程序。

      KDE桌面环境

      首先,打开"System Settings"(系统设置)窗口。你会在System Administration(系统管理)下面找到"Startup and Shutdown"(启动和关闭)图标。点击该图标。

      系统会要求你从一系列已知的应用程序中选择自动启动的某个应用程序。如果你的程序没有列出来,在上面空白区输入该应用程序的名称。如果该程序(比如CLI命令)将在终端中运行,就要选中"Run in terminal"(终端中运行)复选框。点击"OK"(确定)按钮。

      下一步,系统要求你输入该应用程序的详细信息,包括名称、命令和描述。

      之后,你会看到该程序已完成配置,可自动运行。想配置额外的启动程序/脚本,你可以点击右边侧边栏中的"Add Program"(添加程序)按钮或"Add Script"(添加脚本)按钮。

  • 相关阅读:
    周末之个人杂想(十三)
    PowerTip of the DaySorting Multiple Properties
    PowerTip of the DayCreate Remoting Solutions
    PowerTip of the DayAdd Help to Your Functions
    PowerTip of the DayAcessing Function Parameters by Type
    PowerTip of the DayReplace Text in Files
    PowerTip of the DayAdding Extra Information
    PowerTip of the DayPrinting Results
    Win7下IIS 7.5配置SSAS(2008)远程访问
    PowerTip of the DayOpening Current Folder in Explorer
  • 原文地址:https://www.cnblogs.com/chris-cp/p/3732631.html
Copyright © 2011-2022 走看看