启动加一条命令的问题
Tofloor
poster avatar
金声玉振
deepin
2016-03-23 21:48
Author
还是因为我的显卡不被支持,所以每次开机用xrandr命令调回来。后来查到可以在/etc/rc.local文件里写入启动命令,但是不知道怎么弄,写进去之后不起作用。求大神指点!
红字是我自己加上的,每次开机我都是用这命令手动调整分辨率的。

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

sudo xrandr --newmode "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync && xrandr --addmode VGA1 1440x900_60.00 && xrandr --output VGA1 --mode 1440x900_60.00

exit 0

Reply Favorite View the author
All Replies
avatar
u855697021
deepin
2016-03-23 22:34
#1
还是用systemd启动吧...
Reply View the author
avatar
金声玉振
deepin
2016-03-24 00:10
#2
https://bbs.deepin.org/post/38299
还是用systemd启动吧...

本人小白,不会用啊,以为可以像WINDOWS里的BAT文件一样加到自启动就行呢……
Reply View the author
avatar
金声玉振
deepin
2016-03-24 01:43
#3
https://bbs.deepin.org/post/38299
你将你运行的命令写到一个文本文档里,然后以  数字+文件名  的方式命名该文件,将该文件放到/etc/X11/Xses ...

弄了几遍没成……可能是我不会弄吧
Reply View the author