Commit Graph

239 Commits

Author SHA1 Message Date
Rusty Bird
cd3d870fd0
qubes.Restore: remove bashism found by new ShellCheck 2020-02-26 18:47:44 +00:00
Saswat Padhi
f96c00d975
signed 2020-02-08 04:01:48 -08:00
Saswat Padhi
600df100df qubes.GetAppmenus: skip unreadable .desktop files 2020-02-08 10:13:41 +00:00
Amadeusz Piotr Żołnowski
4de377bc3b
Split items in misc directory by topic 2020-02-04 23:59:09 +00:00
Pawel Marczewski
9db6e4e2cc
Advertise qubes.VMExec support as a feature 2020-01-24 18:45:17 +01:00
Pawel Marczewski
738548a8e4
Add qubes.VMExec call, for running a single command
With a VMExecGUI variant that waits for a session.

See QubesOS/qubes-issues#4850.
2020-01-24 18:44:45 +01:00
Marek Marczykowski-Górecki
d2087c5abf
Merge remote-tracking branch 'origin/pr/203'
* origin/pr/203:
  Added "QubesIncoming" shortcut to Nautilus
2020-01-16 04:24:07 +01:00
Marta Marczykowska-Górecka
fd6e551ebe
Added "QubesIncoming" shortcut to Nautilus
A small script will add the QubesIncoming shortcut to Nautilus file pane
on the first use of qvm-copy to a given VM. The shortcut will not be recreated if
deleted.

fixes QubesOS/qubes-issues#2229
2020-01-13 16:45:41 +01:00
Marek Marczykowski-Górecki
cc68f165bc
Merge remote-tracking branch 'origin/pr/199'
* origin/pr/199:
  qubes.GetAppmenus: handle home directory properly in case of sudo
  Silence shellcheck
  GetAppmenus: ensure right app directories
2020-01-09 01:38:12 +01:00
Pawel Marczewski
418a5ec6e3
qubes.GetAppmenus: handle home directory properly in case of sudo 2020-01-08 17:05:32 +01:00
Pawel Marczewski
2df17a4790
Silence shellcheck
See https://github.com/koalaman/shellcheck/wiki/SC1090
2020-01-08 10:29:36 +01:00
Marek Marczykowski-Górecki
cf2c91bc79
Merge remote-tracking branch 'origin/pr/200'
* origin/pr/200:
  Make the file copy operation respect default_user
2020-01-08 02:21:59 +01:00
Pawel Marczewski
e78edba725
Make the file copy operation respect default_user
Previously, both file path and username were hardcoded.

Fixes QubesOS/qubes-issues#5385.
2020-01-07 16:54:19 +01:00
Pawel Marczewski
552b6de862
GetAppmenus: ensure right app directories
The script depends on XDG_DATA_DIRS environment variable
being set up correctly, which is not the case when it is
running under sudo. As a result, a post-install trigger
for apt could remove application entries from other sources
(Snap, Flatpak).

Fixes QubesOS/qubes-issues#5477.
2020-01-07 15:45:05 +01:00
Pawel Marczewski
03621e5792
StartApp: remove workaround for .desktop suffix
The workaround is no longer necessary, and it breaks when
the app name itself contains .desktop (such as org.telegram.desktop).

Fixes QubesOS/qubes-issues#5408.
2020-01-07 13:06:57 +01:00
Frédéric Pierret (fepitre)
71ef524dec
vm-file-editor: drop old wait-for-session mechanism 2019-11-11 16:08:28 +01:00
Frédéric Pierret (fepitre)
a44e73900e
qubes.WaitForSession: refactor by waiting for qrexec-fork-server socket 2019-11-02 23:11:32 +01:00
Amadeusz Piotr Żołnowski
c104d73a85
Don't clean tilda files in qubes-rpc
These are not created by build system, but by some editors. Developers
should deal with extra files created by theirs editors outside of build
files.
2019-10-21 22:45:36 +01:00
Marek Marczykowski-Górecki
e43e262b2d
Merge remote-tracking branch 'origin/pr/188'
* origin/pr/188:
  Use built-in rules in qubes-rpc makefile
  Ignore build result: tar2qfile
  Remove no longer needed xorg-preload-apps.conf
  Move qubes-rpc installation from the root Makefile to qubes-rpc Makefile
2019-10-21 00:45:47 +02:00
Amadeusz Piotr Żołnowski
863c7e130f
Use built-in rules in qubes-rpc makefile
That allows a build system to customize compiler and linker and pass
extra flags to these.

Remove `-g` as default flag and enable it only when `DEBUG` variable is
set.
2019-10-20 09:12:08 +01:00
Amadeusz Piotr Żołnowski
e98d9332fa
Ignore build result: tar2qfile 2019-10-20 09:12:08 +01:00
Amadeusz Piotr Żołnowski
3152c609a9
Move qubes-rpc installation from the root Makefile to qubes-rpc Makefile
qubes-rpc has its own Makefile that's responsible for building some
executables. The root Makefile was installing qubes-rpc files. To make
qubes-rpc a bit more indepdent from core-agent root Makefile and to ease
potential maintainer work on packaging qubes-rpc separately, the
installation has been moved to qubes-rpc Makefile. Moreover that should
make the Makefiles easier to read and maintain.
2019-10-20 09:12:07 +01:00
Marek Marczykowski-Górecki
3c47a7890f
Merge branch 'fc31'
* fc31:
  rpm: switch deps to python3-setuptools on CentOS too
  debian: switch to python3
  Use spaces in xdg-icon script
  Convert other scripts to python3
  Convert qubesagent module to python3
  Minor codestyle fix in qubesadmin/firewall.py
  Require python setuptools
  Update python2 dependencies to python3 and clean deprecated requirements
2019-10-06 07:00:10 +02:00
Marek Marczykowski-Górecki
274c950af7
Use spaces in xdg-icon script 2019-09-19 04:57:55 +02:00
Marek Marczykowski-Górecki
5c9903db46
Convert other scripts to python3
QubesOS/qubes-issues#5289
2019-09-19 04:57:55 +02:00
Marta Marczykowska-Górecka
dffe0b2f1a
Make qvm-copy/move[-to-vm] one script
Instead of two scripts calling one another, now it's
only one script, with added variable names inside for clarity.
Also hopefully finally fixes the help messages for good.

fixes QubesOS/qubes-issues#4058
2019-09-09 22:03:48 +02:00
Frédéric Pierret (fepitre)
e27296da3c
Allow creating TCP sockets between qubes
QubesOS/qubes-issues#2148
2019-08-08 15:48:37 +02:00
Marek Marczykowski-Górecki
ec32be73ed
Specify expected shell in su calls
When calling su with a specific script, specify /bin/sh shell to be sure
to use posix compliant shell. User shell may not be a one (like fish).

Fixes QubesOS/qubes-issues#5135
2019-07-05 20:38:04 +02:00
Marek Marczykowski-Górecki
08a853b960
Merge branch 'remove-qrexec'
* remove-qrexec:
  travis: update for R4.1
  Remove qrexec-agent related files
2019-06-06 23:20:11 +02:00
Frédéric Pierret (fepitre)
0c3421cfa8
qubes.ShowInTerminal: simply exit if mktemp generate " character 2019-05-11 11:54:24 +02:00
Frédéric Pierret (fepitre)
2b2752f936
Rename and fix from Marek's comments 2019-05-07 15:01:34 +02:00
Frédéric Pierret (fepitre)
4324dc1564
Add admin.vm.TerminalDispVM qubes-rpc 2019-05-05 17:59:44 +02:00
Marek Marczykowski-Górecki
20285bc6c2
Remove qrexec-agent related files
Move it to the core-qrexec repository.

QubesOS/qubes-issues#4955
2019-04-08 18:22:38 +02:00
Marek Marczykowski-Górecki
b47a61adcf
Make shellcheck happy 2018-12-15 23:45:34 +01:00
Marek Marczykowski-Górecki
3b0f80e19f
Make shebang explicit /usr/bin/python2 where it's still there
Both Archlinux and Fedora 29 have guidelines to point explicitly at
/usr/bin/python2 where it expect python2.

Also, do not use env.

Fixes QubesOS/qubes-issues#4027
2018-10-24 00:24:50 +02:00
Marek Marczykowski-Górecki
d1f55ffeb8
appmenus: send only persistent appmenus entries, use $XDG_DATA_*
It may be useful to create AppVM-specific menu entries in AppVM itself.
It may be an application installed there (in /usr/local, or using snap
QubesOS/qubes-issues#2766), but it may be also some user custom
shortcut.
To support this, dom0 will accept menu entries also from
TemplateBasedVMs. But to avoid duplicates, qubes.GetAppmenus service
should send only menu entries actually stored in that VM, not inherited
from its template. To distingush them, first check what type of
persistence this VM has (from qubesdb-read /qubes-vm-persistence). If
it's rw-only, send only entries stored on /rw.

To make it more robust, use $XDG_DATA_DIRS and $XDG_DATA_HOME to
discover directories, instead of looking only for
/usr/{,local/}share/applications. This makes snap and flatpak handled
for free.

Fixes QubesOS/qubes-issues#4152
2018-10-09 06:06:58 +02:00
Rusty Bird
ff77c78ecc
Unify qvm-{copy,move}-to-vm.{gnome,kde} and fix some bugs
- Symlink the other three tools to qvm-copy-to-vm.gnome, use the same
  code where possible, and select differing behavior based on invoked
  name (like the CLI tools). This brings qvm-move-to-vm.kde up to date
  for R4.0 (bugfix on 89183e9).

- Get rid of a window focus race between zenity/kdialog and the
  qubes.Filecopy dom0 permission dialog: Only launch the GUI after the
  first line has been read from qfile-agent.

- Avoid visual glitches (e.g. for a non-existing file) by special-casing
  a no-op progress function for $SIZE == 0.

- Pass -- separator between 'rm -rf' and the files to be removed, in
  case someone or something ever invokes the tool on relative file names
  starting with a dash.

- Pass -b (implies --apparent-size) and -s to du, to simplify percentage
  calculation and to avoid unnecessary output.
2018-07-25 12:44:53 +00:00
Rusty Bird
8da7c7af60
qfile-agent.c: exit on EPIPE after gui progress write
The qvm-{copy,move}-to-vm.{gnome,kde} cancel buttons didn't actually
cancel, because qfile-agent ignored EPIPE and - via qfile_pack_init() -
SIGPIPE. So it never noticed when the local PROGRESS_TYPE=gui reader had
shut down.
2018-07-25 12:44:52 +00:00
Marta Marczykowska-Górecka
99f239ea9e
Avoid leaking VM name in qvm-copy usage text
Do not display name of the qube in the usage text.
2018-07-16 18:33:54 +02:00
Marta Marczykowska-Górecka
96d8914c83
Add proper help text to qvm-copy tools and fix incorrect behavior
for qvm-move

Added more descriptive usage text to the
qvm-copy/qvm-move/qvm-copy-to-vm/qvm-move-to-vm family of tools.
Also fixed bug that removed the file being moved for qvm-move-to-vm,
but not for qvm-move.

fixes QubesOS/qubes-issues#3529
fixes QubesOS/qubes-issues#4020
2018-07-16 18:33:39 +02:00
Marek Marczykowski-Górecki
b5a9d9bf8e
Add build-time assert for filename buffer size
Suggested by @cfcs
2018-05-28 22:45:39 +02:00
Marek Marczykowski-Górecki
e8a2d9c32a
Add file managers integration for qvm-open-in-dvm --view-only
Rename existing entry from 'Open In DisposableVM' to 'Edit in
DisposableVM', then add new 'View In DisposableVM'.

Fixes QubesOS/qubes-issues#1118
2018-05-26 03:09:41 +02:00
Marek Marczykowski-Górecki
42b1355957
qvm-open-in-vm: mark file as read-only if opened with --view-only
This will cause most applications to disallow changing the file and also
add some visual indication about the view being read only. This will
avoid making the changes that would be discarded later.

QubesOS/qubes-issues#1118
2018-05-26 03:09:40 +02:00
Marek Marczykowski-Górecki
ef557ca460
qvm-open-in-vm: implement --view-only option
Implement option to disallow (ignore in fact) modifications of file
opened in another VM (including DispVM).
This commit implements actual services part and handling in wrapping scripts.

Fixes QubesOS/qubes-issues#1118
2018-05-26 03:09:40 +02:00
Marek Marczykowski-Górecki
5deac1802f
qubes-rpc: fix code style - indent with spaces 2018-05-26 00:54:09 +02:00
X4lldux
9fa75314f1
Move/Copy many files in one step via nautilus extension 2018-04-30 02:40:23 +02:00
Marek Marczykowski-Górecki
a850e3aaee
Merge remote-tracking branch 'qubesos/pr/109'
* qubesos/pr/109:
  Fix GCC8 warnings
2018-04-21 01:20:52 +02:00
Marek Marczykowski-Górecki
c278d56bea
Update gitignore and make clean target
Debian build require clean sources (make clean must return the sources
to the state from before build).
2018-04-20 16:27:26 +02:00
Frédéric Pierret
c43c4df7b9
Fix GCC8 warnings 2018-04-20 08:52:45 +02:00
Marek Marczykowski-Górecki
96aa933024
Wait for user session as X session owner
... instead of requested user. This makes sure that session startup
script will be able to send a signal here to notify about session
startup.

This is especially needed when the first service started in the VM is
called as root (like qubes.InstallUpdatesGUI).

Fixes QubesOS/qubes-issues#3526
2018-02-14 02:19:15 +01:00