LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-13-2015, 04:51 AM   #1
DavidBrenner
LQ Newbie
 
Registered: Apr 2013
Distribution: Fedora 18 686
Posts: 18

Rep: Reputation: Disabled
create a GUI in C that would work in any Linux distro


Hi.

I want to create a Linux GUI for a Grub4Dos installer. Preferably using C and gcc as compiler.
You can find the C code of the console tool + the Windows GUI here: http://reboot.pro/topic/20238-improv...11#entry191228
I can create the console tool (grubinst) using the "make" command but most of the code from grubinst_gui can be used only in Windows.

The GUI must work in any Linux distro, without having to install additional software or to (re)compile it.

Which Linux IDE I can use for this?

What I've tried so far: Code Blocks with wxWidgets. But it works only with wxWidgets installed.

My OS: Fedora 21 x64 KDE.

Thank you for any help.

Regards,
David
 
Old 03-13-2015, 05:34 AM   #2
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
I would go with GTK or Qt. Pretty much the standard GUI toolkits, shipping with most desktop oriented distributions. My personal preference is Qt.
 
Old 03-13-2015, 05:50 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
1. The IDE has nothing to do with this question.
2. There are linux-boxes without graphics, so your program won't work on every linux-box.
 
Old 03-13-2015, 11:15 AM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,224

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by DavidBrenner View Post
The GUI must work in any Linux distro, without having to install additional software or to (re)compile it.
If you're distributing binaries, then this isn't even a consideration. You just include the dependencies with the download.

Taking that requirement literally, however, I'd recommend giving it a text-based interface using ncurses (which is universal) or s-lang, instead of using a GUI toolkit.

Last edited by dugan; 03-13-2015 at 11:29 AM.
 
Old 03-13-2015, 11:52 AM   #5
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
If you wanted a real GUI, I would say gtk or gtk2 would be your best bet. They are likely to be installed on nearly all Linux systems.

If the Linux system did not have Xorg, then you would go with ncurses as dugan suggests.
 
Old 03-13-2015, 03:46 PM   #6
Blizzard
Member
 
Registered: Oct 2007
Location: Italy
Distribution: Linux Slackware 14.1
Posts: 35

Rep: Reputation: 1
GTK are usually more wide spread than QT. Maybe, for maximum compatibility you may think to divide the logic from the interface and once the program logic is developed, you can implement various interfaces: from GTK to, at least, ncurses that will works everywhere.
 
Old 03-13-2015, 04:55 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
ncurses

but WHY ??? "Grub4Dos"

the last update for that was back in 2009

so no secureboot or uefi support

so no new post 2012 hardware
 
Old 03-14-2015, 01:16 AM   #8
DavidBrenner
LQ Newbie
 
Registered: Apr 2013
Distribution: Fedora 18 686
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you, guys.

Well, I tried QT creator.
The form designer does not seem to work. And I don't see any list of controls I can add (see the screenshot).
Also I searched in menus/options and Google, but couldn't find how to compile a x86 ELF instead a x64 ELF (the OS is x64).

As for other advices: since I'm not a pro in Linux I could not understand them 100%.

Quote:
Originally Posted by John VV View Post
ncurses

but WHY ??? "Grub4Dos"

the last update for that was back in 2009

so no secureboot or uefi support

so no new post 2012 hardware
Actually the last update was 11 days ago: https://github.com/chenall/grub4dos
Attached Thumbnails
Click image for larger version

Name:	snapshot1.png
Views:	19
Size:	89.9 KB
ID:	17780  
 
Old 03-14-2015, 05:11 AM   #9
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Perhaps in some years BIOS would be history and UEFI only remaining.

DOS depends on BIOS for it's working (BIOS Interrupts). And it also adds it's own interrupt to this list.

But you can still use DOS in Qemu or VirtualBox or a dedicated machine.
 
  


Reply

Tags
gui, ide



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot get GUI on any linux distro (live, install gui nor post install) 8800GTX AlteRFirE Linux - Desktop 1 07-08-2008 04:08 PM
how to create a GUI for a C++ application running on linux 64 and AMD turion64 fantomas52 Linux - Newbie 7 05-11-2006 08:54 PM
create Linux distro masand Linux - Distributions 4 05-15-2005 10:05 PM
which linux distro has a GUI? db85usa Linux - Newbie 16 02-03-2005 08:13 PM
Best Linux distro for GUI use? BajaNick General 14 12-16-2003 09:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration