Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/181'
Browse files Browse the repository at this point in the history
* origin/pr/181:
  Use set -a instead of sed
  Do not hardcode "user" as the GUI user
  Increase locked memory limit for "qubes" group
  Update comment to reflect current GUI agent
  • Loading branch information
marmarek committed Jul 21, 2023
2 parents f3f6886 + eebfd81 commit d3092de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions appvm-scripts/etc/securitylimits.d/90-qubes-gui.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Qubes GUI agent needs to mlock() all the composition buffers, so they are
# constant physical address
user soft memlock 131072
user hard memlock 131072
# Old Qubes GUI agent needs to mlock() all the composition buffers, so they are
# constant physical addresses. Current GUI agent needs to allocate large
# amounts of pinned memory for grant sharing.
@qubes - memlock 131072
4 changes: 3 additions & 1 deletion appvm-scripts/usr/lib/qubes/qubes-gui-agent-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

. /usr/lib/qubes/init/functions

user=$(qubesdb-read /default-user) || exit
# pretend tha user is at local console
mkdir -p /var/run/console ; /bin/touch /var/run/console/user
mkdir -p /var/run/console
: > "/var/run/console/$user"

# set corresponding display for guivm
if qsvc guivm-gui-agent; then
Expand Down
4 changes: 3 additions & 1 deletion appvm-scripts/usrbin/qubes-session
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ loginctl activate "$XDG_SESSION_ID"
# Qubes environment using the standard environment.d
# facility. Documentation for the facility is at:
# https://www.freedesktop.org/software/systemd/man/environment.d.html
env=$(set -o pipefail && { systemctl --user show-environment | sed 's/^/export /';}) && eval "$env" || exit
set -a # export all variables
env=$(systemctl --user show-environment) && eval "$env" || exit
set +a


if qsvc guivm-gui-agent; then
Expand Down

0 comments on commit d3092de

Please sign in to comment.