Stuff that has not yet gone into the official build.
Post a reply
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Bloat alert! zenity vs. yad (wheezy)

Fri Aug 17, 2012 3:18 pm

I think it works! (after you remove the extra closing parenthesis at the end of line 1087 of refractainstaller-yad.)
I installed wheezy in vbox with no bootloader. Then booted into the installation using a grub boot cd, installed grub-legacy, ran 'grub-install /dev/sda' and 'update-grub' and was able to boot into it. Did it this way to avoid ever having grub-pc installed and purged.
Installed refractasnapshot-base-9.0.5-4 and refractainstaller-base-9.0.5-3 with dependencies, added the slavino repo and installed yad.
Made a snapshot. Booted the snapshot. Ran refractainstaller-yad, and installed system and bootloader to /dev/sda1.
Rebooted with grub2 rescue iso, went to grub command line and booted by chainloading the grub-legacy bootloader in /dev/sda1. It worked. I got the grub-legacy boot menu, and it booted.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Bloat alert! zenity vs. yad (wheezy)

Fri Aug 17, 2012 7:56 pm

Edit:
refractainstaller-yad appears to be working properly to install grub-legacy bootloader to a partition, but there seems to be a problem with putting grub-pc in a partition. When I tried installing grub-pc to partition, the installer script finished without any relevant errors, I can chainload to the boot menu, select either regular boot or single-user, get as far as "Loading the kernel", but then nothing else happens. If I select the actual kernel and initrd on the grub line, instead of chainloading, it boots normally.
---
Here's what I'm using, which has only a few changes from the last one:
https://gist.github.com/3381952
Line 1087 or so, an extra closing parenthesis at the end of the line
Line 380 or so, window title and text referred to selecting a partition for /boot, but it's really for the bootloader.
I think that was all.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Bloat alert! zenity vs. yad (wheezy)

Sat Aug 18, 2012 1:14 pm

> fsmithred wrote: If I select the actual kernel and initrd on the grub line, instead of chainloading, it boots normally.

To clarify, that would be the command line accessed from the first grub menu, using the bootloader in the MBR, instead of booting from grub rescue CD and using the grub command line.
I tried it again, this time with two partitions and two installations in the same virtual machine, and I get the same results.
Chainloading from grub-pc in the mbr to grub-legacy in the pbr works.
Chainloading from grub-pc in the mbr to grub-pc in the pbr gets me as far as "Loading the kernel" and then it hangs. Running 'update-grub' in that second installation gives me a grub-probe error about not finding a device for /, or something like that. I tried running grub-install (to the partition) from within the running system, with the added option, '--root-directory=/' and that seemed to get rid of the grub-probe error on update-grub, but it still hangs on boot when it starts to load the kernel. Rebuilding the initrd didn't help, either.
Chainloading from grub-legacy in the mbr to grub-pc in the pbr hasn't worked, because I'm using ext4 in the partition with grub-pc. Haven't tried it with both partitions ext3 yet.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Bloat alert! zenity vs. yad (wheezy)

Fri Oct 26, 2012 5:45 pm

In case Refracta want to support removing dependency on zenity, along with it's gtk3 cruft, here is some example code for a script header. This way, for snapshot/installer, dependency can then be zenity | yad
Zenity can still be used, there is then no actual requirement to install 3rd party apps, it's up to the user.
Of course, the more advanced possibilities of yad are simply not available at all in zenity (and zenity is less tolerant of "unknown options")
I tested similar in my own snapshot variations and it works.

Code:
  `# example code only
  # if yad is installed, use in preference
  if [ -f /usr/bin/yad ]; then
  DIALOG="yad"
  INFO="image=gtk-dialog-info"
  QUESTION="image=gtk-dialog-question"
  WARNING="image=gtk-dialog-warning"
  ERROR="image=gtk-dialog-error"
  #buttons
  BUTTON0="button"
  BUTTON1="button"
  BUTTON0NUM=":0"
  BUTTON1NUM=":1"
  #cancel button always returns 1 as $?
  #ok button always returns 0 as $?
  #ok is default (highlighted)
  #buttons in yad dialog window may show reversed from zenity window, e.g.
  #yad: ok -- cancel (0 -- 1)
  #zenity: cancel -- ok (1 -- 0)
  else
  # use zenity
  DIALOG="zenity"
  INFO="info"
  QUESTION="question"
  WARNING="warning"
  ERROR="error"
  #buttons
  BUTTON0="ok-label"
  BUTTON1="cancel-label"
  BUTTON0NUM=""
  BUTTON1NUM=""
  fi
  # dialog example, this should work for zenity or yad
  #
  # $DIALOG --$QUESTION --${BUTTON0}="yes please"${BUTTON0NUM} --${BUTTON1}="no thanks"${BUTTON1NUM} --text="some text"
  `

meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: Bloat alert! zenity vs. yad (wheezy)

Sat Oct 27, 2012 4:25 am

Thats cooll!
of course I don't think escaping from gtk3 is going to be possible but that is still neat
ukbrian

- ukbrian
- Posts: 109
- Joined: Mon Jul 25, 2011 8:22 am
- Location: Cheltenham, UK

## Re: Bloat alert! zenity vs. yad (wheezy)

Sat Oct 27, 2012 7:43 am

> meandean wrote:Thats cooll!
> of course I don't think escaping from gtk3 is going to be possible but that is still neat

Is it a silly idea to develop a html installer in django which Ikey's chosen to do his website with, or something similar?
I think I could learn to prototype screens easier in html.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: Bloat alert! zenity vs. yad (wheezy)

Sat Oct 27, 2012 8:20 pm

> ukbrian wrote:Is it a silly idea to develop a html installer in django which Ikey's chosen to do his website with, or something similar?

no idea....way beyond me...
heck I have about pulled my hair out redoing the gtk tools
I am ready to call it quit and stick to halfass scripts
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Bloat alert! zenity vs. yad (wheezy)

Thu Nov 01, 2012 10:04 am

I thought of another solution. Point the .desktop file to a script that starts the yad version or the zenity version, depending on which is installed. That way, I won't lose my multi-button windows in the yad version. Easy.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: Bloat alert! zenity vs. yad (wheezy)

Thu Nov 01, 2012 12:56 pm

cool idea
Heck, I say demand yad and be happy.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Bloat alert! zenity vs. yad (wheezy)

Thu Nov 01, 2012 2:31 pm

This should work. I only tested the echo part. And I may need to rework the zenity version, so it doesn't have to be started in a terminal. Already did that with the yad version. That way the Exec line in the .desktop file can just point to the wrapper script.

Code:
  `#!/usr/bin/env bash
  # refractainstaller-wrapper.sh
  #
  # Start Refracta Installer using Yad in preference to Zenity.
  # If neither yad nor zenity is installed, give a warning message.
  if [[ -f /usr/bin/yad ]]; then
  /usr/bin/refractainstaller-yad &
  elif
  [[ -f /usr/bin/zenity ]]; then
  /usr/bin/refractainstaller-gui &
  else
  xterm -hold -fa monaco -fs 14 -geometry 80x20+0+0 -e echo "
  Neither Yad nor Yenity is installed. You can't run the GUI version of
  Refracta Installer without one of those. Instead, you can run
  'refractainstaller' from a terminal or console for the CLI version.
  " &
  fi
  exit 0
  `

Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.