Find the answer to your Linux question:
Results 1 to 4 of 4
Android build upon a Linux kernel and most Linux systems use a desktop environment like GNOME, KDE, LXDE etc. I have compiled Linux kernel and minimal root file system build ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    4

    Setup Linux desktop / GUI environment


    Android build upon a Linux kernel and most Linux systems use a desktop environment like GNOME, KDE, LXDE etc.

    I have compiled Linux kernel and minimal root file system build with busybox, arm cross compiler tool-chain and arm-J2SE. Currently I have the basic Command Line Interface. Now I want to use a desktop environment (enable mouse and handle mouse or touchscreen inputs/events). Because my java command line codes running fine but when I am using swing or awt application it shows this exception.

    Code:
    Exception in thread "main" java.awt.HeadlessException at
             java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:535)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:224)
    at Gui.main(Gui.java:7)
    Just I have a look on javadoc and It shows,

    Code:
    public class HeadlessException
            extends UnsupportedOperationException
    Thrown when code that is dependent on a keyboard, display, or mouse is called in an environment that does not support a keyboard, display, or mouse.

    Basically it need some window management or GUI like environment. I found few library for building a GUI environment like XLIB/X11,SDL which can manage those mouse and touch screen events. Can any one tell me where to start to achieve my goal. Few Linux system use startx command to enable GUI environment then brought the desktop,window,mouse etc. I need some thing like this to run my java gui applications. Could any one lead me a way.

  2. #2
    Linux Newbie
    Join Date
    Aug 2006
    Posts
    124
    Hi.

    You're talking about KDE, Gnome, etc... but that's only window managers running over X. X is the client-server handling the graphic display, mouse, keyboard, and related events. To run a graphical application, the DISPLAY environment variable must be defined (at least). For you, install xorg, and run the GUI with X, just X. startx if for launching X and the default desktop manager.

  3. #3
    Just Joined!
    Join Date
    Nov 2012
    Posts
    4
    Quote Originally Posted by CaptainDangeax View Post
    Hi.

    You're talking about KDE, Gnome, etc... but that's only window managers running over X. X is the client-server handling the graphic display, mouse, keyboard, and related events. To run a graphical application, the DISPLAY environment variable must be defined (at least). For you, install xorg, and run the GUI with X, just X. startx if for launching X and the default desktop manager.
    I am confusing about Xlib and X, Can you please provide the source package link? I need to cross compile the source to use it on my arm board.

  4. #4
    Linux Newbie
    Join Date
    Aug 2006
    Posts
    124
    Quote Originally Posted by shantanubanerjee75 View Post
    I am confusing about Xlib and X, Can you please provide the source package link? I need to cross compile the source to use it on my arm board.
    You should begin here : X.Org Wiki - Home

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •