Wine basics.
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 6 1 2 3 ... LastLast
Results 1 to 15 of 90
  1. #1
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wine basics.

    Wine is a program that allows the running of some windows applications in linux and other systems. Please keep discussion on whether wine is an emulator in another thread. It is irrelevant to wine's usage and usually leads to flame wars.

    On request, I'm posting a basic wine guide. Please be aware that this thread is not for posting problems with a specific windows app you are having trouble with. This thread is for general hints/tips and usage.

    Installation
    Installing wine in fedora is really very simple. Open a terminal, in gnome you can find this in applications/system tools. Type in "su" hit enter. Then enter your root password, and hit enter again. Do not be alarmed that you don't see anything change on screen as you type your password in. This is normal. Enter "yum install wine" hit enter. Answer yes by hitting "y" and enter when prompted. After a few minutes you should see the message "Installation Complete". That's it. Wine is now installed. If you have not yet updated your system you may need to restart, depending on what else got updated/installed. Running a general update is also highly recommended "yum update".
    Configuration
    In order to get virtually any game to run in wine you need to have direct rendering. You can check this by running the following command in your terminal.
    Code:
    glxinfo | grep direct
    In that output you are looking for a line that says "direct rendering:" if that line is followed by a no, then you need to setup your video card for direct rendering. That setup is specific to video card chipset and will not be covered here.

    Now, click on applications/Wine/Wine Configuration. This is the menu where you can configure varios wine settings. Please keep in mind that you can configure wine to run a little differently for each application here. To do this, hit the Add application button, navigate to the program .exe then tweak the settings for that app. To my knowledge the only setting in this configuration panel that is general, rather then being customizable for each app, is emulation of a virtual desktop in the Graphics tab. Personally, I prefer not to emulate a virtual desktop as it causes problems running some apps in fullscreen.
    Wine registry.
    Unlike the "Wine Configuration" options changes made to your wine registry are usually general. Meaning they affect every app you run through wine. The ones I've found the most useful are in this screenshot. Please note you will have to create the Direct3D folder, as well as the individual strings. Changing OffscreenRenderingMode, RenderTargetLockMode, and DirectDrawRendere have had the least impact of any of those keys. VideoMemorySize should be set to the amount of dedicated video ram you have. Not the amount your card can virtualize to. If you want more information regaurding these and many other wine registry keys look the official wine wiki.
    Basic usage.
    The simplest usage of wine is just to double click on the .exe file you want to run. Sometimes this works. Mostly it doesn't. The reason this doesn't work is that you are basically executing the wine command followed by the absolute path of the .exe file. For example: you put in a game cd, and double click on example.exe on that disk. What happened was basically this. When you double clicked on the example.exe a phantom terminal was launched and the command
    Code:
    wine /media/exampledisk/example.exe
    was run. Now here's the problem. That phantom terminal is in your home folder. Not the /media/exampledisk. So, if our example.exe looks for a file it needs relative to it's present location, it will look in your home folder. IE: It's looking for data1.cab which should be in the same folder. It will actually look in your home folder, when it should look in /media/exampledisk. So, to get a wine app to run correctly, or frequently at all, you need to cd to the correct folder then run the "wine" command followed by the executable name. IE
    Code:
    cd /media/exampledisk
    wine example.exe
    That way the executable will look for it's files in the right spot.
    Where'd it go?
    Now that example.exe has done it's job and installed our exampleapp how do I launch it? Well, if you are lucky, you also got a launcher for our exampleapp on the desktop. However, it is not uncommon for these launchers to be missing special parameters needed to actually run our app. I prefer to create little scripts to launch my wine apps. That way I can specify what additional parameters I need.

    To do so, right click in a folder and create an empty document file. Then open it with your favorite text editor. First we need to specify this as a script. To do that we add a line at the top called a shebang. For purposes of argument I will only present one type of sheband.
    Code:
    #!/bin/bash
    With that line we specify this file as a script. Next we want to move our phantom terminal to the right folder. I'm using an example from my Simcity 4k install.
    Code:
    cd $HOME/.wine/drive_c/Program\ Files/Maxis/SimCity\ 4\ Deluxe/Apps
    That looks rather odd doesn't it? That is because there are spaces in some of the folder names, as well as the usage of one variable. Another, simpler, way to do this would be to simply use quotes.
    Code:
    cd '/home/username/.wine/drive_c/Program Files/Maxis/Simcity 4 Deluxe/Apps'
    Since that line is in quotes we don't need to put the "\" in front of the spaces. If you have a name with a single quote in it already, then use double quotes to surround the entire line. Now, the easiest way to get our launcher to work would be to just add the line "wine simcity\ 4.exe". That would work just fine. However, I want to turn off all the warning messages that appear in our phantom terminal. They are invisible anyway and slow things down. I also want to specify a custom resolution and turn of the starting movie. So here is the line I use.
    Code:
    WINEDEBUG=fixme-all,err-all,warn-all,trace-all wine simcity\ 4.exe -CustomResolution:enabled -r1680x1050x32 -intro:off
    The "WINEDEBUG" section turns off the errors and warnings. Follow that with the actual "wine" command to start the program. Ending with the options I specified to the .exe. If I issued the same commands to the .exe in a windows command prompt I would do so thus.
    Code:
    'simcity 4.exe' -CustomResolution:enabled -r1680x1050x32 -intro:off
    I end my script with "exit" and an extra hard return. This is the completed script.
    Code:
    #!/bin/bash
    cd $HOME/.wine/drive_c/Program\ Files/Maxis/SimCity\ 4\ Deluxe/Apps
    WINEDEBUG=fixme-all,err-all,warn-all,trace-all wine simcity\ 4.exe -CustomResolution:enabled -r1680x1050x32 -intro:off
    exit
    For reasons unkown, some apps give you errors with an exit line. Try removing that line for the script and see if your app will run.Ok, now save your script as something logical. My Simcity 4 script is saved as "sc4d". Now, right click on the script, go to properties, permissions tab. Check off the box for "Allow executing file as program" and click the "Close" button. You now have a script to launch your wine app. Double click on it and choose "Run".

    If you haven't figured it out already, you have a fake C:\ drive in a folder named .wine/drive_c in your home directory. A period before a folder or file name designates it as hidden.

    I recommend leaving the various error/warning messages on while you are trying to get an app up and running.
    Where do I go to find out what special steps I need for application X?
    Try the Wine Application Database.
    My application is listed as "Garbage" how do I get it to run?
    You can experiment on your own. However, your app may simply not work in wine.
    My app is running really slow, how come?
    Among other things, wine converts direct3d calls into opengl calls. That conversion isn't free.
    Other people said that it ran faster though.
    Generally, that is because they don't have as many unnecessary processes running in gnu/linux then they did in windows. So, they have more resources available to run the app.
    Clicking on a script and then clicking on "Run" is ugly/stupid.
    Yes it is. That is why fedora uses these things called "desktop" files. They are really text files that include things such as an icon and run line. This is the one I use for Simcity 4.
    Code:
    [Desktop Entry]
    Categories=Game;
    Comment=Wine City Simulator
    Encoding=UTF-8
    Exec=/home/username/.scriptlaunchers/sc4d
    Hidden=false
    Icon=/home/username/.scriptlaunchers/Icons/simcity4.png
    Name=Simcity 4 Deluxe
    Path="/home/username/.wine/drive_c/Program Files/Maxis/SimCity 4 Deluxe"
    Terminal=false
    Type=Application
    Version=1.0
    You might be able to tell from this, but I use a hidden folder named .scriptlaunchers in my home folder to hold my custom launchers. As well as my icons. I'm not going to go into detail, but if you save a properly formated text file with the .desktop extension, then it will have the appropriate icon and launch your app without any more steps.

    Application specific how-to's
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	screenshot-registry_editor_original.jpg 
Views:	1504 
Size:	68.4 KB 
ID:	14278  
    Last edited by leadgolem; 31st October 2008 at 07:29 AM.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  2. #2
    Wayne Guest
    Moved to 'Guides & How-To Articles' As mentioned, please don't post about specific application problems, but keep the discussion related to installing and configuring Wine.

    Wayne

  3. #3
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A few helpful hints.
    If you are running a 64bit system I would recommend installing the 32bit libraries for your graphics card as well. I have had the most problems getting apps that use direct draw heavily to run. If a program has an opengl mode for graphics, use it. I have found it helpful to have the following .dll files in my windows/system32 folder; msxml3, d3dx9_24-d3dx9_34. Never, ever, install directx in wine.

    Winetricks
    Winetricks is a script that can install some windows native libraries into wine. It can be very useful if you are nervous or confused about using the command line to do so yourself.

    1. Install some other packages you may need to get and install the files from winetricks.
    Code:
    su
    yum install wget cabextract
    exit
    2. Download the winetricks script.
    Code:
    wget http://www.kegel.com/wine/winetricks
    3. Change permissions so you can execute the winetricks script.
    Code:
    chmod +x winetricks
    4. Run winetricks.
    Code:
    sh winetricks
    Now you should have a nice gui with check boxes for selecting what you want to install.
    Optional
    5. Install winetricks.
    Code:
    su
    mv winetricks /usr/local/bin
    exit
    Now you can run winetricks by simply typing "winetricks" on the command line.

    Setting up your xorg to allow different bits per pixel.
    These steps are somewhat dangerous and should not be attempted unless you are familiar with the command line. Proceed at your own risk. It is possible to make it impossible to boot into a graphical session if you mess up your xorg, and fixing it can be a little scary if you are intimidated by the command line. If you don't know already, you should also find out how to boot into runlevel 3.

    Some games will either not display or not display correctly in bitmodes that are different from what they were originally designed for. You usually get something like this on your command line if a game wants to change the bits per pixel and is unable to.
    Code:
    fixme:x11drv:X11DRV_desktop_SetCurrentMode Cannot change screen BPP from 32 to 8
    So, we need to allow additional bitmodes in our xorg.conf file.
    1. Open a root terminal and make a backup of our xorg.
    Code:
    su
    cp /etc/X11/xorg.conf /etc/X11/xorg.conf-backup
    2. Make the changes to add the extra modes we want.
    A.
    Code:
    gedit /etc/X11/xorg.conf
    B. Now we need to locate our screen section and add the modes. The easiest way to explain this seems to be to just show everybody mine with the relevant sections bolded. My monitor is a 1680x1050 viewsonic. Please note that you should have your video driver installed and working before you try to make any manual changes to your xorg.conf file.
    Code:
    # Xorg configuration created by livna-config-display
    
    Section "Files"
    	ModulePath   "/usr/lib/xorg/modules/extensions/nvidia"
    	ModulePath   "/usr/lib/xorg/modules"
    EndSection
    
    Section "ServerFlags"
    	Option	    "AIGLX" "on"
    EndSection
    
    Section "Device"
    	Identifier  "Videocard0"
    	Driver      "nvidia"
    	Option	    "AddARGBGLXVisuals" "True"
    EndSection
    
    Section "Extensions"
    	Option	    "Composite" "Enable"
    EndSection
    
    Section "Screen"
    	Identifier "Default Screen"
    	Device "Videocard0"
    	Monitor "ViewSonic"
    	Defaultdepth 24
    	SubSection "Display"
    		Depth 24
    		Modes "1680x1050@50" "1280x1024@60" "1024x768@60" "800x600@60" "640x480@60"
    	EndSubSection
    	SubSection "Display"
    		Depth 16
    		Modes "1680x1050@50" "1280x1024@60" "1024x768@60" "800x600@60" "640x480@60"
    	EndSubSection
    	SubSection "Display"
    		Depth 8
    		Modes "1680x1050@50" "1280x1024@60" "1024x768@60" "800x600@60" "640x480@60"
    	EndSubSection
    EndSection
    Now save your changes.

    3. Our xorg is now in order and we need to restart our xserver. This is where we find out if we messed something up. The fastest way to do that is to hit ctrl+alt+backspace. If you've done everything right you should now have a xserver that can change modes when called to do so. If you didn't, then you will likely get a flickering screen and a command prompt. Possibly not even that, just a nice black screen.

    If that happens then you need to copy your backup of your xorg.conf-backup back to your xorg.conf file. You'll probably have to boot into runlevel 3 to do that. Then login as root and run this.
    Code:
    cp /etc/X11/xorg.conf-backup /etc/X11/xorg.conf
    Last edited by leadgolem; 24th February 2010 at 11:54 AM. Reason: aditional information
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  4. #4
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hehe, I exceeded the character limit for a post.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  5. #5
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you are trying to find out what .dll files you might need.
    Try running the app manually in a terminal. Watch the terminal output for an error line specifying a missing .dll. This works about 70% of the time.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  6. #6
    lmo Guest

    MS Access on Wine

    Running msaccess 97 in wine can be accomplished with seemingly 99% full functionality*.

    I happened to have an old CDROM of MS Office 97.
    After many failed attempts to get the darn thing to work, I nearly gave up trying to install it, and on wine.

    Recently, I found this nice howto on installing MS Office 97 in wine at
    http://wine-review.blogspot.com/2007...inux-with.html

    I haven't found (or looked for) any details on later Offices / Accesses.

    As suggested, run msaccess 97 with wine windows version set to: Windows 98
    Having wine windows version set to Windows 98 during the install
    of Office 97 is probably a very good idea.

    Any comments about access requiring internet exporer installation
    are myths.

    I chose Custom installation to enable ODBC capability.
    Change Option for 'Data Access' and check the box:
    Data Access Objects for Visual Basic.

    Not sure that was necessary, but the description says:
    Code:
      Objects used by custom Visual
      Basic applications to access
      external data. Includes
      ODBCDirect functionality.
    Running msaccess 97 in wine needs DCOM98.EXE which is downloadable
    from a google search. (from M$).
    This is mentioned in the above howto.
    However, I added the /C switch which specifically asks for the install path.
    wine DCOM98.EXE /C
    Accept liscense OK
    In path to install DCOM98.EXE choose:
    c:/windows/system32
    Accept ovewrite "Yes to ALL"

    I installed DCOM98.EXE both before and again after installing MS Office 97
    because I do not know which files office installs or whether it reverts
    any of the dcom files. I don't know -- it worked!

    If you need to install DCOM98.EXE, then you will see that access
    will always start minimized until you do.

    If you are very good or very lucky, you will not encounter the
    following problem while running MS Access 97:
    Code:
    **************************************************
    * The dynamic-link library Commdlg failed: error code  '0x1003'.
    * The printer driver for the selected printer may be incorrectly installed.
    * ... bla, bla, bla, bla ... OK
    **************************************************
    
     Reason: The registry may not have the default cups printer in
     quite the right place.
     (I found this tip from extensive google search, but cannot find it again)
    
     Solution: Run regedit in wine and manually add some entries in the
      right place.
     
      Namely, 
      'HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Print/Environments'
      Probably has the correct entries under
      'Windows NT x86/Drivers/Version-3/xxx'
      But maybe not under
      'Windows 4.0/Drivers'
      So the key xxx and values must be manually added under
      'Windows 4.0/Drivers'
     
      where xxx = default cups printer name (which incidentally, must be operable)
      The name (xxx) above, may be determined by typing localhost:631 into
      the browser address bar and clicking on the Printers tab.
      Choose the name displayed directly to the left of (Default Printer).
      If there is only 1 printer, use that name.
     
      For example: xxx = HP_deskjet_3320
      In case 'Windows 4.0/Drivers' does not have HP_deskjet_3320,
      a new key named HP_deskjet_3320 should be added under Windows 4.0/Drivers
     
      and at least these string names/values be added under
      Windows 4.0/Drivers/HP_deskjet_3320:
      : Configuration File - wineps16
      : Data File - <datafile?>
      : Datatype - RAW
      : Driver - wineps16
     
      Once doing that, msaccess 97 can design/run reports and edit/use VBA code.
    If VBA code looks garbled, then change the font for modules to a
    readable font under Tools-->Options-->Module

    Additional information about MS Access 97, PostgreSQL, and ODBC on Wine
    was moved to
    http://forums.fedoraforum.org/forum/...899#post884899

    Thinking back, MS Word was not working, but after installing the DCOM98.EXE
    and making sure that the printer was correct, Word started working --
    -- not sure if that was related.
    Last edited by lmo; 21st October 2007 at 04:57 AM.

  7. #7
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to run .net apps. How can I do that?
    You can try installing mono for windows. In my experience, that is only 20-30% effective.
    Last edited by leadgolem; 21st October 2007 at 05:54 PM.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  8. #8
    phree Guest
    LeadGolem, An excellent tutorial, now that i understand how wine works, I shall have another go at getting Newsrover working, I might even attempt Tversity.

    Very clear and precise. thanks

    Phree

  9. #9
    Join Date
    Oct 2007
    Location
    Jersey
    Age
    34
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    about the yum update thing, i was wondering if this is recommended for everyone? Because I read a lot about doing the general update and how it could mess up some of your apps or kernel.

    I use the kernel with Xen at the end (it's the only one that doesn't pause at boot-up for me) and i use the built in Fedora repo's with Livna as my third party.

    Will doing a yum update mess anything up on my system?

  10. #10
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That depends on what additional kernel modules you have installed. In general an update is recommended. However, if updating would break a critical kernel module, or another app you really want, then you can skip it.

    EDIT: If you are concerned, you might want to install yum-kernel-module.
    Code:
    yum install yum-kernel-module
    Last edited by leadgolem; 15th November 2007 at 06:24 PM.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  11. #11
    Join Date
    Oct 2007
    Location
    Jersey
    Age
    34
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well I haven't tweaked or made any changed to my kernel....

    what does the kernel module do exactly?

    i think i should be ok...

    I'm just gonna do an update real quick to get started....like i said i haven't modified my kernel any....and as long as it doesn't remove my Xen kernel I should be ok--that's the one that works for me..
    Last edited by Omnicloud; 16th November 2007 at 12:22 AM.

  12. #12
    Join Date
    Oct 2007
    Location
    Jersey
    Age
    34
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol...I guess I got one of the few apps that work just by clicking on the .exe file!!!!

    My Watchtower installed automatically and gave me a Desktop icon as well. Plus there's a "programs" section now in my Wine folder located on my task bar.

    Good stuff!!!

    Next up--Warcraft 3!!!!

  13. #13
    kjallcock Guest
    Hi,

    I have tried to compile wine from source on Fedora 8 so I can apply patches etc before the binary is released.
    Only problem is it hasnt gone so well, and I have lost ALSA and Esound as audio outputs ?

    Does anyone know what I should be doing to make sure ALSA is an option in Wine ?
    (It was there with the RPMs, but now, even after make uninstall and installing the RPMs it doesnt come back)

    Cheers

  14. #14
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you wipe your wine configuration files before re-installing the rpms?
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  15. #15
    kjallcock Guest
    I hadn't before as I wanted to keep all the installed apps safe.

    I have just uninstalled the compiled source, moved the .wine folder and installed the RPMs.
    Now I get the option back for alsa !

    How can I re-instate my original .wine folder without losing alsa again ? Will it be something in the wine registry ?

Page 1 of 6 1 2 3 ... LastLast

Similar Threads

  1. back to basics
    By mikekellam in forum Using Fedora
    Replies: 2
    Last Post: 19th February 2008, 05:41 AM
  2. basics
    By jimmmm in forum Using Fedora
    Replies: 2
    Last Post: 24th June 2006, 07:09 PM
  3. Web Serving Basics??
    By ironman in forum Servers & Networking
    Replies: 5
    Last Post: 5th December 2005, 12:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •