What happened to --desktop geom?

Michael Mauch michael.mauch at gmx.de
Fri Apr 27 17:09:54 CDT 2001


Ian Collier <imc at comlab.ox.ac.uk> wrote:
> 
> Michael Mauch <michael.mauch at gmx.de> told
> comp.emulators.ms-windows.wine:
>>                   Now you can override the global settings in
>>"AppDefaults" sections in your ~/.wine/config like so:
>>
>>[AppDefaults\\YourProgram.exe\\x11drv]
>>"Display" = ":0.0"
>>"Managed" = "N"
>>"Desktop" = "900x675"
> 
> This is somewhat inconvenient compared with just specifying a commandline
> flag.  Why was the commandline flag removed?

I don't know, but in fact I think it's more convenient: before the
introduction of these AppDefaults sections, I had shell scripts for each
Windows program to hold the appropriate Wine options. Now I can have
them all in the config file. 

Alas Wine doesn't know (yet) from the AppDefaults about the directory
where I want to start the program, additional Wine arguments, and
arguments for the program. That's where the script below helps out.

Now I can have "StartMeUp" sections like the following:

[AppDefaults\\iexplore.exe\\StartMeUp]
"Args" = "http://localhost:8080"
"ChDir" = "/dos/c/win"
; "WineArgs" = "--winver nt40"

The script is not especially smart, so be sure to surround the equal
sign with spaces.

Regards...
		Michael


#! /bin/bash

PrgWithPath="$1"
StartPrg=${1##*/}

ChDir=~/winstart
mkdir -p "$ChDir"

while read -r Section ; do
  case $Section in
   '[AppDefaults\\'*'\\StartMeUp]'*)
     Prg=${Section#*\\\\}
     Prg=${Prg%\\\\*}
     if [ "$StartPrg" = "$Prg" ] ; then
       while read -r Item Equal Value ; do
         Value=${Value##\"}
         Value=${Value%%\"}
         case $Item in
	  "["*)  break ;;
	  ";"*)  continue ;;
	  '"Args"')      Args="$Value";;
	  '"WineArgs"')  WineArgs="$Value";;
	  '"ChDir"')     ChDir="$Value";;
	 esac
       done
     fi
     ;;
  esac
done <~/.wine/config

shift

set -x
cd "$ChDir"
wine $WineArgs -- "$PrgWithPath" $Args "$@"




More information about the wine-users mailing list