Monday, February 22, 2016

Arch Linux


Linux Mint is my go to distribution for Linux. It simply works out of the box and is less likely to break as time goes on if you stay reasonably withing the Mint repositories.

I have always been tempted to build an Arch distribution from scratch and finally got around to it - well, sort of. In Virtualbox I got almost through the "from scratch" process and ran into a couple questions on the Grub install. I had to leave the machine and was not able to get it back up to finish the setup. The best guide currently is here. Forget the "Beginner" section on the Arch site. It simply is not helpful unless you already know the terminal commands. If I had been using the 3rd party guide, I would have had my questions answered on the original install.

So I took the next route with Architect Linux installer. It basically takes you through the steps of Arch setup and automates the terminal commands in answer to questions. Purist Arch people would hate it but once you go through a "from scratch" you know basic procedures. Torturing yourself further is no advantage.

The Architect Linux installer worked very well. The one place that needs caution is the "refresh pacman keys". This takes forever and the terminal sits forever. You must wait for the update to complete or you will have problems with future installs. There may be a way to update the keys after install but I don't know what it is. Currently here is the best guide for Architect Linux installer.

My Architect Linux install worked very well and I started tweaking this and that. Then I questioned why I would keep spending time trying to get this scratch install look and act like Manjaro. Why not just install Manjaro Xfce and go on with life? But I did learn a few things by doing the from scratch install so all was not wasted.

After install this is helpful:

Install yaourt on Arch Linux
sudo mousepad /etc/pacman.conf
add this to the end of the file:
[archlinuxfr]
 SigLevel = Never
 Server = http://repo.archlinux.fr/$arch

 Save the file and then open terminal and enter:
sudo pacman -Sy yaourt
sudo pacman-db-upgrade && sudo pacman-optimize && sync

Good video on tweaking Xfce (4 of them)

Stuff
Remove program, dependencies and settings
 sudo pacman -Rns (program name)
Install Pamac sudo yaourt pamac (many installs and y/n entries)
Engrapa archive manager seems not to work
sudo pacman -S gtk-theme-config (good theme tweaker)
sudo pacman -S leafpad (actually mousepad works to edit in root anyway)

Here are my notes for scratch install: (works but not desktop yet) yaourt installed but not work

Install Arch to virtual drive
We will be making and using one disk.
The disk will be sda
The single partition will be sda1
$ ping google.com
cntl+z
$ dhcpcd (write down the adapter name)emp0s3
$ fdisk -l (to see the existing partitions)
 (you can pipe |less to scroll up/down)
use cfdisk (to partition)(by far easiest)
 choose "dos"
 remember to set root partition to "boot"
 quit
$ fdisk -l (again to check)
$ mkfs.ext4 /dev/sda1
$ mount /dev/sda1 /mnt 
(Arch install will make the directories)
$ nano /etc/pacman.d/mirrorlist 
(move first US to top for fastest but not necessary)
 hit Alt+6 to copy the line
 hit Ctrl+U to paste
$ pacstrap /mnt base base-devel
 (this installs Arch)
 you may wish to add grub (xorg-server xorg-server.utils xorg-apps alsa-utils git terminator)
 if need wifi
 (dialog wpa-supplicant)
$ genfstab -U -p /mnt >> /mnt/etc/fstab
 (this tells Arch where to mount and boot)
$ nano /mnt/etc/fstab (check for drive)
$ cat /mnt/etc/fstab
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /          ext4       rw,relatime,data=ordered 0 1
$ arch-chroot /mnt /bin/bash
nano /etc/locale.gen
uncomment the following lines (maybe pick both)
 # en_US.UTF-8 UTF-8
 # en_US ISO-8859-1
$ locale-gen
$ echo LANG=en_US.UTF-8 > /etc/locale.conf
$ export LANG=en_US.UTF-8
$ ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
$ hwclock --systohc --utc
find computer hostname by $ hostname
(I'm not where to set the computer name originally)
$ echo (computer name) > /etc/hostname
$ nano /etc/hostname (see if it made it)
may need to edit /etc/hosts ???
$ passwd (for root)
$ useradd -mg users -G wheel,storage,power -s /bin/bash (your_new_user)
$ passwd (your_new_us)
$ pacman -S sudo
$ nano /etc/sudoers
then do the following
(# uncomment to allow members of group wheel to execute any command
wheel ALL (ALL) ALL
cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/my_network (change the adapter to yours from the ip output) emp0s3
netctl enable my_network
pacman -S grub (if not installed in beginning)
grub-install /dev/sda
 if block error do --force /dev/das
$ mkinitcpio -p linux
$  grub-mkconfig -o /boot/grub/grub.cfg
$ systemctl enable dhcpcd
exit
umount /mnt
shutdown -P -h now
or reboot
$ pacman -Syy
You should shutdown the virtual machine and take a snapshot.
***This painful experience should get up a working Arch system***
****Now for installing a GUI***
$ sudo pacman -Syu
$ sudo pacman -S xorg-server xorg-server-utils
$ sudo pacman -S gnome gdm
$ sudo pacman -S open-vm-tools
***below not work but gets black screen when enable and start gdm.service 
$ sudo systemctl enable gdm.service
$ sudo systemctl start gdm.service
gdm.service will not start

Saturday, February 13, 2016

Virtual Box

Great reference video:
https://www.youtube.com/watch?v=J4R2mDlIEKo
He has 4 in the series.

Be sure to grab VB USB Boot HERE. Great for booting a flash drive for testing without rebooting the PC.

Reminders:
Install both main and extension pack
Install "guest additions"
Start with 2048 virtual ram (can be adjusted later when virtual machine is stopped)
2 processors
Max video memory
30GB HD approx dynamically allocated
bridged network adapter works better but NAT works also

If linux host must do this for thumb drive access
  sudo usermod -a -G vboxusers (your user name)
  In client just grab through devices menu
Shared clipboard
  machine not running general - advanced set to enable
  machine on devices shared - clipboard - set

View menu - full screen (popup for menu is on bottom of screen, can change position in general settings

Set up video capture of vb in display menu. Enable after vb machine is running or it captures everything.

Drag and drop only works in Linux virtual machines. Only host to guest and only on Linux virtual machines.

Save machine state: click x for close vb and select "save machine state".

Seamless windows: under view tab. To return "right cntl - (I missed it)

Snapshots: Save the virtual machine at any point. With machine off click on snapshot icon. Must create an original parent snapshot. Then can do new snapshots and go back to any of them.
When machine running go through machine menu. This saves snapshot and machine state. This takes more disk space. This is all very cool. Avoid taking snap shots when machine running unless really need to. Don't delete snapshots from middle of tree. Just change descriptions. Normally uncheck save machine state when restoring a snapshot.

Share folder:
Guest Additions must be installed on each machine.
(In the Linux (or any guest) machine window go to VB menu - Devices and choose "Insert Guest Additions". A link will be dropped onto the Linux desktop. Start the link.)
Before machine started:
Create folder on host machine. No need to share.
In vb go to shared folders auto mount
In Linux the folder shows in "media"
Must add yourself to the group
groups (user name)
sudo usermod -a -G vboxsf (user name)

Display scaling with window enlargement need Guest Additions also.

Errors:
SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr
Solution: Turn off the option "Enable Nested Paging" in the VirtualBox configuration under Settings->System->Acceleration.





Simple Network Share on Linux

Here is a reference video:
https://www.youtube.com/watch?v=jYTrkYfAPIk

ifconfig in terminal to find your ip address
terminal to folder to share
in terminal type python3 -m SimpleHTTPServer --bind 192.168.1.31 8000
obviously change ip to actual
check the port used - something like 8000
open gufw and allow the port on the firewall for tcp
or turn gufw off because this is temporary
other machine type ip:port for the shared machine (http://192.168.1.15:8000)
sever closes when terminal is closed

Wednesday, February 10, 2016

Send Large Files


(For huge files just use first two. The others will choke.)
https://mega.nz
(must have free account 50GB best for personal archive)

https://www.mediafire.com/
(must have free account 50GB best for personal archive)

(Very easy & simple . . . file delete in 2 days)

https://transfer.pcloud.com/
(email link to and encrypt)

I would stick with the above.

https://anonfile.com/
Takes huge files, can delete

https://send-anywhere.com/
Works great - leave both browsers open - SLOW

https://reep.io/
(send from your PC - leave both browsers open)
(I had this choke on 1GB file)

No Password or Expiration Control
https://www.filedropper.com/
(send quick link to file on cloud server -5GB)

Yes Password and Expiration Control
https://www.sendtransfer.com/
(email to and set expire - 10GB)
(I had this choke on 1GB file)

https://transfer.pcloud.com/
(email to and encrypt)


Saturday, February 6, 2016

Chrome OS on old PC

Try this
http://www.neverware.com/landingpage#pricingcomparison

Here is a list of PCs that work. I assume other will also.

CloudReady installation guide (PDF)

I have not tried this. I did put Chrome OS on another old laptop but can't find that source. This may have been it. Just using Linux may be a better option.

But then why not just install Linux Mint and use the darn thing.

Pin Not Available

Crazy Error I had not seen before. Pin not available blah blah. I restarted a few times and it finally worked. If it doesn't some say to...