Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MbetterLiveCD
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MbetterLiveCD
Commits
e7a6355f
Commit
e7a6355f
authored
Dec 15, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update as is
parent
2dfa5d22
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
2 deletions
+39
-2
MbetterClient
MbetterClient
+0
-0
preseed.cfg
config/includes.binary/preseed.cfg
+1
-1
MbetterClient
config/includes.chroot/usr/local/bin/MbetterClient
+0
-0
autoinstallergui
config/includes.chroot/usr/local/bin/autoinstallergui
+0
-0
screenshot.sh
config/includes.chroot/usr/local/bin/screenshot.sh
+37
-0
debian-installer.cfg
config/preseed/debian-installer.cfg
+1
-1
No files found.
MbetterClient
View file @
e7a6355f
No preview for this file type
config/includes.binary/preseed.cfg
View file @
e7a6355f
...
...
@@ -10,7 +10,7 @@ d-i keyboard-configuration/xkb-keymap select us
d-i netcfg/choose_interface select auto
# User accounts - predefined (root password set by set_root_password.sh)
d-i passwd/root-password
password changeme
d-i passwd/root-password
-crypted password $1$aImLCLMx$y.infVof.CnB.nIvN6ER7.
d-i passwd/make-user boolean false
# Time configuration - predefined
...
...
config/includes.chroot/usr/local/bin/MbetterClient
View file @
e7a6355f
No preview for this file type
config/includes.chroot/usr/local/bin/autoinstallergui
View file @
e7a6355f
No preview for this file type
config/includes.chroot/usr/local/bin/screenshot.sh
0 → 100755
View file @
e7a6355f
#!/bin/bash
TARGET_USER
=
"mbetterclient"
SAVE_PATH
=
"/home/
$TARGET_USER
/screenshot_kiosk.png"
export
DISPLAY
=
:0
# 1. Get the current magic cookie from the active X session
# We use xauth to extract the specific cookie for display :0
# We use 'su' to access the user's running session environment
X_COOKIE
=
$(
su
$TARGET_USER
-c
"xauth list
$DISPLAY
"
|
grep
$DISPLAY
|
awk
'{print $NF}'
)
if
[
-z
"
$X_COOKIE
"
]
;
then
echo
"Error: Could not retrieve X authority cookie for user
$TARGET_USER
."
echo
"Please ensure 'xauth' is installed (apt install xauth) and the X server is running on :0."
exit
1
fi
rm
-f
/home/mbetterclient/screenshot
*
png
# 2. Set up a temporary Xauthority file for our root SSH session to use
export
XAUTHORITY
=
$(
mktemp
)
xauth add
$DISPLAY
.
$X_COOKIE
# 3. Take the screenshot using the temporary, valid authority
echo
"Taking screenshot using temporary X authority..."
if
scrot
"
$SAVE_PATH
"
;
then
echo
"Success! Screenshot saved to:
$SAVE_PATH
"
else
echo
"Error: Scrot failed. Check installation and permissions."
fi
# 4. Clean up the temporary Xauthority file
rm
"
$XAUTHORITY
"
unset
XAUTHORITY
# Ensure the saved file is owned by the target user for easy access
chown
$TARGET_USER
:
$TARGET_USER
"
$SAVE_PATH
"
config/preseed/debian-installer.cfg
View file @
e7a6355f
...
...
@@ -17,7 +17,7 @@ d-i netcfg/choose_interface select auto
# d-i netcfg/wireless_key string
# User accounts - predefined (root password set by set_root_password.sh)
d-i passwd/root-password
password changeme
d-i passwd/root-password
-crypted password $1$aImLCLMx$y.infVof.CnB.nIvN6ER7.
d-i passwd/make-user boolean false
# Time configuration - predefined
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment