(SOLVED) Yad startup script for ceni

VastOne

This will be added to the next ISO build to make sure people are are aware and do in fact run ceni to establish their network


 


Script is here

vsido-start (must be made executable)

#! /bin/bash

# Greeting window
action=$(yad --title="VSIDO Messge Center" \
--width=420 \
--image=vsido-start \
--button=$"Run Ceni        :1" \
--button=$"Run WICD        :2" \
--button=$"Close           :3" \
--text=$"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 or WICD 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}" \ )

ret=$?

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


if [[ $ret -eq 1 ]] ; then
xfce4-terminal -e ceni
exit 0
fi

if [[ $ret -eq 2 ]] ; then
wicd-gtk -n
exit 0
fi
VSIDO      VSIDO Change Blog    

    I dev VSIDO

jedi

Great work VastOne!  Once again, persistence pays off!   :D
Forum Netiquette

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

hakerdefo

Kudos VastOne!!! A job well-done!!!
Cheers!!!
You Can't Always Git What You Want

VastOne

#3
Added wicd to the mix and cleaned it up


 


Script is here

vsido-start (needs to be made executable)

#! /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 Change Blog    

    I dev VSIDO

VastOne

VSIDO      VSIDO Change Blog    

    I dev VSIDO

PackRat

Looks good. But I think Ceni first showed up in Aptosid so calling it an Siduction script may not be accurate. I would just modify their own description contained in the copyright information at the end of the script:

"A Curses user interface for configuring network interfaces with ifupdown."

Or give the author Kel Modderman direct credit.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

VastOne

I was never sure of who was the first with that script, the chicken or the egg...

I will give all the creds to Kell Modderman, thanks for that!
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

Made some changes to reflect the proper author


 


Script is here

vsido-start (needs to be made executable)

#! /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


I am having an issue with the exit part of the bash... If you exit terminal by clicking the X on the top right, WICD runs instead of a clean exit of the bash script...

Something basic but I have yet to see what it is to fix

bash pro's, I could use an assist

Thanks
VSIDO      VSIDO Change Blog    

    I dev VSIDO

PackRat

I'm no pro, but don't the "fi" have to come before the "exit 0"?
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

VastOne

^ I thought the same also but it makes no differences... It is something very fundamental I am missing
VSIDO      VSIDO Change Blog    

    I dev VSIDO

hakerdefo

#10
Currently I've no way of testing this as I don't have either a latest ISO of VSIDO or a system with YAD.

#!/bin/bash

yad --width=420 \
    --title="VSIDO Message Center" \
    --image=vsidoorb_blk_sm_140 \
    --button="Run Ceni:2" \
    --button="Run Wicd:3" \
    --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 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. Simply select your Network Interface and then Accept-Enter and finally Yes to exit Ceni. If you prefer something with Graphical User Interface select and use the Wicd that has more robust WIFI connectivity options. Using either Ceni or Wicd you'll have a ready to go Network and a working Internet connection in no time." \

ret=$?
cenee=$(xfce4-terminal -e ceni)
wiicd=$(wicd-gtk)

if [[ $ret -eq 2 ]]; then
"$cenee"

else

if [[ $ret -eq 3 ]]; then
"$wiicd"

fi
fi

exit 0



Try it and let me know.
Cheers!!!
You Can't Always Git What You Want

PackRat

@hakerdefo - it's a no go on my system. Any selection - ceni, wicd, or close - actually makes both apps run in succession.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

VastOne

#12
For me it does the same thing as the original except it opens ceni on close instead of WICD as what PackRat reports

Continuing to test with it

This format seems to work for the looks with your functions hakerdefo


#! /bin/bash

# Greeting window
yad --title="VSIDO Messge Center" --width=420 --image=vsido-start \
--button=$"Run Ceni                                       :2" \
--button=$"Run Wicd                                       :3" \
--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}" \

ret=$?
cenee=$(xfce4-terminal -e ceni)
wiicd=$(wicd-gtk)

if [[ $ret -eq 2 ]]; then
"$cenee"

else

if [[ $ret -eq 3 ]]; then
"$wiicd"

fi
fi

exit 0
VSIDO      VSIDO Change Blog    

    I dev VSIDO

hakerdefo

@PackRat @VastOne thanks for the feedback! Sorry my previous script didn't work! Anyways here is a fresh take,


#!/bin/bash

yad --width=420 \
    --title="VSIDO Message Center" \
    --image=vsidoorb_blk_sm_140 \
    --button="Run Ceni:1" \
    --button="Run Wicd:2" \
    --button="Exit:3" \
    --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." \

function tataa (){
exit 0
}

function cenee (){
xfce4-terminal -e ceni
}

function wiicd (){
wicd-gtk
}

case $? in

1) cenee ;;
2) wiicd ;;
3) tataa ;;
esac


Hope this yields better results!!!
Cheers!!!
You Can't Always Git What You Want

VastOne

Exit button works but neither the Ceni or WICD functions work at all
VSIDO      VSIDO Change Blog    

    I dev VSIDO