Created
March 11, 2024 21:07
-
-
Save 641i130/3f1bf57659e8fb08dcc64a9749129aa1 to your computer and use it in GitHub Desktop.
xpra-user.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat ~/.config/systemd/user/xpra.service | |
[Unit] | |
Description=xpra user service | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/xpra start-desktop --no-daemon --resize-display="1920x1080" --start-child=cinnamon-session-cinnamon | |
[Install] | |
WantedBy=default.target |
Use this script to kill all xpra sessions:
# Get the PID(s) of the process(es) using ps and grep
pid=$(ps aux | grep '/usr/bin/xpra' | grep -v grep | awk '{print $2}')
# Check if pid is not empty
if [ -n "$pid" ]; then
# Kill the process(es)
kill $pid
echo "Processes killed: $pid"
else
echo "No processes found with the specified command."
fi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xpra
like it says here~/.config/systemd/user/xpra.service
systemctl --user daemon-reload
then start the servicesystemctl --user enable --now xpra