AIFashion第三十二天——开机动画常见问题及解决方案

1)在ubuntu上安装git时,发现有依赖没有安装

执行sudo apt-get update

然后再执行sudo apt-get install git

安装成功

2)开机显示详细命令 --> 改为显示画面

a)编辑grub文件   sudo gedit /etc/default/grub

把  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

改成  GRUB_CMDLINE_LINUX_DEFAULT=""

并在最后一行加入  GRUB_GFXPAYLOAD_LINUX=None

b)编辑10_linux         sudo gedit /etc/grub.d/10_linux

找到如下内容删掉

if ! ${recovery} ; then

save_default_entry | sed -e "s/^/\t/"

cat << EOF

gfxmode \$linux_gfx_mode

EOF

fi

提示:如果没有就不用删除。

c)更新   sudo update-grub

重启即可看见效果。

d)如果曾经修改过/etc/initramfs-tools/conf.d/splash

必须把以下内容删掉:FRAMEBUFFER=y

然后更新   sudo update-initramfs -u

3)修改ubuntu背景颜色

ubuntu默认的背景颜色都是紫色的,现我们要修改为白色:

进入 /usr/share/plymouth/themes/ubuntu-logo 目录

执行:gedit ubuntu-logo.script

Window.SetBackgroundTopColor (0.16, 0.00, 0.12);     # Nice colour on top of the screen fading to

Window.SetBackgroundBottomColor (0.16, 0.00, 0.12);  # an equally nice colour on the bottom

改为

Window.SetBackgroundTopColor (1.00, 1.00, 1.00);     # Nice colour on top of the screen fading to

Window.SetBackgroundBottomColor (1.00, 1.00, 1.00);  # an equally nice colour on the bottom

开机背景底色就会变为白色

若修改之后无法保存,重新用sudo gedit *****.script打开就好啦~~

4)修改脚本

修改脚本 例如 

/usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.script

部分脚本:

#-----------------------------------------------------------------------------
# Previous background colour
# #300a24 --> 0.19, 0.04, 0.14
# New background colour
# #2c001e --> 0.16, 0.00, 0.12
#
# 屏幕顶部 rgb 值 (40.8, 0, 30.6)
Window.SetBackgroundTopColor (0.16, 0.00, 0.12);     # Nice colour on top of the screen fading to

# 屏幕底部 rgb 值 (40.8, 0, 30.6)
Window.SetBackgroundBottomColor (0.16, 0.00, 0.12);  # an equally nice colour on the bottom

bits_per_pixel = Window.GetBitsPerPixel ();
if (bits_per_pixel == 4) {
    logo_filename = "ubuntu-logo16.png";
    progress_dot_off_filename = "progress-dot-off16.png";
    progress_dot_on_filename = "progress-dot-on16.png";
    password_field_filename = "password-field16.png";
    question_field_filename = "password-field16.png";
} else {
    logo_filename = "ubuntu-logo.png";
    progress_dot_off_filename = "progress-dot-off.png";
    progress_dot_on_filename = "progress-dot-on.png";
    password_field_filename = "password-field.png";
    question_field_filename = "password-field.png";
}

logo.image = Image (logo_filename);
logo.sprite = Sprite ();
logo.sprite.SetImage (logo.image);
logo.width = logo.image.GetWidth ();                                    #图片logo宽度
logo.height = logo.image.GetHeight ();                                  #图片logo高度
logo.x = Window.GetX () + Window.GetWidth () / 2 - logo.width  / 2;     #图片x坐标
logo.y = Window.GetY () + Window.GetHeight () / 2 - logo.height;        #图片y坐标
logo.z = 1000;                                                          #图片z坐标
logo.sprite.SetX (logo.x);
logo.sprite.SetY (logo.y);
logo.sprite.SetZ (logo.z);
logo.sprite.SetOpacity (1);

# Spacing below the logo - in pixels
logo_spacing = logo.height * 4;                                         #图片底部间隔

修改完成之后 sudo update-initramfs -u 更新开机动画 ,然后 reboot 查看效果

5)设置开机自启动程序

1)进入HOME目录,HOME是当前用户目录的环境变量

2)执行:ls -al

列出当前目录下的所有文件和目录,可以看到一个.config目录,这是一个隐藏目录

3)进入.config目录,执行:ls -l

列出.config下的目录和文件,找到autostart目录

若没有,则执行:mkdir autostart创建

4)执行:cd autostart进入该目录

5)执行:vim **.desktop

创建一个desktop文件,文件名可以自己定义

vim是一个编辑器,可以使用其他的编辑器,如nano,gedit等

6)在desktop文件中写入内容,例子如下:

[Desktop Entry]

Type=Application

Exec=/home/chaowei/test

其中Exec后面放的就是需要自启动的可执行程序的路径,最好选择绝对路径。

你可能感兴趣的:(深度学习,AIFashion)