Linux

Flatpak

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

PPA List: (sudo add-apt-repository ppa:name/package)

  1. Kodi
    • sudo add-apt-repository ppa:team-xbmc/ppa
    • sudo apt-get update
    • sudo apt-get install -y kodi
  2. grub-customizer (doc overview)
    • sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    • sudo apt-get update
    • sudo apt-get install -y grub-customizer
  3. Java VM (1.6 which is 6, expired 2013, for indexing) (source)
    • sudo add-apt-repository ppa:webupd8team/java
    • sudo apt-get update
    • sudo apt-get install -y oracle-java6-installer
  4. hvec decoder for VLC Media Player
    • sudo apt-add-repository ppa:strukturag/libde265
    • sudo apt-get update
    • sudo apt-get install -y vlc-plugin-libde265
  5. f.lux for Linux (must search for f.lux not flux after ppa added)
    • sudo add-apt-repository ppa:nathan-renniewaldock/flux
    • sudo apt-get update
  6. wine (to get the most current version)
    • sudo add-apt-repository ppa:ubuntu-wine/ppa
    • sudo apt-get update
  7. High Performance (and functional high end card) NVIDIA drivers
    • sudo add-apt-repository ppa:xorg-edgers/ppa
    • sudo apt-get update
  8. elementary-tweaks for Elementary OS Fraya
    • sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily
    • sudo apt-get update
  9. gnome-encfs-manager (source)
    • sudo add-apt-repository ppa:gencfsm/ppa
    • sudo apt-get update
  10. boot-repair (source) (from LiveUSB/CD not from running distro on hdd/ssd)
    • sudo add-apt-repository ppa:yannubuntu/boot-repair
    • sudo apt-get update
    • sudo apt-get install -y boot-repair


vnstat


William’s coding stuff: (source1, source2)

  1. curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  2. sudo apt-get install nodejs
  3. nodejs -v tells version insuring its installed
  4. npm -v tells verision insuring its installed
  5. sudo npm install typescript -g
  6. sudo npm install -g @angular/cli
  7. ng -v tells version insuring its installed
  8. ng new angular-hello-world creates new site
  9. cd angular-hello-world
  10. ng serve hosts the site and runs it at http://localhost:4200


Check for Bad sectors/blocks

  1. sudo fdisk -l
    1. Replace /dev/sdc below with your device
  2. sudo badblocks -v -s /dev/sdc > ~/hdd-bad-sectors.txt
    1. This outputs all bad block to corrisponding text file
  3. sudo fsck -l /scan_result/badsectors.txt /dev/sda
    1. This tells Ubuntu not to use the bad sectors mentioned in the hdd-bad-sectors.txt file
    2. Source


Second option

  1. sudo apt-get Install gsmartcontrol
  2. gsmartcontrol
    1. Check the info for the SMART info
  3. sudo fsck -cc /dev/sda1
    1. Will list bad sectors, using the program badblocks
    2. So really the same as above
    3. Source


Useful and essential Programs:

  1. sudo apt-get install system-config-samba
    1. Get network shares working with: system-config-samba - a GUI for managing SAMBA shares and users


Create a swap file (source)

  1. sudo Mkdir /swapfolder
  2. sudo dd if=/dev/zero of=swapfolder/4gb.swap bs=1024 count= 4000000
    1. create a folder called swapfolder to put the file in, example above is right in root of drive
    2. create a file 4GB in size (change the value in count for something different, and the name to match for cleanliness
  3. sudo mkswap /swapfolder/4gb.swap
    1. converts it into a swapfile ;)
  4. sudo swapon /swapfolder/4gb.swap
    1. installs it (turns it on)
  5. swapon -s
    1. to check if it is working (can also check system monitor gui program)
  6. sudo gedit /etc/fstab
    1. edit the file that mounts volumes at startup, add the following:
    2. /swapfolder/4gb.swap none swap sw 0 0


Fix “change bios boot order when Windows boots” issue:

  1. Boot linux
  2. Open root file explorer program such as nemo (sudo nemo)
  3. Browse to boot/efi
  4. Rename these two files:
    1. \EFI\Boot\bootx64.efi rename it to \EFI\Boot\windows.efi
    2. \EFI\Microsoft\Boot\bootmgfw.efi rename it to \EFI\Microsoft\Boot\windows.efi
  5. Copy everything from efi\ubuntu to \efi\boot and \EFI\Microsoft\Boot\
    1. Rename \EFI\Boot\grub???.efi to \EFI\Boot\bootx64.efi
    2. And \EFI\Microsoft\Boot\grub???.efi to \EFI\Microsoft\Boot\bootmgfw.efi
  6. Now it should always boot into grub (source lost sorry :(
    1. Even if you select Microsoft Windows from the UEFI (BIOS system setup thingy) it should load our Grub Menu ;)
  7. Of course you will now have to edit the Windows entry for Grub and change the efi file to windows.efi


Re-initialize Grub after system restore (source) More efibootmgr info

  1. For UEFI simply run Sudo efibootmgr -o XXXX,YYYY,ZZZZ,MMMM and choose desired item
    1. sudo grub-install --target=x86_64-efi
    2. sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --root-directory=/ /dev/sda
    3. sudo update-grub
    4. reboot
  2. For BIOS Replace the XY with the drive letter, and partition number, for example:
  3. sudo mount /dev/sda1 /mnt.
    1. sudo mount /dev/sdXY /mnt &&
    2. sudo mount /dev/sdXY /mnt/boot/efi
  4. Now bind the directories that grub needs access to to detect other operating systems, like so.
    1. sudo mount --bind /dev /mnt/dev &&
    2. sudo mount --bind /dev/pts /mnt/dev/pts &&
    3. sudo mount --bind /proc /mnt/proc &&
    4. sudo mount --bind /sys /mnt/sys
  5. Now we jump into that using chroot.
    1. sudo chroot /mnt
  6. Now install, check, and update grub.
    1. grub-install /dev/sdX
    2. grub-install --recheck /dev/sdX
    3. update-grub
  7. Now grub is back, all that is left is to exit the chrooted system and unmount everything.
    1. exit &&
    2. sudo umount /mnt/sys &&
    3. sudo umount /mnt/proc &&
    4. sudo umount /mnt/dev/pts &&
    5. sudo umount /mnt/dev &&
    6. sudo umount /mnt/boot/efi
    7. sudo umount /mnt
  8. Reboot, and you should see Grub2 ;)


Mount NTFS with user ownership/permissions instead of root (needed for home folder symlinking, source)

  • add this to the end of the mount string: umask=007,uid=1000,gid=1000 0 0
  • can mount through the disks gui, which is nice, change the uid/gid if you are not the first user


Customizations to Cinnamon:

  1. Desklets
    1. AccuWeather Desklet
  2. Applets
    1. Stark menu (Solid, and more Window-esk looking, missing super shortcut)
    2. World Clock Calendar (great customizations) [%a, %d-%b-%Y %l:%M %p]
    3. Window List with App Grouping (a little buggy)
    4. Force Quit II (Force Quit didn’t work for me, this one is PERFECT!!)
    5. Weather (it’s OK, temp not very accurate, and has high/low backwords)
    6. Window quicklist with close button (great replacement for default applet & shows # of open windows)
    7. Multi-core system monitor
      1. sudo apt-get install gir1.2-gtop-2.0
    8. Network Usage Monitor With Alerts
  3. Themes
    1. Teal Blue + Black (subtle with transparency, looks great)
  4. Login Theme
    1. Zukitwo-Transparent


VirtualBox 5 (get USB device access to work) [source]

  1. Install Virtualbox (closed source edition, software manager okay)
  2. Install Virtualbox Addons
  3. Add the following groups to your user account (user and Groups control)
    1. lp
    2. vboxusers
    3. vboxf


Chrome custom profile launcher (source)

  • google-chrome --profile-directory=Default
    • or “Profile 1” or “Profile 2” etc.
  • For icon use the profile image at
    • .config/google-chrome/{profile fldr}/Google Profile Picture.png


PrivateInternetAccess & OpenVPN Stuff :

  • First, install the OpenVPN Network Manager plugin (source):
    • sudo apt-get install network-manager-openvpn-gnome
  • Download the VPS from PrivateInternetAccess.com (source):
  • Install the VPNs to the system:
    • sudo sh ./install_ubuntu.sh
      • Have your username handy
  • Now all the VPNs should be present in the network list. You will need to enter your password when you first connect EACH one, I know it’s a small pain.


Potential Apps

  1. Tips and Tricks for Linux Mint after Installation [Mint 17 & 17.1 - Cinnamon Edition]
    1. http://www.rodsbooks.com/refind/index.html
  2. http://www.techsupportalert.com/content/best-free-software-linux.htm/page/0/2
    1. Gnome Do
    2. I-Nex
    3. PySDM
  3. http://www.techsupportalert.com/content/best-free-software-linux.htm/page/0/1
    1. LMMS
    2. MuseScore
  4. The rEFInd Boot Manager
    1. http://www.rodsbooks.com/refind/index.html
  5. sudo apt-get dconf-editor = lots of settings exposed to play with, run as root (gksudo)
  6. QI-Nex (system information)
    1. ppa:i-nex-development-team/stable
  7. Scribus - Open Source Desktop Publishing software
    1. ppa:ubuntuhandbook1/ppa


Shortcut Keys

  1. Ctrl+Alt+Esc = restarts nemo and cinnamon-settings-daemon in case they had crashed, and launches a brand new instance of the Cinnamon desktop. (simply restarts Cinnamon itself, which means your session is exactly as it was, you don’t lose any work and all your windows and applications remain open.)
  2. Ctrl+Alt+Backspace = terminates your session and brings you back to the login screen
  3. Ctrl+Alt+Down Arrow - Scale
  4. Ctrl+Alt+Up Arrow = Expo
  5. Ctrl+Alt+T = Open Terminal


Test Easy2Boot using QEMU (Source)

  1. Run following command to find the E2B USB drive (use lowercase -L for list)
    1. sudo fdisk -l
  2. Boot using qemu-system-x86_64
    1. sudo qemu-system-x86_64 -machine accel=kvm:tcg -m 512 -hda /dev/sdc
  3. "/dev/sdc" is the usb device as listed by fdisk, 512 is the amount of memory to allocate.


Wifi keeps dropping (even though it still says connected, etc.)

  1. Run the following command:
    1. echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf
  2. Reboot and you should be good to go (source, #2 post)


SLOW WIFI, not sure why or how to fix (Speed up wifi):

  1. Fix the bug in Debian Avahi-daemon
    1. sudo gedit /etc/nsswitch.conf
    2. change this:
      1. hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
    3. To this:
      1. hosts: files dns

Wifi speed tests

  1. HP Touchsmart 520 wifi (<1,500 KB/s in linux >5,000KB/s in Windows)
  2. HP 2000-2c20DX wifi - Ralink RT5390R 802.11bgn (<900 KB/s in linux >7,000KB/s in Windows)
    1. Windows LAN = 25 ms / 90 Mbps / 12 Mbps
    2. Windows Wifi = 26 ms / 70 Mbps / 12 Mbps
    3. LinxuMint LAN = 26 ms / 92 Mbps / 12 Mbps
    4. LinuxMint Wifi = 26 / 14 Mbps / 12 Mbps (Only 20% !!!)
  3. Lenovo P500
    1. Win Wifi = 26 ms / 37 Mbps / 12 Mbps
    2. Mint Wifi = 28 ms / 29 Mbps / 8 Mbps


Install WF2190 Realtek RTL8812AU chipset (Mom’s new 2 antenna AC Wifi) [source]

sudo apt-get install linux-headers-$(uname -r) build-essential git

git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux

cd rtl8812AU_8821AU_linux

make

sudo make install


“Pin Ubuntu Linux Kernal, so driver will not “break / need remade & reinstalled” after update [source]

  • sudo apt-get purge linux-generi* linux-image-generi* linux-headers-generi* linux-signed-generi* linux-signed-image-generi*
  • sudo apt-get purge linux-generi* linux-image-generi* linux-headers-generi*


Do you wish to undo the pinning of a kernel version in Ubuntu? You can do that by means of Synaptic: install Synaptic and then use it to re-install the "linux-generic" packages that are relevant for your kernel series.


Install Edimax Wireless AC (EW-7811UTC) [source1] [driversource]

sudo apt-get install git

git clone https://github.com/gnab/rtl8812au.git

cd rtl8812au

make

sudo make install

sudo modprobe 8812au


Install drivers for Integrated Realtek ALC888 Audio (Gary Sullivan desktop)

  1. http://community.linuxmint.com/tutorial/view/1236
    1. Drivers are now located here: http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false


Erase (wipe over) a bad/failing hdd)

  • ddrescue -f -n -T5 /dev/zero /dev/sd? log.txt (sudo apt-get install gddrescue)


Ubuntu Budgie

  1. Add natural scrolling in gnome-control-center (settings) source
    1. sudo apt-get install xserver-xorg-input-libinput


Errors:

  1. Cinnamon just crashed. You are currently running in Fallback Mode
  2. Do you want to restart Cinnamon?
  3. Could not update ICEauthority file /home/jared/.iCEauthority


Boot up time and resources on Jessica’s laptop (HP 2000)

  1. Linux Mint 17.1 Cinnamon
    1. Bootup (from grub menu) = 1 min 12 sec (55 sec)
    2. RAM usage 370 - 410 MB
    3. With MATE DE as default
      1. Bootup - 45 sec
      2. RAM - 300 - 340 MB
    4. With LXDE as default
      1. Bootup - 38 sec
      2. RAM - 200 MB
  2. Elementary OS Fraya
    1. Install time = < 11min (timer got all messed up)
    2. Bootup (from gurb menu) = 30 sec !!!
    3. Ram usage 360 - 400 MB
  3. Linux Mint 17.1 MATE
    1. Install time = 6min 30sec
    2. Bootup = 45 sec
    3. RAM usage = 210 - 250 MB


April’s HP Touchsmart 520

  • Ubuntu on SSD (Linux Mint)
    • Installation = 6 min (6 min LM)
    • First boot = 15 sec
    • Bootup = 10 sec (11 sec LM)
    • Shutdown = 2 sec (3 sec LM)
    • Restart = 20 sec (22 sec LM)
    • Suspend = 2 sec (2 sec LM)
    • Resume = 2 sec (2 sec LM)
  • install ubuntu to hp inspiron
    • HDD (failing???) = 11min
      • shutdown =4 sec
      • startup = 44 sec
      • restart = 57 sec


Fix UEFI boot problems for Windows 8.1 blue screen error 0x0000225 (source)

  1. Boot off UEFI Windows boot disk or partition recovery
  2. Choose “command prompt” (under troubleshooting -> advanced or something like that)
  3. Run the following commands:
    1. bootrec /scanos
    2. bootrec /rebuildbcd
    3. bootrec /fixmbr
    4. bootrec /fixboot


Fix UEFI/BIOS (like HP’s UEFI) that will default to boot windows EVERY TIME (instead of last OS or predefined order)

source

  1. In Windows, mount the UEFI partition (from Admin Command Prompt):
    1. mountvol S: /S
    2. mounts it as the S: drive) and
  2. Copy the file \EFI\Microsoft\Boot\bootmgfw.efi to use some other name (for example:
    1. copy EFI\Microsoft\Boot\bootmgfw.efi EFI\Microsoft\Boot\bootmgfwNT.efi
    2. but you can change the name to anything else).
  3. Update the Windows UEFI entry to point to the new name:
    1. bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfwNT.efi
    2. adapt to your set name accordingly.
  4. Optionally, change the name of the Windows boot loader so that you would be certain that it points to the new file location:
    1. bcdedit /set {bootmgr} description "Fixed Windows path"


---- Other stuff, not really useful for Linux yet… ---


Apps Used in Windows 8.1 need to be figured out:

  • Foxit Reader, Adobe DC, Foxit Phantom
  • SynBack Free, Win32DiskImager
  • Advanced IP Scanner, Acronis TrueImage 2014, AOMEI PE Builder 1.4
  • AOMEI Backupper Standard Edition 2.5, AOMEI Partition Assistant Standard 5.6
  • Kindle for PC, Calibre, Send-to-Kindle, SDFormatter,
  • Andy, WinLayoutManager, Sizer, Boxcryptor,
  • Remote Desktop Connection,

Apps Used in Windows 8.1 that work in Linux:

  • Chrome, Firefox, Zimbra, qBittorrent, Office, Kodi, Picasa, VLC, Infra-Recorder, Audacity, WinDirStat
  • Lode Runner, VirtualBox, Notepad, Snipping Tool, PureText, PrivateInternetAccess, Dropbox, DiskCryptor, Emcee 3.3, TeamViewer 10


Boxcryptor & EncFS

  • Can BoxCryptor mount encrypted volumes created with EncFS?
  • (Last Updated: Apr 09, 2013 08:29PM CEST, source)
    • Yes, but not all features of EncFS are supported. Right now, BoxCryptor can mount EncFS encrypted volumes with the following configurations:
    • EncFS version >= 1.7
    • Cipher algorithm: AES (with key length 128, 196, 256)
    • Plaintext or Stream encrypted filenames (no block encryption!)
    • No filename initialization vector chaining
    • No per-file initialization vectors
    • No external IV chaining
    • No block MAC headers
    • No per-block random bytes
  • Create an EncFS volume compatible with BoxCryptor Classic (source)



Grub Menu entries:

SSD Linux Mint 17.1 Cinnamon 64-bit (EUFI) 3.13.0-37-generic (/dev/sda5)

recordfail

gfxmode $linux_gfx_mode

insmod gzio

insmod part_gpt

insmod ext2

set root='hd0,gpt5'

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 854d0938-9297-4e6f-82cf-c0ff43cf979b

else

search --no-floppy --fs-uuid --set=root 854d0938-9297-4e6f-82cf-c0ff43cf979b

fi

linux /boot/vmlinuz-3.13.0-37-generic root=UUID=854d0938-9297-4e6f-82cf-c0ff43cf979b ro quiet splash $vt_handoff

initrd /boot/initrd.img-3.13.0-37-generic


SSD Windows 8.1 Pro (/dev/sda3)

insmod part_gpt

insmod fat

set root='hd0,gpt3'

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 F612-8362

else

search --no-floppy --fs-uuid --set=root F612-8362

fi

chainloader /EFI/Microsoft/Boot/bootmgfw.efi


HDD Linux Mint 17.1 MATE 64-bit, 3.13.0-37-generic (/dev/sdb7)

insmod part_gpt

insmod ext2

set root='hd1,gpt7'

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt7 --hint-efi=hd1,gpt7 --hint-baremetal=ahci1,gpt7 0cb793f7-0ef1-4464-8d05-06b2c37ab270

else

search --no-floppy --fs-uuid --set=root 0cb793f7-0ef1-4464-8d05-06b2c37ab270

fi

linux /boot/vmlinuz-3.13.0-37-generic root=UUID=0cb793f7-0ef1-4464-8d05-06b2c37ab270 ro quiet splash $vt_handoff

initrd /boot/initrd.img-3.13.0-37-generic


HDD Windows 8.1 Pro (/dev/sdb2)

insmod part_gpt

insmod fat

set root='hd1,gpt2'

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2 1805-23C9

else

search --no-floppy --fs-uuid --set=root 1805-23C9

fi

chainloader /efi/Microsoft/Boot/bootmgfw.efi