Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KasmVNC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
docker
KasmVNC
Commits
8181cb00
Verified
Commit
8181cb00
authored
3 months ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Almost acceptable user management
parent
68602589
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
docker-compose.yml
+1
-0
1 addition, 0 deletions
docker-compose.yml
docker/change_password.sh
+10
-5
10 additions, 5 deletions
docker/change_password.sh
docker/custom_startup.sh
+8
-0
8 additions, 0 deletions
docker/custom_startup.sh
kasm
+70
-0
70 additions, 0 deletions
kasm
with
90 additions
and
5 deletions
.gitignore
+
1
−
0
View file @
8181cb00
.env
homedir
.*.sw?
dockerstartup/
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
1
−
0
View file @
8181cb00
...
...
@@ -16,6 +16,7 @@ services:
-
SPYDER=${SPYDER}
-
ANACONDA=${ANACONDA}
-
KASM_USER=${VNC_USER}
-
VNCOPTIONS=-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0 -select-de manual -UnixRelay printer:/tmp/printer -allowoverride AcceptPointerEvents,BlacklistTimeout,BlacklistThreshold -blacklistthreshold 1000 -blacklisttimeout 1"
volumes
:
...
...
This diff is collapsed.
Click to expand it.
docker/change_password.sh
+
10
−
5
View file @
8181cb00
#!/bin/bash
title
=
"Changement du mot de passe"
password
=
$(
zenity
--title
=
"
$title
"
--
question
=
"Veuillez entrer votre mot de passe"
--entry
)
confirm
=
$(
zenity
--title
=
"
$title
"
--
question
=
"Veuillez
entr
er votre mot de passe"
--entry
)
password
=
$(
zenity
--title
=
"
$title
"
--
text
=
"Veuillez entrer votre mot de passe"
--entry
)
confirm
=
$(
zenity
--title
=
"
$title
"
--
text
=
"Veuillez
confirm
er votre mot de passe"
--entry
)
icon
=
"error"
if
[
"
$password
"
!=
"
$confirm
"
]
;
then
message
=
$(
echo
-e
"
$password
\n
$password
"
| vncpasswd
-u
$KASM_USER
$HOME
/.vnc/passwd
)
ok
=
0
if
[
"
$password
"
==
"
$confirm
"
]
;
then
ok
=
1
message
=
$(
echo
-e
"
$password
\n
$password
\n
"
| kasmvncpasswd
-u
$KASM_USER
-wo
2>&1
)
if
[
$?
-eq
0
]
;
then
message
=
"Mot de passe changé"
cp
$HOME
/.kasmpasswd
$HOME
/.kasmpasswd.persist
# Restart the VNC server
kill
$(
cat
.vnc/
*
.pid
)
icon
=
"info"
message
=
"Le mot de passe a été changé"
fi
else
message
=
"La confirmation du mot de passe n'est pas identique au mot de passe"
...
...
This diff is collapsed.
Click to expand it.
docker/custom_startup.sh
+
8
−
0
View file @
8181cb00
...
...
@@ -36,3 +36,11 @@ Exec=$(which spyder)
eof
fi
chmod
+x
$VNC_HOME
/Desktop/
*
.desktop
if
[
-f
"
$HOME
/.kasmpasswd.persist"
]
;
then
cp
$HOME
/.kasmpasswd.persist
$HOME
/.kasmpasswd
chown
600
$HOME
/.kasmpasswd
fi
# We should not exit
sleep
infinity
This diff is collapsed.
Click to expand it.
kasm
0 → 100755
+
70
−
0
View file @
8181cb00
#!/bin/bash
is_docker
()
{
if
[
!
-z
"
$(
which docker 2>/dev/null |
grep
-v
'not found'
)
"
]
;
then
echo
"1"
else
echo
"0"
fi
}
usage
()
{
echo
-e
"Usage
$0
<command> [args]
\n
"
echo
-e
"COMMANDS
\n
"
echo
"bash"
echo
-e
"
\t
opens a shell in kasm"
echo
"config"
echo
-e
"
\t
query vncconfig [-list|-get|-set|desc] args"
echo
"down"
echo
-e
"
\t
Stops the services"
echo
"reset_passwd"
echo
-e
"
\t
Reinitialize the passowrd"
echo
"restart"
echo
-e
"
\t
restarts the services"
echo
"up"
echo
-e
"
\t
Starts the services"
}
if
[
"
$(
is_docker
)
"
-eq
1
]
;
then
if
[
!
-z
"
$(
which docker-compose 2>/dev/null
)
"
]
;
then
compose
=
"docker-compose"
else
compose
=
"docker compose"
fi
cmd
=
"
$compose
exec kasm"
fi
action
=
$1
shift
# Keep actions sorted
case
$action
in
"bash"
)
$cmd
bash
;;
"config"
)
if
[
-z
"
$1
"
]
;
then
args
=
"-list"
else
args
=
"
$@
"
fi
$cmd
vncconfig
$args
;;
"down"
)
$compose
down
$@
;;
"reset_passwd"
)
$cmd
rm
.kasmpasswd.persist
$compose
down
$compose
up
-d
;;
"restart"
)
$compose
restart
;;
"up"
)
$compose
up
$@
;;
*
)
echo
"ERROR: No command given"
usage
exit
1
esac
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment