Browse Source

made form sizeable and added settings window

master
Local User 4 months ago
parent
commit
c6d27e94f0
  1. 10
      jupyterlab_iow.sh
  2. 27
      jupyterlab_remote.sh
  3. 16
      phyportal.lpi
  4. 3
      phyportal.lpr
  5. 371
      phyportal.lps
  6. BIN
      phyportal.res
  7. 875
      unit1.lfm
  8. 86
      unit1.pas
  9. 202
      unit3.lfm
  10. 112
      unit3.pas
  11. 3
      xpra_iow.sh

10
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

27
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"

16
phyportal.lpi

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="phyportal"/>
<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>

3
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.

371
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>

BIN
phyportal.res

Binary file not shown.

875
unit1.lfm

File diff suppressed because it is too large Load Diff

86
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);

202
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

112
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.

3
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
Loading…
Cancel
Save