Simple script question...

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

Simple script question...

Postby farna on Sun Jan 08, 2012 6:40 pm

I just installed a commercial DTP program for Linux (Pagestream) and am having a bit of trouble with the launch script. I just don't know how to modify it to work! It launches fine as long as I'm in the directory the program is installed in. What I want to do is put an icon on my desktop that will launch it. I copied the script to my desktop and tried altering it to go the directory, but that's not working. I'm relatively new to Linux, I'm sure someone here can tell me how to fix this easily!

The script that comes with the program:
#!/bin/bash
export PGSPATH=`dirname "$0"`
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PGSPATH/SoftLogik/lib
export PATH=$PATH:$PGSPATH
$PGSPATH/PageStream5
exit 0


I changed the paths to literal, as suggested in a read.me file with the program, but that didn't help. My changes:
#!/bin/bash
export PGSPATH=`dirname "$0"`
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/Pagestream5/SoftLogik/lib
export PATH=$PATH:home/Pagestream5
$PGSPATH/home/PageStream5
exit 0

Obviously I'm doing something wrong in the editing. Or should I be going about this a different way and not copying the script to the desktop? I'd also like for this program to show up in the Mint Menu. I'm using Mint 12 and MATE. Right clicking "menu" in the tool bar brings up a menu with "edit menu...", but clicking on "edit menu..." doesn't do anything.
HTPC: Mint 11, Athlon II x4 (2.6 GHz), GeForce 9400, 4GB
Shop PC: XP Pro, Athlon 64 X2 (2.19 GHz), GeForce 7300GS, 2GB
Wife's PC: Win 7, Athlon II x3 (2.7GHz), GeForce 8200, 4GB
DTP-PC: Mint 12, Phenom II x4 (3.0GHz), GeForce 9600GT, 8GB
farna
Level 3
Level 3
 
Posts: 100
Joined: Sun Oct 25, 2009 6:01 pm
Location: Batesburg-Leesville, South Carolina (USA)

Linux Mint is funded by ads and donations.
 

Re: Simple script question...

Postby seppalta on Sun Jan 08, 2012 7:28 pm

http://douwil7.100webspace.net/linux/Tuning.html#11 Also, you can probably launch from the desktop by putting the launcher in the Desktop directory.
seppalta
Level 4
Level 4
 
Posts: 390
Joined: Wed Jun 08, 2011 12:08 pm

Re: Simple script question...

Postby Habitual on Mon Jan 09, 2012 8:48 am

Terminal >
Code: Select all
find `pwd` / -name PageStream5 -type f


output please.
What's a landing but a take off in reverse?
User avatar
Habitual
Level 8
Level 8
 
Posts: 2274
Joined: Sun Nov 21, 2010 8:31 pm
Location: LM17Q-Xfce

Re: Simple script question...

Postby xenopeek on Mon Jan 09, 2012 9:05 am

You missed a / in the fourth line. And the last line can't be correct, as you still have $PGSPATH there.
farna wrote:#!/bin/bash
export PGSPATH=`dirname "$0"`
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/Pagestream5/SoftLogik/lib
export PATH=$PATH:/home/Pagestream5
$PGSPATH/home/PageStream5
exit 0

I'd suggest proceed with Habitual's suggestion to find where the PageStream5 executable is located. Then change the first script (the original one), and only change the export PGSPATH=`dirname "$0"` line to the absolute path like export PGSPATH=/home/PageStream5, and keep the rest of the script intact (so, using that PGSPATH variable in each line). But the script should work as original written, if the script is located in the directory that also has the PageStream5 executable.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15449
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Simple script question...

Postby farna on Tue Jan 10, 2012 7:31 pm

The script does work as written when launched from the PageStream directory. I think that last post should fix my problem -- I just don't know enough about the scripting language.
HTPC: Mint 11, Athlon II x4 (2.6 GHz), GeForce 9400, 4GB
Shop PC: XP Pro, Athlon 64 X2 (2.19 GHz), GeForce 7300GS, 2GB
Wife's PC: Win 7, Athlon II x3 (2.7GHz), GeForce 8200, 4GB
DTP-PC: Mint 12, Phenom II x4 (3.0GHz), GeForce 9600GT, 8GB
farna
Level 3
Level 3
 
Posts: 100
Joined: Sun Oct 25, 2009 6:01 pm
Location: Batesburg-Leesville, South Carolina (USA)


Return to Newbie Questions

Who is online

Users browsing this forum: Pierre and 38 guests