Setup laptop with Ubuntu for personal use

From Notes_Wiki

Home > Ubuntu > Server or Desktop administration > New machine setup > Setup laptop with Ubuntu for personal use

Installed post OS

Steps not captured for wifi drivers and nvidia drivers installation


sudo config

Edit /etc/sudoers to have

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


Install Office CA-Certificate in OS

In Ubuntu 22.04

Download CA certificate on Desktop and install them to OS via:

sudo apt-get install ca-certificates -y
sudo cp <CA-cert>.pem /usr/local/share/ca-certificates/
sudo update-ca-certificates

In Ubuntu 24.04

sudo apt-get install ca-certificates -y
sudo mkdir /usr/local/share/ca-certificates/<org-name>
sudo cp <CA-cert>.pem /usr/local/share/ca-certificates/<org-name>/<org-name>.crt
sudo update-ca-certificates

Either way test by doing wget to verify this is working as expected


Install text editor, disable lock and copy files

sudo apt-get -y install gedit vim

Settings -> Privacy & Security -> Screen Lock

  • Disable Automatic Screen Lock
  • Set "Blank Screen Delay" to Never

sudo chown -R saurabh:saurabh /mnt/data1

Copy /mnt/data1/{plain_folders,setup,workspace} from existing laptop to this


Link to firefox profiles folder

Configure firefox profile using:

cd  /home/saurabh/snap/firefox/common
rm -rf .mozilla
ln -s /mnt/data1/workspace/application-data/mozilla/ .mozilla

Open browser work profile

Add office CA certificate in firefox as certificate authority


Setup DNS to use /etc/resolv.conf and disable systemd-resolv service

Use below commands:

sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
sudo systemctl mask systemd-resolved
sudo rm -f /etc/resolv.conf

Edit /etc/NetworkManager/NetworkManager.conf such that it has:

[main]
dns=default
#rc-manager=resolvconf

Reconnect. If there is no /etc/resolv.conf file create one with required nameserver settings


Install zoom and rustdesk from deb packages

  • sudo dpkg -i *.deb
  • Configure rustdesk
  • Login into zoom


Set hostname and /etc/hosts

Configure hostname

hostnamectl set-hostname barjatiyarklp

edit /etc/hosts and add

127.0.1.1 barjatiyarklp
172.31.1.164 rekallcm1


History retention

Refer Storing date / time along with commands in history

For saurabh user edit ~/.bashrc. Comment or delete default history configuration in user folders .bashrc

#HISTSIZE=1000
#HISTFILESIZE=2000

Do the same via root in /etc/skel/.bashrc and /root/.bashrc files


Battery information monitoring

CentOS 7.x check laptop battery information


System update and package installations

apt-get update -y
apt-get upgrade -y
apt autoremove -y
apt-get install byobu -y
apt-get install htop expect gimp fdupes erlang git wireshark telnet texlive minicom iw libguestfs-tools dia xsane gparted -y
apt-get install atop freerdp-x11 imagemagick lm-sensors -y
apt-get install vlc kile openconnect -y
sudo apt install texlive-latex-extra -y
sudo apt install libreoffice kompare -y
sudo apt install freerdp2-x11 freerdp2-wayland freerdp3-x11 freerdp3-wayland


Install owncloud

  1. Get latest appimage from https://download.owncloud.com/desktop/ownCloud/stable/latest/linux-appimage/
  2. cp AppImage to home folder for saurabh user
  3. chmod +x own*.AppImage
  4. ./own*.AppImage
  5. Configure appropriate owncloud syncing from various accounts
  6. Download AppImageLauncer from https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.2.0/appimagelauncher_2.2.0-travis995.0f91801.bionic_amd64.deb
  7. Install via "sudo dpkg -i appimagelauncher_2.2.0-travis995.0f91801.bionic_amd64.deb"
  8. Close and open Owncloud. Choose option to "Integrate and Run"


Install Thunderbird

Install thunderbird via:

sudo add-apt-repository ppa:mozillateam/ppa -y
sudo apt update
sudo apt install thunderbird

Start thunderbird and close it

Edit /home/saurabh/snap/thunderbird/common/.thunderbird/profiles.ini for Profile0 to have

IsRelative=0
Path=/mnt/data1/workspace/application-data/thunderbird/jonsyoyo.default

Start thunderbird and confirm it is working properly

Import Organization CA certificate into Thunderbird (Edit -> Settings -> Search for "certificate" -> Go to authorities -> Import)


Sync flies from rekallcm1

rm -rf .ssh
ln -s /mnt/data1/workspace/application-data/ssh .ssh
ssh root@rekallcm1
#Save the key password in keyring for automatic unlock during user login
sudo su -
cp /mnt/data1/plain_folders/documents/room-documents/documents/programs/shell_scripts/sync_files_from_rekallcm1.sh .
ssh-keygen
ssh-copy-id root@rekallcm1
#Or cat ~/.ssh/id*.pub and add to ~/.ssh/authorized_keys of root user on rekallcm1
./sync_files_from_rekallcm1.sh


Install emacs

sudo apt-get install emacs -y
ln -s /mnt/data1/workspace/application-data/emacs .emacs
ln -s /mnt/data1/workspace/application-data/emacs.d .emacs.d# Setting up barjatiyarklp with Ubuntu 22.04


Install brave browser

sudo apt install curl apt-transport-https -y
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
sudo curl -fsSLo /etc/apt/sources.list.d/brave-browser-release.sources https://brave-browser-apt-release.s3.brave.com/brave-browser.sources
sudo apt update
sudo apt install brave-browser -y


Configure nautlius

  1. Open nautilus
  2. Create bookmarks for (Open folder and press Ctrl+D)
    • /mnt/data1/workspace/gbb/owncloud/saurabh
    • /mnt/data1
    • /mnt/data1/plain_folders/documents/Desktop/rekall
  3. Configure nautilus to open .org file via emacs by default, if not done already
  4. vim ~/.config/user-dirs.dirs #As saurabh user
    • Comment all except Desktop and Downloads
  5. vim /etc/xdg/user-dirs.defaults #As root user
    • Comment all except Desktop and Downloads
  6. Logoff and login again
  7. Open nautilus and remove bookmarks for Documents, Music, Videos and Pictures

Refer:


Configure git

1. Configure various git parameters:

    git config --global user.name "Saurabh Barjatiya"  
    git config --global user.email "saurabh [at] sbarjatiya.com"  #Correct email address
    git config --global color.ui true
    git config --global color.status auto
    git config --global color.branch auto
    git config --global core.editor vim

2. Configure to use simple push by default

    git config --global push.default simple
   Refer https://stackoverflow.com/questions/21839651/git-what-is-the-difference-between-push-default-matching-and-simple
   
   

Install nomachine

sudo apt install wget apt-transport-https -y
Go to https://www.nomachine.com/download
Download Linux -> Debian file for x86_64
sudo dpkg -i nomachine_9.0.188_11_amd64.deb
sudo apt install -f
sudo ufw allow 4000/tcp
sudo ufw reload


Install keepassxc

sudo add-apt-repository ppa:phoerious/keepassxc -y
sudo apt update -y
sudo apt install keepassxc -y


Install Google chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

Install CA certificate in chrome, if required


TODO

  • Wazuh-agent
  • KVM, Virt-manager and a few sample VMs
  • NTFS mount eg /mnt/cdrive
  • AI tools installation



Home > Ubuntu > Server or Desktop administration > New machine setup > Setup laptop with Ubuntu for personal use