LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating an application in the Linux (https://www.linuxquestions.org/questions/linux-newbie-8/creating-an-application-in-the-linux-4175428729/)

Karthiprime 09-24-2012 02:21 AM

Creating an application in the Linux
 
Hi all,I am new to Linux and curious to understand it.
Am intersted in creating a simple appication (*.deb), which shoud have following features:
  • After installing it, by clicking on the shortcut i must be able to open terminal.
I hope its an simple application to be developed and it will help to understand the appli development process.

Intersted to know what are thing i need to learn to achieve this and the development process.

Thanks

zwitterion-241920 09-24-2012 03:03 AM

.deb is a package format, not an application format, see this article on howtogeek.

A script that opens a terminal window would look like this in GNOME/Unity:
Code:

#!/bin/sh
terminal

and like this for KDE:
Code:

#!/bin/bash
konsole


pan64 09-24-2012 03:24 AM

I think OP needs a shortcut.

zwitterion-241920 09-24-2012 04:20 AM

Then Google it.

Personally, I don't like shortcuts, they clutter the desktop and you can also put all your favorite programs in the dock on the side of the screen or in your kickoff menu, which looks a lot nicer.
Just google for people's desktops, you'll see the best-looking ones don't have any shortcuts.

Karthiprime 09-24-2012 05:04 AM

Hi ppl, thanks for the reply.

Btw, i thought the process might be like
-- Creating source code (high level language)
-- Compiling it, linking it by using make file.
-- Finally i generate *.deb file.

By installing this app, this should be able produce a shortcut. By clicking it, it should run (i.e, it opens a terminal).

Tell me if i am in a correct direction..

Correct me if my aim/understanding is worng.

Thanks again.

wigry 09-24-2012 08:08 AM

One thing is to write a hello world program which compiles and runs. Another thing is to create an installable package with all its dependencies and what all. So you ar undertaking two tasks and start from one without thinking the other. After you've completed the first task and have running program (sortof) then start looking around in the web, how to package the program.

Karthiprime 09-24-2012 08:45 AM

Thanks. Will work on it..

JaseP 09-24-2012 09:48 AM

Why are you interested in re-inventing the wheel, so-to-speak, by creating a new terminal program, when countless others exist?! If it's an academic exercise, for learning programming, that's one thing. But the request seems strange... What are you looking to make the terminal do?!

Karthiprime 09-24-2012 10:27 AM

Hi JaseP,

I was wondering about the following things while installing some file (.tar format) through configuring, make and install:

-- How the source package has been formed?
-- Why its not in *.deb format?
-- What happens in the kernal after installing the file? (I mean for ex: after installing the gcc, 'gcc' keyword can be used in terminal right? how its actuall happening)
-- And this traced somewhere to why should i not create my own OS?

For this, i was thinking, let me start by simply creating some application and it just happened to open terminal.

Note: Its my hobby work and its couple of days i started working with the Ubuntu. This forum is very useful.

Looking forward to have advice on this.

Thanks JaseP

Habitual 09-24-2012 10:36 AM

Rolling your own Debian packages (part I)
Rolling your own Debian packages (part II)

JaseP 09-24-2012 11:45 AM

Habitual, that's an excellent couple of links that explains things very concisely ...

Karthiprime,...

Habituals links explain what a debian package is, and how it differs from a source package better than I could, as a non-coder...

But as to "why it's not provided as a *.deb file?" ... That's because nobody bothered to build it (or if they did, not from where you got it). *.deb is just one package management system. The other popular one, among the "top two" is RPM (Redhat Package Manager). Other Distros msy have other package management systems, ... each with its own advantages and disadvantages.

Typically speaking, nothing happens to the kernel when you install a package, unless it's a kernel patch, or a kernel module. Typically, nothing really happens when installing a kernel module either,... at least to the kernel itself. For kernel modules, the kernel is made "aware" of the existence of the modules by modprobe-ing "for" the module. For how this works, you need to research the kernel config file, and how that works, in terms of kernel modules, versus "built-in" kernel device support.

The kernel itself does not exist in a vacuum, but has many supporting packages and services that make it useful. This is the reason that Richard Stallman so emphatically points out that a Linux system really shouldn't be called "Linux," but more properly "GNU/Linux," or, lately, as he says, "GNU with Linux." The vast majority of what a typical user thinks of as "Linux," is actually the GNU components of the system. The kernel itself, compiled, can be a few megabytes only, or even less, when configured for specific hardware requirements.

As to why you shouldn't create your own OS? Go ahead... It only took 26+ years for GNU + Linux to be in the state it is now... (and the GNU Hurd kernel is still not ready for day-to-day use...)... But, if you mean to use your OS in a limited capacity, such as on embedded systems, it might only take a few years,...

But then again, If you're talking about creating your own Linux distro, ... you can always follow this guy's lead,...
http://webpath.net/31-flavors
He made 31 distributions in the month of August, as an experiment, ...

Karthiprime 09-26-2012 10:10 AM

Hi JaseP...Sorry, i didnt want to reply this late..
Quote:

Originally Posted by JaseP (Post 4788126)
As to why you shouldn't create your own OS? Go ahead... It only took 26+ years for GNU + Linux to be in the state it is now... (and the GNU Hurd kernel is still not ready for day-to-day use...)... But, if you mean to use your OS in a limited capacity, such as on embedded systems, it might only take a few years,...

Now i really want to understand whyy it took so many years to develop?? I may not want to create my own OS at the worst case, but am curious to understand atleast how to create an OS from scratch, i mean zero.
So the process involved in creating the embedded OS is very similar to the designing our own OS?? (I like to come back to understanding of the embedded OS after the understanding of the PC OS, thinking it is advisable).

Quote:

Originally Posted by JaseP (Post 4788126)
But then again, If you're talking about creating your own Linux distro, ... you can always follow this guy's lead,...
http://webpath.net/31-flavors
He made 31 distributions in the month of August, as an experiment, ...

Ya, i will look into that link...

Thanks Jase...

JaseP 09-26-2012 10:42 AM

Linux didn't take that long to develop. It took that long for the kernel to reach its current state. A useable kernel was available about two years after Linus Torvalds posted his famous message on Usenet (Slackware and Debian being first released in 1993).

Hurd was originally the kernel for the GNU project, but development went nowhere. BSD could have been a candidate, but issues with licensing compatibility and the lawsuit with AT&T pulled it out of the running. Linux was switched over to a GPL 2 license at the right time, and the GNU project was ported over to it... Then the Internet happened, and development really exploded...

The reason I mentioned embedded devices is that, because of their small resources and limited capabilities, it would be easier to write a "new" OS from scratch for them than it would be to do so for a full, general use computer. Many of them borrow from other OSes, such as BSD, which because of its license makes it attractive to canabalize. An example (of the kind of OS I am talking about, not BSD "borrowing") is the eCOS OS that runs the Wowwee Rovio... which is a Posix compliant OS for small embedded machines, developed by RedHat...

Karthiprime 09-27-2012 01:18 AM

Ok Jase.. I read that link: Linus Torvald's Usenet post. Its inspiring. Ya, i consider the OS for the embedded device too.. Now let me work on the some basics of my quest, so as to have further clear questions Jase..

Will get back to you soon..

Thanks..

resetreset 09-27-2012 03:52 PM

If you want to find out how to write OS's, you need books. Andy Tanenbaum's are the most widely known or used I think. If you want specific info on what to actually WRITE, in the x86 architecture, I'd imagine that there's a LOT of info online. Just Google :)
Also, check out the alt.os.assembly and alt.os.development groups on Usenet.


All times are GMT -5. The time now is 06:54 PM.