How do I specify a File manager in Idea running in Openbox in Linux? - linux

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)

Related

Is there a way to see what a .cgi file contains scripting wise?

I work with remotely installed cameras that have a linux build installed in them. Our previous models allowed us to use SSH and run simple commands within their terminal to focus the image, reboot, factory default and the such without having to go to the remote location. We have swapped to a new kind of camera that still has a linux build inside but the previous commands are not as easily accessible if at all. These new cameras have a simple website that can do these actions instead but this can - and has - go wrong with a need for the SSH solution.
There is no way to directly access the camera (that I know of), all of this is through a cat6. I checked the source for the simple website trying to see what the focus button actually runs onclick and found its javascript refers to "/cgi-bin/focus.cgi" (I can provide the chunk of code if needed). I am familiar with programming but not to any pro degree and much less web development but I figure that .cgi might be my ticket to finding out how to activate this stuff from the linux terminal.
I tried making a python script to see if I could read the file in plain text or something but that's a no go. Don't know the first thing about web dev so if there is a neat tech way to open the server on the camera to pick its brains I don't know what it is and don't know where to start. Currently bouncing around all the directories in the camera trying to find some kind of command or clue to where the camera functions are. Double tab doesn't seem to have the commands I'm looking for, and they didn't include a manual with man command. I'm completely lost.

Where is a good place to save app configurations on Linux

I am writing an application, which needs to save some settings to be persistent between runs (last opened file, user preferences, etc...). Where is a good place to save it on Linux?
According to the latest convention and XDG standards you should use
${HOME}/.config/your-app-name
which ought to be defined in XDG_CONFIG_HOME environment variable
If you plan to distribute your application with snap then you will be provided with path inside ${HOME}/snap with SNAP_USER_DATA environment value.
Depends how you define good, but how about:
${HOME}/.your-app-name
Checking my own home folder, that seems what the likes of Atom, Gimp, Mozilla, SSH, Vim, etc. are doing.

How can I put my GTK application in the desktop menus?

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

For InstallShield, How can I get a path from the user by browsing the computer?

I am packing a plugin for another program, thus I need to get the path of the pre-installed program (proe 4.0) and set an environment with it.
Now I used "Requirement" function in InstallShield to search the file of proe 4.0.
The problem is, this "search" function cannot find the install directory in some of the conditions, such as in a nonstandard installation.
I want to show a dialog with a browse button and a text box to allow the user to define the installation directory themselves. How can I do that?
I found the solution which is very easy for advanced users: use a script project, and in the setup vbs script you can find everything you want.

Creating a menu item generically in Linux

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.

Resources