linux启动桌面autostart,autostart

软件简介

Autostart

开源的自启动设置小工具,跨平台,使用方式统一,兼容 windows、mac、linux

桌面版,特别适用于需要开机启动的跨平台程序调用,实现自启动,屏蔽了麻烦的平台判断和启动方法研究。

Usage

On linux and mac , the command is autostart.

On windows , the command is autostart.exe.

1.Enable Application autostart.

_ linux &mac_

autostart enable -k "demokey" -n "my demo application" -c "echo \"autostart\">~/autostart.txt"

help:

autostart enable --help

_ windows_

autostart.exe enable -k test -n test -c "c:\\windows\explorer.exe c:"

help:

autostart.exe enable --help

2.Disable Application autostart.

_ linux &mac_

autostart disable -k "demokey"

help:

autostart disable --help

_ windows_

autostart.exe disable -k "demokey"

help:

autostart.exe disable --help

Linux系统中,自启动代码通常指的是那些用于确保某些服务、程序或脚本在系统启动时自动运行的配置文件和机制。主要有以下几个方面: 1. **Systemd**(Debian和基于Systemd的发行版):Systemd是Linux系统中的默认init系统,通过`systemd.service`或`.service unit files`来定义自启动的服务,例如创建`/etc/systemd/system/my-service.service`文件,并使用`systemctl enable my-service`命令使其开机自启。 2. **Upstart**(旧版本Ubuntu):虽然现在Systemd更为流行,但在Upstart时代,`upstart.conf`文件用于定义自启动任务。 3. **Init.d scripts**(旧系统):在早期的Red Hat和CentOS等发行版中,`rc.local`或`chkconfig`命令下的脚本会被执行作为启动时的工作。 4. **cron jobs**:虽然不是开机自启动,但cron定时任务也可以在系统启动后立即运行,通过编辑`crontab`文件添加`@reboot`定时器。 5. **Environment Variables**:比如`XDG Autostart`目录(`~/.config/autostart`)中的应用程序快捷方式,会在用户登录时自动启动。 6. **Startup Applications**(GNOME或Unity):在桌面环境中,用户可以通过Startup Applications设置管理自启动程序。 要详细了解某个特定服务如何实现自启动,你需要查看对应的配置文件,了解其启动脚本的语法,以及如何管理这些服务使其在系统启动时生效。如果你有具体的自启动程序或服务名称,我可以进一步解释其设置方法。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值