Linux wine portable no root

Portable Wine

In the past, installing Wine to a portable distribution could be a lengthy struggle, fraught with peril, frustration, and chroots. But that gloomy age is gone now! Thanks to the widespread and mature live-system machinery developed by many distros, it shouldn’t be hard to have your own portable installation of Wine.

Contents

Installing the Base Distro

The main thing you’ll need is a properly formatted (FAT32) USB flash drive. To be sure you also have enough space, you’ll probably want.

  • At least 3 to 4 GB for the base distro, though some only require a few hundred MB
  • 1 GB or more for Wine itself and any dependencies
  • Another GB if you plan to keep and compile from source on the drive
  • Anywhere from just a few to hundreds of GB for your programs and data, depending entirely on your needs

The next ingredient is the ISO image of whatever distro you want to run Wine on. If you don’t have one in mind, two well-known Linux distros that historically focused on portability are KNOPPIX and Puppy, but most major distros including Fedora and Ubuntu now offer live-USB versions.

Another distro you might find interesting is Zorin OS, which tries to make Linux as familiar to Windows users as possible and consequently includes a version of Wine right out of the box.

You can always just go to your preferred distro’s website and download an ISO image, but another option definitely worth considering is the UNetbootin tool. Not only can this create your live-USB install from a pre-downloaded ISO, or download the ISO itself, but it makes configuring other settings for your live-USB simple, and can be used entirely from within Windows.

Mac computers have a picky boot-loader and will not accept the file structure typically used on live-USBs. As a result, even though UNetbootin runs on Mac OS X, it can’t create a live-USB image bootable on OS X.

This doesn’t mean you can’t create a portable installation for running on Macs; the tool Mac Linux USB Loader supposedly can, but we haven’t tested this software before. If that doesn’t work, you may just need to follow special instructions for manually creating your live-USB (Ubuntu’s live-USB for OS X instructions are a good example)

Whether you choose a live-USB creator or to follow your distro’s specific instructions manually, just be sure to enable persistence when you install the distro to your USB. This setting will allow your live-USB to record any changes to settings and files when you log off, which is exactly what you need to install Wine and your programs to the drive.

Installing Wine and Programs

Once you have a persistent live-USB ready and working, installing Wine itself shouldn’t be too hard at all. If you’re ok with the version packaged by the distro itself, you should be able to install Wine through the package manager. We also package recent development and staging versions of Wine for a few distros; you can find out more at our Downloads page.

If you want the cutting-edge, as long as your USB drive and host computer’s RAM have enough space, downloading Wine from Git and Building Wine from source should also work essentially the same.

Just don’t forget to always reboot or shutdown, then unplug your live-USB properly so that data isn’t corrupted.

Other Possible Ideas

This section is for noting other approaches that have definite disadvantages, but may actually be useful for some users. If you do come across a situation where one of these methods is preferable, feel free to move its entry to a new section with detailed instructions.

  • If you really want or need to, remastering your distro’s ISO image with Wine and your programs already installed, then writing it to your USB is possible. In fact, this used to be the required approach for portable Wine. Compared to a persistent live install though, this method results in an installation that is both more difficult to setup and less convenient to update.
  • Another thing a remastered ISO image would allow for is theoretically putting your Wine install and distro on a DVD, rather than a USB. However, with the ubiquity of USB ports, using a DVD would have essentially no advantages over a flash drive (except the lower cost of the disk) but many disadvantages (longer boot times and even a rewritable DVD would have limited capacity for updates, which would be very inconvenient)
  • Installing Wine and your prefixes and programs to a flash drive, without any underlying distro, is entirely possible. Besides being inherently less portable (it would only work on unix hosts with all necessary dependencies), you would need to configure each host system to properly access the files.
    • Actually, if you’re just interested in unix host systems, this might not be too hard. One could keep a script on the flash drive to do any necessary configuration.
    • Would symlinking even be necessary, or could directories just be appended to the session’s PATH variables?
  • One last possibility is to still have a live-USB distribution, but rather than installing Wine through the OS with persistence, keep Wine outside the OS file-system on the flash drive. This method should still be wholly portable, but the OS would need to be configured to find all the files (preferably on mount without user input)
    • This method does arguably keep the base OS image more stable, with Wine in a distinct overlay. Would that be a significant advantage though?
    • If the Wine files can be kept in a different partition altogether, one could also use file-systems other than FAT for them.
Читайте также:  1366 материнская плата windows 10

Источник

Linux wine portable no root

Wine builds packed into portable executables

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

The project is deprecated in favor of another my project Conty, which is basically a much improved and extended version of this project.

Conty not only allows to run Wine without any dependecies installed, but also allows to run anything else. Take a look, if you are interested.

This project allows you to pack Wine and almost all of its required libraries into a single portable executable that should work on most Linux distributions. This project uses SquashFS as the container for Wine and its libraries (similar to what AppImage does).

What are the benefits compared to regular Wine builds? The main benefit is that fewer libraries need to be installed. Another benefit is that SquashFS supports fast compression algorithms (such as lz4 or zstd), so Wine can launch faster and use less disk space.

This is the structure of the portable executables generated (from the beginning to the end of the file):

  1. A script that mounts the bundled squashfs image and runs Wine
  2. The squashfuse binary and its libraries, in case squashfuse isn’t installed
  3. The squashfs image that contains Wine, its required libraries (wine-runtime) and a custom launch script

First of all, FUSE is required.

Despite that most required libraries are included into the squashfs image, some libraries still need to be installed. This is the list of libraries that need to be installed:

  • libc6 (glibc)
  • libstdc++6 (gcc-libs)
  • libgcc1 (gcc-libs)
  • libfreetype6 (freetype2)
  • libasound2 (alsa-lib; required for sound to work)
  • libgl1 (required for running OpenGL applications and for using WineD3D)
  • vulkan-driver (required for running Vulkan applications and for using DXVK)

Here are optional libraries that may be required for some applications:

  • libgnutls30 (gnutls)
  • libldap-2.4-2 (libldap)
  • libgmp10 (gmp)

It’s important to install both the 32-bit and 64-bit versions of these libraries.

GLIBC 2.27 or newer is required as the runtime is from Ubuntu 18.04.

How to use portable Wine executables

You can download ready-to-use portable Wine/Proton executables from the releases page.

Root rights are not required!

Make the script executable and run it. For example:

To run winecfg (you can run regedit the same way):

You can also use the built-in winetricks to install dlls and other components. For example, the command below will install dxvk and d3dcompiler_47:

Читайте также:  Creating window in linux

For testing purposes or if installing libraries is not a problem for you (but you like SquashFS and the idea of a single Wine executable), you can disable the included libraries (runtime), in which case Wine will use only system libraries:

How to create portable Wine executables

Use create_wine_portable.sh.

This script will use ready-to-use binaries to create portable Wine executable.

If you want to create a runtime, squashfuse and Wine build from the scratch, then read the next section below.

From the scratch / Sources

All components used in this project (the runtime, the squashfuse and the Wine builds) were created using the official sources.

For my and your convenience i regularly upload ready-to-use runtime, squashfuse and Wine builds.

If you want, you can create everything yourself using the available scripts.

  • create_ubuntu_chroots.sh creates two Ubuntu chroots (32-bit and 64-bit).
  • build_wine.sh compiles Wine builds using two Ubuntu chroots (32-bit and 64-bit).
  • create_wine_runtime.sh creates runtime by copying libraries from two Ubuntu chroots (32-bit and 64-bit).
  • build_squashfuse.sh compiles squashfuse, lz4 and zstd in 64-bit Ubuntu chroot and creates squashfuse.tar with them included.

The first two scripts are available in another my project: https://github.com/Kron4ek/Wine-Builds

Keep in mind that this project is new and it has not been thoroughly tested. Please report any problems you find.

Источник

Использование портативной версии Wine, и создание Desktop файла для удобного запуска Wine программы

Доброго дня вам. Хочу сразу оговорится что статья расчитана на начинающих пользователей в мире linux, и да простят мне эту статью более опытные пользователи. Итак, предположим что у вас возникла ситуация что вы пользовались мега удобной 32-х битной программой на машине с windows, и вы зная про wine 32 bit для запуска этих программ решили его установить. Но так как в основных ведущих linux дистрибутивах существует тенденция на избавление от 32-х битных программ, может случиться так, что возможности установки wine 32 bit у вас может и не быть. Так как wine 32 bit удален из репозитория вашего дистрибутива, его можно установить из другого репозитория, что чревато излишними рисками, ввиду разных зависимостей способных привнести конфликт библиотек в вашей системе.

Моё хоби радиолюбительство, и в моей радиолюбительской практике я использую такую 32-х битную программу. Называется она Sprint Layout, она в принципе является единственной wine программой на моей машине. На одном из Linux форумов я нашел что существуют статичные сборки wine, которые являются portable версиями этой программы, и скачать её можно отсюда https://github.com/Kron4ek/Wine-Builds/releases/ за что большое спасибо Kron4ek за эти скомпилированные сборки. По этому адресу можно найти старые версии этой программы так и самые новые. Можно скачать как wine amd64 так и х86, что мы и сделаем.

Создание desktop файла для Wine

На момент моего эксперимента я скачал архив с wine-6.3-staging-x86.tar.xz и распаковал его в домашний каталог. После распаковки, если зайти в каталог /home/vash_user/wine-6.3-staging-x86/bin/, то мы можем найти файл с названием wine. Вот он нам и нужен. Теперь либо укажем полный путь до этого файла, либо при условии если ваш эмулятор терминала поддерживает перетаскивание, взять этот файл и перетащить в терминал, нажать пробел, а потом мы должны перейти в каталог с вашей wine программой(её каталог также для удобства поместите в домашний каталог) и также ее перетащить в терминал. Чтоб облегчить запуск сего мы можем написать desktop файл, мне удобней это делать в текстовом редакторе Geany, следующего содержания:

Сохраняем его с расширением desktop, например вот так S_L.desktop, обязательно по следующему пути:

Из содержания файла мы видим, что в секции exec мы прописали полный путь место нахождения нашей портативной сборки wine а также через пробел полный путь до исполняемого файла wine программы, в данном случае Layout60.exe.

Также в секции Icon мы пропишем путь до иконки для нашего десктоп файла, которую нужно поместить в созданный нами каталог icons, иконку можно найти в интернете, с расширением jpg, или png, иконку переименуем в sl, ибо скачанная картинка может быть с другим именем, а я выбрал более простое….

Остальное вроде всё и так понятно.

Создавая десктоп файл мы помогаем операционной системе в формировании меню для запуска программ, при нажатии кнопки меню находим нашу программу в нём, а также получаем возможность создавать ярлыки для рабочего стола. После того как мы нашли нашу программу в меню, давайте уже запустим её. Если мы всё сделали правильно не напутав ничего с путями, то первый раз должна запустится программа конфигурации wine которая создаст профиль wine. А также предложит скачать нужные компоненты для её работы, с чем мы соглашаемся, и после установки запустится наша wine программа, следующий запуск десктоп файла приведет сразу к запуску программы . Спасибо за внимание.

Читайте также:  Управление windows с помощью android

Итак, мы сегодня научились использовать статичную портативную сборку wine, а также создавать desktop файл для wine программ для более удобного их запуска.

Автор статьи Vlad-totiks

А на этом сегодня все. Надеюсь данная статья будет вам полезна.
Журнал Cyber-X

Источник

Использование портативной версии Wine, и создание Desktop файла для удобного запуска Wine программы

Доброго дня вам. Хочу сразу оговорится что статья расчитана на начинающих пользователей в мире linux, и да простят мне эту статью более опытные пользователи. Итак, предположим что у вас возникла ситуация что вы пользовались мега удобной 32-х битной программой на машине с windows, и вы зная про wine 32 bit для запуска этих программ решили его установить. Но так как в основных ведущих linux дистрибутивах существует тенденция на избавление от 32-х битных программ, может случиться так, что возможности установки wine 32 bit у вас может и не быть. Так как wine 32 bit удален из репозитория вашего дистрибутива, его можно установить из другого репозитория, что чревато излишними рисками, ввиду разных зависимостей способных привнести конфликт библиотек в вашей системе.

Моё хоби радиолюбительство, и в моей радиолюбительской практике я использую такую 32-х битную программу. Называется она Sprint Layout, она в принципе является единственной wine программой на моей машине. На одном из Linux форумов я нашел что существуют статичные сборки wine, которые являются portable версиями этой программы, и скачать её можно отсюда https://github.com/Kron4ek/Wine-Builds/releases/ за что большое спасибо Kron4ek за эти скомпилированные сборки. По этому адресу можно найти старые версии этой программы так и самые новые. Можно скачать как wine amd64 так и х86, что мы и сделаем.

Создание desktop файла для Wine

На момент моего эксперимента я скачал архив с wine-6.3-staging-x86.tar.xz и распаковал его в домашний каталог. После распаковки, если зайти в каталог /home/vash_user/wine-6.3-staging-x86/bin/, то мы можем найти файл с названием wine. Вот он нам и нужен. Теперь либо укажем полный путь до этого файла, либо при условии если ваш эмулятор терминала поддерживает перетаскивание, взять этот файл и перетащить в терминал, нажать пробел, а потом мы должны перейти в каталог с вашей wine программой(её каталог также для удобства поместите в домашний каталог) и также ее перетащить в терминал. Чтоб облегчить запуск сего мы можем написать desktop файл, мне удобней это делать в текстовом редакторе Geany, следующего содержания:

[Desktop Entry]
Name=sprint_layout
Terminal=false
Exec=/home/vash_user/wine-6.3-staging-x86/bin/wine /home/vash_user/Sprint-Layout60_rus
Icon=/home/vash_user/.local/share/icons/sl.jpg
Type=Application
Categories=GTK;System;TerminalEmulator;

Сохраняем его с расширением desktop, например вот так S_L.desktop, обязательно по следующему пути:

Из содержания файла мы видим, что в секции exec мы прописали полный путь место нахождения нашей портативной сборки wine а также через пробел полный путь до исполняемого файла wine программы, в данном случае Layout60.exe.

Также в секции Icon мы пропишем путь до иконки для нашего десктоп файла, которую нужно поместить в созданный нами каталог icons, иконку можно найти в интернете, с расширением jpg, или png, иконку переименуем в sl, ибо скачанная картинка может быть с другим именем, а я выбрал более простое….

Остальное вроде всё и так понятно.

Создавая десктоп файл мы помогаем операционной системе в формировании меню для запуска программ, при нажатии кнопки меню находим нашу программу в нём, а также получаем возможность создавать ярлыки для рабочего стола. После того как мы нашли нашу программу в меню, давайте уже запустим её. Если мы всё сделали правильно не напутав ничего с путями, то первый раз должна запустится программа конфигурации wine которая создаст профиль wine. А также предложит скачать нужные компоненты для её работы, с чем мы соглашаемся, и после установки запустится наша wine программа, следующий запуск десктоп файла приведет сразу к запуску программы . Спасибо за внимание.

Итак, мы сегодня научились использовать статичную портативную сборку wine, а также создавать desktop файл для wine программ для более удобного их запуска.

Автор статьи Vlad-totiks

А на этом сегодня все. Надеюсь данная статья будет вам полезна.
Журнал Cyber-X

Источник

Оцените статью