Yad --form --field="Filesystem:CB" 'ext2!ext3!ext4' "$fsType" \ # All the other :CB Fail

34 views
Skip to first unread message

Robert Cooper

unread,
Jan 22, 2025, 11:21:02 PMJan 22
to yad-common
My below code the first :CB will work but, the others below will not. I would like to keep this arrangement of variables if possible: 

yad  --form --scroll --width=500 --height=600 --center \
    --field="Distro Name!Enter Name of your Distro" "$distroName" \
    --field="Source Partition!Enter the source partition. For Example /dev/sda1"  \
   --field="Filesystem!Please select filesystem to format drive:CB" 'ext2!ext3!ext4'  "$fsType" \
    --field="Output Drive!Please select drive to write ISO file:CBE" 'sda!sdb!sdc!sdd!sde!sdf' "$outputDrive" \
    --field="Format Partion:CHK" "$enablePartFormat" \
    --field="Output Partition:NUM" "$partNumber" \
    --field="Add Boot Flag to Partition:CHK" "$bootFlag" \
    --field="Install Penguins-eggs:CHK" "$installEggs" \
    --field="Use eggs squash:CHK" "$eggsMkSquash" \
    --field="Install eggs Calamares:CHK" "$enableEggsCalamares" \
    --field="Install Standalone Calamares:CHK" "$enableinstallCalamares" \
    --field="Live ISO Prefix Name" "$isoPrefix" \
    --field="Live ISO Basename" "$isoBaseName" \
    --field="Use ISO Compression:CHK" "$enableIsoCompression" \
    --field="Type ISO Compression:cb" 'xz!gzip!squash' "$isoCompressType" \
    --field="Modify eggs mksquashfs command:TXT" "$mkSquashCommand"  \
    --field="Modify eggs xorriso command:TXT" "$eggs_xorriso_cmd" \
    --field="UserName" "$userActName" \
    --field="UserPassword" "$userPW" \
    --field="Root Password" "$rootPW" \
    --field="Grub Menu Name" "$grubMenuName" \
    --field="eggs Compression:cb" "Standard!Max" "$eggsCompression" \
    --field="chroot for Finalization:CHK" "$enablechroot" \
    --field="Install Grub:CHK" "$enableInstallGrub" \
    --field="Install Grub to Device:cbe" "/dev/sda!/dev/sdb!/dev/sdc!/dev/sdd!/dev/sde" "$grubDevice" \
    --field="Mount Grub Install Partition to /mnt:CHK" "$mountGrubDevice" \
    --field="Grub install method:cb" "sudo grub-install /dev/sdx!sudo grub-install --root-directory=/mnt /dev/sdx" "$grubInstallMethod" \
    --field="update configuration:CHK" "$enableUpdateGrub" \
    --field="Grub update method:cb" 'sudo update-grub!sudo grub-mkconfig -o /mnt /dev/sdx \#must mount device /mnt' "$grubUpdateMethod" \
    --field="Regenerate Kernel image:CHK" "$enableRegenKernelImage" \
    --field="Install kazam Video Record:CHK" "$installKazam" \
    --field="Install gnome-terminal:CHK" "$installGnomeTerm" \
    --field="Install mousepad:CHK" "$installMousepad" \
    --button="Exit:1"

mm1ge...@gmail.com

unread,
Jan 23, 2025, 10:19:05 AMJan 23
to yad-common
Put default values inside the ! list; put the :cb outside the quotes (maybe); give a value (even space) to every variable (sometime is useful);

yad  --form --scroll --width=800 --height=800 --center \
    --field="Distro Name Enter Name of your Distro" "$distroName" \
    --field="Source Partition Enter the source partition. For Example /dev/sda1"  " " \
    --field="Filesystem Please select filesystem to format drive":CB "${Pippo}!ext2!ext3!ext4"  \
    --field="Output Drive Please select drive to write ISO file":CBE "${Pluto}!sdc!sdd!sde!sdf" \

    --field="Format Partion":CHK "$enablePartFormat" \
    --field="Output Partition:NUM" "$partNumber" \
    --field="Add Boot Flag to Partition":CHK "$bootFlag" \
    --field="Install Penguins-eggs":CHK "$installEggs" \
    --field="Use eggs squash":CHK "$eggsMkSquash" \
    --field="Install eggs Calamares":CHK "$enableEggsCalamares" \
    --field="Install Standalone Calamares":CHK "$enableinstallCalamares" \
    --field="Live ISO Prefix Name" "$isoPrefix" \
    --field="Live ISO Basename" "$isoBaseName" \
    --field="Use ISO Compression":CHK "$enableIsoCompression" \
    --field="Type ISO Compression":cb 'xz!gzip!squash'  \

    --field="Modify eggs mksquashfs command:TXT" "$mkSquashCommand"  \
    --field="Modify eggs xorriso command:TXT" "$eggs_xorriso_cmd" \
    --field="UserName" "$userActName" \
    --field="UserPassword" "$userPW" \
    --field="Root Password" "$rootPW" \
    --field="Grub Menu Name" "$grubMenuName" \
    --field="eggs Compression":cb "Standard!Max" "$eggsCompression" \
    --field="chroot for Finalization":CHK "$enablechroot" \
    --field="Install Grub":CHK "$enableInstallGrub" \
    --field="Install Grub to Device":cbe "/dev/sda!/dev/sdb!/dev/sdc!/dev/sdd!/dev/sde"  \

    --field="Mount Grub Install Partition to /mnt":CHK "$mountGrubDevice" \
    --field="Grub install method":cb "sudo grub-install /dev/sdx!sudo grub-install --root-directory=/mnt /dev/sdx"  \

    --field="update configuration":CHK "$enableUpdateGrub" \
    --field="Grub update method":cb 'sudo update-grub!sudo grub-mkconfig -o /mnt /dev/sdx \#must mount device /mnt' "$grubUpdateMethod" \
    --field="Regenerate Kernel image":CHK "$enableRegenKernelImage" \
    --field="Install kazam Video Record":CHK "$installKazam" \
    --field="Install gnome-terminal":CHK "$installGnomeTerm" \
    --field="Install mousepad":CHK "$installMousepad" \
    --button="Exit:1"

Robert Cooper

unread,
Jan 24, 2025, 11:46:18 AMJan 24
to yad-common
Thank You for taking time to help me. I'm old and coding is difficult for. Very much appreciate the hlep.
Your code works Great !

Reply all
Reply to author
Forward
0 new messages