Author Topic: (SOLVED) Yad startup script for ceni  (Read 8326 times)

VastOne

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
(SOLVED) Yad startup script for ceni
« on: July 07, 2015, 04:15:59 PM »
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)

Code: [Select]
#! /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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

jedi

  • DEFCON 1
  • Posts: 1491
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: Yad startup script for ceni
« Reply #1 on: July 07, 2015, 06:03:40 PM »
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

  • Posts: 484
    • View Profile
    • Looking at Linux through the Windows of Life
Re: Yad startup script for ceni
« Reply #2 on: July 07, 2015, 09:44:49 PM »
Kudos VastOne!!! A job well-done!!!
Cheers!!!
You Can't Always Git What You Want

VastOne

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
Re: Yad startup script for ceni
« Reply #3 on: July 09, 2015, 05:38:22 AM »
Added wicd to the mix and cleaned it up


 


Script is here

vsido-start (needs to be made executable)

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

VastOne

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
Re: Yad startup script for ceni
« Reply #4 on: July 09, 2015, 05:40:40 AM »
Thanks jedi and hakerdefo

 ;D
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

PackRat

  • Posts: 1793
    • View Profile
Re: Yad startup script for ceni
« Reply #5 on: July 09, 2015, 01:35:29 PM »
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

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
Re: Yad startup script for ceni
« Reply #6 on: July 09, 2015, 03:05:41 PM »
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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
Re: Yad startup script for ceni
« Reply #7 on: July 10, 2015, 06:47:15 PM »
Made some changes to reflect the proper author


 


Script is here

vsido-start (needs to be made executable)

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

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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

PackRat

  • Posts: 1793
    • View Profile
Re: Yad startup script for ceni
« Reply #8 on: July 10, 2015, 07:50:29 PM »
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

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
Re: Yad startup script for ceni
« Reply #9 on: July 10, 2015, 08:08:58 PM »
^ I thought the same also but it makes no differences... It is something very fundamental I am missing
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

hakerdefo

  • Posts: 484
    • View Profile
    • Looking at Linux through the Windows of Life
Re: Yad startup script for ceni
« Reply #10 on: July 11, 2015, 06:16:23 PM »
Currently I've no way of testing this as I don't have either a latest ISO of VSIDO or a system with YAD.
Code: [Select]
#!/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

  • Posts: 1793
    • View Profile
Re: Yad startup script for ceni
« Reply #11 on: July 11, 2015, 09:10:32 PM »
@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

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
Re: Yad startup script for ceni
« Reply #12 on: July 11, 2015, 09:46:54 PM »
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

Code: [Select]
#! /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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

hakerdefo

  • Posts: 484
    • View Profile
    • Looking at Linux through the Windows of Life
Re: Yad startup script for ceni
« Reply #13 on: July 11, 2015, 10:26:11 PM »
@PackRat @VastOne thanks for the feedback! Sorry my previous script didn't work! Anyways here is a fresh take,

Code: [Select]
#!/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

  •      v-ger
  • Posts: 3841
    • View Profile
    • VSIDO Community
Re: Yad startup script for ceni
« Reply #14 on: July 11, 2015, 10:35:51 PM »
Exit button works but neither the Ceni or WICD functions work at all
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO