Author Topic: (SOLVED) help with a script  (Read 994 times)

Offline Cydell

  • Full Member
  • ***
  • Posts: 61
(SOLVED) help with a script
« on: February 11, 2010, 01:22:10 PM »
Hi
I have 2 hard drives one with windows 7 and the other with pclinuxos.
I want to play world of warcraft from pclos but it is installed on my windows drive.
This is the script so far:

Code: [Select]
#!bin/bash
cd /media/disk/Users/Public/Games/"World of Warcraft"
wine Launcher.exe -opengl

I should say that it works just fine except that I have to open dolphin and select my windows drive before this will work. I assume thats because my windows drive (sda2) is not mounted. How can I modify this script so that it will mount my windows drive before trying to launch the game?
Also why does mounting have to be done as root from konsole but not from the dolphin menu?

Thanks
« Last Edit: February 11, 2010, 04:42:47 PM by Cydell »
When it comes to pitbulls, often, the real beast is the two legged animal holding the leash!

Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: help with a script
« Reply #1 on: February 11, 2010, 01:47:56 PM »
I would be sort of bypassing the auto mounter because it could assign the win partition to a different mount point if you happen to have more removable drives present. This can make it difficult for your script to find the location of the wow program directory for wine.

See if you can mount the win partition manually on  /mnt/some_place

When you can do that safely, you can add that extra action that is required to your script.

hth.

$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.

Offline Cydell

  • Full Member
  • ***
  • Posts: 61
Re: help with a script
« Reply #2 on: February 11, 2010, 02:37:02 PM »
yeah I can mount to /mnt/win but only as root. The game won't allow me to execute it as root with out messing with a config file. I don't want to do that because it would effect playing the game in windows.
Is there a way that I can have my windows drive (sda2) automatically mounted when I boot up or log in?
When it comes to pitbulls, often, the real beast is the two legged animal holding the leash!

Offline Cydell

  • Full Member
  • ***
  • Posts: 61
Re: help with a script
« Reply #3 on: February 11, 2010, 02:41:32 PM »
or even better how can I find out what dolphin is doing when I click my windows drive so that I can add that to the script.
When it comes to pitbulls, often, the real beast is the two legged animal holding the leash!

Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: help with a script
« Reply #4 on: February 11, 2010, 02:45:12 PM »
After dolphin has mounted your partition,

Type:
$ mount

Look closely at the line concerning the drive you are tying to mount. This can give you a idea what flags are being used when dolphin mounted the drive.

Please post the output of mount..

$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6377
  • I'm going South
Re: help with a script
« Reply #5 on: February 11, 2010, 03:11:38 PM »
Is there a way that I can have my windows drive (sda2) automatically mounted when I boot up or log in?

Yes. Don't let Dolphin (HAL) mount it. Mount it the old-fashioned way with a line in /etc/fstab.

The line could simply look like this:

/dev/sda2  /mnt/win  ntfs-3g  defaults  0  0

When you've added the line, reboot. If this doesn't work, post back and we can start adding options.

(The package ntfs-3g must be installed and the mountpoint /mnt/win has to exist at boot.)

« Last Edit: February 11, 2010, 03:27:38 PM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Cydell

  • Full Member
  • ***
  • Posts: 61
Re: help with a script
« Reply #6 on: February 11, 2010, 04:42:23 PM »
Thanks Blackbird and F.Luent

I went the route blackbird suggested and modified my /etc/fstab and now it works they way I want it to. Now I will know what to do once I reinstall for 2010.
thanks again
When it comes to pitbulls, often, the real beast is the two legged animal holding the leash!

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6377
  • I'm going South
Re: help with a script
« Reply #7 on: February 11, 2010, 07:12:52 PM »
I went the route blackbird suggested and modified my /etc/fstab and now it works they way I want it to. Now I will know what to do once I reinstall for 2010.

 ;D ;D
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D