Creating Virtualbox AppImage

First, I want to say great project. Still a relatively new Windows to Linux users (about 1.5 yrs with using Linux installed on are metal), I must say that I really like using AppImages.

There are 2 packages that I would like to create into my own AppImages, but by far the most important to my workflow is VirtualBox.

I don’t know if I have a dependency issue or something else. I know it works on computers that have the program directly installed, but it won’t work on computers that don’t have it installed on, even ones that I compiled everything on.

A run down of my process to make sure that’s kosher:

First I use command apt-get --print-uris --yes install pkgspec | grep ^’ | cut -d’ -f2 >downloads.list then I use wget --input-file myurilist

Now I am using this on a 64 bit OS, so if there are 32bit dependencies that it’s pulling those as well. If not, let me know what I can do differently.

From there, I use the “REPACKAGE EXISTING BINARY” slide from the youtube/pdf off the website. For the dependencies, I use the same command that I did for the main program binary inserted in the same locations.

Before I do the last command involving AppImageAssistant, I run sed -i -e ‘s|/usr|././|g’ MyApp.AppDir/usr/bin/myapp and then I run cd myapp.AppDir/usr/ ; find . -type f -exec sed -i -e ‘s|/usr|././|g’ {} : , after those 2, then I do the command involving AppImageAssistant.

I don’t know if there is something else that I’m missing in the build process or if virtualbox is one of those best left not to try to create an AppImage from.

Any help for the Linux newbie would be greatly appreciated.

Thank.

Evan

First of all, AppImageAssistant has been replaced by appimagetool. I should probably update the presentation soon.

Then, keep in mind that VirtualBox is not a normal userland application in the traditional sense since it needs root rights and a kernel module. This kernel module is compiled(!) during installation by the installer, or provided by your distribution.

To make an AppImage of VirtualBox, one would need to write a script that does the kernel module compilation, and it would also require root rights. So far I haven’t attempted doing it; way too much hassle for my taste. But I am definitely looking for someone to take on the challenge!

Based on that, that is definitely way beyond what I’m able to do (I know enough just to cause damage).

I did try to convert gnome-boxes to an AppImage. Probably the same issues there. The only issue that terminal was spitting out at me when I had it linked to Nautilus was unable to find the org.gnome.boxes schema, yet when I look in the glib2.0 folder, I find it in there in AppDir, so somewhere, it isn’t linked to that new location and trying to find it within the actual system. I did do both commands that were listed in your presentation about changing /usr with ./, but either there is something I’m missing or something else that needs to be done?

Is there a fix for it or like Vbox I’m just outta luck?

My biggest problem is that I just have a little bit of knowledge (emphasis on little bit) that only gets me into trouble it seems.

Although, I’m beginning to think it may not be best for me to try to do an AppImage of a windows app and putting WINE in there as well. I haven’t found dummied down step by step, so that may be no bueno for me to attempt.

Thanks for the help. This project is exactly what I was looking for.

Yes, AppImages containing WINE and a Windows app are definitely doable (have done some for myself long time ago but these days I luckily don’t need any Windows apps anymore).

As for schemas, do the following inside the AppDir:

cd ./usr/share/glib-2.0/schemas/
glib-compile-schemas .

Well, that did get it to work for Gnome-Boxes on the 14.04. However, it wouldn’t work on the 16.10.

I had gotten one library error that I was able to fix, but then I got another one and it was a libgcrypt11 error and I have tried downloading every iteration of that library and it still hasn’t fixed that one. I tried both 32 bit and 64 bit packages in case I needed both.

I tried creating the AppImage on 16.10 and it would start up, but then it would just close out. On older OSs it was giving me library errors as well. On the 16.10, if I recall correctly, it was giving me parshing errors.

Is there a good write up somewhere that would show a total newb how to do it?

I’m ok as long as I can use the same command, just substitute the app names in the appropriate spaces, but if it’s coming up with commands/code by myself, I’m at a total lost.

I have a couple of apps that if I could bundle as AppImages (I know they run within WINE, I would just like them portable), even if the instructions don’t show how to do a trimmed install of WINE, but a full version, that’s fine. I would rather make sure then try to get too fancy with trying to trim to bare essentials.

See Simon’s response when I asked a similar question:

2 Likes

That looks like a nice write up to get it to work.

What would be the best way to install PortableLinuxGames. I didn’t see any method on that (it sucks being a newb at times).

Otherwise that definitely looks like a write up that I could follow. Thanks!