aspose file tools*
The moose likes Other Languages and the fly likes A Python or Java program that runs as or replaces a Linux OS desktop background Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "A Python or Java program that runs as or replaces a Linux OS desktop background" Watch "A Python or Java program that runs as or replaces a Linux OS desktop background" New topic
Author

A Python or Java program that runs as or replaces a Linux OS desktop background

Eric Ushie
Ranch Hand

Joined: Dec 01, 2005
Posts: 31
Hi dudes,

I am working on a certain project and these are the specifications:

(1) The program will automatically run itself during OS startup.
(2) The program's desktop will replace the OS desktop, hiding the entire toolbar of the OS.

I am familiar with Java, C/C++ and Python and my strength in them is in a descending order of their listing. Please can someone help with the resources or language tools for any of these 3 languages of their skill for going about this problem. Thanks for your anticipated assistance.
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

What are you trying to make? Your own desktop such as KDE or Gnome?
Eric Ushie
Ranch Hand

Joined: Dec 01, 2005
Posts: 31
Is that what it looks like? Well, I don't really have such an extensive intent, but if that is what my requirements technically imply then that's it. I have to get this done, a lot depends on it.

Thanks.
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Well, I don't know... what are the requirements? There are ways for programs in a Linux desktop environment to use the entire screen. But I have no clue as to what you are trying to accomplish so I can't really say much. Same for automatically starting/stopping an app, there are different ways of doing this, generally something along the lines of adding a new script under /etc/init.d, but it sounds like you need more something like a program that sort of takes over the desktop once you boot or log into it.

For instance, in Java you could try the example from the following site; it will use the entire screen and works also on Linux: http://michaelodden.com/mac/acquiring-full-screen-in-java-applications/

To have a program start automatically in your Desktop right after you log on, assuming you're using Gnome on Ubuntu, you could select the following from the menu: System -> Preferences -> Startup Applications.

But again, I don't know what the requirements are, so this is just my guess.
Eric Ushie
Ranch Hand

Joined: Dec 01, 2005
Posts: 31
Hi Koen,

There are no more requirements than what I have explained in the two points, I am sure we can work with that. If you are asking for my overall intent for wanting to achieve this functionality well it is a segment of a bigger picture project. I am not privy to certain other detail but what I am suppose to achieve is very clear in the 2 points.

Thanks.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3655
    
  15
Eric Ushie wrote:what I am suppose to achieve is very clear in the 2 points.

A lot of people would disagree with that. I think you need to go back to whoever gave you that 'specification' and ask them the sort of questions that Koen has been asking you.


Joanne
Eric Ushie
Ranch Hand

Joined: Dec 01, 2005
Posts: 31
Koen Aerts wrote:Well, I don't know... what are the requirements? There are ways for programs in a Linux desktop environment to use the entire screen. But I have no clue as to what you are trying to accomplish so I can't really say much. Same for automatically starting/stopping an app, there are different ways of doing this, generally something along the lines of adding a new script under /etc/init.d, but it sounds like you need more something like a program that sort of takes over the desktop once you boot or log into it.

For instance, in Java you could try the example from the following site; it will use the entire screen and works also on Linux: http://michaelodden.com/mac/acquiring-full-screen-in-java-applications/

To have a program start automatically in your Desktop right after you log on, assuming you're using Gnome on Ubuntu, you could select the following from the menu: System -> Preferences -> Startup Applications.

But again, I don't know what the requirements are, so this is just my guess.


Thanks Koen,

I followed the link and it was helpful, but the program doesn't hide the taskbar of the system. Is there something I can alter in the code to achieve that or do I have to look elsewhere?
The next thing is, how can I execute a desktop app on OS startup in a Fedora (I use Fedora Core 15) environment? I know that I can start services to run in the background automatically in linux, in this case however, the program is expected to bring up the window and take over all the desktop.
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Eric Ushie wrote:I followed the link and it was helpful, but the program doesn't hide the taskbar of the system. Is there something I can alter in the code to achieve that or do I have to look elsewhere?
The next thing is, how can I execute a desktop app on OS startup in a Fedora (I use Fedora Core 15) environment? I know that I can start services to run in the background automatically in linux, in this case however, the program is expected to bring up the window and take over all the desktop.

You could also find some more info at Full-Screen Exclusive Mode API. I tried the example from the first link and it does take over the entire screen on Ubuntu, including taskbar. Not sure why it didn't do it in Fedora. Which JDK did you use? I used the one from Oracle.

As to automatically starting an app on the desktop, I already mentioned one way it can be done. The example was for the Gnome desktop, but I don't know which one you're using, for instance you could be using KDE, which I haven't used for the longest time and I can't remember how to auto-start programs in that one, but shouldn't be hard to figure out if you look through the menus.

What happens when your Fedora workstations boot? Do they boot right into a graphical login screen (where you enter username/password and then go to the desktop), or do they boot directly into the desktop (auto-login)? At this point I'm only assuming your Fedora boots up all the way to the graphical login prompt, then waits until you enter the credentials, and then the desktop will appear, at which point, I guess, your app should run and take up the entire screen.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: A Python or Java program that runs as or replaces a Linux OS desktop background