vm: Use nautilus-actions to provide "Copy to other AppVM" etc nautilus commands
No more ugly symlink creation at VM startup, nautilus-actions have system-wide dir (in opposite to nautilus-scripts). Currently old symlinks are not cleaned up. Maybe it should, but leaving them have one advantage: will not break existing users behavior.
This commit is contained in:
parent
14cb955efc
commit
b18d40fb08
7
misc/nautilus-actions.conf
Normal file
7
misc/nautilus-actions.conf
Normal file
@ -0,0 +1,7 @@
|
||||
[runtime]
|
||||
items-create-root-menu=false
|
||||
items-add-about-item=false
|
||||
|
||||
[io-provider na-desktop]
|
||||
readable=true
|
||||
writable=true
|
9
qubes_rpc/qvm-copy-gnome.desktop
Normal file
9
qubes_rpc/qvm-copy-gnome.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Action
|
||||
ToolbarLabel[C]=Copy to other AppVM
|
||||
Name[C]=Copy to other AppVM
|
||||
Profiles=profile-zero;
|
||||
|
||||
[X-Action-Profile profile-zero]
|
||||
Exec=/usr/lib/qubes/qvm-copy-to-vm.gnome %F
|
||||
Name[C]=Default profile
|
9
qubes_rpc/qvm-dvm-gnome.desktop
Normal file
9
qubes_rpc/qvm-dvm-gnome.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Action
|
||||
ToolbarLabel[C]=Open in DisposableVM
|
||||
Name[C]=Open in DisposableVM
|
||||
Profiles=profile-zero;
|
||||
|
||||
[X-Action-Profile profile-zero]
|
||||
Exec=/usr/bin/qvm-open-in-dvm %f
|
||||
Name[C]=Default profile
|
@ -45,6 +45,7 @@ Requires: ethtool
|
||||
Requires: tinyproxy
|
||||
Requires: ntpdate
|
||||
Requires: net-tools
|
||||
Requires: nautilus-actions
|
||||
Requires: qubes-core-vm-kernel-placeholder
|
||||
Requires: qubes-core-libs
|
||||
Provides: qubes-core-vm
|
||||
@ -89,12 +90,6 @@ mv /etc/fstab /var/lib/qubes/fstab.orig
|
||||
fi
|
||||
|
||||
adduser --create-home user
|
||||
su user -c 'mkdir -p /home/user/.local/share'
|
||||
su user -c 'mkdir -p /home/user/.gnome2/nautilus-scripts'
|
||||
su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
|
||||
su user -c 'ln -s /usr/bin/qvm-open-in-dvm /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"'
|
||||
su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created'
|
||||
su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created2'
|
||||
|
||||
%install
|
||||
|
||||
@ -190,6 +185,11 @@ install -m 0644 qubes_rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell,qubes.Syn
|
||||
install -m 0644 qubes_rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $RPM_BUILD_ROOT/etc/qubes_rpc
|
||||
install -m 0644 qubes_rpc/qubes.WaitForSession $RPM_BUILD_ROOT/etc/qubes_rpc
|
||||
|
||||
install -d $RPM_BUILD_ROOT/usr/share/file-manager/actions
|
||||
install -m 0644 qubes_rpc/*-gnome.desktop $RPM_BUILD_ROOT/usr/share/file-manager/actions
|
||||
|
||||
install -D misc/nautilus-actions.conf $RPM_BUILD_ROOT/etc/xdg/nautilus-actions/nautilus-actions.conf
|
||||
|
||||
install qrexec/qrexec_agent $RPM_BUILD_ROOT/usr/lib/qubes
|
||||
install qrexec/qrexec_client_vm $RPM_BUILD_ROOT/usr/lib/qubes
|
||||
install qrexec/qubes_rpc_multiplexer $RPM_BUILD_ROOT/usr/lib/qubes
|
||||
@ -412,6 +412,7 @@ rm -f %{name}-%{version}
|
||||
/etc/udev/rules.d/99-qubes_block.rules
|
||||
/etc/udev/rules.d/99-qubes_network.rules
|
||||
/etc/udev/rules.d/99-qubes_usb.rules
|
||||
/etc/xdg/nautilus-actions/nautilus-actions.conf
|
||||
/etc/xen/scripts/vif-route-qubes
|
||||
%config(noreplace) /etc/yum.conf.d/qubes-proxy.conf
|
||||
%config(noreplace) /etc/yum.repos.d/qubes.repo
|
||||
@ -457,6 +458,8 @@ rm -f %{name}-%{version}
|
||||
/usr/sbin/qubes_firewall
|
||||
/usr/sbin/qubes_netwatcher
|
||||
/usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.override
|
||||
/usr/share/file-manager/actions/qvm-copy-gnome.desktop
|
||||
/usr/share/file-manager/actions/qvm-dvm-gnome.desktop
|
||||
%dir /home_volatile
|
||||
%attr(700,user,user) /home_volatile/user
|
||||
%dir /mnt/removable
|
||||
|
@ -83,22 +83,6 @@ start()
|
||||
|
||||
[ -x /rw/config/rc.local ] && /rw/config/rc.local
|
||||
|
||||
if ! [ -f /home/user/.gnome2/nautilus-scripts/.scripts_created ] ; then
|
||||
echo "Creating symlinks for nautilus actions..."
|
||||
su user -c 'mkdir -p /home/user/.gnome2/nautilus-scripts'
|
||||
su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
|
||||
su user -c 'ln -s /usr/bin/qvm-open-in-dvm /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"'
|
||||
su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created'
|
||||
fi
|
||||
|
||||
if ! [ -f /home/user/.gnome2/nautilus-scripts/.scripts_created2 ] ; then
|
||||
# as we have recently renamed tools, the symlinks would need to be fixed for older templates
|
||||
su user -c 'ln -sf /usr/lib/qubes/qvm-copy-to-vm.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
|
||||
su user -c 'ln -sf /usr/bin/qvm-open-in-dvm /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"'
|
||||
su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created2'
|
||||
fi
|
||||
|
||||
|
||||
success
|
||||
echo ""
|
||||
|
||||
|
@ -45,21 +45,6 @@ fi
|
||||
|
||||
[ -x /rw/config/rc.local ] && /rw/config/rc.local
|
||||
|
||||
if ! [ -f /home/user/.gnome2/nautilus-scripts/.scripts_created ] ; then
|
||||
echo "Creating symlinks for nautilus actions..."
|
||||
su user -c 'mkdir -p /home/user/.gnome2/nautilus-scripts'
|
||||
su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
|
||||
su user -c 'ln -s /usr/bin/qvm-open-in-dvm /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"'
|
||||
su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created'
|
||||
fi
|
||||
|
||||
if ! [ -f /home/user/.gnome2/nautilus-scripts/.scripts_created2 ] ; then
|
||||
# as we have recently renamed tools, the symlinks would need to be fixed for older templates
|
||||
su user -c 'ln -sf /usr/lib/qubes/qvm-copy-to-vm.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
|
||||
su user -c 'ln -sf /usr/bin/qvm-open-in-dvm /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"'
|
||||
su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created2'
|
||||
fi
|
||||
|
||||
# Start services which haven't own proper systemd unit:
|
||||
|
||||
# Start AppVM specific services
|
||||
|
Loading…
Reference in New Issue
Block a user