Click here to Skip to main content
13,347,462 members (54,087 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i am a senior programmer on C# and java over windows

i want to make gui programs to work over linux

i know that java do this but i want another language that make gui too to be learned

some people ask me to learn python. is python can make gui easily ? and what is the program that i can compile it using, like VS 2010 for c#
Posted 21-Sep-12 9:24am
Sergey Alexandrovich Kryukov 21-Sep-12 14:36pm
You can certainly do development using all of the languages you mentioned (I would add Free Pascal, especially close to you if you understand .NET well), but my advise might be better; and it might surprise you: use C#.
amir tarek 21-Sep-12 14:57pm
how to use C# on linux?
and how pascal near .Net? i think pascal as i studied it before is lower than C
Sergey Alexandrovich Kryukov 21-Sep-12 15:05pm
Pascal is not lower, God forbid! And Object Pascal is OOP like .NET, more powerful in some aspects. Never heard of Delphi? This is a direct .NET predecessor.

But I'm talking about multi-platform Free Pascal. Same story: you can write one code, execute on different platforms (but with recompilation). It's not for .NET or Mono (not for CLI), its for native platforms where it is implemented. Very good thing (please see my comment about Double Commander below.)

About C# on Linux -- I answered in full in my solution 1. Please see. (And please accept it formally, "green button".) For you, it might be the best. And it's available for Linux for a long time already, how could you miss this information?

amir tarek 21-Sep-12 15:13pm
mmmmmmmmm no i never heard about Delphi i will see it

i will read your answer and see these links

thank you for interest
pasztorpisti 21-Sep-12 14:57pm
If freepascal is an option I would mention Lazarus "the crossplatform delphi". That is also a nice option if its about rapid gui development.
Sergey Alexandrovich Kryukov 21-Sep-12 15:07pm
Absolutely. Do you know on-going open-source project Double Commander (multiplatform)? It has some remarkable project, intend to beat the excellent (the best in my opinion) Total Commander (perhaps mostly in cross-platform feature). Double Commander is multiplatform UI thanks to Free Pascal.
pasztorpisti 21-Sep-12 15:44pm
That shounds awesome becuase few years ago I was searching for a "Linux Commander" and my findigs weren't satisfactory. I will check out how they are doing with that project! Thanks!
EDIT: I'm also a (Windows) Total Commander fun. Usually thats the first program I install after a fresh windows installation.
Sergey Alexandrovich Kryukov 21-Sep-12 17:56pm
This is exactly why I use Double Commander on Linux (and try it on Windows where I have licensed Total Commander). One of its goal is to be very close to well-thought Windows Commander / Total Commander (Deplhi). Double Commander is only half-done and has bugs and glitches, but even now it's better then any other file manager I ever saw (and I tried very many).
pasztorpisti 21-Sep-12 18:04pm
Thats really promising, on monday I will throw it into my Ubunto VirtualBox at work! Its also very nice that they support the total commander plugins! Thanks for the tip!
pasztorpisti 21-Sep-12 14:54pm
About python - its my favorite scripting language. I use it for automation (max 1-2000 line scripts) and to write small use once throw away scripts to perform otherwise robot work quickly. Its also nice for web development and for a lot of other things, smaller networking utilities/automatization stuff. Despite this my own opinion is that a ducktyping language like python shouldn't be used to write a large sized project as a lot of errors become runtime errors that could be easily cought at compile time with a strongly typed language and this makes development/maintenance much harder. If you want to run python code over the .Net environment then try ironpython, mono also supports some ironpython versions.
amir tarek 21-Sep-12 14:59pm
so as i understand from your words i can make gui application using python but not large programs

but is ironpython run on linux? and what about i want to make large program?
pasztorpisti 21-Sep-12 15:08pm
You can make large programs with python, its just my opinion that it seems to me much harder to maintain a big chunk of codepiece in python because of ducktypeing. I love that language but only up to a limited code size per program. Its quite effective to solve relatively complex problems with short code and it has a very nice library support.
Ironpython compiles your python code to .net binaries so you can run your program on top of mono on any os where mono runs. I think for now you should go with C#, still if you have time learn some python because knowing a powerful scripting language like python is very handy somtimes, you can spare hours of work with it in some cases. An important thing is that python interpreters are available on so many platforms! From windows to linux/macosx/embedded systems and so on...
Sergey Alexandrovich Kryukov 21-Sep-12 15:17pm
I added another answer on Python GUI development on Linux -- please see. Still, as it is used as the interpreting language, the problems you mentioned apply.
But you should understand that they do not apply to IronPython, as every .NET language is compiling. From this side, no hassles in larger-scale project development... :-)
pasztorpisti 21-Sep-12 15:31pm
Because of the tooling and the previous experience of the OP your first solution is probably the way to go. Still I would encourage the OP to learn python becuase a true programmer should be armed with at least one nice scripting language like python (to save tremendous time and to have some fun). :-)
Sergey Alexandrovich Kryukov 21-Sep-12 17:50pm
I full agree and would recommend OP the same.
pasztorpisti 21-Sep-12 19:01pm
The normal pyhton is also compiled, and it has a normal and an optimized compiled version. I havent tried IronPython because it cant be install to my antique XP machine at home but I guess the same runtime errors will apply to .net as well. Python is too dynamic to statically check certain things. Even the namespaces and objects are like dictinaries, I can read in a list of variable names and values from text files and put them to the global or local namespace. Or as an example, lets say I pass an object to a function as a parameter and the function prints the 'x' member of that object to the console. I can instantiate an arbitrary object lets say I put the reference to it to the obj variable and then I ask you from the console for the name and the value of the member and the I say setattr(obj, member_name, value). If you type in 'x' for the member_name then the code doesn't crash when I call the magic function by passing in the object, otherwise it does. This and any other similar problems (basically polymorphism) can not be checked in python in many cases.
Sergey Alexandrovich Kryukov 21-Sep-12 19:03pm
Sergey Alexandrovich Kryukov 21-Sep-12 15:10pm
IronPython of for CLI (.NET), should work for Mono -- check it. It is compileable and can be used for bigger project. With .NET, it's more oriented for Web development though.
Sergey Alexandrovich Kryukov 21-Sep-12 15:01pm
I like Python, too, but I used it mostly for batch scripting on Linux (bash cause me a headache) and for some Web development with WSGI, both mostly for development of developer's service for a team. Not bad at all. Of course I agree if you say that compiling languages are much better for development of any serious scale. IronPython is also a good idea.
pasztorpisti 21-Sep-12 15:23pm
I don't like bash either (weird syntax, hard debugging) - I remember that debugging linux shell scripts was a nightmare. In python I just throw an exception and voila, the location of the 'crash' is known immediately. :-) I love python for its superb simplicity and typeset and the way its armed with high level stuff like serialization, threading, exceptions, and so on...
Sergey Alexandrovich Kryukov 21-Sep-12 17:52pm
Conceptually, Python is pretty clean and academic. And if you remember that it's created in an opposition to Perl... Mm-yes...
pasztorpisti 21-Sep-12 18:12pm
Long ago I learnt some perl from practical use because I had to. Few years later I wanted to learn it seriously from an ebook but when the first page started to advertise how cool when you can solve the same problem in an infinite ways I just stopped reading on. After using python to solve a few simple problems (general txt manipulating problems and some Blender3D scripting that employs python) I read a beginner tutorial, saw its super-simple grammar and just fell in love with it. Didn't like its tabbed blocks for first but quickly realized that for simple script-like programs thats the way to go! However I didn't know about the perl-python relation, but I know from practice that they are hell and heaven! :-)
Sergey Alexandrovich Kryukov 21-Sep-12 19:02pm
These "infinite ways" is one of the things I had in mind -- on point of Python's opposition declared in a typical Python manifesto ("only one way to do a thing" as opposite to Perl's "many ways" Perlists are apparently proud of. And those brainless followers... (in modern Internet-era Russian argo they started to call such people "hamsters" :-) And I didn't mind tabbed blocks in first place -- I keep pretty strict formatting style anyway... the "freedom" to format loosely is quite questionable...
pasztorpisti 21-Sep-12 19:18pm
Hamsters??? LOL :-) I've never understood the pride of perlists... What are they proud of? Their write only code? Unfortunately tabbed blocking can also be misused with a simple trick - I have already seen python code where tabbing was a mixture of tab and space characters and I dont like that even in C like languages. About the freestyle in number solutions and conventions/formatting - I totally agree. We started the current C++ project with a quite strict set a coding conventions - still, from most of the code I can tell you from small signs which of our 10 coders tampered the most in each cpp file. :-)
Sergey Alexandrovich Kryukov 21-Sep-12 19:30pm
I invented a good formatting solution for Visual Studio and C# to stop arguments of formatting. Of course, most files are never shared. But in rare cases when it happens, the rule is: the styles should be automatically formatted by Studio, even though all can have their own formatting rules, but they should be expressed in the text editor option. A person who make any modification has a full right to re-format the whole file and submit it. This is because the original author can reformat it back. Nobody can be hurt. On top of it, I always require something like commenting ends of blocks, consistent empty lines (there are not touched automatically). It works, for the piece on the team...
pasztorpisti 21-Sep-12 20:10pm
That works well if the files have their owners. Currently in our team when a new feature comes a free guy is picked to put that in to its place - this kind of "load balancing" is what goes on in our current project - I dont like it but our technical director wants this and I understand it to some degree because we are in lack of coders and its very hard to find a good one. This way always reformatting the whole code for even a single line of modification would make our source control unusable when we want to track back changes. However with some java projects I remember that we could split the project to packages nicely so this free-form formatting could work, and we had enough ppl to avoid "load balancing". With one of the java projects we used a fixed eclipse source formatting setting and we agreed to format the code always before uploading. That also worked like charm however java too has a standard formatting ruleset that is followed by the majority of coders fortunately and I never had formatting problems in java. I think C# is quite consistent as well thanks to the nice IDE however I worked only on one-man C# programs. :-D
Sergey Alexandrovich Kryukov 21-Sep-12 20:26pm
You are right about single owner, but I describe the measure for the rest of cases only. And my approach is not free formatting. It's multiple-mode strict formatting, do you see the difference. So, speaking of Python... :-)
pasztorpisti 21-Sep-12 20:29pm
Yep, thats fair enough! :-)
Sergey Alexandrovich Kryukov 21-Sep-12 20:49pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you have some experience with C#, I would recommend the following: develop your application on Windows for Microsoft.NET. Use System.Windows.Forms (not WPF, not Metro). If your application does not use any Windows-specific code (like direct manipulation with Windows messages), no P/Invoke, and is in general confined to the standards (Form is itself a non-standard library, but you can use it, you can also use ADO.NET and something else, but most of the code should be based on standard CLI BCL,[^]), you can run such application on Linux without re-compilation!

How? Well, with Mono:[^],[^].

I usually do it in three steps: 1) develop or update code using Visual Studio on Windows; 2) test it under Mono on Window; 3) test it on Linux or other platform under Mono.

[EDIT #1]

If you need to develop it in Linux, the available IDE is MonoDevelop:[^],[^].

It is available on Linux, and also on Windows and other platforms. On Windows, you can also use #develop:[^],[^].

What's good about this one? You can use it to develop UI with a different library, GTK#, which is also multi-platform and has better compatibility of different platforms. Naturally, it is based on GTK, also available for all these platforms:[^],[^],[^],[^].


Mono is available for a number of platforms: Windows, Linux, Mac OS X, iOS, Android and more.

[EDIT #2]

By the way, see Solution 2 about Qt. Not only this is another multi-platform UI library, mostly for C++, but it is also comes CLI-wrapped (or a port, I'm not sure), so you also can use it with Mono on both Windows and Linux (and other platforms).

Please see the available bindings here:[^].

Look at the Mono UI toolkits in general:[^].

You will be fine on Linux, don't worry… :-)


pasztorpisti 21-Sep-12 14:45pm
5ed, this is definitely the way to go because of the tooling.
Sergey Alexandrovich Kryukov 21-Sep-12 14:46pm
Thank you.
amir tarek 21-Sep-12 15:19pm
mmmmmmmmmmm is this really? with this mono or monodevelop i can develop programs for linux using c#? this is great i will try this
Sergey Alexandrovich Kryukov 21-Sep-12 15:30pm
Absolutely real. Actually, most of the applications I write on Windows do run on my Linux boxes. Without any extra effort. Without recompilation. You only need Mono, not MonoDevelop (which you might need only if you don't want to develop on Windows).
You only should be careful to avoid anything platform-specific.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

[In response to Python discussion in the comments to the question:]

Python could be considered as another alternative for UI development (except for Web development) on Linux. Please look at the set of UI toolkits you could use:[^].

Just in case, on Web development see also:[^].


As you actually can use IronPython on Mono, it can also be used to develop Linux applications to run under Mono:[^],[^],[^].

By the way, all CLI applications on Mono are started with the command line like
mono MyApplication.exe

pasztorpisti 21-Sep-12 15:30pm
+5, All my python gui programming consists of popping up a yes/no messagebox from an installer script with PyQt, lets consider that a proof of concept! :-)
Sergey Alexandrovich Kryukov 21-Sep-12 16:12pm
Thank you very much. Well, I would agree to consider it to be a proof of concept. :-)
Sergey Alexandrovich Kryukov 21-Sep-12 20:00pm
By the way, documentation confirms that IronPython can be used on Mono to do CLI programming on all platforms where Mono is available. I added the references to an updated answer, after [EDIT].
pasztorpisti 21-Sep-12 20:20pm
This makes an otherwise crossplatform language even more crossplatform and the access to .Net libraries can also come handy.
Sergey Alexandrovich Kryukov 21-Sep-12 20:40pm
Aha, "it's getting crossplatformier and crossplatformier..." :-)
pasztorpisti 21-Sep-12 20:42pm
:-) :-) :-)
Sergey Alexandrovich Kryukov 21-Sep-12 21:00pm
By the way, right now, people (including myself) are having a lot of fun over the question on the CodeProject mascot :-)
Please see or join:

pasztorpisti 22-Sep-12 7:57am
Thanks for the tip, made the start of my day much better. :-) My strict filtering hid that nice catch.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3[^]

If you know C++ you can try Qt framework
it provide all gui kits with the c++ framework

Sergey Alexandrovich Kryukov 21-Sep-12 15:33pm
Of course, but it could be harder for OP. Anyway, I voted 5.

However, Qt is also available for CLI, .NET and Mono, so it also can be developed using C#. Please see my answer.
Sergey Alexandrovich Kryukov 21-Sep-12 16:07pm
So, please see my answer and the update, [EDIT #2].

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 21 Sep 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100