Board index FlightGear Development New features

Simple FG GUI front-end for Linux

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Simple FG GUI front-end for Linux

Postby erobo » Mon Nov 02, 2009 11:54 am

Hello,

Image
I wrote some time ago a simple GUI front-end for FlightGear. It was written in Python and it takes slightly different approach than any other such application known to me - it combines a simple GUI which allows you to select a plane, airport, runway, park position or scenario with text window where you can write more advanced command line options that will be passed to FlightGear. I know, it sounds like crazy idea, but I have found it to be quite convenient solution (at least for me :) ).

Be aware that I'm a complete amateur when it comes to programming. That is why I can't guarantee this software will meet you expectations regarding usability or even run on your system. I tested it on Debian and got reports that it run on Ubuntu. Having said that I presenting it here in hope it will be useful for some of you anyway.

Regards,
Robert

UPDATE:
The software can now be downloaded at this address: http://sites.google.com/site/erobosprojects/flightgear/add-ons/fgo
Last edited by erobo on Wed Aug 25, 2010 8:25 am, edited 8 times in total.
erobo
 
Posts: 98
Joined: Wed Mar 19, 2008 11:10 pm
Location: Poland

Re: Simple FG GUI front-end for Linux

Postby martin » Mon Nov 02, 2009 6:20 pm

Hi Robert,

erobo wrote:I wrote some time ago a simple GUI front-end for FlightGear. It was written in Python and it takes slightly different approach than any other such application known to me - it combines a simple GUI which allows you to select a plane, airport, runway, park position or scenario with text window where you can write more advanced command line options that will be passed to FlightGear.


Being a command-line 'veteran' I like this approach very much: Entering the GUI terrain for known good reasons while still respecting the command-line tradition.
Just one note from my end: Would you mind adding a TerraSync-starter plus the respective FlightGear command-line switch like the respective GUI front-ends on Windows and Mac do ?

Cheers, Martin.
FlightGear Scenery Release Manager
martin
 
Posts: 666
Joined: Thu Feb 15, 2007 9:03 am
Location: EDLN

Re: Simple FG GUI front-end for Linux

Postby MAKG » Tue Nov 03, 2009 12:41 am

Just so you guys know, you're reinventing the wheel.

fgrun does all the things your trying. And it works great under linux (I use it all the time).
MAKG
 
Posts: 1156
Joined: Sun Oct 19, 2008 6:11 pm
Location: California Central Coast

Re: Simple FG GUI front-end for Linux

Postby erobo » Tue Nov 03, 2009 8:31 am

Hi Martin,
martin wrote:Just one note from my end: Would you mind adding a TerraSync-starter plus the respective FlightGear command-line switch like the respective GUI front-ends on Windows and Mac do ?

I forgot to mention in first post but this software already supports TerraSync. You can turn it on and off using simple checkbutton. Respective FG command is added automatically.

Robert
erobo
 
Posts: 98
Joined: Wed Mar 19, 2008 11:10 pm
Location: Poland

Re: Simple FG GUI front-end for Linux

Postby erobo » Tue Nov 03, 2009 9:00 am

Hi MAKG,
MAKG wrote:fgrun does all the things your trying. And it works great under linux (I use it all the time).

Yes, fgrun is a great tool and I have been using it a long time. I felt however I need something simpler, faster and less recourse hungry than fgrun. My approach was that I don't really need to have 3D Aircraft preview or GUI to set up advanced options (like: window geometry or multiplayer). Instead I need simple and fast FG launcher with ability to pass to FG any more advanced command-line option. I know, this approach may not appeal to all users (or even to anyone but me :) ), but this is in my opinion something different from fgrun. So no, I don feel like reinventing the wheel. :wink:

Robert
erobo
 
Posts: 98
Joined: Wed Mar 19, 2008 11:10 pm
Location: Poland

Re: Simple FG GUI front-end for Linux

Postby FlugHund » Tue Nov 03, 2009 10:56 am

Hi Erobo,

erobo wrote:... faster and less recourse hungry than fgrun.

That is exactly the reason I don't use fgrun anymore. My system has only 1 GB RAM, starting FG from the command line is noticeable faster than with fgrun. Because I am too lazy to write something like this on my own I am stuck to .fgfsrc now. I really appreciate your work, Robert, and I will give this alternative to fgrun a try.

Don't get me wrong about fgrun, it is really a great tool and I was really happy to have it to get used to FG. But on this oldish PC it is just overload.

Greetings
Alex
User avatar
FlugHund
 
Posts: 519
Joined: Thu Mar 01, 2007 3:27 pm
Callsign: D-HUND
IRC name: D-HUND / debdog
Version: next
OS: Devuan

Re: Simple FG GUI front-end for Linux

Postby hovkid » Tue Nov 03, 2009 1:51 pm

Looks good! This should be realy helpfull to people with lower spec computers.

Hovkid
Fav Airliner - MD81 - Fav Fighter - F4J76 - Fav Light Aircraft - DHC2
User avatar
hovkid
 
Posts: 928
Joined: Tue Sep 01, 2009 10:20 am
Location: Gloucester, UK
Callsign: GB-TYER or AA-124

Re: Simple FG GUI front-end for Linux

Postby karla » Sat Nov 21, 2009 10:53 am

Thanks Robert, your front end GUI really made my FG experience much more enjoyable. I tried installing FGRun a couple of times without success (only three months with Ubuntu) but managed to get FGo up and running after sorting out where the various paths where (like I said, three months with ....).

I've added --nmea=socket,out,0.5,[pc ip],[port],udp for Atlas and --prop:/sim/sound/voices/enabled=true for Festival TTS.

Thanks.
Piper Cub, B777-200ER mods, EGGD, EGKK, KSFO T2
User avatar
karla
 
Posts: 194
Joined: Thu Nov 19, 2009 10:01 pm
Location: Hampshire, UK

Re: Simple FG GUI front-end for Linux

Postby erobo » Sat Nov 21, 2009 3:34 pm

Thanks karla, I'm glad you like it. Its worth to mention that you can type in console: fgfs --help --verbose to see list of others useful options you can use.

BTW.
This post reminds me that I forgot to mention in readme file that to be able to run this software you need Python Imaging Library (PIL). Sorry if you had any problems with installation because of that. Documentation is now updated.

Regards,
Robert
erobo
 
Posts: 98
Joined: Wed Mar 19, 2008 11:10 pm
Location: Poland

Re: Simple FG GUI front-end for Linux

Postby kg6rtr » Wed Nov 25, 2009 11:21 pm

Hi erobo,

I tried to use your program, and it didn't work. The error I received is as follows:

"[kg6rtr@bloemberger fgo]$ python fgo.py
Traceback (most recent call last):
File "fgo.py", line 1515, in <module>
app = App(root)
File "fgo.py", line 249, in __init__
self.colorText()
File "fgo.py", line 322, in colorText
endline = comment.split('.')[0] + '.end'
AttributeError: '_tkinter.Tcl_Obj' object has no attribute 'split' "

I checked the dependencies in your README file. I use a Fedora 10 64-bit distro, and the following programs are installed on my system:
FlightGear 1.9.1
Python 2.5.2
python-imaging 1.1.6
python-imaging-tk 1.1.6
tcl/tk 8.5.3 (both x86_64 and i386 packages)
tkinter 2.5.2

I don't know how to solve the problem. I tried to install different other programs (for example, all the "i386" versions of the programs in the dependency list), and it still didn't work. Any help would be greatly appreciated. fgrun "eats" 70 MB (!) of my computer memory whenever I run it. Not cool.

Thanks,
kg6rtr.
Ferdi B.
KG6RTR
kg6rtr
 
Posts: 17
Joined: Sat Jun 06, 2009 9:42 pm

Re: Simple FG GUI front-end for Linux

Postby erobo » Thu Nov 26, 2009 8:37 am

Hi kg6rtr,

It seems to be some problem with tcl/tk libraries (or somewhere between tkinter and tcl/tk). I'm using older version of tcl/tk (8.4.19), and can't test if my solution actually works, but patches you will find at this address could help: http://sites.google.com/site/erobosfiles/.
Site contains two patched versions of fgo.py file. Unpack first one to fgo directory (replace the old file), and see if program runs. If not, unpack second version and try again.

Let me know if this helps,
Robert
erobo
 
Posts: 98
Joined: Wed Mar 19, 2008 11:10 pm
Location: Poland

Re: Simple FG GUI front-end for Linux

Postby kg6rtr » Sun Nov 29, 2009 1:24 am

Hi erobo,

I followed your instructions, and downloaded both patched files. The first one (fgo.py-version1.tar.gz) didn't work (I pasted the error message below in case you want to analyze it):

"[kg6rtr@cessna182 fgo]$ ./fgo
Traceback (most recent call last):
File "fgo.py", line 1516, in <module>
app = App(root)
File "fgo.py", line 250, in __init__
self.colorText()
File "fgo.py", line 323, in colorText
endline = comment.split('.')[0] + '.end'
AttributeError: '_tkinter.Tcl_Obj' object has no attribute 'split' "

However, the second patch (fgo.py-versio2.tar.gz) worked all right. I could set it up, and run FG from it. When I looked at the memory being used by fgo!, I couldn't believe it: 164 kB. Wow!
The interface is very friendly, it has a command line for people like me, who want to have a command line option (not just GUI) and better control over the options, and the setup was a breeze. My personal conclusion is: fgo! is great!

Thank you for your contribution to Flight Gear. I am really grateful for your help and your program! Even though I have lots of computing power, I still don't like to waste resources.

Ferdi
KG6RTR.
Ferdi B.
KG6RTR
kg6rtr
 
Posts: 17
Joined: Sat Jun 06, 2009 9:42 pm

Re: Simple FG GUI front-end for Linux

Postby stuart » Sun Nov 29, 2009 7:10 pm

Hi Erobo,

Great work!

As a GUI front-end this is just about perfect for me. As others have said, it provides just the right level of UI help, while still allowing command-line options. I particularly like the re-use of the thumbnails.

I think it might be worth putting this into CVS, possibly under utils?

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1469
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: Simple FG GUI front-end for Linux

Postby erobo » Wed Dec 02, 2009 12:34 am

Hi kg6rtr,

Thank you for your detailed report, it will surely help to improve the software. I'm glad that second patch worked for you. Unfortunately, second patch just disables colored text, so you will not be able to see colored comments in text window. As I'm unable to reproduce this bug on my machine I can't do much better right now. Sorry. :(
kg6rtr wrote:When I looked at the memory being used by fgo!, I couldn't believe it: 164 kB. Wow!

I can't believe it either. :) On my system it uses between 9.5 and 11.5MB (that includes all libraries used by this program). It's not so small, but it's better than 70MB+ for sure.

Thank you,
Robert
erobo
 
Posts: 98
Joined: Wed Mar 19, 2008 11:10 pm
Location: Poland

Re: Simple FG GUI front-end for Linux

Postby erobo » Wed Dec 02, 2009 1:16 am

Hi Stuart,

stuart wrote:I think it might be worth putting this into CVS, possibly under utils?

If you think it's worth to put this GUI into CVS, I'll be happy if you do so. But take into consideration that I'm not professional programmer, and code quality certainly differs from common standards. You've been dealing with my code previously, and you surely know what I'm talking about. :wink: But if you would like to put it into CVS anyway, please contact me. I'm right now testing some changes to the program, and will be happy to provide you most recent code.

Regards,
Robert
erobo
 
Posts: 98
Joined: Wed Mar 19, 2008 11:10 pm
Location: Poland

Next

Return to New features

Who is online

Users browsing this forum: Applebot [Bot] and 2 guests

cron