ubuntu settings - animeshtrivedi/notes GitHub Wiki

July 16th 2024

Compiler: what is the feature name? https://askubuntu.com/questions/1513160/how-to-install-gcc-14-on-ubuntu-22-04-and-24-04

sudo apt-get install gcc-14 g++-14 
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
atr@u24clean:~/src/nvmevirt$ sudo update-alternatives --config g++
There is 1 choice for the alternative g++ (providing /usr/bin/g++).

  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/g++-14   14        auto mode
  1            /usr/bin/g++-14   14        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

July 5th 2024

Updating the default editor, and then sudo no password access

sudo update-alternatives --config editor 
sudo visudo

add then specific account

YOUR_USERNAME_HERE ALL=(ALL) NOPASSWD: ALL

all sudo group users

%sudo   ALL=(ALL:ALL) NOPASSWD: ALL

specific command

john    ALL=(ALL) NOPASSWD: qemu-system-x86_64

March 30th 2024

iphone mounting to Ubuntu mount:

  * Open the iDevices Documents folder in Nautilus.
  * Press CTRL+L to get the real address which will look like afc://YOURSERIAL:3/
  * Remove trailing colon and number and press ENTER (i.e. it should just read afc://YOURSERIAL)

https://askubuntu.com/questions/928750/how-do-i-access-ios-camera-pictures-on-ubuntu

Then viewing heic image format:

sudo apt-get install heif-gdk-pixbuf heif-thumbnailer 

https://askubuntu.com/questions/958355/any-app-on-ubuntu-to-open-and-or-convert-heif-pictures-heic-high-efficiency-i

April 25th 2023

Eclipse setting

If pdflatex escape is not found, then probably old texclipse version. Delete the old one

https://stackoverflow.com/questions/892203/how-do-i-delete-an-eclipse-perspective-for-a-plugin-i-uninstalled (by going to update and there there is a button that says "whats installed")

Install texclipse form the Marketplace plugin (2+ version number) -- that one has the properties to put --shell-escape

https://www.davidpace.de/category/latex/texlipse/

Open Preferences -> Texlipse -> Builder Settings, select the PdfLatex program and click Edit. The following dialog appears, in which you can add the -shell-escape option to the command line:

March 26th 2023

On a fresh system

sudo apt-get install git build-essential  fakeroot libncurses5-dev libssl-dev ccache bison flex libelf-dev dwarves ifstat autoconf gcc g++ clang sysstat net-tools vim-gtk3 exuberant-ctags gdb cmake htop 

website hosting:

sudo apt-get install ruby-bundler python3 jekyll ruby-dev 
bundle config set --local path 'vendor/bundle'
bundle install 
bundle add webrick
./atr-server.sh 

https://github.com/jekyll/jekyll/issues/9110

Aug 24th 2021

#listing all files and remove their permissions 
chmod -x `find . -maxdepth 1 -type f`
# But this does not handle the file name with spaces 
#check directory permission 
stat -c %a working-set/
777
atr@atr-xps-13:~$ stat -c %a Templates/
755
atr@atr-xps-13:~$ stat -c %a Templates/
chmod 755 `find . -maxdepth 1 -type d`

Not trying to remove snap - because it has core and gnome packages, not sure what they are needed for?

Name               Version                     Rev    Tracking         Publisher        Notes
brave              1.28.106                    126    latest/stable    brave            -
chromium-ffmpeg    0.1                         17     latest/stable    canonical✓       -
core               16-2.51.4                   11606  latest/stable    canonical✓       core
core18             20210722                    2128   latest/stable    canonical✓       base
gnome-3-28-1804    3.28.0-19-g98f9e67.98f9e67  161    latest/stable    canonical✓       -
gnome-3-34-1804    0+git.3556cb3               72     latest/stable/…  canonical✓       -
gtk-common-themes  0.1-52-gb92ac40             1515   latest/stable/…  canonical✓       -
opera              78.0.4093.147               137    latest/stable    opera-software✓  -
snap-store         3.38.0-64-g23c4c77          547    latest/stable/…  canonical✓       -
snapd              2.51.4                      12883  latest/stable    canonical✓       snapd
vlc                3.0.16                      2344   latest/stable    videolan✓        -

https://techwiser.com/remove-snap-ubuntu/

the default has issues with gcc 9, multiple application fails to cleanly install

including linux kernel. (http://lkml.iu.edu/hypermail/linux/kernel/1906.3/01818.html, https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1830961)

Switch to gcc 8.

sudo update-alternatives --remove-all gcc 
sudo update-alternatives --remove-all g++
sudo apt-get install gcc-8 gcc-9 g++-8 g++-9

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 20

sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc

sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++

sudo update-alternatives --config gcc
sudo update-alternatives --config g++

See here: https://askubuntu.com/questions/26498/how-to-choose-the-default-gcc-and-g-version

installing libglib mess up on ubuntu 20

https://itectec.com/ubuntu/ubuntu-cant-install-package-libglib2-0-dev-because-it-depends-on-some-unknown-version/

Just install with aptitude (first need to install), and then accept its suggestions sudo aptitude install libglib2.0-dev

More missing packages when compiling QEMU or Kernel

sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev https://github.com/Automattic/node-canvas/issues/1065

The big missing stuff

sudo apt-get install gdm3 gnome-characters gnome-shell gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons gnome-shell-extension-ubuntu-dock gnome-software gnome-software-plugin-snap gstreamer1.0-packagekit gvfs-bin libglib2.0-bin lightdm nautilus packagekit packagekit-tools software-properties-common software-properties-gtk tracker tracker-extract tracker-miner-fs ubuntu-session ubuntu-settings ubuntu-software unity unity-session unity-tweak-tool

old

Default terminal sudo update-alternatives --config x-terminal-emulator

install MATE Ubuntu 18

libboost-all-dev, htop, gitk, tree, cmake, git, subversion, vim-gtk3, vim, ctags, automake pgpgpg

texlive-latex-recommended texlive-latex-base texlive-binaries

[Choose lightdm management, instead of gdm]

https://linuxconfig.org/how-to-install-mate-desktop-on-ubuntu-18-04-bionic-beaver-linux sudo apt install ubuntu-mate-desktop sudo apt purge ubuntu-mate-desktop

https://itsfoss.com/use-unity-ubuntu-17-10/ sudo apt install ubuntu-unity-desktop sudo apt purge ubuntu-unity-desktop

Mouse setting:

This worked for me:

xinput --set-prop 11 294 1
where:

11: is my mouse id, you should find and replace with yours

xinput --list --short
294: is the "Accel Speed" property id of my mouse. Just change 11 with your id and you can find your desired prop id with

xinput --list-props 11
1: the final number is the property value. For me default was 0, 1 accelerated the pointer up.

You can add the first command to the startup applications to keep the settings after a reboot. Instead of the device and prop id you can quote them in case they change after a reboot, ex:

xinput --set-prop 'Microsoft Basic Optical Mouse' 'libinput Accel Speed' 1
Source and more details taken from here: How to change mouse speed/sensitivity?

https://askubuntu.com/questions/1067062/change-mouse-speed-on-ubuntu-18-04

"open Terminal" https://askubuntu.com/questions/908201/how-to-restore-open-new-terminal-by-right-click-in-unity

"slack setting" somehow slack is not starting from the Ubuntu menu. So make a command from /snap/slack/current/usr/lib/slack/slack

⚠️ **GitHub.com Fallback** ⚠️