mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-28 07:06:04 +00:00
Add a desktop file for launching remote-viewer
Enable automagic handling of spice:// URLs in firefox by registering a desktop handler for remote-viewer with the SPICE URI scheme
This commit is contained in:
parent
8ae777a5f7
commit
be3ce01096
@ -111,6 +111,11 @@ if OS_WIN32
|
||||
remote_viewer_LDFLAGS += -Wl,--subsystem,windows
|
||||
endif
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_DATA = remote-viewer.desktop
|
||||
|
||||
EXTRA_DIST += $(desktop_DATA)
|
||||
|
||||
VIRT_VIEWER_RES = virt-viewer.rc virt-viewer.manifest
|
||||
ICONDIR = $(top_builddir)/icons
|
||||
MANIFESTDIR = $(srcdir)
|
||||
|
||||
6
src/remote-viewer.desktop
Normal file
6
src/remote-viewer.desktop
Normal file
@ -0,0 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Remote Viewer
|
||||
Exec=remote-viewer %u
|
||||
Type=Application
|
||||
Terminal=False
|
||||
MimeType=x-scheme-handler/spice
|
||||
@ -35,6 +35,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: openssh-clients
|
||||
Requires(post): %{_sbindir}/update-alternatives
|
||||
Requires(postun): %{_sbindir}/update-alternatives
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(postun): desktop-file-utils
|
||||
|
||||
%if %{with_gtk3}
|
||||
BuildRequires: gtk3-devel >= 3.0.0
|
||||
@ -132,6 +134,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_sbindir}/update-alternatives --install %{_libexecdir}/spice-xpi-client \
|
||||
spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer 25
|
||||
update-desktop-database -q %{_datadir}/applications
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
@ -139,6 +142,7 @@ if [ $1 -eq 0 ] ; then
|
||||
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_sbindir}/update-alternatives --remove spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer
|
||||
fi
|
||||
update-desktop-database -q %{_datadir}/applications
|
||||
|
||||
%posttrans
|
||||
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
@ -154,6 +158,7 @@ fi
|
||||
%{_datadir}/%{name}/ui/virt-viewer-auth.xml
|
||||
%{_datadir}/%{name}/ui/virt-viewer-about.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/*
|
||||
%{_datadir}/applications/remote-viewer.desktop
|
||||
%ghost %{_libexecdir}/spice-xpi-client
|
||||
%{_libexecdir}/spice-xpi-client-remote-viewer
|
||||
%{_mandir}/man1/virt-viewer.1*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user