A lightweight, Python-based desktop photo viewer for Linux (specifically optimized for Kali Linux and Debian/XFCE environments) designed to replicate the classic Windows Photo Viewer experience.
- Classic UI: Familiar top-bar menus and bottom rounded capsule navigation bar.
- Custom Vector Icons: Rendered programmatically to bypass common Linux GTK/Qt theme compatibility issues (ensuring icons show up correctly on any theme).
- Interactive Zooming: Support for zooming in/out using the mouse scroll wheel.
- Mouse Panning/Dragging: Easily hold and drag the image with the left mouse button to view details when zoomed in.
- Fullscreen Mode: Toggle fullscreen by clicking the monitor icon, and exit seamlessly by pressing
ESC. - File Navigation: Navigate through pictures in the same folder using the previous/next buttons or keyboard arrow keys (Left/Right).
- External Open: "Open with" submenu to easily direct files to GIMP, Ristretto, Firefox, or System Default.
- Local Deletion: Delete photo files directly from the app interface with a confirmation safety prompt.
- Crop Photo: Crop Photo directly from the app interface with a confirmation safety prompt.
You only need Python 3 and PyQt5:
sudo apt update
sudo apt install python3-pyqt5 -ySimply run the Python script
python3 photo_viewer.pyTo set this application as your default image viewer (so double-clicking opens images here):
- Make sure the script is in a permanent location, e.g., /home/your_path/PhotoViewer/photo_viewer.py.
- Create a desktop entry file:
mkdir -p ~/.local/share/applications/
cat << 'EOF' > ~/.local/share/applications/photo-viewer.desktop
[Desktop Entry]
Type=Application
Name=Windows Photo Viewer (Linux)
Comment=View your photos with Windows style
Exec=python3 /home/rie/PhotoViewer/photo_viewer.py %f
Icon=image-viewer
Terminal=false
Categories=Graphics;RasterGraphics;Viewer;
MimeType=image/png;image/jpeg;image/gif;image/bmp;image/webp;
EOF
- Update the execution permissions and refresh the desktop database:
chmod +x ~/.local/share/applications/photo-viewer.desktop
update-desktop-database ~/.local/share/applications/
- Register it as the default association for major image formats:
xdg-mime default photo-viewer.desktop image/png image/jpeg image/gif image/bmp image/webp