Very basic scripting help


Forum: Other Help Topics
Topic: Very basic scripting help
started by: Your Fuzzy God

Posted by Your Fuzzy God on Oct. 20 2005,22:56
I have Photshop installed and running via wine; however, for certain features to work I have to open xterm and cd to "/home/dsl/.wine/drive_c/Program Files/Adobe/Photoshop 7.0" then "sudo wine Photoshop.exe."  If I try to run Photoshop via the desktop icon, those features won't work.  

I have tried adding 2 "command:" lines to the lnk file (the first a cd, the second a run command) and while the program did open, it did not allow me to access the features.  

There has to be a simple script that opens the program and runs it in it's own directory, but I am at a loss as to what this script should contain.  Any help would be much appreciated!

Thanks!



P.S. (Preemptive Shhh!)  Before anyone asks, I want to use Photoshop because I learned on it and like it better than Gimp.  Just my personal preference.

Posted by mikshaw on Oct. 21 2005,01:29
If you need to be in a specific directory to run a program, you can do it with a single command:
Code Sample
cd /home/dsl/.wine/drive_c/Program\ Files/Adobe/Photoshop\ 7.0; sudo wine Photoshop.exe

or
Code Sample
cd /home/dsl/.wine/drive_c/Program\ Files/Adobe/Photoshop\ 7.0 && sudo wine Photoshop.exe

The second one runs the second part of the command only if the first part succeeds.

If for some reason this doesn't work with xtdesk, then you can break the lines up and use a script instead:
Code Sample
#!/bin/sh
cd /home/dsl/.wine/drive_c/Program\ Files/Adobe/Photoshop\ 7.0
sudo wine Photoshop.exe

Posted by Your Fuzzy God on Oct. 21 2005,14:39
Tried all three; all same result.  The program opens, but those extra features still don't work.  I am thinking of trying to open Photoshop like Synaptic (with a terminal window in the background).  Is there script I can use to open a terminal window and call the commands there?

Thanks,

Posted by mikshaw on Oct. 21 2005,14:47
aterm -e sudo wine Photoshop.exe
or
aterm -e sudo su -c "wine Photoshop.exe"

Posted by Your Fuzzy God on Oct. 21 2005,18:35
OUT OF MY WAY!! I'M A BIG TIME PROGRAMMER!!

.lnk file includes:
Code Sample
Command: aterm -title "Photoshop Loader" -e /home/dsl/.pshop.sh


.pshop.sh:
Code Sample
#!/bin/sh
cd /home/dsl/.wine/drive_c/Program\ Files/Adobe/Photoshop\ 7.0/
sudo wine Photoshop.exe 2>/dev/null


Yeah, this was really simple.  I guess there is just a learning curve going between a terminal to multiple commands through an executable file.  

Thank you so much mikshaw!

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.