当前位置:网站首页>/etc/rc. Local setting UI program startup and self startup
/etc/rc. Local setting UI program startup and self startup
2022-07-24 07:02:00 【lifei_ 0001】
And Windows Different ,Linux The desktop system of is just a software running on the kernel (Windows The desktop is integrated with the kernel ), It is no different from other software . The desktop software is opened when the user logs in with the desktop , therefore Linux Under the UI The program must open the account on the desktop to have permission to open .
Set up UI There are many scripts for program startup , For example, use in desktop settings desktop、 Write a self starting service by yourself 、 utilize Linux Scheduled tasks, etc , Here we discuss the use of /etc/rc.local The plan .
/etc/rc.local Script is the last script opened when the system starts , Permissions are root, If you want to start UI The program first needs to switch users .
For example, my current desktop login user is pi, Turn on UI The script of the program is start.sh.
stay rc.local Add su - pi -c 'echo "pi"|sudo /home/pi/start.sh'
su - pi -c ' command ': In the single quotation mark is the start script command ;
sudo /home/pi/start.sh :sudo Permission opening script ;
echo “pi” | : towards sudo Pass the password , The password is pi;
ps:UI The program must run on the display , So remember to set the displayed device location in the startup script . Generally, set environment variables “export DISPLAY=:0.0”.
边栏推荐
- Redis special data type bitmap
- Sealos packages and deploys kubesphere container platform
- It can be written in 10 minutes -- 25~30k foreign enterprise recruitment interview questions, isn't it easy~
- MySQL automatic generation creation time and update time
- Design a function print to print the string. If only the string parameter s is passed, the string length is compared with 10, greater than 10, print the first 10 characters, less than 10, and output a
- Practice of online problem feedback module (12): realize image deletion function
- Input the names of 10 people and output them in descending order
- Thinking of data analysis -- analyzing the retail industry as a whole -- an all-round and multifaceted detailed analysis
- 【学习笔记】Web页面渲染的流程
- Input some data and find the maximum output. (keyboard and file reading)
猜你喜欢
![[lvgl (4)] event and event bubble of the object](/img/1e/9fe3d34f5f8d8c7298a106dca8d949.png)
[lvgl (4)] event and event bubble of the object

(static, dynamic, file) three versions of address book
![[lvgl (2)]](/img/f8/d04183cf74896295382765a9dfd88d.png)
[lvgl (2)]

极客星球丨 字节跳动一站式数据治理解决方案及平台架构

STM32基于hal库的adc以DMA的多通道采样以及所遇问题解决

(静态,动态,文件)三个版本的通讯录

MySQL gets the self incrementing line mark (different from MySQL version)

"Big factory interview" JVM Chapter 21 questions and answers
![[lvgl (1)] a brief introduction to lvgl](/img/2e/2e155f1d3669c27ad1b090ca954224.png)
[lvgl (1)] a brief introduction to lvgl

STM32 ADC based on Hal library uses DMA multi-channel sampling and solves the problems encountered
随机推荐
Requirements already satisfied: and read timed out. problem solving methods appear during the installation of snownlp package
Design a function print to print the string. If only the string parameter s is passed, the string length is compared with 10, greater than 10, print the first 10 characters, less than 10, and output a
Three level classification / menu query tree structure
Tensorflow Einstein function
先爱自己,再爱别人。
[lvgl (5)] label usage
MapReduce (I)
owasp top10 渗透测试
[wechat applet] understand conditional rendering, list rendering and wxss template style
Redis基本类型-有序集合Zset
Wix path with spaces
Redis special data type hyperloglog
Ge port: sgmii mode and SerDes mode
[lvgl] [stage summary 1]
Libevent and multithreading
[learning notes] possible reasons and optimization methods for white screen on Web pages
渗透学习-SQL注入篇-靶场篇-安全狗的安装与绕过实验(后续还会更新)
永远不要迷失自我!
STM32 external interrupt (register version)
Jsonobject is sorted in A-Z order of key