ubuntu14.04.3 更改登陆界面背景图片
1、首先我们准备好喜欢的图片,假如现在图片路径为:/home/vv/2.jpg
把图片的权限改为777:

2、把图片复制到 /usr/share/backgrounds/ 文件夹里面

3、切换到 /usr/share/backgrounds/ 目录把warty-final-ubuntukylin.jpg文件改个名字;
再把2.jpg改成warty-final-ubuntukylin.jpg


4

5、就可以到这儿你在每次开机的时候看到你喜欢的背景了,是不是很好玩的样纸啊~~~

1、不过换了一张不满意,想再换怎么办,又敲代码??那样也太麻烦了吧
所以咯,小丰丰为了大家方便写了一个基于python的代码:
##Code Start
#!/usr/bin/python
import os,os.path,sys,commands
if (os.path.exists("2.jpg") == True):
os.system("chmod 777 2.jpg")
if (os.path.exists("/usr/share/backgrounds/2.jpg") == True):
os.system("cp /usr/share/backgrounds/2.jpg /usr/share/backgrounds/old2.jpg")
os.system("cp 2.jpg /usr/share/backgrounds/2.jpg")
commands.getoutput("mv /usr/share/backgrounds/warty-final-ubuntukylin.jpg /usr/share/backgrounds/warty-final-ubuntukylin.2.jpg")
commands.getoutput("mv /usr/share/backgrounds/2.jpg /usr/share/backgrounds/warty-final-ubuntukylin.jpg")
os.system("chmod 644 /usr/share/backgrounds/warty-final-ubuntukylin.jpg")
print "Background Exchange Success. Then you can Execute \"sudo reboot\""
else:
print "ERROR: \"2.jpg\": No file or directory"
##Code end
要是运行不起来,可以自行修改下格式、代码。
2、把上面的代码复制到记事本,将文件名修改成什么1.py 2.py 之类的,只要是".py"结尾的都可以;将其复制到和你喜欢的图片同一个目录,再把喜欢的图片重命名为:2.jpg

3、在linux shell中执行:sudo python 1.py
等到提示:Background Exchange Success. Then you can Execute "sudo reboot"
再执行 sudo reboot就OK啦
这样是不是更简单啦(^_^)
