Skip to content

Commit 31d803c

Browse files
committed
handle cleanup
1 parent 7337743 commit 31d803c

File tree

5 files changed

+115
-5
lines changed

5 files changed

+115
-5
lines changed

.Xresources

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
!------------------------------------------------------------------------------
2+
! This is a sample ~/.Xresources file, demonstrating some basic X/Motif and
3+
! EMWM configuration. Refer to EMWM FAQ/Guide and manpages for further info.
4+
!------------------------------------------------------------------------------
5+
6+
!------------------------------------------------------------------------------
7+
! Global X/Motif setup
8+
!------------------------------------------------------------------------------
9+
10+
!! Make sure to adjust this for your screen to have properly sized fonts
11+
Xft.dpi: 160
12+
13+
!! Default variable width font for all Motif user interface elements
14+
*renderTable.variable.fontType: FONT_IS_XFT
15+
*renderTable.variable.fontName: Liberation Sans
16+
*renderTable.variable.fontSize: 10
17+
*renderTable: variable
18+
19+
!! In case fixed width font is preferred for text input widgets...
20+
*renderTable.fixed.fontType: FONT_IS_XFT
21+
*renderTable.fixed.fontName: Liberation Mono
22+
*renderTable.fixed.fontSize: 10
23+
!! ...uncomment lines below to enable
24+
! *XmText*renderTable: fixed
25+
! *XmTextField*renderTable: fixed
26+
27+
!! Default background and highlight colors
28+
*background: #d2d2d2
29+
*highlightColor: #5f8ba0
30+
31+
!! Lighter and somewhat saturated background for lists and text input widgets
32+
*XmList.background: #b6b6aa
33+
*XmText.background: #d3b5b5
34+
*XmTextField.background: #d3b5b5
35+
36+
!! Tool tip appearance
37+
*TipLabel.background: antiquewhite
38+
*TipShell.borderColor: black
39+
*TipShell.borderWidth: 1
40+
41+
!! Some tweaks
42+
*multiClickTime: 260
43+
*XmScrollBar.width: 14
44+
*XmScrollBar.height: 14
45+
46+
47+
!------------------------------------------------------------------------------
48+
! Window and icon decorations
49+
!------------------------------------------------------------------------------
50+
Emwm*client*background: #8C8C8C
51+
Emwm*client*activeBackground: #aba68c
52+
Emwm*icon*activeBackground: #aba68c
53+
54+
!! Dithered frame borders (somewhat reminiscent of Indigo Magic)
55+
! Emwm*client*topShadowPixmap: 1x1
56+
! Emwm*client*activeTopShadowPixmap: 1x1
57+
58+
!------------------------------------------------------------------------------
59+
! Client icon substitution
60+
!------------------------------------------------------------------------------
61+
!! Note that unless full path is given, images must reside in one of
62+
!! default locations like $APPLRESDIR/bitmaps (see XmGetPixmap(3))
63+
Emwm*XTerm*iconImage: terminal.xpm
64+
Emwm*NEdit*iconImage: textedit.xpm
65+
Emwm*XFile*iconImage: xfile.xpm
66+
67+
!------------------------------------------------------------------------------
68+
! CDE 2.0 Motif look defaults
69+
!------------------------------------------------------------------------------
70+
*enableThinThickness: True
71+
*enableBtn1Transfer: button2_adjust
72+
*enableButtonTab: True
73+
*enableDefaultButton: True
74+
*enableEtchedInMenu: True
75+
*enableMenuInCascade: True
76+
*enableMultiKeyBindings: False
77+
*enableToggleColor: True
78+
*enableToggleVisual: False
79+
*enableDragIcon: False
80+
81+
!------------------------------------------------------------------------------
82+
! CDE 2.0 bindings for text input widgets
83+
!------------------------------------------------------------------------------
84+
*XmText*Translations:#override\n\
85+
Ctrl<Key>u:delete-to-start-of-line()\n\
86+
Ctrl<Key>k:delete-to-end-of-line()\n\
87+
Ctrl<Key>a:beginning-of-line()\n\
88+
Ctrl<Key>e:end-of-line()\n\
89+
Ctrl<Key>p:process-up()\n\
90+
Ctrl<Key>b:backward-character()\n\
91+
Ctrl<Key>n:process-down()\n\
92+
Ctrl<Key>f:forward-character()
93+
94+
*XmTextField*Translations:#override\n\
95+
Ctrl<Key>u:delete-to-start-of-line()\n\
96+
Ctrl<Key>k:delete-to-end-of-line()\n\
97+
Ctrl<Key>a:beginning-of-line()\n\
98+
Ctrl<Key>e:end-of-line()\n\
99+
Ctrl<Key>b:backward-character()\n\
100+
Ctrl<Key>f:forward-character()
101+
102+
!----------------------------------- EOF --------------------------------------
103+
! $Id: Xresources-sample,v 1.8 2024/12/25 21:30:19 alx Exp alx $

.bashrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
alias amrvis2d='/Amrvis2D/amrvis2d.gnu.ex'
22
alias amrvis3d='/Amrvis3D/amrvis3d.gnu.ex'
33

4+
echo "*** Welcome to Amrvis-container! ***"
5+
echo ""
6+
echo "Type 'amrvis2d' or 'amrvis3d' to start Amrvis."
7+
echo "Exiting this terminal will stop this container."
8+
echo ""
9+

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ COPY Palette /home/vscode/Palette
4141

4242
## configure X11 server
4343
COPY ./xpra.conf /etc/xpra/xpra.conf
44+
COPY ./.Xresources /home/vscode/.Xresources
4445
COPY ./start_http_server.sh /home/vscode/start_http_server.sh
46+
RUN mkdir -p /run/user/1000 && chown vscode /run/user/1000
47+
ENV XDG_RUNTIME_DIR=/run/user/1000
4548
EXPOSE 8080
4649

4750
WORKDIR /home/vscode

launch_amrvis_browser.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
MOUNT_DIR=${1:-`pwd`}
66

7-
docker run -p 8080:8080 --platform linux/amd64 -v $MOUNT_DIR:/home/vscode/data ghcr.io/benwibking/amrvis-container:latest
7+
docker run --init -p 8080:8080 --platform linux/amd64 -v $MOUNT_DIR:/home/vscode/data ghcr.io/benwibking/amrvis-container:latest
88

99
## open your web browser to http://localhost:$PORT
1010
## enter the autogenerated password printed to the terminal

start_http_server.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ echo "************************************************************"
1515
echo ""
1616
echo ""
1717

18-
xpra start --start=$EXE --bind-tcp=0.0.0.0:$PORT --ssl-cert=/etc/xpra/ssl-cert.pem #--no-daemon
19-
20-
# prevent container from exiting
21-
sleep infinity
18+
xpra start --start-child=$EXE --bind-tcp=0.0.0.0:$PORT --ssl-cert=/etc/xpra/ssl-cert.pem --exit-with-children --no-daemon > xpra_logfile.txt 2>&1
19+
wait $!
2220

2321
## open your web browser to http://localhost:$PORT
2422
## enter the autogenerated password printed to the terminal

0 commit comments

Comments
 (0)