LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-23-2007, 02:14 PM   #1
izquierdista
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 342

Rep: Reputation: 30
How to install program with .sh file in ubuntu?


Hello, I would like to install a small application called DHW page viewer on a computer that runs Ubuntu Feisty Fawn.

I think this program was written for KDE because whenver I used to have SUSE the program would install very easily. But now I switched over to Ubuntu and when I try to double click on the file and install the program I get error messages inside a text editor.

How do I go about installing this program, is there anyway I can install the necessary components?

I really need this to work.
 
Old 06-23-2007, 02:28 PM   #2
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
You can install a shell script by doing "sh filename.sh" in terminal
 
Old 06-23-2007, 02:35 PM   #3
izquierdista
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 342

Original Poster
Rep: Reputation: 30
I get this error message whenever I try to run that command:

Code:
chacmool@link:~$ sh DHWPageViewer.sh
DHWPageViewer.sh: 2: Syntax error: "(" unexpected
chacmool@link:~$
what should I do now?
 
Old 06-23-2007, 02:37 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,089

Rep: Reputation: 299Reputation: 299Reputation: 299
Can you post the first 5 lines of the script? It looks like there's an error in the shell script code. This has nothing to do with GNOME or KDE BTW.
 
Old 06-23-2007, 03:10 PM   #5
izquierdista
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 342

Original Poster
Rep: Reputation: 30
Ok,
whenever I double click on the .sh file this is what I get:

Code:
#!/bin/sh
function error()
{
	kdialog --error "$1" --title "Could not install Digital Handwriting Page Viewer"
	exit 1
}

if [ -z `which uudecode` ]
then
	error "You must have uudecode installed to run this installer."
fi

if [ -z `which tar` ]
then
	error "You must have tar installed to run this installer."
fi

if [ -z `which bzcat` ]
then
	error "You must have bzcat installed to run this installer."
fi

INSTALL=`kdialog --getexistingdirectory $PWD`
if [ -z $INSTALL ]
then
	error "You must specify an install directory that already exists."
fi

if [ `which kde-config` ]
then

#DESKTOP=`kde-config --expandvars --install xdgdata-apps`
DESKTOP="`kde-config --localprefix`/share/applnk"
mkdir -p $DESKTOP
touch $DESKTOP/DHWPageViewer.desktop || error "Could not create menu entry."
( cat > $DESKTOP/DHWPageViewer.desktop ) << DESKTOP_END
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=/bin/sh $INSTALL/DHWPageViewer2.0/wrapper
Icon=$INSTALL/DHWPageViewer2.0/icon.png
Name=Digital Handwriting Page Viewer
Categories=Qt;KDE;Graphics
DESKTOP_END
kbuildsycoca --menutest &> /dev/null
fi

mkdir -p $INSTALL || error "Could not write to install directory."
cd $INSTALL
(uudecode -o /dev/stdout | bzcat -c | tar -xv ) << ENDOFWRAPPER
begin-base64 644 encoded.dat
I know for a fact the program works because whenever I had SUSE as I said I could install it using the .sh file without any problems
 
Old 01-07-2008, 06:20 PM   #6
nerdroger
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 0
I need this file...

Is there any possible way that you could post the DHWPageViewer.sh file? I have been searching the internet and the original link is dead.

Thanks
Roger
 
Old 02-06-2008, 06:30 PM   #7
alfanerd
LQ Newbie
 
Registered: Feb 2008
Posts: 1

Rep: Reputation: 0
Try bash

Try using bash instead of sh

bash DHWPageViewer.sh

Most likely in your system sh is linked to dash instead of bash.

Good luck
 
Old 02-06-2008, 07:00 PM   #8
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Do chmod +x filename, then ./filename.
 
  


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
how to install a program using an .sh file izquierdista Linux - Desktop 6 02-12-2007 09:04 PM
can i install a dial-up program on ubuntu alexeyp Linux - Software 2 07-25-2006 04:46 PM
How to install a program that comes as a .i686 file? There's no 'how to install' file TrulyTessa Linux - Newbie 3 06-13-2006 06:17 PM
where to get a file share program and how to install it????? travis93635 Mandriva 7 06-08-2006 01:34 AM
How to install a Program with ubuntu....Nuwbie!! befloyd Linux - Newbie 3 01-31-2005 02:21 AM


All times are GMT -5. The time now is 03:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration