Linux command-line graphics - linux

I'm need some help. I'd like to write a CLI program, that uses "windows". I mean it looks like the installer of Debian. So I want to know, what C libs I need to do this: http://iomem.com/uploads/tutorial/debiansargeraid/pic002.jpg

The thing used in debian installer is most probably the dialog(1) utility. See examples at http://unstableme.blogspot.com/2009/12/linux-dialog-utility-short-tutorial.html
If you really want C library than what you want is either ncurses library (more low-level) or dialog.h provided with dialog utility.

You're looking for Ncurses ... it's what debians installer and
most other CLI "windowing" tools use.

Related

How to install VIM with all options/features? - VIM

I have VIM on Mac & CentOS. So, I see people are writing about -xterm_clipboard, -lua, ... Is there an simple way to install it all? or we have to enable options one-by-one and compile/recompile it?
If you want to install a pre-compiled package, look for a package name like vim-full, vim-huge or something similar.
If you want to compile youself you can pass the --with-features=huge to the configure script. Note, however, this does not enable the different language bindings because those are mostly optional and also the various GUIs need to enabled specifically, because you can have only one gui.
Therefore, you need to pass the --enable-<lang>interp argument for each language you want (e.g. --enable-luainterp --enable-pythoninterp) and the --enable-gui=<gui> e.g. (--enable-gui=gnome for the Gnome Gui).
This should cover the most important compile options. There might still some -flags in the :version output, but those should be generally not really important and would need to be enabled specifically. Read the help of the configure call ./configure --help to see all options available.

Is there a directory where i can put a d file so that the compiler automatically includes it?

I am new to the D programming language, and would like to use ncurses in D. I have found a good D port of ncurses, but I want to be able to import it in any source file without writing:
gdc <files> ncurses.d
Is there any way I can make it included every time?
Btw I am using gdc on debian Gnu/Linux.
No. You should consider using a build tool, such as rdmd, which will automatically construct a compiler's command line and add all modules included by your program.
If, for some reason, you don't want to use a build tool, a common approach is to use a Makefile.

How to change windows exe file's icon in linux without wine?

I know I can use ResHacker to change a resource from windows and I know I can use ResourceUpdate function to do the same problematically (again in windows). My problem is that I have to update the icon of a windows exe file in linux, without using wine.
(the reason for not using wine is that this process should run on an automation server that change the files and sign them).
I don't know even where to start from.
You can change a files metadata like this:
gvfs-set-attribute '/path/to/file' -t stringv metadata::custom-icon "/path/to/image.png"
There's a program called windres that should suit your needs
Whoops, that's just a resource compiler, sorry.
However there is pefile a python module for working with PE executables, perhaps you could write a script with it that does what you want

problem with unistd.h in VC++

It always produce an error that cant find "unistd.h" why? Any remedies for this?
Services for Unix ships with various linux related headers (including unistd.h), so you could use that.
But that might require to link some of the SFU libraries..
Why? It's just not there. It looks like you try to compile a program that is not portable or you try to port the program to Windows.
unistd.h is a not a standard header. Probably you find it only on Unix-like systems.
See: Wiki
See Is there a replacement for unistd.h for Windows (Visual C)? for a partial replacement. (If you can add aditional functionality, please do so).

Tutorial/Guide to create a classic, small Linux application in a package (Debian)

I've made a small script in my machine, and an alias in .bashrc that calls it. It's a bash script with 3 lines, but it can grow.
Now, some people in my team found it useful, and want to use it.
Instead of saying "copy this alias, do this, do that, install that lib" I was thinking about creating a simple package to be a little more professional. Fact is, I've never done something like this before. And the problem to me is not creating a package, is trying to decide what usually do you put in a package.
Suppose I want to take my script, and create myapplication. I want to create a .deb file that my team would install and:
Have a /usr/bin/myapplication or /usr/sbin/myapplication (what's the difference between them?), so they would just call myapplication at their terminal and it would work;
Have a man page; (Where are usually located man pages in a debian system?);
Have a possibility to read a .myapplicationrc in home folder with some configurations;
Have an entry for shortcuts in a gnome installation (is it possible to have an universal shortcut "format" that's is available to KDE and Gnome as well?);
Install dependencies.
I'm new to all that stuff. I usually code simple scripts and create an alias in my bashrc. I've never done a package before. Which guides do you know of that can help me accomplish what I thinking of above?
Here is a place to start, though I welcome a more succinct answer.
I couldn't find a complete guide. I think the best thing to do is download a package that does exactly what I'm thinking of and do some reading, like taskwarrior.

Resources