如何在没有 X 的情况下观看电影/图像?

Mat*_*ock 17 linux graphics

我想知道是否有一种方法可以在不运行 X 服务器的情况下观看电影或图像。我没有使用登录管理器 - 我登录到 tty 并手动启动 X 服务器。

假设情况:我登录了,但决定只看电影,或者看几张照片。我不想为了这个目的而运行 X 服务器和所有的 GUI 东西。

如何在没有 X 的情况下观看电影/图像?

Pan*_*dya 13

对于图像:

您可以使用以下方式观看图像fbi

NAME
       fbi - linux framebuffer imageviewer

SYNOPSIS
       fbi [ options ] file ...

DESCRIPTION
       fbi  displays  the  specified  file(s) on the linux console using the framebuffer device.  PhotoCD, jpeg, ppm,
       gif, tiff, xwd, bmp and png are supported directly.  For other formats fbi tries to use ImageMagick's convert.
Run Code Online (Sandbox Code Playgroud)

示例命令:

$ fbi path/to/file.jpg
Run Code Online (Sandbox Code Playgroud)

对于视频:

  • 您必须具有写入 `/dev/fb0` 的权限。所以要么是`sudo`,要么是`sudo usermod -aG video $USER`。否则`fbi`失败,`vlc`呈现ASCII艺术。也许还需要`audio`组。 (3认同)