Author Topic: Need simple YAD screen/script  (Read 2089 times)

VastOne

  •      v-ger
  • Posts: 3794
    • View Profile
    • VSIDO Community
Need simple YAD screen/script
« on: July 06, 2015, 04:24:18 PM »
I want to develop a simple YAD opening screen to be started from fluxbox startup that will have a Welcome to VSIDO installation message and a blurb about setting up your network using ceni

Then one button on the dialogue that states Start Ceni / OK

This will ultimately be a dual role Welcome, one for the LiveCD and one for after the installation is completed and on first boot.  The second option might include another button to execute the vsido-welcome screen

Greatest lifelong appreciation to anyone willing to give it a go...

VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 3794
    • View Profile
    • VSIDO Community
Re: Need simple YAD screen/script
« Reply #1 on: July 07, 2015, 12:10:32 AM »
Here is an image and the idea I am looking to do... this is done in YAD to the point of adding the command to run Ceni.  I would like input on the verbiage and look of the message and content

This will run from autostart on the LiveCD and on first boot of a new installation of VSIDO


 

VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

jedi

  • DEFCON 1
  • Posts: 1474
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: Need simple YAD screen/script
« Reply #2 on: July 07, 2015, 12:13:19 AM »
Very nice!
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

dizzie

  • DEFCON 1
  • Posts: 729
  • Bastard Operator From Hell
    • View Profile
Re: Need simple YAD screen/script
« Reply #3 on: July 07, 2015, 03:49:34 AM »
Bad ass!!  ???
Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |


VastOne

  •      v-ger
  • Posts: 3794
    • View Profile
    • VSIDO Community
Re: Need simple YAD screen/script
« Reply #4 on: July 07, 2015, 04:09:16 AM »
I got a functional yad script doing what I want done... It is not perfect (it is a hack of several examples I found)

I want a single functional button... In this I have two and a Close button that I do not want... I have tried for the last hour to get this working the way I would like it but I keep failing... In other words, this is ugly as shit but it does work


 


Name this vsido-start / make it executable and then execute it to see it's functions

Code: [Select]
#! /bin/bash

action=$(yad --width 380 --entry --title "VSIDO Messge Center" \
    --image=vsidoorb_blk_sm_140 \
    --button="Run Ceni:0" --button="gtk-close:1" \
    --text "Welcome to VSIDO. Due to changes from Debian and udev, it is not possible to see every Network Interface that udev now creates
${custom_text}
It is recommended that you run Ceni to establish your network before you begin. Ceni is a Siduction script used for setting up networks on several distros and is very easy to use
${custom_text}
Simply select your Network Interface and then Accept-Enter and finally Yes to exit Ceni.  Your network is then ready to go and connectibity to the Internet established
${custom_text}" \
    --button "Run Ceni:2" \
    "Run Ceni")
ret=$?

[[ $ret -eq 1 ]] && exit 0

if [[ $ret -eq 1 ]]; then
    gdmflexiserver --startnew &
    exit 0
fi

case $action in
    Run*) cmd="xfce4-terminal -e ceni" ;;
    Reboot*) cmd="xfce4-terminal -e ceni" ;;
    Suspend*) cmd="xfce4-terminal -e ceni" ;;
    *) exit 1 ;;       
esac

eval exec $cmd
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 3794
    • View Profile
    • VSIDO Community
Re: Need simple YAD screen/script
« Reply #5 on: July 07, 2015, 04:14:20 AM »
Anyone that can get this functional with a single Run Ceni button is King for a Day
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 3794
    • View Profile
    • VSIDO Community
Re: Need simple YAD screen/script
« Reply #6 on: July 07, 2015, 05:21:29 AM »
Got it the way I wanted it by being persistent...


 


Code: [Select]
#! /bin/bash

# Greeting window
yad --title="VSIDO Messge Center" --width=420 --image=vsidoorb_blk_sm_140 \
--button=$"Run Ceni                                       :0" \
--button=$"Run Wicd                                       :1" \
--text=$"$live_session_warning

Welcome to VSIDO. Due to changes from Debian, systemd and udev, it is not possible to see every Network Interface that systemd/udev now creates

It is recommended that you run Ceni to establish your network before you begin. Ceni is a Curses user interface for configuring network interfaces with ifupdown developed by Kel Modderman and used for setting up networks on several distros. You can also select and use the WICD GUI that has more robust WIFI connectivity options

Simply select your Network Interface and then Accept-Enter and finally Yes to exit Ceni.  Your network is then ready to go and connectivity to the Internet established
${custom_text}" \

if [ $? -eq 0 ] ; then
xfce4-terminal -e ceni

else

if [ $? -eq 1 ] ; then
wicd-gtk


 exit 0

fi
fi
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Snap

  • Posts: 462
    • View Profile
Re: Need simple YAD screen/script
« Reply #7 on: August 09, 2015, 04:48:57 AM »
Just want to point something out. I chose ceni after first boot (last 26-july-2015 iso). Never use Wicd. When adding a new user the script doesn't autorun again and after every login Wicd launches like three warnings in a row saying that it wants to run or something like that. I had to remove the desktop launcher from /etc/xdg/autostart to get it out of the way. I guess it would be nice if the script removes that launcher once ceni is chosen for a given system.

VastOne

  •      v-ger
  • Posts: 3794
    • View Profile
    • VSIDO Community
Re: Need simple YAD screen/script
« Reply #8 on: August 09, 2015, 04:51:39 AM »
Interesting, I have not seen this snap.  Thanks for reporting it..

I will see what I can do to replicate and/or remove if possible

VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO