objarni's picture

Ubuntu as a development environment?

Hi everybody.

I'm currently using WindowsXP and Visual Studio Express 2008 as a development environment.

While I am quite pleased with Visual Studio, I'm starting to grow tired of Windows (viruses+slowness+hassle+security).

So I'm thinking - could I go Ubuntu and still keep Visual Studio? Eg. via a VirtualBox+minimal Windows XP (only Studio! no network). Then I could develop using Studio and have a Shared Folder from which I run the result, hardware accelerated (NVidia graphics cards work fine in linux world..).

The alternative is MonoDevelop, which I tried a year ago or so and it was not up to par with Visual Studio yet (mostly because of IntelliSense being a lot less attractive). Maybe it is a lot better nowadays? For example I sure would appreciate better scripting possibilities than Visual Studio Express.

Does anybody have experiences to share?

Really off topic: The other thing I would miss from my windows environment is HalfLife2 :) Does anybody have any experience getting H/W acceleration under Virtual Box? That's the only way I can thing of to make it work under Ubuntu (don't tell me to use Wine -- I've had bad experiences regarding that software).


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

I've been running Ubuntu on my main dev-box for about a year. There's an installation of vista for the odd game, but I rarely use it anymore.

Suggestions: go with the amd64 version. Install VirtualBox from virtualbox.org and install XP on it. For best results, configure your VM to use 1GB of RAM (assuming you have 2GB or more). You'll need about 12GB of hard disk to run a typical installation of VS2008 (I tend to use 16GB-20GB to leave some room for updates etc). After this, you can use VirtualBox in seamless mode, which integrates open windows with your desktop - not very beatiful (ugly XP themes), but it works fine.

Regarding Ubuntu itself, make sure you go to System -> Preferences -> Appearance -> Fonts and select "Subpixel smoothing (LCDs)". This will greatly enhance appearance (font quality is easily superior to windows). For best effect, download the droid fonts and use these on your desktop. I'm not sure if its license allows this, but the Consolas font is a very good programming font.

(To install fonts, simply create a .fonts directory in your home, copy them there and logout/login (or type "fc-cache -fv" in a terminal)).

[MonoDevelop]
I've been testing MonoDevelop 2 (alpha versions) and it actually does everything I want it to. *Much* better than MD 1 (code completion, code folding, graphical debugging and code analysis).

[Half-Life 2]
It should run perfectly under wine. VMs are not suitable for gaming, unfortunately.

Edit: some further suggestions.

  • Install Banshee as your media player (great program, uses Mono).
  • Run Ubuntu instead of Kubuntu. While the latter works great, KDE/QT4.4 currently suffer from a font rendering bug that cause them to use either full or no hinting (both look awful - slight hinting with subpixels is the way to go).
  • Create a separate partition for /home. This way, you can reinstall/upgrade without fear of losing your files and preferences.

Edit 2: Spelling mistakes.

objarni's picture

Fiddler: horray! Thanks for all helpful tips now I've got homework to do heh

Entropy's picture

Actually I'm glad someone asked about this, as my XP installation managed to break itself last week and until I can get hold of another Xp installation disk (mine is horrendously scratched), I'm running (and struggling slightly with)Ubuntu amd-64. I'll take all the advice offered above myself, though I might wait until Monodevelop 2 enters beta before trying it out.

As an aside/continuation of the Ubuntu question, can anyone give me advice on how I can configure it for OpenGL support? When I try to build an OpenTK project on it in MonoDevelop, I get errors to the effect that OpenGL32.dll is missing, and I'm not sure where to put it and how to register it. Also, I don't think I've got my ATI card configured for 3D in Ubuntu yet - it took me 2 evenings to get my dual monitor setup working properly with Big Desktop.

the Fiddler's picture

[OpenTK.dll error]
Make sure "OpenTK.dll.config" is present alongside "OpenTK.dll". This instructs the Mono runtime to substitute opengl32.dll (which is windows-specific) with the correct library on linux.

You can get this file from the opentk releases.

[MonoDevelop 2]
Better wait, the alphas are usable but have several bugs.

[3d support]
I take it that you have enabled the closed drivers? What is the output of "glxinfo | grep direct"? Do you get 4-digit numbers in glxgears? If yes to both, you have 3d support. :)

I know the pain of configuring a big desktop with ati (it was even worse with older drivers). In my experience, the "aticonfig" utilty is the easiest way to get this working.

JTalton's picture

On Ubuntu go into System-Preferences-Appearance-Visual Effects. When you turn them on, Ubuntu will check to see if there is closed drivers for your hardware and install them.

As for MonoDevelop, I really, really want to use it, but 2.0 is the only version with a debugger and it is currently buggy. Also it still needs some of the bells and whistles that Visual Studio has.

Entropy's picture

[3D Support]
In glxgears, I'm consistently getting around 250fps. Intriguingly, glxinfo | grep direct returns : 'No (LIBGL_ALWAYS_INDIRECT set)'. Any idea how I can change that? I'm not having much luck on the Ubuntu forums.

the Fiddler's picture

Which version of Ubuntu are you running? Which video card? Have you enabled the closed drivers (as per JTalton's suggestion?)

It's possible that you have a video card that is not well supported by the open drivers yet (e.g. hd3000 or hd4000 series).

Edit: go to System -> Administration -> Hardware drivers and check whether your video card is listed there.

Entropy's picture

I'm running Ubuntu 8.10 (Intrepid). The Hardware Drivers window displays my proprietary ATI/AMD FGLRX driver, and it's activated (thanks for the tip, JTalton).

My graphics card is a Radeon X1950, which should be old enough be be supported?

flopoloco's picture

I am also very positive about going Linux these days, as far as I see the Ubuntu distribution is the most popular for home users. In any case or another I want to play safe in the beginning and use a virtual machine via Windows.

Regarding the IDE, I think that MonoDevelop is a port of SharpDevelop. I use SharpDevelop in daily basis and I love it, it's features are equal to Visual Studio and it cost only 16MB of space. It defenitelly suits your needs. :)

the Fiddler's picture

[X1950]
This is one of the best-supported cards actually. What makes this issue odd, is that I have the same card and it worked with Intrepid x64 from the get-go, no tinkering required. I've since upgraded to a 4850, which also works fine.

This may have something to do with the big desktop setup. I've never had problems with this, but several people have reported losing 3d acceleration with specific setups. If you run "aticonfig --initial" and logout/login, is 3d acceleration still missing? (Backup your xorg.conf first).

If you do not mind being limited to GL 1.3, you could also deactivate fglrx and fall back to the open drivers. They might work better, since Ubuntu shipped with a beta version of fglrx - you can try fglrx again once 8.11 is released later this month.