2013年9月27日 星期五

Ubuntu 12.04/14.04/16.04 install looks like 10.04

1. update sabertooth z87 bios to latest version in boot setup menu

2. install ubuntu 12.04.5 or 14.04.2
http://releases.ubuntu.com/12.04/
http://old-releases.ubuntu.com/releases/14.04.2/

ubuntu 14.04.2 linux kernel version is 3.16.0-xxx

3. burn iso file in DVD

4. setting DVD first boot in motherboard bios

5. create primary partition assign mount / ([/] = root directory)
My PC: 1Tb Hard disk and 8gb real ram
size         : 496gb
type         : Primary
use as      : Ext4
Mount point : /

6. create swap partition on logical
size     : 8gb
type     : Logical
use as  : swap area

7. create extend partition on logical (option)
size     : 512gb
type     : Logical
use as  : Ext4
Mount point : (assign later)

Example:
http://ivanblagojevic.com/how-to-install-ubuntu-14-04-lts-on-an-empty-hard-disk-tutorial

8. update
software-properties-gtk -> Other software
enable all [Canonical] check boxes

software-properties-gtk -> Updates
enable all [...updates] check boxes

automatically check for updates: never
when there are security updates: display immediately
when there are other updates: display every two weeks
notify me of a new Ubuntu version: never

~~~close software-properties-gtk without reload

sudo rm /var/lib/apt/lists/lock
sudo apt update

9. change /bin/sh to bash
sudo dpkg-reconfigure dash
select [No] will use bash
ls -al /bin/sh

10. install nvdia driver (option)
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-current-updates
http://www.upubuntu.com/2012/05/how-to-install-nvidia-linux-display_17.html

11. lightdm
ver 16.04/18.04
sudo apt install lightdm
sudo dpkg-reconfigure lightdm  -> select lightdm
sudo apt remove gdm3

12. install gnome metacity
//ver 14.04
sudo apt-get install gnome-session-fallback
//ver 16.04~20.04 must use sudo
sudo apt install gnome-session-flashback

13. enable root login (option)
//set root account
sudo passwd root

//ver 12.04
sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'

//ver 14.04
sudo sh -c 'echo "greeter-show-manual-login=true" >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf'

//ver 16.04~20.04
sudo sh -c 'echo "greeter-show-manual-login=true" >> /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf'

14. if gdm3 files exist do comment
sudo gedit /etc/pam.d/gdm-autologin
# auth required pam_succeed_if.so user != root quiet_success

sudo gedit /etc/pam.d/gdm-password
# auth required pam_succeed_if.so user != root quiet_success

15. root login error message fix (option)
sudo gedit /root/.profile
~find
mesg n || true ~~~or~~~ mesg n 2> /dev/null || true
~change to
tty -s && mesg n

16. root auto login
~select (a) or (b)
(a) lightdm
sudo sh -c 'echo "autologin-user=root" >> /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf'

ls -al /etc/lightdm/lightdm.conf
~if file exist then
sudo sh -c 'echo "autologin-user=root" >> /etc/lightdm/lightdm.conf'

(b) if using gdm3 (option)
gedit /etc/gdm3/custom.conf
//enable
AutomaticLoginEnable = true
AutomaticLogin = root

17. set root default session (option)
//for 16.04/18.04
~~check
sudo update-alternatives --config x-session-manager
~~setting for gnome-flashback-metacity must use sudo
sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/lib/gnome-flashback/gnome-flashback-metacity 60

18. enable frame buffer mode (option for 14.04/16.04)
gedit /etc/default/grub
find [quiet splash]

ver 14.04  
add vga=792
to
quiet splash vga=792
http://pierre.baudu.in/other/grub.vga.modes.html

ver 16.04
add nomodeset
to
quiet splash nomodeset
plus 2 lines
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=keep

gedit /etc/modprobe.d/blacklist-framebuffer.conf
blacklist vesafb
to
#blacklist vesafb

update-grub
reboot

19. aptitude install can fixed depends problem
sudo apt install aptitude

20. install tools depends lib
sudo apt install build-essential

21. right click open terminal in folder
apt-get install nautilus-open-terminal
nautilus -q

22. show trash icon on desktop
gsettings set org.gnome.nautilus.desktop trash-icon-visible true

23. show right click menu icon
gsettings set org.gnome.desktop.interface menus-have-icons true

24. menu icon change press Alt + mouse-R

25. add/remove shortcut on Nautilus file browser
mkdir $HOME/Downloads //no need to make Desktop
gedit ~/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"

gedit /etc/xdg/user-dirs.defaults //prevent restore from system restart
DESKTOP=Desktop
DOWNLOAD=Downloads
nautilus -q

26. add/remove bookmark of Nautilus files browser
gedit ~/.config/gtk-3.0/bookmarks

27. change printscreen save path
gsettings set "org.gnome.gnome-screenshot" "auto-save-directory" "file:///$USER/Desktop"

28. disable overlay scroll bars to normal
gsettings set com.canonical.desktop.interface scrollbar-mode normal

29. terminal screen repeat key
gsettings set org.gnome.settings-daemon.peripherals.keyboard repeat true

30. big-5 code input
~must use sudo
sudo software-properties-gtk -> enable all canonical
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 835AB0E3
sudo apt install gcin
sudo /usr/bin/gnome-language-selector -> gcin
applications->pereferences->gcin tools-> face setting
disable popup input window
disable gcin window position use
edit area select both show
disable tray
reboot

31.
If boot ubuntu meet - tsc: Fast TSC calibration failed
cat /sys/devices/system/clocksource/clocksource0/available_clocksource
show [tsc hpet acpi_pm] and we select acpi_pm

gedit /etc/default/grub
change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=792"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=792 clocksource=acpi_pm"
update-grub
reboot

32.
If task bar disappear or gsettings -> Using the 'memory' GSettings backend
mv /etc/ld.so.conf.d/libc.conf /etc/ld.so.conf.d/xi386-linux-gnu.conf
ldconfig
reboot

33. samba share file
apt install samba
gedit /etc/samba/smb.conf

//after
# with the net usershare command.
//add
usershare owner only = false

//modify
usershare allow guests = no
//to
usershare allow guests = yes

//add account and password
[upload]
path = /mnt/upload
browseable = yes
read only = no
writable = yes
valid users = root
~~save

smbpasswd -a root

ubuntu 16.04
/etc/init.d/samba restart
ubuntu 18.04
sudo service smbd restart

34. root enable audio
pulseaudio -D

35.enable /etc/rc.local
gedit /etc/systemd/system/rc-local.service
~~~add
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
~~~save

gedit /etc/rc.local
#!/bin/bash
echo "hello test" > /var/log/test.log
exit 0
~save

chmod 755 /etc/rc.local

sudo systemctl daemon-reload
sudo systemctl enable rc-local.service
sudo systemctl restart rc-local.service
sudo systemctl status rc-local.service

refer to:
https://www.freedesktop.org/software/systemd/man/systemd.service.html

36. firefox new version
apt-get purge firefox
add-apt-repository ppa:mozillateam/ppa
apt-get update
apt-get install firefox-esr

37. notepadqq
//notepad need qt 5.4.2 under ubuntu 14.04
http://download.qt.io/archive/qt/5.4/5.4.2/qt-opensource-linux-x64-5.4.2.run
sudo chmod +x qt-opensource-linux-x64-5.4.2.run
sudo ./qt-opensource-linux-x64-5.4.2.run
specify install folder /opt/Qt

//un-install if need
folder location -> /opt/Qt
/opt/Qt/MaintenanceTool

sudo add-apt-repository ppa:notepadqq-team/notepadqq
sudo apt-get update
sudo apt-get install notepadqq

//for root
gedit /usr/share/applications/notepadqq.desktop
Exec=notepadqq %U
to
Exec=notepadqq %U --allow-root

gedit /usr/bin/notepadqq
~after 
SCRIPTPATH="$(dirname "$(readlink -f "$0")")"
~add
export QTWEBENGINE_DISABLE_SANDBOX=1

38. Chinese words keyin
software-properties-gtk
enable all canonical
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 835AB0E3
apt-get install gcin
gnome-language-selector -> keyboard input: gcin
applications->pereferences->gcin tools-> face setting
disable popup input window
disable gcin window position use
edit area select both show
disable tray
reboot

39.view all package
apt-get install synaptic

40. change close button to right
change it to the right run
gsettings set org.gnome.desktop.wm.preferences button-layout :minimize,maximize,close
change it to the left run
gsettings set org.gnome.desktop.wm.preferences button-layout close,minimize,maximize:

41. show hidden files permanently
gsettings set org.gtk.Settings.FileChooser show-hidden true

42. list view permanently
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
#restore
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'icon-view'

43. find filename in zip directory recursively
find . -name "classes.zip" | xargs -I{} sh -c 'echo searching in {}; zipgrep "StringHelper" {}'

44. beep enable
gedit /etc/modprobe.d/blacklist.conf
~comment
#blacklist pcspkr
~then
apt install beep
reboot

45. disable nautilus typeahead search
gsettings set org.gnome.nautilus.preferences enable-interactive-search false
~or
apt install dconf-editor
dconf-editor -> org -> gnome -> nautilus -> preferences
[enable-interactive-search] uncheck

46. disable boot grub timeout select a. or b.
(a)
gedit /boot/grub/grub.cfg
~comment
#if [ "${timeout}" = 0 ]; then
#  set timeout=10
#fi
~save & reboot

(b)
gedit /etc/grub.d/30_os-prober
~comment
#if [ "\${timeout}" = 0 ]; then
#  set timeout=10
#fi
~save & continue

gedit /etc/default/grub
GRUB_TIMEOUT=0
~save & continue

update-grub
reboot

47. adobe reader
apt install gdebi libxml2:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libatk-adaptor:i386 overlay-scrollbar-gtk2:i386 unity-gtk2-module:i386
wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb
gdebi ./AdbeRdr9.5.5-1_i386linux_enu.deb
acroread

48. chrome
wget --continue https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
gdebi ./google-chrome-stable_current_amd64.deb
sudo gedit /usr/bin/google-chrome
~find
exec -a "$0" "$HERE/chrome" "$@"
~change to
exec -a "$0" "$HERE/chrome" "$@" --no-sandbox

1 則留言:

  1. I trace env variable $DESKTOP_SESSION
    It set in lightdm in source https://github.com/canonical/lightdm
    ~in seat.c
    session_set_env (session, "DESKTOP_SESSION", session_name);

    回覆刪除