更改 lightdm 背景

更改 lightdm 背景

在 AskUbuntu 上多次看到类似的问题,但大多数答案都是关于 unity-helpers 或 gconf ...canonical... 等,所以这实际上似乎不起作用。
问题是我决定从 gdm 迁移到 lightdm。是的,它有效,但我无法为其设置背景图像 - 总是用黑色背景颜色来交换图片。
我的配置:

tempos@parmasse ~ $ cat /etc/lightdm/lightdm-gtk-greeter.conf 
#
# logo = Logo file to use, either an image absolute path, or a path relative to the greeter data directory
# background = Background file to use, either an image path or a color (e.g. #772953)
# theme-name = GTK+ theme to use
# icon-theme-name = Icon theme to use
# font-name = Font to use
# xft-antialias = Whether to antialias Xft fonts (true or false)
# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
# xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)
# xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)
# show-language-selector (true or false)
#
[greeter]
#logo=
background=/usr/share/backgrounds/lightdm.jpg
#background=#772953
#theme-name=Adwaita
#icon-theme-name=gnome
#font-name=
#xft-antialias=
#xft-dpi=
#xft-hintstyle=
#xft-rgba=
show-language-selector=true

文件本身:

tempos@parmasse ~ $ ls -la /usr/share/backgrounds/lightdm.jpg
-rwxrwxrwx 1 root root 1362684 авг 14 12:36 /usr/share/backgrounds/lightdm.jpg

答案1

我找到了一个解决方案:

我选择了我喜欢的壁纸并复制到 aliceinwire 提供的目录中。

sudo cp your-wallpaper.jpg /usr/share/backgrounds/lightdm.jpg

答案2

您可以尝试从背景图像中删除 Alpha 通道(可以使用 gimp 来完成)。
要检查它是否有 alpha 通道,您可以执行以下操作:
file /usr/share/backgrounds/lightdm.jpg

如果它有 Alpha 通道,它将显示“RGBA”。
A 表示 Alpha 通道。
所以没有“RGB”。

如果没有不起作用,您可以尝试添加新的:

convert <input> -alpha on <output>

如果由于一些奇怪的问题而无法通过 lightdm 的配置文件进行设置,您可以使用 feh 来完成。

(feh — 图像查看器和编目器)

它没有太多的依赖性,有利于查看图像文件。

从 feh 你几乎可以在任何地方设置背景/壁纸

feh --bg-fill /usr/share/backgrounds/lightdm.jpg

背景设置
feh 也可以用作背景设置器。除非你传递 --no-fehbg 选项,否则它会将设置背景所需的命令行存储在 ~/.fehbg 中,因此要在每次启动 X 时恢复背景,你可以添加“eval $(cat ~/ .fehbg)”到您的 X 启动脚本(如 ~/.xinitrc)。

答案3

谢谢大家。
似乎,这是 lightdm 本身的一些错误(指特定于包的或某些库),或者可能只是安装了一些错误/错误。我现在正在尝试安装许多不同的东西,例如 compiz、awesome、enlightenment、lightdm 等,所以不能确定。
事实上,今天 lightdm 和 lightdm-gtk-greeter 都收到了更新,并且即使使用原始图像和配置,也修复了背景问题。

相关内容