if you made up an application in linux you will get a blank ugly icon
but if i wanted to add an icon without going and make a desktop entry , is it possible ?
if i uploaded my portable app to the internet i would like that users see the icon merged to my portable app ! :)
Thanks
For scripts probably not, but for ELF binaries seen under Gnome (nautilus) you can try
elfres
http://www.compholio.com/elfres/
Most desktop environments on Linux follow the freedesktop.org Desktop Entry Specification for application descriptions and icons. You'll need a separate .desktop file in one of the XDG directories (specifically, applications within one of $XDG_DATA_DIRS) which will list an icon (which is an image file in another directory).
Related
I started with programming a little time ago and I created my first running application with GTK 3.0. I did not use Glade, I do not know if worth highlight it. My code is working perfectly, but now I have a doubt, how can I make my own desktop menu application? I mean, I want that my application running up without compile in a terminal with GTK 3.0 compiler, but yes with a double click.
I have been seen these examples provided by GNOME Developer Center, but I confess that did not understand it: https://developer.gnome.org/integration-guide/stable/desktop-files.html.en#ex-sample-desktop-file
The idea is to create a file containing this sequence of lines:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Sample Application Name
Comment=A sample application
Exec=application
Icon=application.png
Terminal=false
This file is my executable or it is a different file which points to my executable? If it is my executable, where can I insert it?
Thank you!
So basically this file will create a desktop entry for those configurations you provide for the corresponding directives in the file. Judging by your question, you are unable to find where to place your application executable in that directive.
Exec="/absolute/path/to/your/executable/file"
And the Name directive will hold the information of your application name. This is the one you will be querying for in your gnome applications search (which appears when you press the windows key).
This file will contain a .desktop extension. And this file itself is not executable. This will point to your application, making the gnome/ubuntu system understand that such application exists.
This will not directly create a desktop shortcut as in Windows, rather this will index your application which you can run from the application menu (ubuntu or gnome)
If you aren't sure where to place the file here's a hint from the documentation you linked.
Place this file in the /usr/share/applications directory so that it is accessible by everyone, or in ~/.local/share/applications if you only wish to make it accessible to a single user
I've been developing in Idea on Linux for a little while now and am getting used to it after the initial pain of transitioning from Eclipse.
One of my problems has been how to configure the file manager. I'm running Openbox on Arch Linux and I can't see an obvious way (despite some extensive Googling) to specify a default file manager and I'm not sure if Idea would use it if I did.
Does anyone know how to specify the file manager in Idea for Openbox on Linux?
Click IDE Settings -> External Tools, and then click the Add button.
Specify the tool - like in this screenshot:
http://kobo.github.io/grails-improx/img/idea-external-tools-edit-sh.png
Basically you can specify any external program you want.
The program path should point to the binary file you want to use as a file manager (for example thunar is a great one: /usr/bin/thunar (you can find the correct path by executing "$which thunar" in a terminal)).
The parameter & working dir should be "$FilePath$" & "$FileDir$ (or you can choose other variables if you prefer different functionality)
This question already has an answer here:
Qt Creator - how to set application icon for ubuntu linux?
(1 answer)
Closed 8 years ago.
Can someone give me a strait up answer on how to set up application icon in linux.
I have an application developed in Qt and I wont to show it on desktop but I wont to change it's default icon. I know that in linux I can't make icon as part of binary but how to connect icon with application?
Thanks...
Unix binaries don’t know about the concept resources of icons. Instead, a desktop entry file is used to describe each application. These files have the file name extension of desktop and are usually stored in $XDG_DATA_DIRS/applications or /usr/share/applications.
An Example of a .desktop file:
[Desktop Entry]
Type=Application
Name=My Application
Exec=myapplication %F
MimeType=image/x-mydata;
Icon=/install/path/myicon.png
The line reading [Desktop Entry] tells you that what follows is an entry for a desktop entry. Next is Type, which tells you that the entry will describe an application. According to Name, the application is called My Application. The Exec line tells the desktop what command to issue to start the application; in this case, it is myapplication. The %F part tells the desktop where to list the file names if a user starts the application by trying to open one or more data files. The connection between these data files and the application is handled using the MimeType entry that defines the mime type; that is, the file type that the application handles. The last line, Icon, tells you which icon to use. The easiest way is to specify an absolute path to the icon. If you specify only the file name, you must determine where to store the icon file so that the desktop environment can find it.
When installing applications on Unix, it is common to support the make target install,
which enables the user to type make install to copy the application files to a global location.
This is supported by QMake using install sets.
For part of a large university project I have built a large java based application. To make "installation" cleaner I am aiming to write a script to copy the jar to a hidden file in the users home directory then add a menu &/Or desktop launcher.
Since I do not know what platform the markers shall be using it seems sensible to make this generic so I was going to build a shell script and a batch file.
The shell script starts off simple, check the directory doesnt already exist, make it and copy the file accross.
Then it comes to making a launcher of some kind. I presume each desktop environment shall do things differently.
After 10 minutes with google it seems everything suggested is autotools but since I have no knowledge of this it seems a bit overkill.
Is there an easy way to achieve what i need?
Thanks
These days, basically all of the desktop environments uses desktop files. For the specification for those files, see the Desktop Entry Specification.
Normally, they're put in /usr/share/applications on the system. Those files are then read and used to construct the menu.
If you have the ability to write to the system /usr/share/applications directory, that's obviously simplest, but if you had that, you would probably be putting the JAR file somewhere other than a hidden directory in the user's home directory.
If not, the path that's supposed to be honored is ~/.local/share/applications. If you drop a desktop file in there, it should show up for the user. (This is somewhat newer; I don't think GNOME 2 supports, it for example. Older desktop environments had various special places for these files.)
Then, the problem basically reduces to figuring out what to write for the Exec line in the desktop file. (See the desktop files on your system in /usr/share/applications for some examples.) If you're lucky, you can get away with just sticking a java command in there, but the details will depend on your application.
For me, compact discs and these customized auto-start dialogs are somewhat outdated and waste...
However, I have to create such a dialog as an index for a CD consisting of a few PDF files. Making one to work on Microsoft Windows is quite easy. As there might be users from different platforms (Unix, Apple,...), the question raises how to offer them such a (auto-starting) dialog as well.
Java is of course an option, but I think it's overloaded and naturally too slow for this purpose.
Now, I think of a single webpage that will appear in the local browser. Using all these web standards this could a very creative, light-weight approach working on most systems.
Do you see any problems that might occur here? Probably, there is a different and more elegant solution to this issue?
I can't really recommend something precisely but I've seen lots of CD open a Adobe Flash dialog. It's also been a long time I've played around with flash but I think they're a setting in File > Publish that allows you to export to a dialog.
The CD auto-start is an autorun.ini file added to the root of the CD. You could create a folder on the CD named autorun or something. Insert all your Flash/HTML files then point the open parameter of the autorun.ini file to an HTML/Flash file.
Some documentation below (or Google “autorun.ini”).
http://support.microsoft.com/kb/818804
Notice however not all computer will have Flash installed by default.