Baixar o java JRE para linux : [Link]
jsp
1) Instalação do java (exemplo [Link]), e configurações.
1.1) Desempacotar o java dentro da pasta /usr/lib/jvm
Supondo que o download do pacote [Link] tenha sido feito
dentro da pasta Downloads.
Botão Direito sobre o arquivo, extrair
Ou o java8u491 pode ser desempacotado na pasta /usr/lib/jvm usando o terminal:
tar zxvf [Link]
1.2) Usar o arquivo /etc/[Link] para incluir a pasta dos binários do java
na lista da variável de ambiente PATH para que o sistema consiga enxergá-los.
Abrir o arquivo:
sudo gedit /etc/[Link]
Incluir o conteudo abaixo no final:
export JAVA_HOME=/usr/lib/jvm/jre-8u491-linux-x64/jre1.8.0_491
export JRE_HOME=/usr/lib/jvm/jre-8u491-linux-x64/jre1.8.0_491
export PATH=$JAVA_HOME/bin:$PATH
Após salvar o arquivo [Link], pode-se executar o comando abaixo para
aplicar a modificação:
source /etc/[Link]
Para verificar se o java já está ativa, use:
java -version
Exemplo :
p@hp-Ubuntu:~$ source /etc/[Link]
hp@hp-Ubuntu:~$ java -version
java version "1.8.0_491"
Java(TM) SE Runtime Environment (build 1.8.0_491-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.491-b10, mixed mode)
hp@hp-Ubuntu:~$
1.4) Para que o javaws seja sugerido, automaticamente, pelo firefox quando o
usuario usar o SIAFI
a) criar um lançador para o javaws (java web start) do java dentro da pasta
/usr/share/applications
sudo gedit /usr/share/applications/javaws-jre1.8.0_491.desktop
Coloque o conteudo abaixo:
Funcionando:
[Desktop Entry]
Encoding=UTF-8
Name=JavaWS
Comment=Java Web Start
Exec=/usr/lib/jvm/jre-8u491-linux-x64/jre1.8.0_491/bin/javaws
Icon=/usr/lib/jvm/jre-8u491-linux-x64/jre1.8.0_491/lib/desktop/icons/
LowContrast/16x16/apps/[Link]
Terminal=false
Type=Application
Make the desktop file executable by running:
sudo chmod +x /usr/share/applications/javaws-jre1.8.0_491.desktop
b) incluir no arquivo [Link] da home do usuário
sudo gedit /usr/share/applications/[Link]
Incluir a linha application/x-java-jnlp-file=javaws-jre1.8.0_491.desktop;
na última linha da tag Default Applications
obs.: caso o arquivo não exista coloque todo o conteudo abaixo.
[Default Applications]
text/plain=[Link];
application/x-java-jnlp-file=javaws-jre1.8.0_491.desktop;
como exemplo abaixo:
1. c) Colocar uma copia na /etc/skel para ficar disponível para novos
usuarios que logarem no PC (usar sudo é importante abaixo, não faça como
root)
2.
3. sudo mkdir /etc/skel/.config
4. sudo cp -f ~/.config/[Link] /etc/skel/.config/
5.
1.5) Criar um lançador para o Painel de controle do java, e adicionar o site do
SIAFI, à lista de exceções do java.
a) criar um lançador para o painel de controle (ControlPanel) do java dentro da
pasta /usr/share/applications
sudo gedit /usr/share/applications/javaws-jre1.8.0_491.desktop
colocar dentro o conteudo abaixo:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Painel de Controle do Java
Comment=painel de controle do java (ControlPanel)
Exec=/usr/lib/jvm/jre-8u491-linux-x64/jre1.8.0_491/bin/jcontrol
Icon=/usr/lib/jvm/jre-8u491-linux-x64/jre1.8.0_491/lib/desktop/icons/LowContrast/
16x16/apps/[Link]
Type=Application
To add applications to the "Open With Other Application" dialog in Nautilus
(GNOME Files), you need to ensure the program has a valid .desktop file
registered in your system. This allows the file manager to recognize the
software as capable of handling specific file types.
Method 1: The Native GUI Way
If the application is already installed but simply not showing up: [1]
1. Right-clickthe file you want to open and select Properties.
2. Go to the Open With tab.
3. Under the list of Recommended Applications, click Show other applications.
4. Select the application from the list and click Add. [1, 2]
Method 2: Create a Custom .desktop File
If you downloaded a portable app (like an AppImage or a tarball) and want it to
appear in the menu, you can manually create a launcher: [1, 2, 3]
1. Open your terminal and run the following command to create a new application
file:
nano ~/.local/share/applications/[Link]
2. Paste
the following configuration, adjusting the Name , Exec (path to your app),
and MimeType to fit your needs: [1, 2, 3]
text
[Desktop Entry]
Type=Application
Name=Your App Name
Exec=/path/to/your/app/binary %F
Icon=/path/to/[Link]
Terminal=false
Categories=Utility;
MimeType=text/plain;application/pdf;
Use o código com cuidado.
3. Save the file (in nano , press Ctrl+O then Enter, and Ctrl+X to exit).
4. Make the desktop file executable by running:
chmod +x ~/.local/share/applications/[Link] [1]
Method 3: Using a Temporary Custom Command
If you just need a one-off way to open files using a CLI script or custom terminal
flag: [1, 2]
1. Right-click your file and select Open With Other Application.
2. Scroll to the bottom and select Use a custom command.
3. Type the command you want to use and hit Enter. [1, 2, 3, 4]
If you're trying to add a specific type of application or are running into issues
with your file associations, let me know:
What specific application are you trying to add?
What file format/extension are you trying to open with it?
I can guide you through the exact setup.
Ask Ubuntu
Add custom command in the open with dialog? - Ask Ubuntu
16 de out. de 2011 — For 11.10 and newer: You open nautilus, right-click on your file, select properties. In
the properties window, there is a "Open Wi...
Ask Ubuntu
How can I add an application to the list of Open With ... - Ask Ubuntu
11 de jul. de 2012 — Based on vine_user's method, but with a different approach. I normally download
Blender from the official website, then use Alcart...
Ask Ubuntu
How to add "open with custom command" option in right click ...
9 de mar. de 2014 — The Script. Save the following script as Open with custom command in the following
directory. ~/.local/share/nautilus/scripts/ (Ub...
9 sites
A IA pode cometer erros. Por isso, cheque as respostas
[Link]