Search This Blog

2024/11/09

Ubuntu :Installing Geogebra

I tried to install GeoGebra using flatpak.Just for
experiement i installed flatpak using apt

I was greeted with follwoing error when i run command to install geogebra.

Error:
sangram@sangram-Inspiron-14-5430:~$ flatpak install flathub org.geogebra.GeoGebra

Note that the directories

'/var/lib/flatpak/exports/share'
'/home/sangram/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for matches…
error: No remote refs found for ‘flathub’

Solution:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Open bashrc file:
sudo nano ~/.bashrc

Add following line into it
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/$USER/.local/share/flatpak/exports/share

Reload bashrc
source ~/.bashrc

verify that the Flathub remote was successfully added by listing Flatpak remotes:
flatpak remotes

Output:
Name Options
flathub system


Now I was able to install using following command
flatpak install flathub org.geogebra.GeoGebra

To launch it run
flatpak run org.geogebra.GeoGebra

If you want to remove this app then run
flatpak uninstall flathub org.geogebra.GeoGebra

Confirm it is deleted by seeing list of installed app
flatpak list

2024/11/04

Ubuntu:.Recover corrupt bashrc

Somehome you messed with .bashrc file & it
start mulfunctioning then you can just backup
and replace it with its working copy.
Usually .bashrc file located in /home/username (sangram is my username).
cd /home/sangram
Backup
cp .bashrc .bashrc_backup

Delete
rm -rf bashrc
First Way:
Now go for https://gist.github.com/marioBonales/1637696
which has default Ubuntu Bashrc file content.copy its
content and do

nano .bashrc

Then add copied content to it.Then

source .bashrc

Second Way:
copy the content of /etc/skel/.bashrc
and paste it into empty .bashrc

Now
source .bashrc