Thursday, February 20, 2014

Motherboard Failures / SSD / WINE Solutions And The Spirit of OSS

Welcome to yet another laundry post. It's been a long week for me. I'm still recovering after hurting my back, twice now in less than 7 months. So let's begin with motherboard failures

Recently I noticed that my motheboard SATA slots were faulty, sometimes I had to change cables or slots to make a SATA device work. Now, the cable I used was brand new, I didn't really think it had anything to do with the cable. Even before the new cable, before moving to a full linux environment this year I had ran into a problem where my DVD ROM had read errors. I was taken back with the issue because I did an integrity check after burning the disc.

So what happened is that I had to move the cable to another SATA slot. This was the first strike of something going wrong with the mobo. I ignored it back then.

Now I know I need to get a new motherboard. So with that I want to get an extra 8GB DDR3, and SSD with a debian-based distro.

I looked at the possibility of moving to a arch-based distro, but a question remained: Why bother with a rolling-release distro? Now, I might be biased because I lean toward debian-based distros, it doesn't have to be Ubuntu. It could even be Debian Sid or whatever.

In the end, I just didn't bother coming up with an answer. The ending result no matter what linux distro you go with is that you will end up with a linux system, different package manager. KDE, GNOME, OpenBox, whatever WM you choose won't change that experience.


That said, let's talk about WINE wrappers. Normally, I don't have any problems with WINE wrappers. I actually don't by the way. I just think that WINE
wrappers have been focusing on the wrong things.

There are too many problems with reporting bugs with WINE. If people used winetricks, developers complain, if users used playonlinux, developers would mark it as invalid even if they are using a vanilla WINE installation (no patch whatsoever), it's so, so tedious to fill a bug report with a wrapper. Even if the wrapper took care of basic stuff like library installations, it still would be "invalid". So how can I report bugs to WINE? God knows... if you know how, let me know.

So with that in mind. If you create a wrapper for WINE, users will use it, there's no doubt about that. WINE with patches? Yes, I understand the implications of why people shouldn't file a report.

Now, there have been many applications that handles WINE for you. Thanks to the OSS community we get to have many options available. I'm still thinking whether I should bother creating one or not. I don't know to be honest, maybe I'm having second thoughts on how an I create a tool that WINE developers wouldn't mind, at the same time the tool is aimed for users, not the developers.

Why not improve an existing one? Because they all have different ideology on how to handle WINE from under the hood to the frontend. I also have a different idea on how user interface should be handled, I still use POL btw.



Well,that's it for now.

Saturday, February 15, 2014

MPD + Laptop issues

I had a hunch on the issue already... let me tell you that working with audio stuff in linux gets me a little "nervous", because a computer without any audio output is simply nothing to me... not having my good mate MPD shuffling through songs through a shared MPD music/playlists? it kills me.

So apparently, for me to run MPD system-wide I have to run pulseaudio system-wide, this is regardless on how many groups you add to the MPD user, it won't run. It kind of rubs me off the wrong way.

I just ended up making mpd making it run at a user-level... not happy about it.

I'm gonna join in the many who have a qualm with pulseaudio... sometimes it works... sometimes it just screws up your sound with WINE.




How To Organize Your Steam Games with PlayOnLinux

Are you tired of installing Steam multiple times using PlayOnLinux? Do you want to organize all your Steam games in one giant library (e.g Steam Library), then this guide is for you.


Installing multiple Steam client always drove me crazy with PlayOnLinux, when you see the big picture (no pun intended) you realize that you have over 100+ steam games and that you need to create a new virtual for each, and it's not even rare. Why one virtual drive for each game? There's something called regression, sometimes games break in new WINE releases, so people have to use the WINE version that works for that game. 

Before we start:


  • By configuring it this way you will have to create the shortcuts for each single steam game. This might sound “bad”, but it's really easy.
  • We don't use the terminal as much in this guide, so rest at ease.
  • Please read through the notes and comments I leave. Skipping the registry steps could make Steam unstable.
  • (Optional) Users are required to have a very basic understanding of what is a WINEPREFIX, this helps a lot.
    The guide may seem really long, but it isn't. Most of the time it's just me explaining stuff.



The Idea

The main idea or scope of this guide is to teach you how to have ONE steam installation and be able to manage multiple Steam Libraries in different drives.


Side note
Symlinks (Symbolic Links) plays a big role in this guide. PlayOnLinux as of 4.2.3 and older version has a bug that doesn't know how to handle symlinks. This is not important, WINE knows how to handle them just fine. If you create a drive_c symlink from a NFS mount, it will run the application just fine.


Benefits

  • By having only one Steam installation you can manage/download your Steam games in one central point
  • You will also save space from all the tedious redundant Steam installations done by PoL
  • Your credentials are saved in the main Steam installation, meaning that re-using it will keep you logged in for as long as is takes.
  • Settings are never forgotten, this is a plus if you want specific games to have overlay.
  • Easy management and updates.
  • If you are a GamersOnLinux user, the Steam game installations will be done in a slight different way. I will do a follow up after this guide on how to know what to do, however, there's a high possibility that you'll know how to do it at the end of this guide.



Drawbacks

  • To make this work, you will have to create shortcuts manually in PoL folder for both Steam and games.
  • Import registry for every new virtual drive.
  • Not exactly a drawback, using the terminal is awesome but yea, you have to use the terminal to create the symlinks. I'm not going to do screenshot examples because everyone has different Desktop Environments.



If you notice, they drawbacks are really.... silly, compared to what we will be gaining.



Wait a moment, if I have all Steam games in one location, won't it mess up wine prefixes done by PlayOnLinux?



Not at all. Remember that PoL is pretty much a wrapper around WINE. When you create a virtual drive, you do it for the purpose of making that game work. After you finish the guide, you will see the bigger picture.



So why do I need to create a shortcut of Steam in every virtual drive?



Steam games requires it to be running, if you are new to Steam don't let that take you by surprise, a lot of windows gamers are used to it. When you create the shortcut and launch it using that virtual drive, you are telling WINE “launch Steam, using version 1.7.8”, once Steam is running, within the same virtual drive you'll launch the Steam game you want.



In a nutshell, you run Steam on the virtual drive (wine prefix), when you launch a steam game within the same virtual drive, the game will recognize that steam is running and steam will know that a steam game is launching.



Alright, enough talk, let's get our hands dirty.



Side Note



I'm going to make this guide as uniform as possible. I'll be taking decisions for you, however, you can set up the folders HOWEVER you want.



Step 1) Choose a main location for your Steam installation.



I chose mine to be in /home/david/WINEApps/Steam



Open up your terminal and write:


mkdir ~/WINEApps





Step 2) Choose a main location for your Steam Library. Remember, I said Steam Library. I'm not going to explain what are Steam libraries, please search the web.



I chose mine to be in /media/david/Usagi/Library/Games, however to keep this guide uniform. I will create it in your user directory.




mkdir ~/Library/Games



Step 3)



Side Note



For the sake of getting a fresh install of Steam (one last time – Dream Theater), let's install Steam. If you are following this guide, by now you should know how to do this. Experienced users can skip to step 4






Open your PlayOnLinux, click Install



Click on Install a non-listed program


Create a virtual drive called Steam. (as shown in the screenshots)








Click on “Use another version of WINE” choose any from 1.7.8 and up. I used a 32 bits installation.






Then choose the Steam installer you downloaded. 





It will probably appear without these letters, but yea. close it.

Let Steam finish installing then close it after the Steam login popup appears.

If PlayOnLinux window thinks it's still installing Steam after you closed it, just press cancel, no harm done.





Step 4)



Awesome, you got a fresh Steam installation.



First, Downloadthis registry file. You can look at it, it just has basic Steam registry. KEEP THIS FILE BECAUSE YOU WILL CONTINUE USING IT.



Side Note



In truth I don't know if the registry import is completely required. Do note that not choosing to import the registry could make Steam crash or become unstable.



Open your terminal and type




cd ~/WINEApps


mv ~/.PlayOnLinux/wineprefix/Steam/drive_c/Program\ Files/Steam ./



Alright, we got the Steam installation in our WINEApps folder if no error message appeared. You can check by typing ls in the terminal, like this




ls

david@david-mate:~/WINEApps > ls
Steam



Side Note: Why not leave the Steam installation there?



Commodity, /home/david/WINEApps/Steam can be easily memorized and less error-prone than /home/david/.PlayOnLinux/wineprefix/Steam/drive_c/Program\ Files/Steam





After you are done moving Steam, remove the virtual drive you created to download it.



Step 5) Let's create a new virtual drive!



Call it Steam4All (or whatever you want, just no spaces, and please remember the name you use, we'll keep using it)

(32 bit WINE, 1.7.8 or above)








When it asks you to browse the file to install, press cancel.






Step 6) Let's create a symbolic link now.



Side Note - IMPORTANT



For every virtual drive you create to run a Steam game, you have to create a symlink for each of them. In this case. We are going to do a symlink of our Steam folder in ~/WINEApps/Steam in the Steam4All virtual drive.



For example: If you want to run Skyrim, then create the virtual drive for skyrim THEN create the symlink of the steam folder.






Open your terminal:
 

ln -s ~/WINEApps/Steam ~/.PlayOnLinux/wineprefix/Steam4All/drive_c/Program\
Files/Steam



Side Note – Complimenting my Skyrim comment –



THIS IS JUST AN EXAMPLE. If it was a Skyrim installation, after the virtual drive creation, supposing it's called Skyrim




ln -s ~/WINEApps/Steam ~/.PlayOnLinux/wineprefix/Skyrim/drive_c/Program\
Files/Steam



Step 7) Let's create the shortcut manually



I'm going to get visual so you get an idea of what I'm doing. Usually this is a PlayOnLinux shortcut:



Let's go to ~/.PlayOnLinux/shortcuts folder here are some screenshots







We are going to create a new file called “Steam4All” and paste this



#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
# Always remember to change the WINEPREFIX path
export WINEPREFIX="/home/USERNAME/.PlayOnLinux//wineprefix/Steam4All"
export WINEDEBUG="-all"
# Important part
cd "/home/USERNAME/WINEApps/Steam"
POL_Wine Steam.exe "$@"



REMEMBER TO REPLACE USERNAME WITH THE USER YOU ARE CURRENTLY USING.





Side Note



If you take a look at PlayOnLinux picked it up instantly. DO NOT RUN IT YET




Step 8) Import the registry!



If you haven't downloaded the file, click here. (If you wanted you could do Step 8 before 7, it doesn't matter, but never forget the registry)


Press Configure in your POL.



Go to the Wine tab and press Registry Editor



Click on the Registry label in the menu bar.



Click on Import Registry, find the registry you downloaded and load it. No messages will be given. Once you load it, close the registry editor.




IMPORTANT NOTE



You don't have to write -no-dwrite anymore. I disabled dwrite in the registry you loaded. Hurrah? HURRAH



Step 9) Friends, mates, aliens. We are done. Let's run this.  If you really need to know what to do .... just click on Steam4All and run it.







Step 10) Let's create a Steam Library.



Go to View-> Settings



Go to Downloads

Click on Steam Library Folder

Click on Add Steam Library







Add the path we created, it should be in /home/USERNAME/Library/Games and you are done.



This is it people, We finished configuring our main Steam installation. You can add as many steam libraries you want.



COMPLEMENTARY GUIDE – How to install games with this setup



Okay, I'm not going to walk you through a whole game installation guide. I will however explain how to compliment our new steam setup with your steam game installations. I'm going to install Skyrim.



Here's what I will do, if you need help on installing Skyrim, read GamersOnLinux Skyrim Guide. However, you DON'T NEED TO install Steam. Also, please remember to choose the right Steam Library.



With the new Steam installation, download Skyrim. (Please note that this is an example) 




Step 1) Once Skyrim finishes downloading go to PlayOnLinux and create a virtual drive for Skyrim. I'm using WINE 1.7.10-CSMT. Remember to use GamersOnLinux guide to know what libraries to install for your virtual drive (e.g .NET Framework, dxfullsetup, etc)



Step 2) Once you create the virtual drive, we are going to create two shortcuts (three if you are using SKSE)



Create these shortcuts in ~/.PlayOnLinux/shorcuts



Create the file and call it: Steam (for Skyrim)

(the letters in italic is the filename)



#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
# Always remember to change the WINEPREFIX path
export WINEPREFIX="/home/USERNAME/.PlayOnLinux//wineprefix/Skyrim"
export WINEDEBUG="-all"
# Important part
cd "/home/USERNAME/WINEApps/Steam"
POL_Wine Steam.exe "$@"



Create another file and call it Skyrim



 #!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/USERNAME/.PlayOnLinux//wineprefix/Skyrim"
export WINEDEBUG="-all"
cd "/home/USERNAME/Library/Games/SteamApps/common/Skyrim"
POL_Wine Skyrim.exe "$@"


Create another file and call it Skyrim SKSE



#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/USERNAME/.PlayOnLinux//wineprefix/Skyrim"
export WINEDEBUG="-all"
cd "/home/USERNAME/Library/Games/SteamApps/common/Skyrim"
POL_Wine skse_loader.exe "$@"



That's all. Go to your PlayOnLinux and launch the game. :)



Side Note



This is a RINSE AND REPEAT process. Now whenever you create new virtual drives, just change the path in WINEPREFIX and make sure the change directory path is pointed to the game folder.



Later on I'll try to do a Borderlands 2 installation setup with this, you'll see how easy it is.







Questions



Q: If I change WINE versions, will the files in my Steam folder be affected?

A: No. That WINE version will get updated, the registry will remain intact.



Q: How does Steam works when the physical files are not in drive_c/Program Files?

A: WINE knows how to distinguish a symlink, you could create a symlink of drive_c and store all the files in Dropbox if you wanted. (not recommended, don't get any weird ideas...)



Q: What happens if I launch the games in my main Steam virtual drives?

A: If you don't prepare a virtual drive for each game properly. The obvious scenario is that the game won't run. The libraries are not installed, the game will crash. It's important to always create a virtual drive for each game, regardless if this Steam installation is being used for all of them.



Q: Can I organize all my previous Steam game installations?

A: Yes, and please don't panic right away. Please read carefully.



Go to your previous installations through PlayOnLinux's Virtual Drives



All Steam games are installed in Steam/SteamApps/common



You will see all games folder with their proper name.



If you followed the guide, just drag and drop the folder to /home/USERNAME/Library/Games/SteamApps/common



Open your Steam4All installation, the game won't be recognized on the fly. Proceed to install the game, Steam will say “Discovering Borderlands 2 files” then “Verifying files”. When it completes, you are done. You have successfully ported the game.

Like this: 





Please ask in the forums if you have doubts.




Thursday, February 13, 2014

I'm still "wasting time": Setting up a shared MPD, PlayOnLinux brainstorming, WINE + NFS

I'm actually supposed to be learning C++ and golang (Go Language) to kill time, a long with a language I'm currently learning (not a programming language). I'm not really burned out, but I do feel a bit .... losing motivation maybe? Still, I feel confident about learning it. Priority for me is learning the language, and then the programming languages.

I finished my shared MPD setup through NFS. I exported my NTFS hard drive connected in my main desktop and the mpd config directory. I kind of needed to tidy things up. I have this habit of leaving a mess of directories and files, which at the end it gets hard to be organized.

I like it, it's still scanning through the music folder, but so far so good.

PlayOnLinux, while I was devising a way to isolate applications from the... tight grips of PlayOnLinux installers. I ended up thinking that the only good thing PoL provides are their patched WINE packages such as Guild Wars 2. Now, this might sound really harsh; I'm not trying to throw dirt at PoL. I think they have done an amazing job, but it makes you ponder that they could have done better user interface decisions... but seeing that half of the project is a set of bash scripts and the other half is a set of python scripts... it does bring a lot of questions, at least for me, behind their decision.

Anyway, that's just me. Don't take it to heart. I've done some brainstorming but I don't think it fits PoL's way. In the end, as all WINE wrappers I don't know what WINE really needs. I do know what the users need, but to help the project? not sure where to start.


WINE + NFS, one of my ideas which I'm sure it's possible is to set-up PlayOnLinux as a system-wide tool. However, PoL was made for per-user usage, how can I "fool it"? I do have a few ideas but... not sure if it's worth it. Let me know in the comment section if you are interested.

From now on, these type of posts where you see me babbling will be tagged as laundry posts. Check them out, it's just me talking whatever crap comes to my mind.


Stuck with Linux Mint in the end

Apparently, my laptop has a mind of its own. It won't let me install Manjaro KDE. I know I have to get a new laptop but...for this laptop to force me to stick with linux mint, huh...

My laptop (the one I'm currently using to write this) is old. I want to get a new one for casual stuff and leave my main desktop for programming/debugging, etc. I really wanted to have a go with an arch-based distro. It seems I won't be able to until I get a new laptop, until then I'll stick with Linux Mint, which I don't mind because I'm really used to debian-based distro.

I tried to get into OpenSUSE, I've heard many great things about their community and how open it is for all ages, and that really makes me happy inside. However..... I'm not a fan of their software management program... so clunky and slow... I usually install all my packages through cli since it's faster. But... using their gui installer was pretty bad. Another thing that I couldn't get right was installing multilib, or well, 32 bit packages. In debian you would just say apt-get install mplayer:i386 and you are done. In OpenSUSE? god knows, I didn't stay around for long.

So, to sum it up. I don't know when I will get my new laptop, but when I do it'd be either Manjaro or yet another debian-based distro.


Wednesday, February 12, 2014

Manjaro 0.8.8, Network Sharing, MPD deception

Something to talk about tonight is my struggle with Manjaro. I tried to install Manjaro OpenBox, or ManjaroBox. This is a typical scenario of not getting a working wireless. I know the setup automatically detected the right drivers, but for some reason the crappy network manager it had installed didn't detect any connections.

So, I proceeded to install wicd; after installing it I got all sorts of weird errors. My patience was running a bit thin, mostly because I wanted an stable system, which is Manjaro's main goal but I couldn't get any of that. I've used Arch Linux in the past and know how hectic it can get with their updates, sometimes it could break your whole system.

A curious note before I continue. In Manjaro's site I  don't know why they bothered to put KDE's memory usage. To be honest, a lot of people are using "modern" linux desktop/laptops to be worrying about the RAM you use. I have 8GB RAM in my main desktop Linux Mint/KDE and I hardly use 3-4GB, needless to say, unless you are running a really old laptop with 512MB RAM which I really doubt, there's no need to get all panicky with the memory usage. Unless you notice a memory leak.


In the end, what I decided to do was temporarily install Linux Mint. The wi-fi connection worked perfectly and all was well in my little world.

One note about Manjaro, their advanced setup where you want to create the partitions was broken :( (related to the GUI install) so even if you created the partitions you wanted, it wouldn't continue the installation.

Now, let's talk about file sharing across linux machines. I personally never tried it, you don't know how EASY it is sharing files using NFS. I did a few mount --bind setups in my fstab to lay out the stuff I wanted to share across.

So I mounted the network folder I shared via NFS in my laptop and everything worked.

While I was configured this laptop, which I'm going to format again very soon. I tried to share the music from my main MPD set up to this laptop. Sadly, I deceived myself in a way. I thought with MPD I could serve music, but that's not the case. I do wish they added that capability in the future, imho, it would be perfect. Then again, I have researched very little on media setups. My main desktop is always turned on so... maybe I'll dig a bit.

Monday, February 10, 2014

How to install the latest NVIDIA Drivers in Linux Mint 16 "petra"

Hey there, linux users around the world. I'll be writing a little how-to install NVIDIA drivers

Please follow this guide if:

  • You are willing to dirty your hands with the terminal. Ubuntu and its variants (Linux Mint) has done a great job in maintaining the simplicity. 
  • You really need the drivers. Some drivers could lead to instability, uninstalling them is an easy task though. 
  • You want the latest NVIDIA drivers for Linux, I think that's why you are here. Let's get started
Things you need to know beforehand. If your distro upgrades the kernel or any X.org package there's a high possibility that your drivers might break. This isn't a big issue because you can reinstall them as many time as you want. I always keep a folder of NVIDIA drivers in my home directory. Example:


david@david-desktop:~/NVIDIA > find . -type d 
.
./331.38
./334.16-BETA
Now, whenever I download the drivers I always make sure to place them driver in different folders because they are easy to access. This is just a suggestion, if you don't want to do it that's your choice.

Anyway, let's go get our stuff ready

Step 1) Download the drivers

Step 2) 
sudo apt-get install linux-headers-`uname -r` build-essential
sudo apt-get purge xserver-xorg-video-nouveau nvidia*
sudo update-initramfs -u -k all

Step 3) Logout and switch to a different TTY, press CTRL + ALT + F1 (you can use from F1 to F6 Linux Mint usually uses F8 for the display output).

You'll be in tty1 after you pressed CTRL + ALT + F1

Login with your user and password

Step 3) An important note, at least in my Linux Mint 16 we use MDM which is the Mate Display Manager, the one that handles greetings and let us login into different sessions. What we are going to do is stop it. In an enviroment like Lubuntu where the DM is LightDM then you would say "sudo service lightdm stop"

sudo service mdm stop

Step 4)  Go to the directory where you downloaded your drivers

I'm going to use drivers 331.38 in my example, it could be different for you.

Step 5)
chmod +x NVIDIA-Linux-x86_64-331.38.run
sudo ./NVIDIA-Linux-x86_64-331.38.run
Accept or we won't get anywhere


Continue! (Yes)

Almost done, sir!


Step 6) The installer will ask you if you want to enable DKMS. What DKMS support will do is that every time there's a new kernel update it will automatically build the driver. I haven't tested this feature so I answered in mine no.

Step 7) The installer will ask you if you want to install 32 bit libraries. Say yes unless you want to say good bye to Steam and WINE games. The installer will install it in: /emul/ia32-linux/usr/lib/

Step 8) The installer will ask you if you want to update X.org configuration. I always choose yes.

Step 9) You are done, reboot and come back here because you aren't done.

Step 10) Once you logged into your machine.

sudo kate /etc/ld.so.conf

Step 11) Add the path /emul/ia32-linux/usr/lib at the end of the file



Step 12) 

sudo ldconfig -v

Congrats, you are done. Please leave any questions or doubts here. The reason for adding 32 bit libraries of those drivers is because a lot of games and applications like WINE 32bit still uses them. Steam won't "find" OpenGL.so because there's no 32 bit alternative.


Things to know:
  • You don't have to update ldconfig everytime you install the drivers
  • The NVIDIA drivers will usually save your answers for later installations
  • You can uninstall the drivers by saying sudo ./NVIDIA[longname].sh -uninstall









Saturday, February 8, 2014

A Game Session of Guild Wars 2

Morning guys, it's a beautiful morning here. I've been playing Guild Wars 2 using PlayOnLinux.

I'm loving the new WvW map, Edge of the Mists. The map is so rich in strategies for GW2 guilds, yesterday I had to stay in alert because 2 walls in the keep were down, so any Borderland enemy could just march in and wipe us out. We of course resisted and held our position as long as we could.

Two things I've noticed while running Guild Wars 2 is that you have to lower the people you see in the game when it comes to large zergs. It's not much about the people you see, but all the different outfits and textures the games has to load, it kills your framerate really fast. I had to change my settings of Character Limit to Lowest because at the moment WINE couldn't provide me with a better experience.

Now, I'm not going to point fingers because I'm running a game in an unsupported OS. Plus, come on, WINE team and contributors have done an INCREDIBLE job. PlayOnLinux has also done a great job, but I wish the interface was better.

Going back to GW2, I left a few months ago. I think Guild Wars 2 community is really toxic, especially when it comes to World vs World where a lot of WvW veterans don't tolerate new players. Some players have suggested to just turn off the chat, that's the part that got me curious. Is it THAT bad that newcomers have to turn off the chat? Is Guild Wars 2 turning into the new League of Legends?

Now, I don't want to start a war between two games. After playing Final Fantasy XIV: A Realm Reborn and comparing it to Guild Wars 2, hands down FFXIV community wins, no questions asked. You don't know a high level dungeon? No worries, they'll teach you. Need help for whatever mundane task you can't complete? Someone will message you privately to help you. Attitude in the game? It's pretty awesome. You don't have a guy telling you "use the /wiki command" or "WHO'S THE TROLL KILLING THE ZERG TRAIN". (I personally hate zerg train the most, it's at best one hell of an offender to newcomers who just want to play the content like they want)

Anyway, that's it for today, see you around.