Skip to main content

Questions tagged [systemd-run]

5votes
1answer
198views

environment variable with su - and systemd-run su -

If the environment variable DISPLAY is set and I do /bin/su - root from a user shell in an X terminal, then a login shell for root is setup and the DISPLAY environment variable is still present. If I ...
J G Miller's user avatar
0votes
1answer
55views

How to use systemd-run to isolate the rest of the system from a rogue program triggering the oom killer

I'm wanting to use cgroups and systemd-run to insulate the rest of my system from rogue programs that wake the OOM killer. In particular, clangd is hogging all my memory and then some, and then ...
John Carter's user avatar
3votes
3answers
253views

Run an update *one* time at shutdown – systemd-run?

I've got a few things that I don't want to update while my graphical session is running, but would be happy to have them updated on shutdown (after my graphical session ended, while network is still ...
Marcus Müller's user avatar
1vote
0answers
98views

Using systemd-run --uid

I am trying to run commands from a root shell as other users. I am trying to remove sudo from it: systemd-run --user --pty --same-dir --wait --service-type=exec sudo -u ubuntu make I tried: systemd-...
gcb's user avatar
  • 620
0votes
1answer
42views

omit command output on systemd-run

when running systemd-run --pty --same-dir --wait --service-type=exec I get all the command output in journal. While nice, it is not something I want/can afford all the time. for example, if I want ...
gcb's user avatar
  • 620
0votes
0answers
86views

how to stop user unit properly?

Starting a user unit $ systemd-run --scope --user qemu-system-x86_64 -pidfile startedvm Running as unit: run-r99922f9d145a4111bae22dd8aceb8515.scope; invocation ID: 10be8f45e7124b9e868f374023d4e06e ...
gcb's user avatar
  • 620
1vote
1answer
361views

How to list units with specific properties?

I use systemd-run --user a lot to run things. I want to be able to list only those transient units, but there seems to be no option to systemctl --user list-units to do it. I also cannot list the ...
neingeist's user avatar
0votes
1answer
202views

How do I pass a command group to systemd-run?

Why can't I pass a command group to systemd-run like this? $ systemd-run --on-active=1 { cp file1 file2 && echo hi; } Failed to find executable {: No such file or directory I tried various ...
ckattmann's user avatar
1vote
0answers
368views

Can systemd-run create temporary cgroups for temporary commands with resource limits?

I'd like to limit the resource consumption of temporary commands with cgroup created by systemd-run, similar to what cgcreate does instead, but I'm not sure if that makes sense? I'd like to make sure ...
山河以无恙's user avatar
0votes
1answer
144views

Why systemd-run memory limiting cause crash of program?

I am using different methods for different programs to control their resource management. When I used systemd-run for gimp(GNU image manipulation program), when picture's memory requirement is higher ...
user avatar
3votes
1answer
1kviews

using systemd-run to replace 'at' commands

What is the best way of using systemd-run in place of a simple sudo -u xxx at -f backupJ-447.cmd 03:10 Our org has gone systemd mad and no longer installs 'at', 'batch' and cron is depricated on our ...
ferg's user avatar
  • 141
2votes
0answers
1kviews

Running command under systemd slice works for root, but not user

I'm trying to execute a command under some resource limits. This correctly limits my-bin to just 1 CPU core. I'm able to verify with htop. $ sudo systemd-run -p AllowedCPUs=0 -- ./my-bin However, ...
425nesp's user avatar
5votes
1answer
1kviews

What does "?" means in ls -l output? [duplicate]

I saw a few files/dir are inaccessible even to the root user: find: ‘/run/user/1000/gvfs’: Permission denied. So I went a level deeper and ran ls -l; below is the output. /run/user/125# ll ls: cannot ...
samshers's user avatar
0votes
1answer
211views

Does /dev, /run and /sys exist on HDD (if so what is there location if it can be meaningfully traced)?

At the time of Linux installation, i have mentioned only one filesystem (/dev/sda1 -> ext4 -> / ). But for dev, run, proc, sys - Linux is creating addition FS which is inferable from mount. $ ...
samshers's user avatar
3votes
1answer
6kviews

Running systemd service synchronously / in foreground

I would like to replace my Xsession with my custom program (kiosk-like setup), previously I was just setting STARTUP variable in my .xsessionrc file like: STARTUP='/path/to/my/program' Now I want to ...
reddot's user avatar

153050per page
close