UPDATED ON NOV 21 16.57 GMT+1
Updated: mounting commands. added 1777 fix for /dev/shm. Without steam wont run
Updated: A few coommands that will help you a lot.
This little work around: steam steam://open/games. Basically it allows you to run steam without getting message about beta account. Basically, just run it, and you can run steam as non beta.
Secondly... 'steam://run/440'. This line allows you to open up steam links inside of browser. It's used to install games, which have no 'install' or 'play' button'. Choose game in Valve game store, put this line into address bar of that page and if piping is working well - it will transfer link to your steam and download will autostart. Be advised, it MAY start windows download!!! Rule of thumb: games that are found with search by OS option - are safe bet + Team Fortress 2.
Updated: Currently steam is launching(depending on distro, seemd to work in xubuntu 32 bit), it can download and back up games under chroot. Trying to run game gives bad errors. check this page: Error in libc
However, there is lsteam update for 5 megs, perhaps some bug fixes... will have to test.
Please let me knwo what doesnt work, or what I can do to immedeatly help with this web site.
Disclaimer: Are you 18? If no - please leave. I don't like script kiddies :P. I have very little patience. I may use: foul language; language that some people may find offensive; blasphemy; technical terms, which may result in loss of productivity, broken computers, etc.; mispelling and plain incorrect english language.
This site has been done quick and dirty.
If you continue and want to follow instructions - I expect you to have more than fair ammount of knowledge on Linux. It's not a howto, but more of a starting point. Though this 'Thing' has been tested by at least one person and is known to work. It's under GPL3 license.
http://www.gnu.org/licenses/gpl.html
Hello dear Linux Fans.
Firsthand intention of this site is to help all those poor souls like me. To help them ease their pain and frustration.
As many of you have heard Valve has actually released Steam for Linux!!!!
Why do it?
Various reasons are behind it. First of all, i run not supported OS. Gentoo. And since it will take time before it appears anywhere else but ubuntu - will take time. Further more, before it appears in my beloved Gentoo - it will take even more time.
People proposed to simply unpack deb files. I don't like that approach, It won't work everywhere, but even if it did, it will not guarantee to work everywhere with steam, because steam erquires/assumes certain binaries to be present on system, which is not case with your OS. You can simply install them manually, but over time it will take more jobb than what I am doing now.
Many of those who know are aware that it's restricted to beta only accounts. And some of those who know that, know that beta account limitation protection sucks and blows. Those in the know - know, that installation files are in .deb format, meaning, they can't easily install Steam on other OS. Which is true. And this is what I want to ease a bit.
Basically options to try out Steam atm are:
1) Install Ubuntu, which blows. You need to dualboot, it takes additional space, fsck's (man fsck) up existing grub/Lilo, makes you reboot more than usual.
2) Virtual machine. Same as above, but no rebooting, though, booting and shutting down of virtual OS still counts. There is no proper realistic way of getting 3D acceleration.
3) There is right way, wrong way and my way. Which is wrong, quick and dirty way. That requires no rebooting, no messing with BIOS, no messing with grub and supports 3D! (Hello Sweet Sweet OpenGL!!!!!) Further more it has obvious security flows and all other issues associated with option 2. It requires knowledge of Linux. It requires various software instruments. It will require you (worst part) to either kill existing Xorg server, or take performance hit (it may not be that bad on newer machine). I give you a hint: chroot :P
It should be cross platform way of doing things, but be aware, I didn't test it on anything else but Gentoo.
DON'T EXPECT ELEGANT SOLUTIONS. It's gonna be brute, it's gonna be a hack. And it's gonna smell bad. Yet, it's a starting point.
Still not afraid? Well, then you may proceed :P
For impatient, see part that is called: things that may go wrong.
I shall try to put all commands I used and some explanation behind it. I can forget some.
Machine I use is not too old, not too new, but it's 64-bit environment. Though, I see no reason not to use 32-bit environment, bear in mind, your chroot also should be 32-bit then.
In a bashshell nutshell, we shall create new virtual machine, install Ubuntu (I used Xubuntu, as current Ubuntu sucks balls and Steam works there anyway, but I can't test how games would work. Please let me know, see my whois info for email, or (drjoms [(@)] gmail.com) if You made any of them work. I'd love to try smth before it actually comes up in full version :)
First of all, we shall create new Virtual Machine and (SUPRISE!!!!!) install Ubuntu onto it.
Than we make chroot environment out of it.
Than we chroot into it.
??????
PROFIT!!!!
1) The easy Part. Virtualisation
Making the virtual machine...
First of all, I use KVM (Kernel Virtual Machine). It's built into Kernel. It's quick and dirty way of getting virtualization. It lacks GUI, but I am used to it, so i don't care. You possibly can do same thing in other Virtual machines, BUT, you must use raw format. Since we will need to mount it later on.
Size should be expected OS size + enough for games.
Actual command for qemu (KVM frontend, application set to control visualization and it's various aspects) image creation:
qemu-img create -f raw xubuntu.raw 100G
This will create container, where actual future install will be.
Next thing for me was: (assume all programs to run as root, unless I explicitly say otherwise.)
You wont need those commands, it's for networking junkies.
tunctl -b -u dimko -g dimko -t tap1
brctl addif br0 tap1
ip link set tap1 up
Then we actually install Guest. Its really simple.
qemu-kvm -hda xubuntu.raw -cdrom /dimko/xubuntu-12.04.1-desktop-amd64.iso -boot once=d
It will start instance of virtual machine, where -hda - is one and only HDD, -cdrom - one and only CDROM (iso image is more than sufficient), which will be bootable untill first reboot (no need to actually kill proccess once guest is installed, you can safely reboot guest and it will start from HDD container).
I won't explain much of this, as most of you won't need it. Those who will - will understand it.
Then...
qemu-kvm -hda xubuntu.raw -net nic,macaddr=00:00:00:00:00:01 -net tap,ifname=tap1,script=no,downscript=no -m 2048 -sdl -soundhw all
It starts new virtual machine with virtual interface of tap1 as network device. It's NOT necessary to run it. This command requires no root.
You probably won't need the whole line above, it's for network junkies.
What you will need:
qemu-kvm -hda xubuntu.raw -m 2048 -sdl -soundhw all
This command requires no root.
This line runs the container with xubuntu.raw with 2 gigs of ram, trying to give you some sound under guest. I assume guest OS is already installed. After installation don't forget to install appropriate VGA driver. Same one as you are using. I suggest binary driver in case of Nvidia. Noveua wont cut. Read your distro documentation on relevant howto. Driver for your distro and for guest must match.
Download setup http://media.steampowered.com/client/installer/steam.deb file.
2)Mounting virtual installation
Log into Guest OS.
Remember I asked for raw image? It's for a reason. Qcow won't cut, since it compresses image, and we can't mount a compressed image.
Run smth like: fdisk and press p there. It should give you the info on start of root partition, in my case its 2048 (should be same with you, most likely, unless u made a custom raw image), sector size, which typically is 512 bytes.
So, with installation finalized, video driver installed and information about root partition collected SHUT DOWN GUEST BEFORE PROCEEDING!
mount -o loop,offset=$((2048*512)) /home/dimko/xubuntu.raw /mnt/
There we actually mount raw image into folder called /mnt/.
cd /mnt
self explanatory.
mount -t proc none ./proc
mounting proc partition inside of chroot.
mount -o bind /dev ./dev
binding /dev partition. It usually happens at start.
mount -o bind /dev/pts ./dev/pts
mount -o bind /dev/snd ./dev/snd
Those 2 lines above shouldn't really be here, since /dev/ partition should do the trick, but in my case for some funny reason it failed. I found it useful.
mount -o bind /sys ./sys
another one needed for 'boot'
cp /etc/resolv.conf ./etc/resolv.conf
by default chrooted environment exists with network settings of your OS. But it uses its resolv.conf file that says which DNS servers to use. In many OS this file is blank by default. It's updated at start up. But since there is no start with chroot - no update to file in question, and your environment fails to know how to resolve domain names. IP functionality still is present non the less.
mount -o bind /tmp ./tmp
technically not needed line, but it doesn't hurt. It may help with various service/proccesse sharing.
xhost +
rather important line - makes your Xorg(GUI) server share itself with any and all connections to it. It basically allows you to run applications from under chroot environment! I CAN'T STRESS ENOUGH, IT'S A SECURITY RISK. You can limit actions to localhost, see man pages how to do it.
chroot /mnt /bin/bash
xset +fp ./usr/share/fonts/X11/100dpi
This will tell Xorg Environment to use 100DPI fonts of Ubuntu, without it chrooted application will miserably fail with really naughty error message. On the other hand this command may fail, no idea why, but most likely it wont be too critical if it fails. If it is critical - running application will warn about fonts.
FINALLY! we are in chrooted environment.
From here you can use programs from chroot. You can even run your own user from guest. just: sudo su $USER, where $USER is your login in virtualised guest.
3) 'Unfortunatelly', workarounds...
First of all, change permissions inside of chroot environemnt for /dev/snd/* files. We don't want to mess those files up. But we can mess /etc/group file in chroot. Modify, so that audio group has same group number as /dev/snd/* files.
ls -la /dev/snd/*
nano /etc/group
Change group number using text editor.
Profit
Nope...
Unfortunatelly, for me, most programs run with no problem, but not steam... Asshat doesn't want to run in existing Xorg server (it's backbone of GUI in Linux). Since all is mounted - we can kill Xorg.
pstree -p|grep xorg
kill $PROCCESS
Where, $PROCCESS - is Xorg server, which we intend to kill
DO NOT PROCEED IF YOU DONT KNOW CONSOLE, AND CAN'T START XORG FROM IT. Reboot could be only option if you do. It will kill GUI. Console will still be there
Unfortunatelly you will need to chroot again:
chroot /mnt /bin/bash
Unfortunatelly I couldn't work out how to make sound work under normal user. Root is only option, which is a security hole. And it's a big one at that.
4) Inside of Chroot.
Well... before chrooting - copy kernel from existing OS(you meay need to install it first), in binary distros it's its not there by default, to /mnt/usr/src/.
There, make && make install&& make modules_install . make may not be neccessary, but it wont hurt. Wont hurt for another half and hour on weaker machine...
To make things worse - it will break bootloader to smithereens! You will need to restore it using iso image from before.
You will ask me, why do it? To install driver of your video card. The trueth is, if chrooted ubuntu and host OS have different version of kernel - there will be Xorg conflict.
More or less done with that, we can now call Xorg from chroot.
As I found how to link font from chroot to existing Xorg, this section is no longer relevant.
Try a few 3d apps there. if all is fine glxgears should work. glxinfo |grep direct should tell you, smth like direct rendering: yes. if it's not - we got a problem.
Unigine download - my favorite benchmark. perfect way of knowing idf ur chroot works with 3d or not.
5) Unmouting stuff/mounting stuff back
To mount:
mount -o loop,offset=$((2048*512)) /home/dimko/xubuntu.raw /mnt/
cd /mnt
mount -t proc none ./proc
mount -o bind /dev ./dev
mount -o bind /dev/pts ./dev/pts
mount -o bind /dev/snd ./dev/snd
mount -o bind /sys ./sys
cp /etc/resolv.conf ./etc/resolv.conf
mount -o bind /tmp ./tmp
xhost +
chroot /mnt /bin/bash
chmod 1777 /dev/shm
To unmount stuff before running virtual machine for example
cd /mnt
umount proc/
umount ./sys
umount ./tmp
umount ./dev/pts
umount ./dev/snd
umount ./dev
umount /home/dimko/xubuntu.raw
6) Executing actuall steam and installing games.
First of all, run the steam without any arguments. It should
Things that will go wrong:
Don't install anything from chroot (Steam games should be an exception), I mean, using apt-get install. Some things may break down badly to the point when it's FUBAR. Some may fly through, but if not sure - do it the safe way, boot virtual machine.
Don't ever forget to switch virtual machines before mounting root. Don't ever forget to unmount chroot environment before loading guest OS. Or kittens will die and hairs will grow out of your palms. YOU WERE WARNED. Consequence may be - you will need to reinstall all over again.
Be advised, that chrooting into real Xorg environment, if i can say so is highly advised before running steam from noormal xorg. You need to be somewhat familiar with console.
Kill Xorg, chroot with smth like chroot /mnt/ /bin/bash, run xinit or startxfce4 or whatever windows manager you have under your Ubuntu.
Note about Steam
It still is Beta quality.
For example: I activated SPAZ. which I purchased with humble bundle. It still doesn't work from steam, however, it does work from under stand alone application(bought it from indie bundle earlier on). Another application is known to work under steam: Red Orchestra, but it has issues connencting to the intrnetz. Either option is disabled, either option is simply not working. Mind you, all other applications from under chroot, like Firefox, for example work fine.
Proovs
As you can see, it works, further more, I was able to buy a game, and RUN IT TOO! Red Orchestra. Graphics was outdated, but well behaved.n You can see, i practiced fpr 20 minutes or so. I didnt do any benchmarks, but rate was withing good boundaries. While I am not under an NDA, I am still somewhat responsible person, and I won't make any screenshots from inside games. I suggest you not share with screenshots too, once you finally get your hands on steam.
I was too quick with judgement, i thought alien swarm was working, i was wrong. it downloaded win binaries...
BONUS
BTW, whole thing can be used to try PS2 emulation on Linux, which I shall also try, since in Gentoo certain things are pain in the ass. PS2 emulator + 32-bit chroot (under 64-bit system) = nice attempt at emulation.
Links:
http://steamcommunity.com/app/221410/discussions/1/882965118606133134/
http://www.omgubuntu.co.uk/2012/11/reddit-users-bypass-valve-linux-beta-invitations
TO DO
Currently this document is in an Alpha stage
Add some unicorns and shit...
Try to get sound under user account in chroot.
link
make links more automatic, use piping etc.
spell check
need to find out how to start gui in true ubuntu environment and not xubuntu.
need to update page that alien swarm is not yet linux ready. Windows bin files download, bu not the linux ones. On briter side, chmod -Rv 777 /dev/shm seem to fix issue with steam client inside of chrooted user. I was able to successfuly run steam from under my normal user and not root.
also little update, on how to run applications from under chroot, using sshd, and normal non chroot user.
testing environment of chroot, like running 3d application.
Need to explain compilation and rescue of partition.
Dbus, and how bad it actually is.