LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-18-2010, 07:42 PM   #1
SimianDysfunction
LQ Newbie
 
Registered: Jul 2010
Distribution: Crunchbang
Posts: 6

Rep: Reputation: 0
Kdialog problem & college network


I am running Kubuntu 10.04 and as part of the registration process for connecting to my college residences network, I have to download and run one of thosese retarded Bradford Dissolvable Agent, it is a bin file and when I execute it I get:

Code:
:~$ sudo sh Bradford_Dissolvable_Agent.bin
Bradford_Dissolvable_Agent.bin: 92: kdalog: not found
Bradford_Dissolvable_Agent.bin :: Unable to read policy
Now you can ignore the fact it says kdalog instead of kdialog, examining the bin file in kate shows it's just a typo.

I'm not entirely sure what to do regarding kdialog, I assume it is installed (it's there in /usr/bin/), does anyone have any idea how to troubleshoot this further, as I am all out of ideas?

Here is the first 100 or so lines of the script if anyone wants to take a look:
Code:
#!/bin/sh

errorMessage() # str title , str message 
{
    title=$1
    message=$2
    if [ -x "`which zenity 2>/dev/null`" ]
    then
        zenity --title "$title" --error --text "$message"
    elif [ -x "`which kdialog 2>/dev/null`" ]
    then
        kdalog --title "$title" --error "$message"
    elif [ -x "`which xmessage 2>/dev/null`" ]
    then
        xmessage -center -buttons "OK" "$message"
    fi
    echo "$title :: $message"
}

lsb_release=/usr/bin/lsb_release

if [ -x "/bin/lsb_release" ]
then
 lsb_release=/bin/lsb_release
fi
dlg_title=`basename $0`
if [ -x "$lsb_release" ]
then
    $lsb_release -v | grep -E "core-(3|4)\..-(ia32|x86_64|amd64)" >/dev/null
    if [ $? -eq 0 ]
    then
        SKIP=`awk '/^#__BEGIN_BINARY__/ { print NR +1; exit 0; }' "$0"`
        tail -n +$SKIP "$0" >"$0.bin"
        chmod +x "$0.bin"
        if [ -x /usr/bin/xdg-mime ]
        then
            defaultHTML="`/usr/bin/xdg-mime query default text/html 2>/dev/null`"
            browser=""
            if [ -z "$XDG_DATA_HOME" ]
            then
                XDG_DATA_HOME=$HOME/.local/share
            fi

            if [ -e $XDG_DATA_HOME/applications/preferred-web-browser.desktop ]
            then
                browser="preferred-web-browser"
            elif [ -e /usr/share/applications/mozilla-firefox.desktop ]
            then
                browser="mozilla-firefox"
            elif [ -e /usr/share/applications/iceweasel.desktop ]
            then
                browser="iceweasel"
            elif [ -e /usr/share/applications/konqueror.desktop ]
            then
                browser="konqueror"
            elif [ -e /usr/share/applications/epiphany.desktop ]
            then
                browser="epiphany"
            elif [ -e /usr/local/share/applications/opera.desktop ]
            then
                browser="opera"
            elif [ -e /usr/share/applications/mozilla-seamonkey.desktop ]
            then
                browser="mozilla-seamonkey"
            fi
            
            if [ -s "$browser" ]
            then
                /usr/bin/xdg-mime default $browser.desktop text/html 2>/dev/null
            fi
        fi
        if [ -x /usr/bin/xdg-mime ]
        then
            /usr/bin/xdg-mime default $defaultHTML text/html 2>/dev/null
        fi
        thedir="`dirname "$0"`"
        thefile="`basename "$0"`"
        error_message="$("$thedir/./$thefile.bin")"
        if [ $? -eq 0 ]
        then
            rm "$0"
            rm "$0.bin"
            exit
        else
            errorMessage "$thefile" "$error_message"
        fi
    else
        errorMessage "$dlg_title" "LSB 3.0 or higher not found.  Please install the appropriate LSB packages."
    fi
else
    errorMessage "$dlg_title" "$lsb_release not found.  Please install the appropriate LSB packages."
fi

#clean up intermediary file just in case
if [ -e "$0.bin" ]
then
    rm "$0.bin"
fi

exit 

#__BEGIN_BINARY__#
 
Old 09-18-2010, 07:59 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 208Reputation: 208Reputation: 208
The 'typo' does matter. Try correcting it, then execute the file again.
 
Old 09-18-2010, 09:22 PM   #3
SimianDysfunction
LQ Newbie
 
Registered: Jul 2010
Distribution: Crunchbang
Posts: 6

Original Poster
Rep: Reputation: 0
Hmm... my knowledge of bash scripting is limited, but from what I can tell it is just sending "kdalog" as output string for the error message? I shall give it a try though. Thanks!
 
Old 09-18-2010, 09:33 PM   #4
SimianDysfunction
LQ Newbie
 
Registered: Jul 2010
Distribution: Crunchbang
Posts: 6

Original Poster
Rep: Reputation: 0
Actually, I can't do it... I know how to replace a hex value using vim, but how should I go about adding one?
 
Old 09-18-2010, 09:37 PM   #5
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 208Reputation: 208Reputation: 208
You should be able to make the change using a regular text editor. Kwrite should work.
 
Old 09-18-2010, 09:41 PM   #6
SimianDysfunction
LQ Newbie
 
Registered: Jul 2010
Distribution: Crunchbang
Posts: 6

Original Poster
Rep: Reputation: 0
Nope, I have to use a hex editor of some type because it has binary in it and it will result in a corrupt file. I'll google for a bit to see...
 
Old 09-18-2010, 09:52 PM   #7
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 208Reputation: 208Reputation: 208
Quote:
Originally Posted by SimianDysfunction View Post
Nope, I have to use a hex editor of some type because it has binary in it and it will result in a corrupt file. I'll google for a bit to see...
I don't get a corrupt file. The only error I get is about not having LSB 3.0 or higher and that's because I don't have LSB on my system. See screenshot.
Attached Thumbnails
Click image for larger version

Name:	example.png
Views:	19
Size:	193.1 KB
ID:	4631  
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to college network (DHCP problem?) n1k Linux - Networking 1 01-22-2009 11:03 PM
College wireless network needs? subnet_rx Linux - Wireless Networking 5 12-27-2004 08:44 PM
help connecting to college network primus___sucks Linux - Networking 9 09-01-2004 04:17 PM
Nmap on a college network ch4s3r Linux - Security 9 03-01-2004 12:58 AM
Connecting to a college network... redkazan Slackware 20 01-23-2004 10:43 AM


All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration