1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-26 16:32:34 +01:00
Files
wicd/in/scripts=wicd-client.in
Robby Workman 784076926a Some nitpick edits to wicd-client's section that checks for X and offers
to launch the curses client.  This is largely personal preference, so
  no offense will be taken by merge refusal, but I'm not convinced that
  "friendliness" belongs in the file comments :-)
2009-01-23 16:04:07 -06:00

37 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
BOLD=$(tput bold)
BLUE=$(tput setaf 4)
NC=$(tput sgr0)
# check_firstrun()
if [ ! -d ~/.wicd ]; then
mkdir -p ~/.wicd
fi
# Make sure the user knows WHEREAREMYFILES ;-)
if [ -e %DOCDIR%WHEREAREMYFILES ] && [ ! -L ~/.wicd/WHEREAREMYFILES ]; then
ln -s %DOCDIR%WHEREAREMYFILES ~/.wicd/WHEREAREMYFILES
fi
if [ "$DISPLAY" = "" ] && [ -x "%BIN%wicd-curses" ]; then
if [ ! -f ~/.wicd/CLIENT_CURSES_WARNING ]; then
printf "NOTICE: You do not have an X server active on this console, \n"
printf "so ${BOLD}${BLUE}wicd-curses${NC} will be started instead. \n"
printf "Please see the wicd-client and/or wicd-curses manual pages \n"
printf "for more information about this error and resulting message. \n"
printf "\n"
printf "This message will not be displayed again. \n"
printf "Press enter to continue... \n"
read _junk
cat >> ~/.wicd/CLIENT_CURSES_WARNING << EOF
The wicd-client script checks for the existence of this file to determine
whether it should warn the user before launching wicd-curses instead, in
the event of the gui client being launched outside of the X Window environment.
If you delete this file, then wicd-client will print the warning if it is
launched outside of X (and then recreate this file again).
EOF
fi
exec %BIN%wicd-curses
fi
exec python -O %LIB%wicd-client.py $@