• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Add and Support Your Own Distribution

Started by Donald Darden, October 21, 2007, 05:48:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald Darden

According to several authorities, there are ten significant or major Linux Distributions currently available.  Then there is BeOS, the Mac OS, Minix 3, Unix,
and I don't know what all.  In addition, we are in an age where you can also use VM (Virtual Machine) software to run a host OS, partnered with one or more guest OSes.  That's a big mix, and I hope to support some of that here with a forum that will allow members to add and expand on the basic categories that I've set up.  The two most obvious to me are Ubuntu, which is getting a lot of interest, and Knoppix, a very slick adaptation that first appeared back in 2004.

But you may have your own preference, and experience that could help others to decide to follow your lead or to strike out in another direction.  You might also want to pose questions here in hopes of finding someone that can assist you with whatever problems and issues you encounter.  And if you want to post polls or see if you have enough interest to form a SIG (Special Interest Group), that's okay too.

As you know, most posters on these forums are interested in PowerBasic, which at this time is only available for DOS and Windows.  PB/DOS 3.x has been used successfully within Linux with a DOS Emulator.  To date nobody has reported being able to do the same thing for PB/CC or PB/Win using a Windows Emulator (most think of WINE in this respect).  That does not mean it can't be done, but even if possible, there may be unresolved issues involved.

This is not nec3essarily a dead end for the BASIC programmer.  The possibility of using VM means that you can possibly run some version of Windows either as
host or guest operating system, and that can mean that you can still develop Windows apps that run in windows, regardless of what the host OS actually is.

VM may also be a lifesaver to anyone currently using Windows that dreads the
prospect of eventually being forced to move to Vista.  Less than 11 percent of the PC world is currently using Vista, and resistance to eventually being forced to move to it is growing.  Ultimately Microsoft may not care, as it makes money on the sale of any version of Windows, but there are so many PCs out there that are already licensed to run Windows XP, that a smart thinking person would be hard pressed to see any reason ever to buy a new copy of that old software.  And if you run Windows XP as a guest system, it is virtually immune to being hacked externally because the environment around it does not really exist.

It's something to think about.

Donald Darden

If you want another distribution to be set up in its own child board, just ask.

If you have some other bright ideas or suggestions, then comment or suggest.

Charles Pegge

After the initial culture shock, which may last a few months, Linux really is a very nice environment both for using applications and developing them. On the whole you are unlikely to find big differences between distributions, as most of them use X11 windows and the KDE desktop (or Gnome), and the Bash terminal. A distribution is perhaps more defined by what is missing than what is included.

Since we are all Powerbasic users here, it might be useful to look at some of the issues involved in porting between MS/PB and Linux/Freebasic. If I had to choose between Microsoft and Linux I would definitely go for Linux. MS is ahead on multimedia, but Linux is catching up fast.

Even after excluding MSWindows specifics, Powerbasic still has a richer function set than Freebasic and that could be used to advantage, should PB choose to offer a Linux version.


Donald Darden

PB/Linux is no longer mentioned as an objective of PowerBasic, and I believe that they will likely stick with the larger market that Windows commands.  But it is a big world out there, and even a small segment can be a substantial one.  So maybe they will change their minds in time.

Meanwhile, the beat must go on.  And while there are core elements common to all versions of Linux, there are distinctions as well.  How you measure and mark those distinctions could be of some interest to others.

FreeBasic is attractive because it can be used with several platforms.  The same can be said of other tools as well.  It's not even the only BASIC dialect available.  But FreeBASIC and PowerBASIC both are derivitives and supersets of the old QuickBASIC syntax and language, so share some commonality and are that much more attractive to some people.

What I am pointing out is that Windows is merely one option, though at this point the most prevalent, and also a given for most people contemplating the use of PowerBasic.  It may not always be that way.  In fact, it may be that you can work things around so that you can have the best of all worlds, and not continue to worry and wait for the day that PowerBasic decides to venture in the same direction.

If you plan to wait until PowerBasic releases a PB/Linux version, then make the move to Linux yourself, you are going to be frustrated because you will not be ready for new environment that will present itself.  Does that make sense?  If
you consider PureBasic as a premise for argument, which is one of the BASICS
that can be used with multiple platforms, then you should realize that many
features accessable from that BASIC are platform dependent, and that the
largest number are only available in the Windows world.  There is a reason for that, which is that the Windows world provides the most extensive and well documented set of APIs currently available.

Which means, dear friends, that it is unlikely that PB/Linux will have the native power of PB/CC or PB/Win, unless somebody writes a whole lot of new functionality for Linux that either it currently lacks, or which is not well documented or understood.  So wishing for it is not going to make it happen, and waiting for it could be a major disappointment down the road.

But we can do something about the environment, and again that is the point I am trying to stress at this time.  We have options, so let us consider them.  And what we learn now will be there at a later time when we might need that information.  Better to venture than to merely sit and wait.

Charles Pegge

For console programming, moving to Linux is very straightforward, and shuttling between the two systems, as I do on a daily basis, compiling Freebasic in Linux then in Windows is almost a seamless process. I can do this without changing a single line of code.

For multimedia programming I am locked into Windows for the time being, one of the problems is the ITX hardware in my low-powered Linux box. A fully fledged PC box with a mainstreeam graphic card should resolve that. Then most of the GUI can be handled using Opengl, which I hope will radically reduce OS dependencies.

Translating code between Powerbasic and Freebasic is a significant hurdle, but can, I believe be automated efficiently, if the programmes structures are kept as simple as possible. I am using a form of 'Pidgin Basic' in my own programs to make this easier.

Most of the changes required are trivial like using '!' before assembler instructions, but there are more subtle ones like GET and PUT with binary files, and not forgetting about the decoration of function names in DLLs.
A board on this subject would be helpful to anyone who needs to move between these two BASICs as well as  between MS and Linux.


Donald Darden

#5
The similarities between FreeBasic and PowerBasic are superficial.  Yes, many statements appear pretty much the same, but the underlying structure, the matter of specific syntax rules, and the lack of exact parity in instruction sets, variables, and other elements means that considerable rework is required to make source code for one compile with the other.

I agree that a discussion area or board related to the similarities and differences in FreeBasic and PowerBasic could be of some value.  I know that often, people have looked for some convenient way to convert source code intended for one compiler to try and make it compile properly with an other.  We see this effort or interest when it comes to moving from QBASIC or QuickBASIC to any other variant, or between various new BASIC compilers.  Heck, we even see peope wanting a quick and easy way to move C and C++ header files to PowerBasic.

So why can't we make it happen?  Well, the answer is, too many differences exist, and as everyone who programs knows, we can only write effective programs when we have fully understood the task before us and can render a comprehensive result into exacting code.  You write a successful program, then spend the life of the contract to figuring out how users manage to break it, and work to make it more and more bulletproof with further code, traps, and filters.  With all its resources and money, Microsoft still can't write an operating system that is without defect and unexploitable by hackers.

The alternative is to do what you are doing, which is limit yourself to a very small subset of instructions that are largely alike between two or more versions of BASIC, but that also means programming with a handicap.  I once knew an exceptional Maintenance Programmer (a person that writes test and diagnostic programs to test out hardware and report problems) that deliberately limited his repertoire to perhaps 30 essential instructions out of hundreds that were available.  His programs were consequently larger is size, since they were not optimized for speed or to take the best advantage of the computer instruction set, but they were familiar and easy to read, minimalistic in terms of number of instructions and complexity, and the resulting programs were outstanding in terms of how well they worked and did their job.  It was like watching an artist that could use any medium, any material for his artwork, and deciding to do a series of drawings in charcoal instead of oils.  This man was a true artist, and the limitation he imposed on himself was only a way of underscoring that fact.

So, yeah, sure.  If someone wants to study the differences between one language and another, that's valid.  If someone else wants to devise a minimalist way of programming that is compatable with more than one compiler, that's good too.  And if anyone creates a tool that does a good job in converting code from one dialect of a language to another, that would be worth putting on the forums for others to access, that would be even better.

But differences between languages, operating systems, and virtual machine software are different categories to be addressed.  We may have to shuffle the categories around in order to consolidate interest into particular areas.

Charles Pegge

One of the virtues of using a reduced instruction set BASIC is being able to add another layer for higher level programming. And as proof-of-concept one of the challenges I have set myself in the R$ project is to be able to translate its own source code into either Freebasic or Powerbasic without manual intervention. A yet more demanding challenge is to translate an R$ script into efficient Basic source code where the programming model is radically different, particularly the scoping rules.

To expedite this project, it has been essential to travel light and eliminate redundant constructs so the only control structures i use are IF THEN END IF DO CONTINE EXIT LOOP GOTO. ELSE and CASE might be considered for final optimisation but they often disrupt the logical extensibility in a program.

I hope some useful translation tools will eventually emerge from this. R$ and a few useful scripts only took 1 month to write from scratch, so I am optimistic.


Donald Darden

Having allowed this above posts stew on their own for awhile, and nothing said by others to change the flavor or thrust thus far, I will proceed to address this thread as a generic base for discussing aspects of using Linux as an alternative category, with specific distributions and alternatives as child boards.  In other words, comments, issues, and observations related to Linu8x distributions in general will be discussed on this thread,

To begin with, let's assume you have moved beyond the stage of acquiring a live CD and booting it, and have installed that distribution on your hard drive.  If you haven't gotten that far, look for your distribution as one of the child boards here, or pursue that course elsewhere first.  Then come back.  Because having your Linux distribution on a hard drive is pretty much necessary if you are going to be making changes or updates.

Linux distributions tend to fall into three groups:  Debian distributions, RPM distributions, and others.  Debian distributions, like Debian, Knoppix, and Ubuntu, can be updated using the .DEB package concept, which automatically find supporting libraries as needed during updates.  RPM distributions, such as Red Hat, Fedora, and Mandrake, do not automatically find supporting packages, so the sequence of updating may be more critical when it comes to adding new libraries.

Everything about each distribution of Linux is under constant review and modification, and major.minor updates are only occasional.  But if you want to make sure you always have the latest and best that is out there, you can attempt an update as you see fit.  This is a manual step, not something that happens whenever your Windows or Microsoft Updater software kicks in.  Since I am only dealing with two debian distributions at this point, I will only cover how you can do this with them.  If the method is different for RPM, I will let someone else comment on that.

Since I have little experience in this area (yet), my fumbling steps may serve as a guide to others.  First, I have read that if you find a ,DEB package, you can click on it and it will automatically download and install.  Well and good, but I haven't tried that yet.  So I am just passing that tip along for what it is worth.  Right now I am just looking at my new Knoppix install, and wondering if I have the latest version of WINE on it.  It doesn't tell me, because the setup process assumes I am using WINE 0.9 Beta, then complains because the actual software is not a match.  I don't know what I have, but presently WINE 0.9.47 is available, and of course I could opt to move to one of the commercial versions that are also available.  But, my goal is just to make sure I am on the latest free version out there.

I searched for WINE LINUX, and found the WINE HQ web site, and following the links there, looked for Knoppix as one of the distributions for which a .DEB package has already been prepared.  No such luck.  So I just picked the Debian group from the download page, and it turns out that there are just a series of separate folders being specified for the target location.  Ubuntu is particularly unique in this regard.  It appears that as Ubuntu is being revised (and it is one of the fastest changing distributions right now), they are adding new folders to support new features, so that the old and new aspects can continue to reside there side by side.

But the instructions on that page give you other clues as well.  First, though they don't really telll you how, you need to be able txo have administrator priveleges to install new packages.  They do tell you that you need to use a Terminal windows, and that is easily done,  But if you try to log in as root when your PC boots into Knoppix, it will refuse to let you.  You have to log in under your user account and password.   And when you open a Terminal window, you are presented with a $ prompt, meaning you are logged in by default under that same user account with limited pivileges.  To get administrator privliges temporarily, you can enter su (which stands for Super User), then when asked, enter the password for root.  Now you can make changes.

The following information was copied vebatum from the Wine HQ web site:

QuoteDistributions Debian Linux

Debian and Debian-based distributions, such as Ubuntu, utilize a special tool for managing packages known as APT. APT is able to automagically install all of the needed dependencies for a software package, as well as keep the package up to date, by scanning what are known as APT repositories. Debian-based distributions have their own repositories of software, many of which include Wine, however we keep our own repository of the latest available packages here for download.

There used to be graphical instructions here, however we have found that the terminal commands are actually simpler to describe and quicker for the user to input. Because the commands below use sudo, you may have to enter your user password after hitting enter.
Adding the WineHQ APT Repository:

First, open a terminal window. Then add the repository's key to your system's list of trusted APT keys by copy and pasting the following:

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

Next, add the repository to your system's list of APT sources:

Going further down the same page (pass the individual distributions mentioned), I also found this:
QuoteAlternatively, you can install from the terminal by running 'sudo apt-get update' to update APT's package information and then 'sudo apt-get install wine'.

It turns out that running the first sudo command will attempt to update all your packages at once.  and the second will make sure that WINE is installed.  So that turned out to be an easy way to get the lastest updates, and to make sure WINE is installed.  This should be an edge up and forward when it comes to further updates.

Note that instead of trying to type in the above commands by hand, you can switch back and forth between your web browser session and the terminal console and do a copy and paste to insert the command lines shown in bold above.  Press enter, and each should execute.  That makes it a lot easier than trying to retype each one exactly by hand.

Charles Pegge

From your research so far, which distribution do you think will give the best support for multimedia: Graphics Accelerator cards. Sound, Cameras etc, Donald?

Donald Darden

The Knoppix live CD gets about 2 GB contents onto a single CD via compression.  They also have a DVD version with much more, but my efforts to install it showed an install issue when it tried to read come of the content from my CDRW drive instead of the DVDROM drive.  I'm not sure of how to work around that.  But the CD image seems pretty good.

I've had less experience with the Ubuntu release, but it also looks very good, and is likely a better choice if you like to sit and play computer games.  The Knoppix version indicates that it recognized my USB-attached Canon printer, but it does not have an exact driver for it.  Checking for a printer with Ubuntu showed me nothing.  Ubuntu also has a number of tools for working with Bluetooth, which I've not found yet with Knoppix.

At a guess, concerning your questions, you might want to give Ubuntu a shot first.  It showed a larger number of applications accessible from the desktop that are devoted to your interests than I see in Knoppix.  Knoppix probably has them, but you might have to dig down further to access them.  However, Knoppix does seem to focus more on development tools, and as I mentioned before, you can find an updated version of it that already has OpenVZ embedded in it, which gives you immediate exposure to a VM environment.  With the constant changes and availabilities of so many additional packages, I would be way off base if I maintained that one distribution is significantly better than another.

However, many people seem to regard Knoppix as basically a Live Demo, not an install version, so you don't find it covered in quite the same depth that you might find another distribution.  And Ubuntu seems to be evolving a lot faster - already up to version 7.10, although they all use pretty much the same Linux kernels and most of the same open source elements.

I like them both.  So I elected to proceed with both for a time, and compare them in more depth as time goes on.  There is no problem with having more than one Linux OS on your PC - you just end up with more time spent managing and evaluating the OS than the user who sees the OS as just an incidental environment for accessing and managing his other interests.

Kent Sarikaya

I really liked Ubuntu when I had it on my notebook a while back. My friend who seems to have a different distro on his computer whenever I talk with him always says how much he hates gnome and likes KDE. I must say when I installed Suse and I think also Mandravia, they both had KDE and it is really nice. I guess one thing with Linux is the choices you have, there are many to make.

I think Ubuntu is gaining popularity because they realize it is too many choices for new users and are starting to make decisions for end users that would meet the widest range of needs.
Also there work to deal with the driver issues is really great.

For developing, there are virtual machine applications for developers that you can play in vmware. I haven't tried them but did see them in the list.

Thanks for the posts, it is nice to read your progression into the linux world and your discoveries along the way.

Donald Darden

Knoppix's Menu setup is not as straightforward as that provided with Ununtu, but with diligence and some persistence, you uncover a whole lot that might not be evident at first.  Further searching is showing me that Knoppix is rich in games and all sorts of goodies.  And as most Linux distributions, highly configurable.  So again, it is partly a matter of personal taste, and partly what catches your eye first when you check out a modern Linux distribution.

I've been able to locate some stuff that I need to get on top of before I can really say I am making progress, and part of the problem is in the matter of locating information on the web.  You often learn far more from other people's problems and the advice given than trying to read an instructional manual from beginning to end.

Customizing XWindows is likely another topic worth exploring.  The default 1024x768 size is too small for my eyes, so I changed it.  But each setting effects my monitor in a different way, often causing a dark edge to left or right to appear,  It has to do with refresh rates and line scan rates, and the monitor would have to be adjusted again for each setting.  Some tinkering is required, but the big thing is to make sure that opened windows do not drop down too far or overwrap so as to make them hard to read or manage.  LCD users probably have less problems, but fewer good choices, since setting a monitor below or above its optimum size can cause other artifacts to appear.

I note that you can refine and change your desktop menu, moving things from one dropdown to another, or adding new items, and make many other changes to the appearance, so the degree of customization is very high.


Donald Darden

Doing anything with Linux means learning what you can do and how.  A good starting text can be found at this link:
http://qref.sourceforge.net/Debian/reference/ch-preface.en.html

I haven't absorbed it all, but I decided that printing out chapers 4 and 6 are beneficial for what I am attempting now.

Seeing how commands and programs are actually used and in what circumstances and sequence is an important contribution of online articles and some references.  The man command does try to fill in some of the blanks about all the options found with each reference, but at the expense of teaching you the specifics on using those references in domr context.  Seeing how other people use them rules out a lot of trial and error on your part, and actually using them tends to make you remember them better, while building your confidence about what you think you know and can do. 

Donald Darden

The most prevalent command shell for Linux is reputedly bash (borne again shell) which is an extention of the earlier borne shell (sh),  Some people prefer the Korn shell, which is even newer that bash.  But bash continues to be the shell of choice for most people.  And represents a good place to start.

Each user account is associated with that user's preferences and rights.  Your account can be set up or modified to define many features and aspects of your login sessions.  Some settings you can change, and some must be modified by the super user (su) or root.  For our purposes, su and root are the same, and use the same password.

There are many sources that explain the way in which Linux shellls work, and the commands and symbols along with what they do.  You can research bash online easily enough.

But when you get accustomed to using the terminal console, you might want to create some shortcuts and predefined defaults to help you further.  For this you can create a .bashrc file in your user's home directory, and put the necessary commands there.  These will only effect that particular user.  To make changes that effect all users of the bash shell, changes can be made to the file /etc/bashrc.

The following link can provide more information on this subject:
http://www.linuxfromscratch.org/blfs/view/stable/postlfs/profile.html

Note that I found this to be a handy way to modify an alias for the ls (list) command:
                    alias ls="ls --color=never"
What this does is prevent the ls command from displaying folder and file names in different colors, a
benefit to me, since I have a hard time seeing dark blue against black, and some other combinations as well.