diff --git a/jupyterlab_iow.sh b/jupyterlab_iow.sh new file mode 100644 index 0000000..f9c1b33 --- /dev/null +++ b/jupyterlab_iow.sh @@ -0,0 +1,10 @@ +source ~/.bashrc +source ~/.bash_profile +module load miniconda3 +ncores=1 +export OMP_NUM_THREADS=$ncores +export OPENBLAS_NUM_THREADS=$ncores +export MKL_NUM_THREADS=$ncores +export VECLIB_MAXIMUM_THREADS=$ncores +export NUMEXPR_NUM_THREADS=$ncores +jupyter lab diff --git a/jupyterlab_remote.sh b/jupyterlab_remote.sh new file mode 100644 index 0000000..c0c413c --- /dev/null +++ b/jupyterlab_remote.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +#SBATCH --job-name=jupyter +#SBATCH --output=/data/%u/.jupyter_out.txt +#SBATCH --nodes 1 +#SBATCH --ntasks=1 +#SBATCH -t 8:00:00 +#SBATCH -p compute + +source ~/.bashrc +PATH=$PATH:$HOME/.local/bin:$HOME/bin + +export PATH + +export MODULEPATH=$MODULEPATH:/data/iow/iow-modules/DATAFORMATS +export MODULEPATH=$MODULEPATH:/data/iow/iow-modules/VISUALISATION +export MODULEPATH=$MODULEPATH:/data/iow/iow-modules/MPI +export MODULEPATH=$MODULEPATH:/data/iow/iow-modules/NUMERICS +module load miniconda3 + +export OMP_NUM_THREADS=40 +export KMP_AFFINITY=compact,1,0,granularity=fine +export MKLDNN_VERBOSE=1 +export MYJUPYTERPORT=40374 +export XDG_RUNTIME_DIR="/data/$USER" +hostname > /data/hr275/.jupyterlab_hostname.txt +jupyter lab --port $MYJUPYTERPORT --ip 0.0.0.0 --no-browser --notebook-dir="/data/$USER" diff --git a/phyportal.lpi b/phyportal.lpi index 69896fa..a52a1d0 100644 --- a/phyportal.lpi +++ b/phyportal.lpi @@ -1,13 +1,11 @@ - + - - - + <Scaled Value="True"/> <ResourceType Value="res"/> @@ -26,13 +24,14 @@ </PublishOptions> <RunParams> <FormatVersion Value="2"/> + <Modes Count="0"/> </RunParams> <RequiredPackages Count="1"> <Item1> <PackageName Value="LCL"/> </Item1> </RequiredPackages> - <Units Count="3"> + <Units Count="4"> <Unit0> <Filename Value="phyportal.lpr"/> <IsPartOfProject Value="True"/> @@ -53,6 +52,13 @@ <ResourceBaseClass Value="Form"/> <UnitName Value="Unit2"/> </Unit2> + <Unit3> + <Filename Value="unit3.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form3"/> + <ResourceBaseClass Value="Form"/> + <UnitName Value="Unit3"/> + </Unit3> </Units> </ProjectOptions> <CompilerOptions> diff --git a/phyportal.lpr b/phyportal.lpr index d10d657..b1b5fcd 100644 --- a/phyportal.lpr +++ b/phyportal.lpr @@ -7,7 +7,7 @@ uses cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset - Forms, Unit1, Unit2 + Forms, Unit1, Unit2, Unit3 { you can add units after this }; {$R *.res} @@ -18,6 +18,7 @@ begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); + Application.CreateForm(TForm3, Form3); Application.Run; end. diff --git a/phyportal.lps b/phyportal.lps index 424f729..5625de8 100644 --- a/phyportal.lps +++ b/phyportal.lps @@ -1,179 +1,192 @@ -<?xml version="1.0" encoding="UTF-8"?> -<CONFIG> - <ProjectSession> - <PathDelim Value="\"/> - <Version Value="12"/> - <BuildModes Active="Default"/> - <Units Count="4"> - <Unit0> - <Filename Value="phyportal.lpr"/> - <IsPartOfProject Value="True"/> - <EditorIndex Value="-1"/> - <WindowIndex Value="-1"/> - <TopLine Value="-1"/> - <CursorPos X="-1" Y="-1"/> - <UsageCount Value="183"/> - </Unit0> - <Unit1> - <Filename Value="unit1.pas"/> - <IsPartOfProject Value="True"/> - <ComponentName Value="Form1"/> - <HasResources Value="True"/> - <ResourceBaseClass Value="Form"/> - <UnitName Value="Unit1"/> - <IsVisibleTab Value="True"/> - <TopLine Value="539"/> - <CursorPos X="68" Y="551"/> - <UsageCount Value="183"/> - <Loaded Value="True"/> - <LoadedDesigner Value="True"/> - </Unit1> - <Unit2> - <Filename Value="unit2.pas"/> - <IsPartOfProject Value="True"/> - <ComponentName Value="Form2"/> - <HasResources Value="True"/> - <ResourceBaseClass Value="Form"/> - <UnitName Value="Unit2"/> - <EditorIndex Value="1"/> - <TopLine Value="24"/> - <CursorPos X="77" Y="49"/> - <UsageCount Value="178"/> - <Loaded Value="True"/> - <LoadedDesigner Value="True"/> - </Unit2> - <Unit3> - <Filename Value="C:\lazarus\fpc\3.0.4\source\packages\fcl-process\src\process.pp"/> - <EditorIndex Value="-1"/> - <TopLine Value="268"/> - <CursorPos X="21" Y="24"/> - <UsageCount Value="5"/> - </Unit3> - </Units> - <JumpHistory Count="30" HistoryIndex="29"> - <Position1> - <Filename Value="unit1.pas"/> - <Caret Line="729" TopLine="716"/> - </Position1> - <Position2> - <Filename Value="unit1.pas"/> - <Caret Line="730" TopLine="716"/> - </Position2> - <Position3> - <Filename Value="unit1.pas"/> - <Caret Line="733" TopLine="716"/> - </Position3> - <Position4> - <Filename Value="unit1.pas"/> - <Caret Line="736" TopLine="716"/> - </Position4> - <Position5> - <Filename Value="unit1.pas"/> - <Caret Line="725" TopLine="716"/> - </Position5> - <Position6> - <Filename Value="unit1.pas"/> - <Caret Line="729" TopLine="716"/> - </Position6> - <Position7> - <Filename Value="unit1.pas"/> - <Caret Line="730" TopLine="716"/> - </Position7> - <Position8> - <Filename Value="unit1.pas"/> - <Caret Line="733" TopLine="716"/> - </Position8> - <Position9> - <Filename Value="unit1.pas"/> - <Caret Line="686" Column="76" TopLine="674"/> - </Position9> - <Position10> - <Filename Value="unit1.pas"/> - </Position10> - <Position11> - <Filename Value="unit1.pas"/> - <Caret Line="488" Column="3" TopLine="467"/> - </Position11> - <Position12> - <Filename Value="unit1.pas"/> - <Caret Line="763" Column="12" TopLine="742"/> - </Position12> - <Position13> - <Filename Value="unit1.pas"/> - <Caret Line="201" Column="86" TopLine="193"/> - </Position13> - <Position14> - <Filename Value="unit1.pas"/> - <Caret Line="204" Column="18" TopLine="191"/> - </Position14> - <Position15> - <Filename Value="unit1.pas"/> - <Caret Line="190" Column="52" TopLine="176"/> - </Position15> - <Position16> - <Filename Value="unit1.pas"/> - <Caret Line="926" Column="20" TopLine="924"/> - </Position16> - <Position17> - <Filename Value="unit1.pas"/> - <Caret Line="12" Column="3"/> - </Position17> - <Position18> - <Filename Value="unit1.pas"/> - <Caret Line="584" Column="54" TopLine="476"/> - </Position18> - <Position19> - <Filename Value="unit1.pas"/> - <Caret Line="488" Column="75" TopLine="479"/> - </Position19> - <Position20> - <Filename Value="unit1.pas"/> - <Caret Line="323" Column="11" TopLine="308"/> - </Position20> - <Position21> - <Filename Value="unit1.pas"/> - <Caret Line="10" Column="26"/> - </Position21> - <Position22> - <Filename Value="unit1.pas"/> - <Caret Line="71" Column="11" TopLine="51"/> - </Position22> - <Position23> - <Filename Value="unit1.pas"/> - <Caret Line="74" Column="11" TopLine="54"/> - </Position23> - <Position24> - <Filename Value="unit1.pas"/> - <Caret Line="75" Column="11" TopLine="55"/> - </Position24> - <Position25> - <Filename Value="unit1.pas"/> - <Caret Line="76" Column="11" TopLine="56"/> - </Position25> - <Position26> - <Filename Value="unit1.pas"/> - <Caret Line="77" Column="11" TopLine="57"/> - </Position26> - <Position27> - <Filename Value="unit1.pas"/> - <Caret Line="305" Column="15" TopLine="284"/> - </Position27> - <Position28> - <Filename Value="unit1.pas"/> - <Caret Line="323" Column="15" TopLine="302"/> - </Position28> - <Position29> - <Filename Value="unit1.pas"/> - <Caret Line="12" Column="24"/> - </Position29> - <Position30> - <Filename Value="unit1.pas"/> - <Caret Line="85" Column="16" TopLine="58"/> - </Position30> - </JumpHistory> - <RunParams> - <FormatVersion Value="2"/> - <Modes ActiveMode=""/> - </RunParams> - </ProjectSession> -</CONFIG> +<?xml version="1.0" encoding="UTF-8"?> +<CONFIG> + <ProjectSession> + <PathDelim Value="\"/> + <Version Value="11"/> + <BuildModes Active="Default"/> + <Units Count="5"> + <Unit0> + <Filename Value="phyportal.lpr"/> + <IsPartOfProject Value="True"/> + <EditorIndex Value="-1"/> + <WindowIndex Value="-1"/> + <TopLine Value="-1"/> + <CursorPos X="-1" Y="-1"/> + <UsageCount Value="185"/> + </Unit0> + <Unit1> + <Filename Value="unit1.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form1"/> + <HasResources Value="True"/> + <ResourceBaseClass Value="Form"/> + <UnitName Value="Unit1"/> + <TopLine Value="701"/> + <CursorPos X="23" Y="710"/> + <UsageCount Value="185"/> + <Loaded Value="True"/> + <LoadedDesigner Value="True"/> + </Unit1> + <Unit2> + <Filename Value="unit2.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form2"/> + <HasResources Value="True"/> + <ResourceBaseClass Value="Form"/> + <UnitName Value="Unit2"/> + <EditorIndex Value="2"/> + <TopLine Value="25"/> + <CursorPos X="37" Y="32"/> + <UsageCount Value="180"/> + <Loaded Value="True"/> + <LoadedDesigner Value="True"/> + </Unit2> + <Unit3> + <Filename Value="C:\lazarus\fpc\3.0.4\source\packages\fcl-process\src\process.pp"/> + <EditorIndex Value="-1"/> + <TopLine Value="268"/> + <CursorPos X="21" Y="24"/> + <UsageCount Value="5"/> + </Unit3> + <Unit4> + <Filename Value="unit3.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form3"/> + <ResourceBaseClass Value="Form"/> + <UnitName Value="Unit3"/> + <IsVisibleTab Value="True"/> + <EditorIndex Value="1"/> + <TopLine Value="76"/> + <CursorPos X="33" Y="84"/> + <UsageCount Value="22"/> + <Loaded Value="True"/> + <LoadedDesigner Value="True"/> + </Unit4> + </Units> + <JumpHistory Count="30" HistoryIndex="29"> + <Position1> + <Filename Value="unit1.pas"/> + <Caret Line="551" Column="68" TopLine="539"/> + </Position1> + <Position2> + <Filename Value="unit3.pas"/> + <Caret Line="7" Column="19"/> + </Position2> + <Position3> + <Filename Value="unit3.pas"/> + <Caret Column="2"/> + </Position3> + <Position4> + <Filename Value="unit3.pas"/> + <Caret Line="8" Column="51"/> + </Position4> + <Position5> + <Filename Value="unit3.pas"/> + <Caret Line="10" Column="37"/> + </Position5> + <Position6> + <Filename Value="unit3.pas"/> + <Caret Line="8" Column="17"/> + </Position6> + <Position7> + <Filename Value="unit3.pas"/> + <Caret Line="9" Column="11"/> + </Position7> + <Position8> + <Filename Value="unit3.pas"/> + <Caret Line="6" Column="56"/> + </Position8> + <Position9> + <Filename Value="unit3.pas"/> + <Caret Line="10" Column="30"/> + </Position9> + <Position10> + <Filename Value="unit3.pas"/> + <Caret Line="6" Column="20"/> + </Position10> + <Position11> + <Filename Value="unit3.pas"/> + <Caret Line="16" Column="28"/> + </Position11> + <Position12> + <Filename Value="unit3.pas"/> + <Caret Line="13" Column="63"/> + </Position12> + <Position13> + <Filename Value="unit3.pas"/> + <Caret Line="9" Column="18"/> + </Position13> + <Position14> + <Filename Value="unit1.pas"/> + <Caret Line="546" Column="43" TopLine="543"/> + </Position14> + <Position15> + <Filename Value="unit1.pas"/> + <Caret Line="1032" Column="3" TopLine="1015"/> + </Position15> + <Position16> + <Filename Value="unit3.pas"/> + <Caret Line="28" Column="24" TopLine="23"/> + </Position16> + <Position17> + <Filename Value="unit3.pas"/> + <Caret Line="29" Column="24" TopLine="23"/> + </Position17> + <Position18> + <Filename Value="unit3.pas"/> + <Caret Line="30" Column="24" TopLine="23"/> + </Position18> + <Position19> + <Filename Value="unit1.pas"/> + <Caret Line="1085" Column="3" TopLine="1056"/> + </Position19> + <Position20> + <Filename Value="unit1.pas"/> + </Position20> + <Position21> + <Filename Value="unit1.pas"/> + <Caret Line="1141" Column="64" TopLine="1112"/> + </Position21> + <Position22> + <Filename Value="unit1.pas"/> + <Caret Line="1099" Column="44" TopLine="1086"/> + </Position22> + <Position23> + <Filename Value="unit1.pas"/> + <Caret Line="1157" Column="49" TopLine="1125"/> + </Position23> + <Position24> + <Filename Value="unit3.pas"/> + <Caret Line="26" Column="10" TopLine="23"/> + </Position24> + <Position25> + <Filename Value="unit3.pas"/> + <Caret Line="61" Column="82" TopLine="31"/> + </Position25> + <Position26> + <Filename Value="unit3.pas"/> + <Caret Line="67" Column="66" TopLine="37"/> + </Position26> + <Position27> + <Filename Value="unit3.pas"/> + <Caret Line="65" Column="19" TopLine="50"/> + </Position27> + <Position28> + <Filename Value="unit3.pas"/> + <Caret Line="67" Column="28" TopLine="51"/> + </Position28> + <Position29> + <Filename Value="unit3.pas"/> + <Caret Line="109" Column="28" TopLine="76"/> + </Position29> + <Position30> + <Filename Value="unit1.pas"/> + <Caret Line="652" Column="37" TopLine="641"/> + </Position30> + </JumpHistory> + <RunParams> + <FormatVersion Value="2"/> + <Modes Count="0" ActiveMode=""/> + </RunParams> + </ProjectSession> +</CONFIG> diff --git a/phyportal.res b/phyportal.res index 1adb040..bec39b4 100644 Binary files a/phyportal.res and b/phyportal.res differ diff --git a/unit1.lfm b/unit1.lfm index eeeeabd..181555c 100644 --- a/unit1.lfm +++ b/unit1.lfm @@ -1,75 +1,83 @@ object Form1: TForm1 Left = 550 - Height = 781 + Height = 976 Top = 0 - Width = 1016 + Width = 1300 Caption = 'phyportal' - ClientHeight = 781 - ClientWidth = 1016 + ClientHeight = 976 + ClientWidth = 1300 Color = clNavy - Font.Height = -14 + Constraints.MinHeight = 976 + Constraints.MinWidth = 1200 + DesignTimePPI = 120 + Font.Height = -18 Font.Name = 'Open Sans' OnCreate = FormCreate OnShow = FormShow Position = poDesktopCenter - LCLVersion = '2.2.0.4' + LCLVersion = '2.0.4.0' object Shape1: TShape - Left = 13 - Height = 288 - Top = 64 - Width = 986 + Left = 16 + Height = 360 + Top = 80 + Width = 1272 + Anchors = [akTop, akLeft, akRight] Brush.Color = clSilver Pen.Style = psClear end object Label1: TLabel - Left = 19 - Height = 20 - Top = 90 - Width = 39 + Left = 24 + Height = 24 + Top = 112 + Width = 52 Caption = 'phy-1' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object LabelCPU1: TLabel - Left = 90 - Height = 20 - Top = 90 - Width = 116 + Left = 112 + Height = 24 + Top = 112 + Width = 147 Caption = 'CPUs busy (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object LabelMEM1: TLabel - Left = 90 - Height = 20 - Top = 115 - Width = 114 + Left = 112 + Height = 24 + Top = 144 + Width = 142 Caption = 'RAM used (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object Button2: TButton - Left = 90 - Height = 25 - Top = 141 - Width = 124 + Left = 112 + Height = 31 + Top = 176 + Width = 155 Caption = 'more info...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button2Click ParentFont = False TabOrder = 0 end object Memo1: TMemo - Left = 397 - Height = 76 - Top = 90 - Width = 421 - Font.Height = -14 + Left = 496 + Height = 95 + Top = 112 + Width = 566 + Anchors = [akTop, akLeft, akRight] + Font.Height = -18 Font.Name = 'Open Sans' Lines.Strings = ( 'getm (by klingbei) uses 50 cores (expected end 2023-10-10)' @@ -83,206 +91,216 @@ object Form1: TForm1 WordWrap = False end object Button3: TButton - Left = 826 - Height = 25 - Top = 90 - Width = 165 + Left = 1072 + Height = 31 + Top = 112 + Width = 206 + Anchors = [akTop, akRight] Caption = 'start jupyter lab' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button3Click ParentFont = False TabOrder = 2 end object Button4: TButton - Left = 825 - Height = 25 - Top = 115 - Width = 166 + Left = 1071 + Height = 31 + Top = 144 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button4Click ParentFont = False TabOrder = 3 end object Label4: TLabel - Left = 19 - Height = 20 - Top = 64 - Width = 165 + Left = 24 + Height = 24 + Top = 80 + Width = 223 Caption = 'IOW COMPUTE SERVERS' Font.Color = clGreen - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object Button5: TButton - Left = 825 - Height = 25 - Top = 141 - Width = 166 + Left = 1071 + Height = 31 + Top = 176 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console via xpra' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button5Click ParentFont = False TabOrder = 4 end object Shape2: TShape - Left = 13 - Height = 51 - Top = 6 - Width = 986 + Left = 16 + Height = 64 + Top = 8 + Width = 1272 + Anchors = [akTop, akLeft, akRight] Brush.Color = clSilver Pen.Style = psClear end object Label5: TLabel - Left = 19 - Height = 20 - Top = 6 - Width = 41 + Left = 24 + Height = 24 + Top = 8 + Width = 54 Caption = 'LINKS' Font.Color = clGreen - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object Button1: TButton - Left = 19 - Height = 25 - Top = 26 - Width = 114 + Left = 24 + Height = 31 + Top = 32 + Width = 142 Caption = 'beginners'' intro' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button1Click ParentFont = False TabOrder = 5 end object Button6: TButton - Left = 134 - Height = 25 - Top = 26 - Width = 114 + Left = 168 + Height = 31 + Top = 32 + Width = 142 Caption = 'phywiki' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button6Click ParentFont = False TabOrder = 6 end object Button7: TButton - Left = 250 - Height = 25 - Top = 26 - Width = 114 + Left = 312 + Height = 31 + Top = 32 + Width = 142 Caption = 'webmail' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button7Click ParentFont = False TabOrder = 7 end object Button8: TButton - Left = 365 - Height = 25 - Top = 26 - Width = 114 + Left = 456 + Height = 31 + Top = 32 + Width = 142 Caption = 'chat' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button8Click ParentFont = False TabOrder = 8 end object Button9: TButton - Left = 480 - Height = 25 - Top = 26 - Width = 114 + Left = 600 + Height = 31 + Top = 32 + Width = 142 Caption = 'owncloud' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button9Click ParentFont = False TabOrder = 9 end object Button10: TButton - Left = 595 - Height = 25 - Top = 26 - Width = 114 + Left = 744 + Height = 31 + Top = 32 + Width = 142 Caption = 'public drive' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button10Click ParentFont = False TabOrder = 10 end object Button11: TButton - Left = 710 - Height = 25 - Top = 26 - Width = 114 + Left = 888 + Height = 31 + Top = 32 + Width = 142 Caption = 'git server' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button11Click ParentFont = False TabOrder = 11 end object Label6: TLabel - Left = 19 - Height = 20 - Top = 179 - Width = 39 + Left = 24 + Height = 24 + Top = 224 + Width = 52 Caption = 'phy-2' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object LabelCPU2: TLabel - Left = 90 - Height = 20 - Top = 179 - Width = 116 + Left = 112 + Height = 24 + Top = 224 + Width = 147 Caption = 'CPUs busy (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object LabelMEM2: TLabel - Left = 90 - Height = 20 - Top = 205 - Width = 114 + Left = 112 + Height = 24 + Top = 256 + Width = 142 Caption = 'RAM used (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object Button12: TButton - Left = 90 - Height = 25 - Top = 230 - Width = 124 + Left = 112 + Height = 31 + Top = 288 + Width = 155 Caption = 'more info...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button12Click ParentFont = False TabOrder = 12 end object Memo2: TMemo - Left = 397 - Height = 76 - Top = 179 - Width = 421 - Font.Height = -14 + Left = 496 + Height = 95 + Top = 224 + Width = 566 + Anchors = [akTop, akLeft, akRight] + Font.Height = -18 Font.Name = 'Open Sans' Lines.Strings = ( 'getm (by klingbei) uses 50 cores (expected end 2023-10-10)' @@ -296,90 +314,97 @@ object Form1: TForm1 WordWrap = False end object Button13: TButton - Left = 826 - Height = 25 - Top = 179 - Width = 165 + Left = 1072 + Height = 31 + Top = 224 + Width = 206 + Anchors = [akTop, akRight] Caption = 'start jupyter lab' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button13Click ParentFont = False TabOrder = 14 end object Button14: TButton - Left = 825 - Height = 25 - Top = 205 - Width = 166 + Left = 1071 + Height = 31 + Top = 256 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button14Click ParentFont = False TabOrder = 15 end object Button15: TButton - Left = 825 - Height = 25 - Top = 230 - Width = 166 + Left = 1071 + Height = 31 + Top = 288 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console via xpra' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button15Click ParentFont = False TabOrder = 16 end object Label9: TLabel - Left = 19 - Height = 20 - Top = 269 - Width = 39 + Left = 24 + Height = 24 + Top = 336 + Width = 52 Caption = 'phy-3' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object LabelCPU3: TLabel - Left = 90 - Height = 20 - Top = 269 - Width = 116 + Left = 112 + Height = 24 + Top = 336 + Width = 147 Caption = 'CPUs busy (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object LabelMEM3: TLabel - Left = 90 - Height = 20 - Top = 294 - Width = 114 + Left = 112 + Height = 24 + Top = 368 + Width = 142 Caption = 'RAM used (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object Button16: TButton - Left = 90 - Height = 25 - Top = 320 - Width = 124 + Left = 112 + Height = 31 + Top = 400 + Width = 155 Caption = 'more info...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button16Click ParentFont = False TabOrder = 17 end object Memo3: TMemo - Left = 397 - Height = 76 - Top = 269 - Width = 421 - Font.Height = -14 + Left = 496 + Height = 95 + Top = 336 + Width = 566 + Anchors = [akTop, akLeft, akRight] + Font.Height = -18 Font.Name = 'Open Sans' Lines.Strings = ( 'getm (by klingbei) uses 50 cores (expected end 2023-10-10)' @@ -393,98 +418,106 @@ object Form1: TForm1 WordWrap = False end object Button17: TButton - Left = 826 - Height = 25 - Top = 269 - Width = 165 + Left = 1072 + Height = 31 + Top = 336 + Width = 206 + Anchors = [akTop, akRight] Caption = 'start jupyter lab' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button17Click ParentFont = False TabOrder = 19 end object Button18: TButton - Left = 825 - Height = 25 - Top = 294 - Width = 166 + Left = 1071 + Height = 31 + Top = 368 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button18Click ParentFont = False TabOrder = 20 end object Button19: TButton - Left = 825 - Height = 25 - Top = 320 - Width = 166 + Left = 1071 + Height = 31 + Top = 400 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console via xpra' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button19Click ParentFont = False TabOrder = 21 end object Shape3: TShape - Left = 13 - Height = 109 - Top = 358 - Width = 986 + Left = 16 + Height = 136 + Top = 448 + Width = 1272 + Anchors = [akTop, akLeft, akRight] Brush.Color = clSilver Pen.Style = psClear end object Label12: TLabel - Left = 19 - Height = 20 - Top = 384 - Width = 39 + Left = 24 + Height = 24 + Top = 480 + Width = 52 Caption = 'phy-4' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object LabelCPU4: TLabel - Left = 90 - Height = 20 - Top = 384 - Width = 116 + Left = 112 + Height = 24 + Top = 480 + Width = 147 Caption = 'CPUs busy (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object LabelMEM4: TLabel - Left = 90 - Height = 20 - Top = 410 - Width = 114 + Left = 112 + Height = 24 + Top = 512 + Width = 142 Caption = 'RAM used (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object Button20: TButton - Left = 90 - Height = 25 - Top = 435 - Width = 124 + Left = 112 + Height = 31 + Top = 544 + Width = 155 Caption = 'more info...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button20Click ParentFont = False TabOrder = 22 end object Memo4: TMemo - Left = 397 - Height = 76 - Top = 384 - Width = 421 - Font.Height = -14 + Left = 496 + Height = 95 + Top = 480 + Width = 566 + Anchors = [akTop, akLeft, akRight] + Font.Height = -18 Font.Name = 'Open Sans' Lines.Strings = ( 'getm (by klingbei) uses 50 cores (expected end 2023-10-10)' @@ -498,110 +531,119 @@ object Form1: TForm1 WordWrap = False end object Button21: TButton - Left = 826 - Height = 25 - Top = 384 - Width = 165 + Left = 1072 + Height = 31 + Top = 480 + Width = 206 + Anchors = [akTop, akRight] Caption = 'start jupyter lab' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button21Click ParentFont = False TabOrder = 24 end object Button22: TButton - Left = 825 - Height = 25 - Top = 410 - Width = 166 + Left = 1071 + Height = 31 + Top = 512 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button22Click ParentFont = False TabOrder = 25 end object Button23: TButton - Left = 825 - Height = 25 - Top = 435 - Width = 166 + Left = 1071 + Height = 31 + Top = 544 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console via xpra' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button23Click ParentFont = False TabOrder = 26 end object Label15: TLabel - Left = 19 - Height = 20 - Top = 358 - Width = 118 + Left = 24 + Height = 24 + Top = 448 + Width = 160 Caption = 'IOW GPU SERVER' Font.Color = clGreen - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object Shape5: TShape - Left = 13 - Height = 198 - Top = 474 - Width = 986 + Left = 16 + Height = 248 + Top = 592 + Width = 1272 + Anchors = [akTop, akLeft, akRight] Brush.Color = clSilver Pen.Style = psClear end object Label16: TLabel - Left = 19 - Height = 20 - Top = 499 - Width = 47 + Left = 24 + Height = 24 + Top = 624 + Width = 63 Caption = 'phy-10' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object LabelCPU5: TLabel - Left = 90 - Height = 20 - Top = 499 - Width = 116 + Left = 112 + Height = 24 + Top = 624 + Width = 147 Caption = 'CPUs busy (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object LabelMEM5: TLabel - Left = 90 - Height = 20 - Top = 525 - Width = 114 + Left = 112 + Height = 24 + Top = 656 + Width = 142 Caption = 'RAM used (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object Button24: TButton - Left = 90 - Height = 25 - Top = 550 - Width = 124 + Left = 112 + Height = 31 + Top = 688 + Width = 155 Caption = 'more info...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button24Click ParentFont = False TabOrder = 27 end object Memo5: TMemo - Left = 397 - Height = 76 - Top = 499 - Width = 421 - Font.Height = -14 + Left = 496 + Height = 95 + Top = 624 + Width = 566 + Anchors = [akTop, akLeft, akRight] + Font.Height = -18 Font.Name = 'Open Sans' Lines.Strings = ( 'getm (by klingbei) uses 50 cores (expected end 2023-10-10)' @@ -615,102 +657,110 @@ object Form1: TForm1 WordWrap = False end object Button25: TButton - Left = 826 - Height = 25 - Top = 499 - Width = 165 + Left = 1072 + Height = 31 + Top = 624 + Width = 206 + Anchors = [akTop, akRight] Caption = 'start jupyter lab' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button25Click ParentFont = False TabOrder = 29 end object Button26: TButton - Left = 825 - Height = 25 - Top = 525 - Width = 166 + Left = 1071 + Height = 31 + Top = 656 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button26Click ParentFont = False TabOrder = 30 end object Button27: TButton - Left = 825 - Height = 25 - Top = 550 - Width = 166 + Left = 1071 + Height = 31 + Top = 688 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console via xpra' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button27Click ParentFont = False TabOrder = 31 end object Label19: TLabel - Left = 19 - Height = 20 - Top = 474 - Width = 131 + Left = 24 + Height = 24 + Top = 592 + Width = 180 Caption = 'IOW DATA SERVERS' Font.Color = clGreen - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object Label20: TLabel - Left = 19 - Height = 20 - Top = 589 - Width = 47 + Left = 24 + Height = 24 + Top = 736 + Width = 63 Caption = 'phy-11' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object LabelCPU6: TLabel - Left = 90 - Height = 20 - Top = 589 - Width = 116 + Left = 112 + Height = 24 + Top = 736 + Width = 147 Caption = 'CPUs busy (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object LabelMEM6: TLabel - Left = 90 - Height = 20 - Top = 614 - Width = 114 + Left = 112 + Height = 24 + Top = 768 + Width = 142 Caption = 'RAM used (total):' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object Button28: TButton - Left = 90 - Height = 25 - Top = 640 - Width = 124 + Left = 112 + Height = 31 + Top = 800 + Width = 155 Caption = 'more info...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button28Click ParentFont = False TabOrder = 32 end object Memo6: TMemo - Left = 397 - Height = 76 - Top = 589 - Width = 421 - Font.Height = -14 + Left = 496 + Height = 95 + Top = 736 + Width = 566 + Anchors = [akTop, akLeft, akRight] + Font.Height = -18 Font.Name = 'Open Sans' Lines.Strings = ( 'getm (by klingbei) uses 50 cores (expected end 2023-10-10)' @@ -724,236 +774,257 @@ object Form1: TForm1 WordWrap = False end object Button29: TButton - Left = 826 - Height = 25 - Top = 589 - Width = 165 + Left = 1072 + Height = 31 + Top = 736 + Width = 206 + Anchors = [akTop, akRight] Caption = 'start jupyter lab' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button29Click ParentFont = False TabOrder = 34 end object Button30: TButton - Left = 825 - Height = 25 - Top = 614 - Width = 166 + Left = 1071 + Height = 31 + Top = 768 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button30Click ParentFont = False TabOrder = 35 end object Button31: TButton - Left = 825 - Height = 25 - Top = 640 - Width = 166 + Left = 1071 + Height = 31 + Top = 800 + Width = 208 + Anchors = [akTop, akRight] Caption = 'start console via xpra' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button31Click ParentFont = False TabOrder = 36 end object Shape7: TShape - Left = 13 - Height = 96 - Top = 678 - Width = 859 + Left = 16 + Height = 120 + Top = 848 + Width = 1074 Brush.Color = clSilver Pen.Style = psClear end object Label23: TLabel - Left = 19 - Height = 20 - Top = 678 - Width = 164 + Left = 24 + Height = 24 + Top = 848 + Width = 219 Caption = 'EXTERNAL RESSOURCES' Font.Color = clGreen - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object Label24: TLabel - Left = 21 - Height = 20 - Top = 698 - Width = 205 + Left = 26 + Height = 24 + Top = 872 + Width = 274 Caption = 'haumea cluster (Uni Rostock)' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object Button32: TButton - Left = 19 - Height = 25 - Top = 717 - Width = 109 + Left = 24 + Height = 31 + Top = 896 + Width = 136 Caption = 'get account...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button32Click ParentFont = False TabOrder = 37 end object Button33: TButton - Left = 135 - Height = 25 - Top = 717 - Width = 165 + Left = 169 + Height = 31 + Top = 896 + Width = 206 Caption = 'start jupyter lab' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button33Click ParentFont = False TabOrder = 38 end object Button34: TButton - Left = 134 - Height = 25 - Top = 742 - Width = 166 + Left = 168 + Height = 31 + Top = 928 + Width = 208 Caption = 'start console' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button34Click ParentFont = False TabOrder = 39 end object Label25: TLabel - Left = 365 - Height = 20 - Top = 698 - Width = 149 + Left = 456 + Height = 24 + Top = 872 + Width = 200 Caption = 'NHR supercomputers' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object Button35: TButton - Left = 365 - Height = 25 - Top = 717 - Width = 115 + Left = 456 + Height = 31 + Top = 896 + Width = 144 Caption = 'get account...' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button35Click ParentFont = False TabOrder = 40 end object Button36: TButton - Left = 481 - Height = 25 - Top = 717 - Width = 178 + Left = 601 + Height = 31 + Top = 896 + Width = 222 Caption = 'start jupyter lab (berlin)' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button36Click ParentFont = False TabOrder = 41 end object Button37: TButton - Left = 481 - Height = 25 - Top = 742 - Width = 178 + Left = 601 + Height = 31 + Top = 928 + Width = 222 Caption = 'start console (berlin)' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button37Click ParentFont = False TabOrder = 42 end object Button38: TButton - Left = 666 - Height = 25 - Top = 717 - Width = 192 + Left = 832 + Height = 31 + Top = 896 + Width = 240 Caption = 'start jupyter lab (göttingen)' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button38Click ParentFont = False TabOrder = 43 end object Button39: TButton - Left = 666 - Height = 25 - Top = 742 - Width = 192 + Left = 832 + Height = 31 + Top = 928 + Width = 240 Caption = 'start console (göttingen)' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button39Click ParentFont = False TabOrder = 44 end object Label26: TLabel - Left = 398 - Height = 20 - Top = 69 - Width = 101 + Left = 498 + Height = 24 + Top = 86 + Width = 126 Caption = 'registered jobs' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False end object Button40: TButton - Left = 506 - Height = 18 - Top = 69 - Width = 109 + Left = 632 + Height = 22 + Top = 86 + Width = 136 Caption = 'refresh' - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' OnClick = Button40Click ParentFont = False TabOrder = 45 end object Shape8: TShape - Left = 880 - Height = 96 - Top = 678 - Width = 119 + Left = 1100 + Height = 120 + Top = 848 + Width = 189 + Anchors = [akTop, akLeft, akRight] Brush.Color = clSilver Pen.Style = psClear end object Label27: TLabel - Left = 888 - Height = 20 - Top = 678 - Width = 52 + Left = 1110 + Height = 24 + Top = 848 + Width = 70 Caption = 'STATUS' Font.Color = clGreen - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' Font.Style = [fsBold] + ParentColor = False ParentFont = False end object LabelStatus: TLabel - Left = 888 - Height = 67 - Top = 701 - Width = 100 + Left = 1110 + Height = 84 + Top = 876 + Width = 165 + Anchors = [akTop, akLeft, akRight] AutoSize = False - Font.Height = -14 + Font.Height = -18 Font.Name = 'Open Sans' + ParentColor = False ParentFont = False WordWrap = True end + object Button41: TButton + Left = 1182 + Height = 31 + Top = 32 + Width = 94 + Anchors = [akTop, akRight] + Caption = 'settings' + OnClick = Button41Click + TabOrder = 46 + end object Timer1: TTimer Interval = 120000 OnTimer = Timer1Timer - Left = 257 - Top = 94 + left = 321 + top = 118 end end diff --git a/unit1.pas b/unit1.pas index a32cf2a..dcac6ba 100644 --- a/unit1.pas +++ b/unit1.pas @@ -51,12 +51,14 @@ type Button39: TButton; Button4: TButton; Button40: TButton; + Button41: TButton; Button5: TButton; Button6: TButton; Button7: TButton; Button8: TButton; Button9: TButton; Label1: TLabel; + Label27: TLabel; LabelCPU3: TLabel; LabelMEM3: TLabel; Label12: TLabel; @@ -94,6 +96,7 @@ type Shape3: TShape; Shape5: TShape; Shape7: TShape; + Shape8: TShape; Timer1: TTimer; procedure Button10Click(Sender: TObject); procedure Button11Click(Sender: TObject); @@ -129,6 +132,7 @@ type procedure Button39Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button40Click(Sender: TObject); + procedure Button41Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button6Click(Sender: TObject); @@ -153,7 +157,7 @@ var implementation -uses Unit2; +uses Unit2, Unit3; {$R *.lfm} @@ -1023,6 +1027,11 @@ begin timer1timer(self); end; +procedure TForm1.Button41Click(Sender: TObject); +begin + Form3.ShowModal; +end; + procedure TForm1.Button4Click(Sender: TObject); begin StartConsoleIOW('phy-1'); @@ -1057,8 +1066,10 @@ procedure TForm1.FormCreate(Sender: TObject); var F: TextFile; begin + // we have not yet unlocked haumea and hlrn keys haumea_unlocked:=false; hlrn_unlocked:=false; + // users can overwrite the terminal they want to use favouriteTerminalStart:='xterm -e '; favouriteTerminalEnd:=''; if FileExists(ExtractFilePath(Application.ExeName)+'/favourite_terminal.txt') then @@ -1073,8 +1084,81 @@ begin end; procedure TForm1.FormShow(Sender: TObject); +var + F: TextFile; + s: String; + seeking: Boolean; begin Timer1timer(self); + // now try to read user names from ~/.ssh/config + Form3.Edit1.Text:=''; Form3.Edit2.Text:=''; // IOW username and password + Form3.Edit3.Text:=''; Form3.Edit4.Text:=''; // Haumea username and password + Form3.Edit5.Text:=''; Form3.Edit6.Text:=''; // HLRN username and password + if FileExists(GetUserDir+'/.ssh/config') then + begin + assignFile(F,GetUserDir+'/.ssh/config'); + reset(F); + seeking:=false; + while not EOF(F) do + begin + readln(F,s); + if copy(lowercase(trim(s)),1,12)='host rdpserv' then + seeking:=true + else + if seeking then + begin + if copy(lowercase(trim(s)),1,5)='user ' then + begin + Form3.Edit1.text:=trim(copy(trim(s),5,length(s))); + seeking:=false; + end; + if copy(lowercase(trim(s)),1,5)='host ' then seeking:=false; + end; + end; + closefile(F); + + assignFile(F,GetUserDir+'/.ssh/config'); + reset(F); + seeking:=false; + while not EOF(F) do + begin + readln(F,s); + if copy(lowercase(trim(s)),1,11)='host haumea' then + seeking:=true + else + if seeking then + begin + if copy(lowercase(trim(s)),1,5)='user ' then + begin + Form3.Edit3.text:=trim(copy(trim(s),5,length(s))); + seeking:=false; + end; + if copy(lowercase(trim(s)),1,5)='host ' then seeking:=false; + end; + end; + closefile(F); + + assignFile(F,GetUserDir+'/.ssh/config'); + reset(F); + seeking:=false; + while not EOF(F) do + begin + readln(F,s); + if copy(lowercase(trim(s)),1,11)='host blogin' then + seeking:=true + else + if seeking then + begin + if copy(lowercase(trim(s)),1,5)='user ' then + begin + Form3.Edit5.text:=trim(copy(trim(s),5,length(s))); + seeking:=false; + end; + if copy(lowercase(trim(s)),1,5)='host ' then seeking:=false; + end; + end; + closefile(F); + end; end; procedure TForm1.Label6Click(Sender: TObject); diff --git a/unit3.lfm b/unit3.lfm new file mode 100644 index 0000000..c1c0701 --- /dev/null +++ b/unit3.lfm @@ -0,0 +1,202 @@ +object Form3: TForm3 + Left = 442 + Height = 400 + Top = 147 + Width = 557 + BorderStyle = bsDialog + Caption = 'phyportal - settings' + ClientHeight = 400 + ClientWidth = 557 + Color = clNavy + DesignTimePPI = 120 + Font.Height = -18 + Font.Name = 'Open Sans' + Position = poDesktopCenter + LCLVersion = '2.0.4.0' + object Shape1: TShape + Left = 8 + Height = 384 + Top = 8 + Width = 541 + Anchors = [akTop, akLeft, akRight, akBottom] + Brush.Color = clSilver + Pen.Style = psClear + end + object Label1: TLabel + Left = 240 + Height = 24 + Top = 32 + Width = 70 + Caption = 'IOW NIS' + ParentColor = False + end + object Label2: TLabel + Left = 149 + Height = 24 + Top = 87 + Width = 82 + Alignment = taRightJustify + Caption = 'password' + ParentColor = False + end + object Edit1: TEdit + Left = 240 + Height = 32 + Top = 55 + Width = 164 + OnChange = Edit1Change + TabOrder = 0 + Text = 'Edit1' + end + object Button1: TButton + Left = 416 + Height = 31 + Top = 72 + Width = 112 + Caption = 'auto-config' + TabOrder = 1 + Visible = False + end + object Label3: TLabel + Left = 240 + Height = 24 + Top = 136 + Width = 100 + Caption = 'Uni Rostock' + ParentColor = False + end + object Edit2: TEdit + Left = 240 + Height = 32 + Top = 88 + Width = 164 + EchoMode = emPassword + OnChange = Edit2Change + PasswordChar = '*' + TabOrder = 2 + Text = 'Edit2' + end + object Label5: TLabel + Left = 240 + Height = 24 + Top = 240 + Width = 178 + Caption = 'NHR (blogin + glogin)' + ParentColor = False + end + object Edit3: TEdit + Left = 240 + Height = 32 + Top = 160 + Width = 164 + OnChange = Edit3Change + TabOrder = 3 + Text = 'Edit3' + end + object Button2: TButton + Left = 416 + Height = 31 + Top = 176 + Width = 112 + Caption = 'auto-config' + TabOrder = 4 + Visible = False + end + object Button3: TButton + Left = 416 + Height = 31 + Top = 280 + Width = 112 + Caption = 'auto-config' + TabOrder = 5 + Visible = False + end + object Label7: TLabel + Left = 146 + Height = 24 + Top = 55 + Width = 85 + Alignment = taRightJustify + Caption = 'username' + ParentColor = False + end + object Label8: TLabel + Left = 45 + Height = 24 + Top = 159 + Width = 186 + Alignment = taRightJustify + Caption = 'username (e.g. ab123)' + ParentColor = False + end + object Label4: TLabel + Left = 149 + Height = 24 + Top = 191 + Width = 82 + Alignment = taRightJustify + Caption = 'password' + ParentColor = False + end + object Label9: TLabel + Left = 21 + Height = 24 + Top = 264 + Width = 210 + Alignment = taRightJustify + Caption = 'username (e.g. mvk?????)' + ParentColor = False + end + object Label10: TLabel + Left = 149 + Height = 24 + Top = 296 + Width = 82 + Alignment = taRightJustify + Caption = 'password' + ParentColor = False + end + object BitBtn1: TBitBtn + Left = 328 + Height = 38 + Top = 344 + Width = 200 + Default = True + DefaultCaption = True + Kind = bkOK + ModalResult = 1 + OnClick = BitBtn1Click + TabOrder = 6 + end + object Edit4: TEdit + Left = 240 + Height = 32 + Top = 192 + Width = 164 + EchoMode = emPassword + OnChange = Edit4Change + PasswordChar = '*' + TabOrder = 7 + Text = 'Edit4' + end + object Edit5: TEdit + Left = 240 + Height = 32 + Top = 264 + Width = 164 + OnChange = Edit5Change + TabOrder = 8 + Text = 'Edit5' + end + object Edit6: TEdit + Left = 240 + Height = 32 + Top = 296 + Width = 164 + EchoMode = emPassword + OnChange = Edit6Change + PasswordChar = '*' + TabOrder = 9 + Text = 'Edit6' + end +end diff --git a/unit3.pas b/unit3.pas new file mode 100644 index 0000000..e351cc7 --- /dev/null +++ b/unit3.pas @@ -0,0 +1,112 @@ +unit Unit3; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, + MaskEdit, Buttons; + +type + + { TForm3 } + + TForm3 = class(TForm) + BitBtn1: TBitBtn; + Button1: TButton; + Button2: TButton; + Button3: TButton; + Edit1: TEdit; + Edit2: TEdit; + Edit3: TEdit; + Edit4: TEdit; + Edit5: TEdit; + Edit6: TEdit; + Label1: TLabel; + Label10: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + Shape1: TShape; + procedure BitBtn1Click(Sender: TObject); + procedure Edit1Change(Sender: TObject); + procedure Edit2Change(Sender: TObject); + procedure Edit3Change(Sender: TObject); + procedure Edit4Change(Sender: TObject); + procedure Edit5Change(Sender: TObject); + procedure Edit6Change(Sender: TObject); + private + + public + + end; + +var + Form3: TForm3; + +implementation + +{$R *.lfm} + +{ TForm3 } + +procedure TForm3.BitBtn1Click(Sender: TObject); +begin + Form3.Close; +end; + +procedure TForm3.Edit1Change(Sender: TObject); +begin + if (length(Edit1.Text)>0) and (length(Edit2.Text)>0) then + Button1.visible:=true + else + Button1.visible:=false; +end; + +procedure TForm3.Edit2Change(Sender: TObject); +begin + if (length(Edit1.Text)>0) and (length(Edit2.Text)>0) then + Button1.visible:=true + else + Button1.visible:=false; +end; + +procedure TForm3.Edit3Change(Sender: TObject); +begin + if (length(Edit3.Text)>0) and (length(Edit4.Text)>0) then + Button2.visible:=true + else + Button2.visible:=false; +end; + +procedure TForm3.Edit4Change(Sender: TObject); +begin + if (length(Edit3.Text)>0) and (length(Edit4.Text)>0) then + Button2.visible:=true + else + Button2.visible:=false; +end; + +procedure TForm3.Edit5Change(Sender: TObject); +begin + if (length(Edit5.Text)>0) and (length(Edit6.Text)>0) then + Button3.visible:=true + else + Button3.visible:=false; +end; + +procedure TForm3.Edit6Change(Sender: TObject); +begin + if (length(Edit5.Text)>0) and (length(Edit6.Text)>0) then + Button3.visible:=true + else + Button3.visible:=false; +end; + +end. + diff --git a/xpra_iow.sh b/xpra_iow.sh new file mode 100644 index 0000000..b1da784 --- /dev/null +++ b/xpra_iow.sh @@ -0,0 +1,3 @@ +source ~/.bashrc +source ~/.bash_profile +xpra start :22113 --bind-tcp=0.0.0.0:22113 --mdns=no --webcam=no --pulseaudio=no --no-daemon --start-child=/usr/bin/xterm --exit-with-children=TRUE