Manual software installation
There is a convention for manually installed software to put it in /opt
. (See Linux FHS)
The following steps are recommended to maintain such a setup:
- Obtain a .zip of the software distribution
- Unzip it to
/opt/<publisher>/<app name>-<version>
(The publisher directory is optional) - Setup symbolic links for other apps to reference (so they don't break when you upgrade)
Example
$ curl -sL https://ihmc.us.tar.gz -o app.tar.gz $ tar -xvzf app.tar.gz # mv app-v2/ /opt/. # rm /opt/app-v2 # ln -s /opt/app-v2/ /opt/app # ln -s /opt/app/bin/app.sh /usr/local/bin/app
Environment Variables
To set environment variables for terminals, use export VAR_NAME=value
in ~/.bashrc
.
To set environment variables for GUI desktop launchers, use export VAR_NAME=value
in ~/.profile
.
To temporarily set environment variables, run export VAR_NAME=value
just before you run your program.
Desktop entries
freedesktop.org has defined a file format standard for creating shortcut launchers that work in both GNOME and KDE. See the full spec here. However, a good overview can be found on the Arch Wiki page.
A sample intellij-idea-ce.desktop
in /usr/share/applications
:
[Desktop Entry] Version=2019.2.1 Type=Application Name=IntelliJ IDEA Community Comment=Intelligent Java IDE Exec="/opt/intellij-idea-ce/bin/idea.sh" %f Icon=/opt/intellij-idea-ce/bin/idea.png Comment=Intellij Idea IDE (community version) with Intellij JDK Categories=Development;IDE; Terminal=false StartupNotify=true StartupWMClass=jetbrains-idea-ce
Scroll in a Terminal / Console
SHIFT + Page Up and SHIFT + Page Down are the correct keys to operate on the linux (virtual) console
Passwordless sudo
Sometimes it's easier if embedded systems don't ask for a password everytime you need to use sudo commands. To achieve this, one option follows.
# visudo
Adjust the following section to add "NOPASSWD: " before the "ALL".
# Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) NOPASSWD: ALL