openjdk shows proper application icon only when started from terminal - linux

I'm using openJDK on Ubuntu 12.04 LTS and I have strange problem with starting GUI applications that are packed in jar archive. When I start application from terminal with "java -jar archivename.jar" it shows proper application icon in side panel. But when I start it from nautilus by double clicking archive icon it shows standard Duke icon.
It also shows icon when I start application by double-clicking shell script from nautilus.
Script content is simple:
#!/bin/bash
java -jar archievename.jar
Is this some bug, or what is the problem? How can I make it show application icon when started from nautilus too, but without script?
It's not big problem to be honest, because I think that using script to start application is often way to do it in linux, even for native applications, written in C++.
I'm just curious.
Thank you.

You can probably make a desktop entry and set the icon properly. See this question about running a jar file.

Related

WSL2 GUI programs not respecting my screen resolution

I mainly run Cypress and Chrome through WSL2, whenever I try and make any of the windows that open full screen a part of them always displays on my second monitor.
Is there anything I can change in a config file or something to fix it?
I don't know if it's related but the cursor on the WSL2 GUI programs is huge. Is this something that can be fixed too?

How to debug problems with the Divio app?

I am trying to set up the Divio app on Win10 Pro.
I can launch the application, log in, select the workspace folder for my project, so the required dependencies should be fine.
However when I click on "Set up my project", then a new window is opened with a text "Preparing logs...", and an animated "hour-glass" appears next to the "Open Shell" button in the lower-left corner, but that's it. Everything hangs up at this point, and I can't figure out what's wrong. Restarted the computer and the app several times, but with same results.
Any ideas how to work out what is going wrong?
The Divio app is an Electron application, and uses Chromium for the interface.
You can invoke its Inspector as you would in Chrome itself, using command-option-i on Macintosh and control-shift-i on Linux and Windows.
The Inspector's Console tab will show any errors, and this will help understand what is happening internally. Typically, they will be errors related to the operating system in some way.

Testing Linux shell script in or from Windows environment, without jumping from window to windows

I'm usually using VM/linux to run scripts, copying script using putty
or writing them directly there, but some times too many opened windows is not that comfortable..
I was recently trying to run shell script, using RUN option in Notepad++
to use build in Ubuntu in win10 anniversary, but can't really manage to get the right syntax to do it.. and didn't find any plugin to do so..
I would appreciate if anyone can put me to the right path in this one.
I found that it is also possible to do it using sygwin, by C:\cygwin\bin\bash --login -c "command.sh" but again its an extra software piece... and bit far from natural Linux environment, and slight different paths etc..
there is also a solutions to run some shell IDE using X11 using Xming, to work with Linux VM without switching between the opened windows. but in this case Question is the where can I find a proper shell IDE for linux, capable to run shell scripts directly from it, without living the IDE window, like all other IDE's do ?
any real solution would be appreciated.
It will NOT replace a pure Linux environment but, it is a closest I've seen
https://www.tutorialspoint.com/execute_bash_online.php

Node webkit window manager on boot

I have written a node webkit application that also works as a window manager.
I want to achieve the following on Ubuntu on boot:
Bypass Ubuntu loading screen (skip it or customize it)
Start and display my app instead of and before anything else
Is that possible? And if yes how can it be achieved? Thanks.
I take it that you are launching node-webkit in kiosk mode?
https://github.com/nwjs/nw.js/wiki/The-Kiosk-mode
To add your app in Ubuntu as apps to start as soon as linux has booted:
https://askubuntu.com/questions/30931/how-do-i-make-a-program-auto-start-every-time-i-log-in

Open website from within eclipse's internal browser?

Could anyone help me with opening web pages from within Eclipse's internal (embedded) browser? I'm running Linux (tiling window manager) and Eclipse-3.7.2 side-by-side with browser and it's a pain.
I want this to be able to comfortably read requirements from my code and at the same time code. This could be a question for superuser but it's Eclipse related so I guess I have better shot for an answer here.
Thanks in advance.
edit: I'm running gentoo linux and swt-3.7.1 with compiled in xulrunner support.
edit2: adding picture of gui menu in response to answer bellow.
Open Window / Customize Perspective... menu then on "Command Group Availability" tab find "Web Browser" entry and make sure it is checked. Then confirm that "Web Browser" is also checked on "Tool Bar Visibility" tab. Then you should see a web browser globe icon on toolbar that would open a web browser editor in the IDE.
Though you'll have to change settings on your picture to use "Internal Web Browser" then it will be opened as an Eclipse editor.
I know the question is old but I just had the same problem and was able to find the soloution.
The internal browser of SWT is using the webkitgtk browser engine. Because you're running gentoo I suppose you currently have net-libs/webkit-gtk:3 installed which is incompatible with SWT. But this is no problem because you can install the compatible net-libs/webkit-gtk:2 in a new slot.
Just install it like this:
emerge net-libs/webkit-gtk:2
After the package is installed the internal webbrowser is working again (for me)
Regards
Martin
On Ubuntu 13.04 using Eclipse it automagically worked, I was not sure which webkit I was missing, so I installed all that seemed relevant, if someone has pinpointed which it is, please comment,
Regards,
Gabriel Medina
aptitude install libqt4-webkit libqt5webkit5 libqtscript4-webkit libqtwebkit4 libswt-webkit-gtk-3-jni libwebkitgtk-1.0-0 libwebkitgtk-3.0-0

Resources