Ubuntu 创建下自启动脚本
来源:互联网 发布:数据库原理经典书籍 编辑:程序博客网 时间:2024/06/07 14:05
1.编写启动脚本start.sh/home/Software为编译好的可执行文件的路径;#!/bin/sh cd /home/Software/./test1 &
./test1为可执行文件 切记最后的 “&” 表示可以后台运行;2.将此脚本加到系统启动文件 ~/.porfile中编写~/.proflie文件 ,编写完成后:其中:/home/Software为文件start.sh的路径;切记最后的 “&” 不能省略,否则开机后切换不了界面,系统只运行你写的程序;# ~/.profile: executed by the command interpreter for login shells.# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login# exists.# see /usr/share/doc/bash/examples/startup-files for examples.# the files are located in the bash-doc package.# the default umask is set in /etc/profile; for setting the umask# for ssh logins, install and configure the libpam-umask package.#umask 022# if running bashif [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then. "$HOME/.bashrc" fifibash /home/Software/start.sh & # set PATH so it includes user's private bin if it existsif [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH"fi
在重启机子之前最好先验证一下脚本是否有效,验证的方法是:把bash /home/Software/start.sh,粘到终端里看能否
正确运行。脚本里如果出顼有路径,最好用绝对路径。
- Ubuntu 创建下自启动脚本
- Ubuntu 创建开机自启动脚本
- Ubuntu 创建开机自启动脚本
- Ubuntu自启动脚本
- Ubuntu 创建开机自启动脚本的方法
- Ubuntu 创建开机自启动脚本的方法
- Ubuntu 创建开机自启动脚本的方法
- Ubuntu python 创建开机自启动脚本的方法
- Ubuntu 创建开机自启动脚本的方法
- Ubuntu 创建开机自启动脚本的方法
- Ubuntu 创建开机自启动脚本的方法
- Ubuntu 创建开机自启动脚本的方法
- Ubuntu 创建开机自启动脚本的方法
- ubuntu 设置自启动脚本
- ubuntu 添加自启动脚本
- ubuntu下lampp自启动
- ubuntu 10.04 添加自启动脚本
- ubuntu编写开机自启动shell脚本
- 机器人软件平台ROS
- 最近关于调试一些心得,和离奇的案例
- C++ 中引用参数类型不匹配造成的编译问题
- Tinyxml2 实现xml文件的增删改查
- 关于SearchView的一些小细节
- Ubuntu 创建下自启动脚本
- oracle唯一索引
- Ubuntu 下快速解决:E: Could not open lock file /var/lib/dpkg/lock
- ROS中找并编译已存在的Package
- RSA加密与解密
- C++ 中宏(macro)#,##,和...(可变参数宏variadic macros)
- Ubuntu 下关闭/启用触摸板
- expandableListView嵌套GridView
- C++ 中Template 类、函数的编译过程