Saturday, January 16, 2016

remove unwanted service - Be Carefull!!

* remove unwanted service
http://www.hecticgeek.com/2012/06/few-things-to-speed-up-ubuntu/


* compiz and unity-tweak-tool
sudo apt-get install unity-tweak-tool
sudo apt-get install unity-webapps-common

unity-tweak-tool &
  > Window Manager > General >
    General > Window snapping > turn off
    General > General > turn off [Animations]

** disabling-zeitgeist
http://askubuntu.com/questions/45548/disabling-zeitgeist

zeitgeist-daemon --quit
cd /usr/bin/
sudo mv zeitgeist-daemon zeitgeist-daemon.bak
sudo mv zeitgeist-datahub zeitgeist-datahub.bak


* disable avahi
from: http://askubuntu.com/questions/339702/network-service-discovery-disabled-what-does-this-mean-for-me

- Network service discovery disabled: What does this mean for me?
Every time at boot I get a message “Network service discovery disabled. Your current network has a .local domain, which is not recommended and incompatible with the Avahi network service discovery. The service has been disabled.”

A-1.

It looks like avahi-daemon is started when the network connection is established
(/etc/network/if-up.d/avahi-daemon). This notification is informing you that
mDNS (Avahi) has been disabled. It's only used for a small number of
applications that only work on the local network, it won't adversely affect your
internet connection or DNS.  The most well known use for mDNS is sharing music
with Rhythmbox (or iTunes) over your LAN. It's an Apple technology, but it's
largely been ignored in favour of uPNP or DLNA.

To disable it, you must edit the file /etc/default/avahi-daemon as root:

sudo -i
gedit /etc/default/avahi-daemon

and add this line (or change it if already exists to):
AVAHI_DAEMON_DETECT_LOCAL=0

Source: http://ubuntuforums.org/showthread.php?t=1632952


A-2.
According to the Avahi wiki there are two workarounds:
In /etc/avahi/avahi-daemon.conf uncomment and change the line with domain name to
domain-name=.alocal
Second one:
In /etc/nsswitch.conf delete a [NOTFOUND=return] text.


* disableDeja-dup backup
sudo apt-get autoremove deja-dup

How to change the background colour of a window?

 How to change the background colour of a window?
http://askubuntu.com/questions/68003/how-to-change-the-background-colour-of-a-window
First install dconf-editor if you dont have it already:
sudo apt-get install dconf-tools
And then run the dconf editor:

sudo dconf-editor

Browse to org.gnome.desktop.interface and locate: gtk-color-scheme

Edit the property to the colours of your choosing:

 >> add with it
bg_color:#ebe0be;selected_bg_color:#737370;base_color:#ffd39b
or
bg_color:#f0f1f2;selected_bg_color:#4677f0


The colours are in hexadecimal in the format #RedRedGreedGreedBlueBlue
For example:
    Black = #000000 (None of any colour)
    White = #ffffff (The maximum
    of every colour) Red = #ff0000 (Red Only)
Happy Customising!

(add-hook 'org-mode-hook 'css-color-turn-on-in-buffer)

로그인 후 Launchear 가 사라질 때 - 재설정

* 로그인 후 Launchear 가 사라질 때 - 재설정
 sudo reboot
 sudo apt-get update
 sudo apt-get install --reinstall ubuntu-desktop
 sudo apt-get install unity
 sudo apt-get install compizconfig-settings-manager
 dconf reset -f /org/compiz/
 setsid unity
 gconf-editor
 sudo gconf-editor
 sudo apt-get install gconf-editor
 sudo gconf-editor
 ps -ax
 dpkg -l |grep remmina
 dpkg --list |grep gstream
 dpkg -l |grep avahi
 sudo vi /etc/default/avahi-daemon
 dpkg -l |grep deja-dup
 sudo apt-get autoremove deja-dup
 sudo apt-get autoremove eja-dup-backend-gvfs
 dpkg -l |grep deja
 dpkg -l |grep deja-dup
 sudo apt-get autoremove deja-dup
 sudo apt-get autoremove indicator-messages
 dpkg -l |grep zeit
 sudo apt-get purge libzeitgeist-2.0-0 rhythmbox-plugin-zeitgeist zeitgeist-core zeitgeist-datahub
 dpkg -l |grep Telepathy
 sudo apt-get purge telepathy-haze
 sudo apt-get purge libfolks-telepathy25:amd64
 sudo apt-get purge libtelepathy-glib0:amd64
 sudo apt-get purge libtelepathy-logger3:amd64
 sudo apt-get purge telepathy-idle telepathy-indicator telepathy-logger telepathy-mission-control-5 telepathy-salut
 sudo apt-get purge rhythmbox rhythmbox-plugin-cdrecorder rhythmbox-plugin-magnatune rhythmbox-plugins unity-lens-music unity-scope-gmusicbrowser unity-scope-musicstores librhythmbox-core9
 sudo apt-get remove geoclue geoclue-ubuntu-geoip geoip-database whoopsie


packages

* libreoffice
sudo apt-get install libreoffice-base
sudo apt-get install libreoffice-sdbc-postgresql

-> connection string for postgres: postgresql://localhost:5432/emacsdb

* thunderbird
enigmail

USER_ME@gig:~$ gpg --version
gpg (GnuPG) 1.4.18

enigmail 1.8.2 message
> This is the last version of enigmail to support this version of GnuPG. Future version only work with GnuPG 2.0 and newer.
We therefore recommend that you upgrade to the lastest version of GnuPG 2.0.x.


* pdfsam
  A tool to split and merge pdf documents


* sudo apt-get install arc-theme
webbrowser-app
sudo apt-get install webbrowser-app

Postgres

* postgres
- postgres
  > Client Installation
 sudo apt-get install postgresql-client
 psql -h server.domain.org database user
 SELECT * FROM table WHERE 1;

- To install the server locally use the command line and type:
  apt-cache search postgres
  ...

- pgadmin3
sudo apt-get install pgadmin3

- Basic Server Setup

: this connects as a role with same name as the local user,
: i.e. "postgres", to the database called "postgres" (1st argument to psql).

sudo -u postgres psql postgres

Set a password for the "postgres" database role using the command:
\password postgres


sudo -u postgres psql postgres -h localhost
ALTER USER USER_ME WITH PASSWORD 'MY_PASS_IS';


cd /usr/share/postgresql/9.4/extension


- Create database
 To create the first database, which we will call "mydb", simply type:
 sudo -u postgres createdb mydb


 > Install Server Instrumentation (for PgAdmin) for Postgresql 8.4 or 9.3

PgAdmin requires the installation of an add-on for full
functionality. The "adminpack" addon, which it calls Server
Instrumentation, is part of postgresql-contrib, so you must install
that package if you haven't already:

sudo apt-get install postgresql-contrib

  Then to activate the extension, for ""Postgresql 8.4"", run the adminpack.sql script, simply type:
 sudo -u postgres psql < /usr/share/postgresql/8.4/contrib/adminpack.sql

For "Postgresql 9.3"+ install the adminpack "extension" in the "postgres" database:
 sudo -u postgres psql
 CREATE EXTENSION adminpack;

 sudo -u postgres psql < /usr/share/postgresql/9.4/extension/adminpack--1.0.sql

- Alternative Server Setup

 sudo -u postgres createuser --superuser $USER
 sudo -u postgres psql
 postgres=# \password $USER
 sudo -u postgres createdb $USER
 psql
 create database amarokdb;
 pgadmin3
 sudo vi /etc/postgresql/9.4/main/pg_hba.conf

# Database administrative login by Unix domain socket
local   all             postgres                                peer
to
# Database administrative login by Unix domain socket
local   all             postgres                                md5

sudo /etc/init.d/postgresql reload

cd /etc/postgresql/9.4/main/

$ sudo vi pg_hba.conf
# "local" is for Unix domain socket connections only
#local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
#
# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
host    all             all             10.10.50.0    255.255.255.0      md5


$ sudo postgresql.conf
add
  listen_addresses = '*'

then
sudo /etc/init.d/postgresql reload


To create a database with a user that have full rights on the database, use the following command:

sudo -u postgres createuser -D -A -P myuser
sudo -u postgres createdb -O myuser mydb

sudo /etc/init.d/postgresql reload
sudo /etc/init.d/postgresql restart

# "local" is for Unix domain socket connections only
# local   all             all            trust
#
# IPv4 local connections:
#host    all             all            127.0.0.1/32         md5
host    all             all             0.0.0.0/0            md5
host    emacsdb         USER_ME             0.0.0.0/0            md5
host    USER_ME             USER_ME             0.0.0.0/0            md5
# host all all ::1/128 md5 host all postgres 127.0.0.1/32 md5
#
# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
#host    all             all             10.10.50.0    255.255.255.0      md5


- pgmodeler
http://sourceforge.net/projects/pgmodeler/files/latest/download

svn

* svn
sudo ~/bin/svnsrv

--  ~/bin/svnsrv
#!/bin/sh
svnserve -d --foreground -r /data/srv/svn/repos


 ; ubutu user & group del command is --> userdel, groupdel

 : Follow This link: http://odyniec.net/articles/ubuntu-subversion-server/
 : http://blogmubuntu.blogspot.kr/2014/05/svn.html
- install
$ sudo apt-get install subversive

> check service port
$ cat /etc/services |grep svn
svn        3690/tcp    subversion    # Subversion protocol
svn        3690/udp    subversion

- set account - make home directory
$ mkdir /data/srv/svn
$ mkdir /data/srv/svn/repos


- add group & user
$ cat /etc/passwd | grep svn
$ sudo groupadd svn

$ sudo chgrp svn /data/srv/svn/
$ sudo chgrp -R svn /data/srv/svn/
$ sudo chmod g+w /data/srv/svn
$ sudo chmod -R g+w /data/srv/svn

> add set-group-ID bit
$ sudo chmod g+s /data/srv/svn/repos

; check  >> ls -alh /data/srv/svn/
: drwxrwsr-x 2     1002 svn 4.0K  1월  1 03:42 repos

$ sudo usermod -a -G svn USER_ME
$ sudo usermod -a -G svn qesdes

$ cat /etc/group |grep svn
: >>> check svn:x:1002:USER_ME,qesdes

: 그룹은 재 로그인되지 전까지 유효하지 않음
: However, your new group membership will not be effective for the
: current session, so you need to log out and log back in. When you're
: back, you can verify that your account is recognized as a member of
: the svn group:

$ groups
michal adm dialout cdrom plugdev lpadmin admin sambashare svn


- test
$ umask 002
$ svnadmin create /data/srv/svn/repos/test
$ umask 022
svn checkout file:///data/srv/svn/repos/test
Checked out revision 0.

$ cd test
$ echo 'Hello, World!' > hello.txt

$ svn add hello.txt
A         hello.txt


$ svn commit -m "Added a 'hello world' text file."
Adding         hello.txt
Transmitting file data .
Committed revision 1.


- Accessing the Repository with the Svn Protocol

sudo vi /data/srv/svn/passwd-team
--
[users]
USER_ME = asdfadf
qesdes = asdfasdf

$ sudo chmod 600 /data/srv/svn/passwd-team


$ vi /data/srv/svn/repos/test/conf/svnserve.conf

There's probably some default configuration in the file, but you can just remove everything and enter this:

[general]
anon-access = none
auth-access = write
password-db = /data/srv/svn/passwd-team
realm = Team

- launch svnserve in foreground

$ sudo svnserve -d --foreground -r /data/srv/svn/repos

$ svn checkout svn://10.10.50.11/test --username USER_ME

$ cd test
$ vi hello.txt
 then
$ svn commit -m "Modified the hello.txt file."

font and dconf-editor

* Source Code Pro - OTF fonts
    http://askubuntu.com/questions/193072/how-to-use-the-new-adobe-source-code-pro-font

    Download the archive from the Source Code Pro homepage. You can do
    it also using wget: Open a terminal (ctrl-alt-t or press the win
    key and type "terminal") and type

    wget https://github.com/adobe-fonts/source-code-pro/archive/2.010R-ro/1.030R-it.zip
    Unzip the archive (you can use Nautilus for that, or use the following command).

    unzip 1.030R-it.zip

    Create a directory in your home directory called ".fonts" (either
    go to home in Nautilus and create a new folder, or type the
    following from the terminal)

    mkdir -p ~/.fonts

    If you already have that directory, don't worry.
    Move the Open Type fonts (*.otf) to the newly created .fonts directory. In command line, that would be

    cp source-code-pro-2.010R-ro-1.030R-it/OTF/*.otf ~/.fonts/
    If you haven't done it yet, open a terminal, and type

    fc-cache -f -v

Your font is now ready to use and the applications should be able to see it.
All in one script for those who simply want to copy/paste the answer

#!/bin/bash
mkdir /tmp/adodefont
cd /tmp/adodefont
wget https://github.com/adobe-fonts/source-code-pro/archive/2.010R-ro/1.030R-it.zip
unzip 1.030R-it.zip
mkdir -p ~/.fonts
cp source-code-pro-2.010R-ro-1.030R-it/OTF/*.otf ~/.fonts/
fc-cache -f -v
If you want to install system wide instead of per user, copy the files to /usr/local/share/fonts/ instead of ~/.fonts/.


* dconf-editor
sudo apt-get install dconf-editor
dconf-editor &

packages

* rss reader
QuiteRSS
$ quiterrss
  File > Import Feed or 파일 > 피드 불러오기 --> ~/Books/Rss/QuiteRss_feed_20151227b.opml

  http://rss.slashdot.org/Slashdot/slashdot
  http://pod.ssenhosting.com/rss/bbong420/bbong420.xml
  http://www.khan.co.kr/rss/rssdata/total_news.xml
  http://www.codeproject.com/WebServices/MessageRSS.aspx?fid=1159
  http://www.emacswiki.org/emacs?action=rss
  https://opensource.com/feed
  http://www.sisainlive.com/rss.xml
  http://www.ddanzi.com/rss
  http://media.daum.net/syndication/today_sisa.rss
  http://www.aljazeera.com/xml/rss/all.xml
  http://sachachua.com/blog/category/emacs-news/feed
  http://feeds.feedburner.com/UbuntuGeek?format=xml


* thunderbird
  thunderbird (already installed - just start)
  thunderbird &

  /data/USER_ME/.thunderbird/profiles.ini 에서 "Path=dmyimpug.default" 경로를 맞춰 준다.
--
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=dmyimpug.default
Default=1


- thunderbird
 > personal folder
  mkdir ~/Mail/thunderbird/LocalBox
  profiles.ini in USER HOME directory .thunderbird

  ; set local Mailbox to -> /data/USER_ME/Mail/thunderbird/LocalBox/
    change Personal Foler "개인 폴더" --> LocalBox

-> turn off spam filter
-> turn off some account mail check when startup


* audacity
 install with sw center
 change default settings > 편집 > 기본설정 > 디렉토리 -> .audacity_temp


* mozilla firefox

 - disable error verbose mesage
   about:config -> Search "error" --> browser.xul.error_pages.enable ; boolean ; false (세부 에러 메시지 표시 안함)

    Open up a new tab (CTRL+T) or window (CTRL+N).
    Type in de addressbar: about:config.
    In the filterbar type: error and press enter.
    Now set the value of the 'browser.xul.error_pages.enabled' to 'true'. Double clicking will do.
    Restart Firefox.

    Turning off the 'friendly HTTP error messages' in Firefox

 - restclient install

 > uncheck spellcheck
 > delete all cache
 > check off firefox statuch check
 > check off report error report
 > check auto cache max to - 350 MB

 > thunderbird & mozilla backup

   tar cvzf Home_dot.thunderbird_20161227a.tgz ~/.thunderbird
   tar cvzf Home_dot.mozilla_20161227a.tgz ~/.mozilla

* csh
: sudo apt-get install csh


: * wine
:   SW Center > search "wine" > install "Microsoft Windows Compatibility Layer"
:   Browser -> mouse right click -> change it to wine windows Program loader


* dns and hosts file
 sudo cp hosts /etc/hosts
 restore hosts


* sshfs
- sudo apt-get install sshfs

  sshfs remote_user@211.112.123.123:/home/locate /home/tmp/remote_mnt -o allow_other
  sshfs remote_user@server_ip:/home/locate /home/tmp/remote_mnt

  fusermount -u /home/tmp/remote_mnt
  umount /home/tmp/remote_mnt

  sudo sshfs -o allow_other username@hostname.com:/path/to/mount /local/mount/path

Change System Appearance and Behavior or tune


* Change System Appearance and Behavior or tune
  If you want to change Desktop Background or Launcher Icon Size, open
  System Settings –> Appearance –> Look and personalize the desktop.

  시스템 설정 > Hardware > 디스플레이 > 모서리 달라 붙기 > "끔"
  시스템 설정 > 모양 > 동작방식 -> [check] 작업공간 바꾸기 사용
  시스템 설정 > 모양 > 동작방식 -> [check] 데스크톱  보이기 아이콘 런처에 추가 > 배경색 변경
  시스템 설정 > 모양 > 런처아이콘 크기 48 -> 28

- 단축키
 > 작업공간 바꾸기: ctrl + alt + arrow
 > 길게 Super key 누르기 -> help , 단축키
 > 시스템 설정  > 시스템
  혹은
  화면상단 시스템 설정(맨오른쪽 구석) [날짜와 시간] -> 요일, 날짜와 달 표시.

* Improve System Security and Privacy, power saving
 System > Security & Privacy >
  Security: check off all password request
  File & Program: log saving usage > check off all
  Search:  turn off Dash on line searching
  Diagnosie: check off all

 - Bright and Lock Screen
   Dark change for power saving "5" min. -> 30 min.

packages

* Graphic gimp
  sudo apt-get install gimp gimp-plugin-registry gimp-data-extras
 :  GIMP (alternative for Adobe Photoshop)
 :  Darktable
 :  Rawtherapee
 :  Pinta
 :  Shotwell
 :  Inkscape (alternative for Adobe Illustrator)
 :  Digikam
 :  Cheese

* Media Burners / ubuntu cd wirte
 : $ sudo apt-get install brasero
 : $ sudo apt-get install k3b
 : $ sudo apt-get install xfburn
 : $ sudo apt-get install furiusisomount

  http://www.ubuntu.com/download/server   -> Previous releases


* Archive Applications
sudo apt-get install p7zip-full
 : others $ sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller

* Chat Application
 : Pidgin
 : Skype
 : Xchat
 : Telegram
 : aMSN
 : Viber
 : $ sudo apt-get install pidgin
 : $ sudo apt-get install skype
 : $ sudo apt-get install xchat
 : $ sudo apt-get install amsn
 : $ sudo add-apt-repository ppa:atareao/telegram -y
 : $ sudo apt-get update
 : $ sudo apt-get install telegram

* Torrent Software
 : $ sudo apt-get install deluge
 : $ sudo apt-get install transmission
 : $ sudo apt-get install qbittorrent
 : $ sudo apt-get install linuxdcpp


* Tweak Tools
- 폰트 설정  > Unity Tweak Tool 필요

- Search "Unity Tweak Tool" install
  Prevent Unity from auto-maximizing [duplicate]
  -> Window Manager > Window Spread > Window snapping > -> "turn off"

- Appearance > font > General > Default font --> "D2Coding Reqular 11"
  Appearance > font > General > Windows Title font: 렉시굴림 Regular 10

 --> command is: /usr/bin/unity-tweak-tool



update package

- GUI
update-manager

sudo apt-get update
sudo apt-get upgrade

- Synaptic is a Graphical utility for apt
  Gdebi has the same functionality for local .deb packages

 > sudo apt-get install synaptic gdebi

$ sudo synaptic
$ sudo gdebi

gconf-editor

Note that if you don't have the CompizConfig Setting Manager installed, you can use gconf-editor (start it from terminal) and go to :

- apps -> compiz-1 -> plugins -> grid -> screen0 -> options -> top_edge_action
:  ; set this value to 0
:   --> top_edge_action=10  --> top_edge_action=0

top_left_corner_action 4 --> 0
top_right_corner_action 6 --> 0
right_edge_action 6 --> 0
left_edge_action 4 --> 0
bottom_left_corner_action 4 --> 0
bottom_right_corner_action 6 --> 0
bottom_edge_action 0 --> 0


- scroll down
: <mouse-5> (translated from <down-mouse-5> <mouse-5>) at that spot runs
: the command cua-scroll-up, which is an interactive compiled Lisp
: function.

: sudo apt-get install ubuntu-restricted-extras openjdk-8-jdk

vlc

- vlc
  VLC  & -> 연결 프로그램 수정

sudo apt-get install vlc browser-plugin-vlc

mysql

- install
sudo apt-get install mysql-server
 > mysql account password ---> root:MY_PASS_IS

 edit /etc/mysql/my.cnf file
bind-address            = 192.168.0.5
bind-address            = 127.0.0.1 --> only local access

s ls -al /etc/mysql/my.cnf

 > 우분투에서는 alternatives 로 my.cnf 를 관리한다.
 : lrwxrwxrwx 1 root root 24 12월 24 23:07 /etc/mysql/my.cnf -> /etc/alternatives/my.cnf
 --> alternatives 가 사용됨

USER_ME@gig:/etc/mysql/mysql.conf.d$ sudo update-alternatives --config my.cnf
 : 대체 항목 my.cnf에 대해 (/etc/mysql/my.cnf 제공) 2개 선택이 있습니다.
 :   선택       경로                      우선순� 상태
 : ------------------------------------------------------------
 : * 0            /etc/mysql/mysql.cnf         200       자동 모드
 :   1            /etc/mysql/my.cnf.fallback   100       수동 모드
 :   2            /etc/mysql/mysql.cnf         200       수동 모드
 :
 : Press <enter> to keep the current choice[*], or type selection number:

 --> my.cnf ==> refer to /etc/mysql/mysql.cnf
--
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/


sudo vi /etc/mysql/conf.d/mysql.cnf
[mysql]

[client]
default-character-set=utf8    # <-- add this line

--
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
....
# localhost which is more compatible and is not less secure.
# bind-address    = 127.0.0.1  <-- comment
bind-address    = 0.0.0.0   <-- change

[mysqld]  <---- 이 섹션에 아래  5개 라인 추가
...
init_connect=SET collation=utf8_general_ci
init_connect=SET NAMES utf8
# default-character-set=utf8 # error
character-set-server=utf8 # new DB create with option character-set
collation-server=utf8_general_ci


- restart service
tail -f /var/log/mysql/error.log

sudo service mysql restart
or
sudo /etc/init.d/mysql restart
then check
sudo netstat -tap | grep mysql


: - mysql-client
: sudo apt-get install mysql-client

- connect
mysql -u root -p
or
mysql -h server_ip -P 3306 -u root -p


- create database
create database journaldev;
use journaldev;

create table person (
  id int unsigned auto_increment,
  name varchar(30),
  age int,
  gender char(3),
  grade int,
  primary key(idx)
 ) Engine='InnoDB' default charset='utf8';


- user add
 > 로컬에서 접속 모두 허가
GRANT ALL PRIVILEGES ON journaldev.* TO USER_ME@localhost IDENTIFIED BY 'MY_PASS_IS';

 > 외부에서 접속 모두 허가
GRANT ALL PRIVILEGES ON journaldev.* TO USER_ME@'%' IDENTIFIED BY 'MY_PASS_IS';


 > 특정 권한만 지정
GRANT INSERT,UPDATE,SELECT ON journaldev.* TO USER_ME@'localhost' IDENTIFIED BY 'MY_PASS_IS';

 > commit;
flush privileges;
status;

 > if super priviledge need - with grant option
#+begin_src
GRANT ALL PRIVILEGES ON journaldev.* TO 'USER_ME'@'%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON journaldev.* TO 'USER_ME'@localhost WITH GRANT OPTION;
#+end_src

ex.1
#+begin_src
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,
    INDEX, ALTER, CREATE TEMPORARY TABLES
    ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
#+end_src

ex. 2
#+begin_src
GRANT EXECUTE, PROCESS, SELECT, SHOW DATABASES, SHOW VIEW, ALTER, ALTER ROUTINE,
    CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP,
    EVENT, INDEX, INSERT, REFERENCES, TRIGGER, UPDATE, CREATE USER, FILE,
    LOCK TABLES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SHUTDOWN,
    SUPER
        ON *.* TO mysql@'%'
    WITH GRANT OPTION;
#+end_src

- mysql-workbench
: USER_ME@gig:~$ sudo apt-get install mysql-workbench

then run

$ mysql-workbench

apache-maven

 > download: http://maven.apache.org/download.cgi#
 > extract to /data/develop/apache-maven-3.3.9/

export M2_HOME=/data/develop/apache-maven-3.3.9
$PATH ...


then check
kys@gig:/data/develop$ echo $M2_HOME
>>> /data/develop/apache-maven-3.3.9

# Maven Env. variable
vi /etc/profile
#+TITLE: /etc/profile
#+begin_src
export JAVA_HOME=/usr/local/java
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export M2_HOME=/usr/local/maven
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
#+end_src

source /etc/profile

> check maven version
mvn -version


- path
# java, apache-tomcat, maven
#+TITLE: ~/.bashrc
#+begin_src
..
export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export TMP_CLASSPATH=$CLASSPATH
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export CLASSPATH=$TMP_CLASSPATH:$CLASSPATH
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30
export M2_HOME=/data/develop/apache-maven-3.3.9

PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin:$CATALINA_HOME/bin

#+end_src

$ source ~/.bashrc


- apache-maven setting
 > backup
  cp /data/develop/apache-maven-3.3.9/conf/settings.xml /data/develop/apache-maven-3.3.9/conf/settings.xml-dist

modify settings.xml <--- (this for both global and local)

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
          http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <!-- modified -->
  <localRepository>/data/develop/dot.m2/repository</localRepository>
..

kys@gig:/data/Project_Pool/check$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T01:41:47+09:00)
Maven home: /data/develop/apache-maven-3.3.9
Java version: 1.8.0_65, vendor: Oracle Corporation
Java home: /usr/lib/java/jdk1.8.0_65/jre
Default locale: ko_KR, platform encoding: UTF-8
OS name: "linux", version: "4.2.0-16-generic", arch: "amd64", family: "unix"
kys@gig:/data/Project_Pool/check$

- OK. fix repoisitory
$ cd ~/.m2
$ ln -s /data/develop/dot.m2/repository repository

apache-tomcat 설치

download tomcat-8 : http://tomcat.apache.org/

> add .bashrc following line

export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30
$PATH ...

kys@gig:~$ source ~/.bashrc


  : Apache Standard Taglib 1.2.5 Released
  : ..
  : Download | Changes
  : 2013-11-11 Tomcat Maven Plugin 2.2 Released
  : ...
  :
  : <plugin>
  :   <groupId>org.apache.tomcat.maven</groupId>
  :   <artifactId>tomcat7-maven-plugin</artifactId>
  :   <version>2.2</version>
  : </plugin>
  :
  : or
  :
  : <plugin>
  :   <groupId>org.apache.tomcat.maven</groupId>
  :   <artifactId>tomcat6-maven-plugin</artifactId>
  :   <version>2.2</version>

copy /data/develop/apache-tomcat-8.0.30/bin/startup.sh /data/develop/apache-tomcat-8.0.30/bin/startup-dist.sh

$CATALINA_HOME/bin/startup.sh
You should get a result similar to:
Using CATALINA_BASE: ...
Using CATALINA_HOME: ..
Using CATALINA_TMPDIR: ..
Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64/
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.

eclipse or Spring


** download: http://www.eclipse.org/downloads/

  > extract
: $ tar zxvf ~/folder/eclipse-standard-kepler-R-linux-gtk-x86_64.tar.gz
: $ cd ~/
:  >. move eclipse folder   ;  install to  /opt/
: $ sudo mv ~/다운로드/eclipse /opt/
: $ sudo mv ~/eclipse /opt/


$ sudo apt-get install libsvn-java

 : error message

 : Failed to load JavaHL Library.
 : These are the errors that were encountered:
 : no libsvnjavahl-1 in java.library.path
 : no svnjavahl-1 in java.library.path
 : no svnjavahl in java.library.path
 : java.library.path = /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib

 -> http://subclipse.tigris.org/wiki/JavaHL


** issue# JavaHL library

  > search "JavaHL library"

$ apt-get install libsvn-java # Use sudo in Ubuntu

  Next, find the path where the JavaHL library is installed, as you will need to
  know this path for the following instructions:

$ find / -name libsvnjavahl-1.so # Use sudo in Ubuntu
..
-Djava.library.path=</path/to/library>
Example:
-Djava.library.path=/usr/lib/jni
CollabNet Subversion installs into /opt/CollabNet_Subversion. So if you are using that package, you need this:
-Djava.library.path=/opt/CollabNet_Subversion/lib

>> ex. eclipse.ini
..
-showsplash
org.eclipse.platform
-framework
plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar
-vmargs
-Djava.library.path=/opt/CollabNet_Subversion/lib
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m


** spring shourt cut
 mkdir /data/develop
 mv sts-bundle /data/develop/
 /data/develop/sts-bundle/

kys@gig:/data/develop/sts-bundle$ ls -1 /data/develop/sts-bundle/sts-3.7.2.RELEASE/
META-INF
STS            <---------------- 실행파일
STS.ini
artifacts.xml
configuration
dropins
features
icon.xpm
license.txt
open_source_licenses.txt
p2
plugins
readme
kys@gig:/data/develop/sts-bundle$


$ # get STS
$ tar -zxvf sts*
$ sudo mv sts-bundle /opt
$ cd /opt/sts-bundle/sts-3.5.1.RELEASE
: $ sudo ln -s /opt/sts-bundle/sts-3.5.1.RELEASE/STS /usr/local/bin/sts
sudo ln -s /data/develop/sts-bundle/sts-3.7.2.RELEASE/STS /usr/local/bin/sts

$ sudo vi /usr/share/applications/sts.desktop

[Desktop Entry]
Name=STS
Exec=/usr/local/bin/sts
Terminal=false
StartupNotify=true
Icon=/data/develop/sts-bundle/icon.xpm
Type=Application


: $ # add extentions vrapper, color-theme, gradle support
: $ # set emacs key binding as default key

** ini

- STS.ini
#+TITLE: sts.ini
#+begin_src
-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms1024m
-XX:MaxPermSize=512m
-Xverify:none
-Xmx1200m
#+end_src

** 메모리 사용 보기
 Window > Preferences > General > [check] Show heap Status


** turn off spell check
 eclipse performance ; spell check
 spell check 해제 : Preferences → General → Editors → Text Editors → Spelling >  체크 해제.


** format
Java > Code Style > Formatter

[Tab policy] Spaces only , indent size: 2
[New Lines] Insert new line
  -> [uncheck] in empty class body
  -> [uncheck] in empty method body


** theme
- download Eclipse Color Theme
  http://eclipsecolorthemes.org/


- line format
  Market Place -> Search "Eclipse Color Theme"
  install

  > download theme apply
  > Window > Preferences > General > Appearance > Color Theme
  Sunburst
  fronttenddev

  > line wrapping ; max line width = 120
  > [comments] [uncheck] /** and */ on separate lines
  > Block comments settigns [uncheck] /* and */ on separate lines
  > line width : 120

Web - Css Files - Editor > line width 72 --> 120
    - HTML Files : line width 72 --> 120
    - JSP Files >
    - XML - XML FIles > Editor > line width : 72 --> 120

java install


  http://thinkubuntu.tistory.com/entry/%EC%9D%B4%ED%81%B4%EB%A6%BD%EC%8A%A4-%EC%84%A4%EC%B9%98
  Eclipse on Ubuntu ubuntu/Java 2013.07.16 11:01

: 1. OPEN Java
:   > Ctrl+Alt+T open terminal
:   > instll
:     $ sudo apt-get install openjdk-7-jdk

2. Oracle Java
  > Download
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
  > if os is Ubutu 13.04
    then download amd64 Linux x64
  > extract file

: $ tar zxvf jdk-7u25-linux-x64.tar.gz
$ tar xvzf jdk-8u65-linux-x64.tar.gz

check already java installed before then if not continue
$ type java

$ sudo mkdir /usr/lib/java
: move jdk-7u25-linux-x64 to /usr/lib/java/

: $ sudo mv ~/jdk1.7.0_25 /usr/lib/java
$ sudo mv jdk1.8.0_65 /usr/lib/java/

check
$ ls /usr/lib/java

sudo cp /etc/environment /etc/environment-dist
sudo vi /etc/environment

> edit environment and path
$ sudo vi /etc/environment

add JAVA_HOME Path
PATH=".....:/usr/lib/java/jdk1.7.0_25"
: JAVA_HOME=/usr/lib/java/jdk1.7.0_25
JAVA_HOME=/usr/lib/java/jdk1.8.0_65

org.
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

change.
#+TITLE: /etc/environment
#+begin_src
..
JAVA_HOME=/usr/lib/java/jdk1.8.0_65
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME"
..
#+end_src
$ source /etc/environment

check.
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/java/jdk1.8.0_65

: skip
: > /etc/profile FILE_PATH_WHERE
: export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")

- 이 부분은 profile 에서 안하고 ~/.bashrc 에서 처리
vi /etc/profile -> ~/.bashrc 에서 해준다.
; 다만 아래는 고정으로 했기 때문에 자바 버전 변경하면 바꿔야 한다.

#+TITLE: .bashrc
#+begin_src
..
export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export TMP_CLASSPATH=$CLASSPATH
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export CLASSPATH=$TMP_CLASSPATH:$CLASSPATH
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30

PATH=$PATH:$JAVA_HOME/bin
..
#+end_src
$source ~/.bashrc


> link execution file =>  java, javac, javaws

  some of Ubuntu package or linux package use OpenJDK,
  so don't do set with agreesssively just leave it alone
  and "set environment with locally"
** alternative
> update-alternatives
 - ex. format
 : $ sudo dpkg -l | grep <확인할 패키지 이름> | awk '{print $2}'
 : $ sudo update-alternatives --install <link> <name> <path> <priority>   <-- 등록
 : $ sudo update-alternatives --set <name> <path>                         <-- 설정
 : $ sudo update-alternatives --display gcc                               <-- 표시
 : $ sudo update-alternatives --remove <name> <path>                      <-- 삭제

; check before link
ls $JAVA_HOME/bin/java
ls $JAVA_HOME/bin/javac
ls $JAVA_HOME/bin/javaws

; let's link with alternative; 숫자가 높을 수록 우선 순위가 높다. 하지만, 이것은
자동 모두 일 때이며, 수동모드도 바꾸면 숫자크기와 관계없이 선택할 수 있다.

;; 아래부부은 자바를 새로 설치 하면, 끝부분 <priority> 1 부분 숫자를 바꾸도록 한다.
$ sudo update-alternatives --install /usr/bin/java    java   /usr/lib/java/jdk1.8.0_65/bin/java   1
$ sudo update-alternatives --install /usr/bin/javac   javac  /usr/lib/java/jdk1.8.0_65/bin/javac  1
$ sudo update-alternatives --install /usr/bin/javaws  javaws /usr/lib/java/jdk1.8.0_65/bin/javaws 1

;; 만약, 이전에 버전이 있고, 새로 설치한 경우에 다음처럼 set 을 해 준다.
;; 예를들어, sudo update-alternatives --config editor 하면 아래와 같이 대화형으로
;; 선택할 수 있는 숫자 입력 줄이 나온다. 숫자를 선택하면 바뀐다. 하지만, --set 옵션을 써도 된다.
sudo update-alternatives --config editor
     선택       경로             우선순� 상태
   ------------------------------------------------------------
     0            /bin/nano           40        자동 모드
     1            /bin/ed            -100       수동 모드
     2            /bin/nano           40        수동 모드
   * 3            /usr/bin/emacs24    0         수동 모드
     4            /usr/bin/vim.tiny   10        수동 모드

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

- 1.7.x 설치하고 변경 할 때 사용
$ sudo update-alternatives --set java /usr/lib/java/jdk1.8.0.65/bin/java
$ sudo update-alternatives --set javac /usr/lib/java/jdk1.8.0.65/bin/javac
$ sudo update-alternatives --set javaws /usr/lib/java/jdk1.8.0.65/bin/javaws

$ sudo update-alternatives --set java /usr/bin/java

> check instaation
$ java -version

font

sudo apt-get install console-terminus
sudo apt-get install ttf-dejavu
sudo apt-get install ttf-droid <- xx
sudo apt-get install ttf-inconsolata <- xx
sudo apt-get install xfonts-terminus

 : 폰트 설치 terminus 는 소프트웨어 센터를 통해서 설치
 :  http://sourceforge.net/projects/terminus-font/
 :
 : 참고로 굳이 셋째 방법을 쓰겠다면, [터미널] 또는 alt+F2로 명령창을
 : 열어서 gksu nautilus /usr/share/fonts/truetype 로 폴더를 연 후에
 : 글꼴이름으로 폴더를 만든 후 그 속에 글꼴을 옮겨주시고, 그 다음에 다시
 : 명령창에서 sudo fc-cache -f -v 해주셔야 적용됩니다.

 : 우분투의 으뜸 글꼴, 은글꼴은 상당히 잘 만든 글꼴입니다.
 : 여기서(http://kldp.net/projects /unfonts)보세요.
 :
 : 과거에는 백묵글꼴도 설치됐습니다만, 이제는 자동으로 설치되지
 : ..'글꼴'을 선택, Korean으로 검색해보시면 꾸러미(ttf-baekmuk)를 보실 수
 : 또한 이호석씨가 만든 글꼴도 ttf-alee 꾸러미로 함께 설치됩니다. 이
 : 꾸러미에는 반달, 방울, 구슬, 은진, 은진낙서 등 깜찍한 글꼴이
 : http://myubuntu.tistory.com/446


- font-manager, install Font Viewer
  downlaod font then open Font Viewer
  다운로드 한 폰트를 마우스 오르쪽 클릭해서 폰트뷰어로 열고, 우측 상단에 "설치" 를 클릭한다.

sudo apt-get install font-manager
sudo font-manager

Category -> All, Family 창에서 [체크] 아이콘 밑에 X, - 는 각각 사용안함, 삭제를 의미한다.

Video

nvidia
http://www.howopensource.com/2012/10/install-nvidia-geforce-driver-in-ubuntu-12-10-12-04-using-ppa/
Nvidia GTX660M
http://www.geforce.com/drivers

Linux x64 (AMD64/EM64T) Display Driver
Version   352.63
Release Date   Mon Nov 16, 2015
Operating System   Linux 64-bit
Language   Korean
File Size   74.05 MB

nautilus

** Turn off trash and delete all trash from Ubuntu 15.04
  Files > Edit > Preferences > Behaviour tab and check the option for
  "Include a Delete command that bypasses the Rubbish Bin" and you will
  have a Delete option on the right click context menu as well as the
  standard "Move to the Rubbish Bin"

  Alternatively, Shift + Delete will bypass th


** nautilus daemon
 - do not kill or remove nautilus -n  "it is connected wm" <- bad.

  파일 > 편집 > 기본 설정
  > [보기] 숨김/백업 파일 보이기 (확인)
  > [동작] 실행할 수 있는 텍스트 파일을 누르면 실행 [선택]
  > 휴지통을 비우거나 파일을 삭제하기 전에 물어보기 [체크해제]


http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/
find . -name "*.el" -print |xargs grep ".bmk"

Firewall

- open firewall
$ iptables -F

- hosts.allow, hosts.deny
/etc/hosts.deny
#+TITLE: hosts.deny
#+begin_src
...
ALL : ALL
#+end_src

#+TITLE: hosts.allow
#+begin_src
..
in.telnetd : 10.10.30.0/255.255.255.0
..
#+end_src

vsftp-ftp

  > site: https://help.ubuntu.com/lts/serverguide/ftp-server.html
sudo apt-get install vsftpd

cd /etc/
sudo cp vsftpd.conf vsftpd.conf-dist
sudo vi vsftpd.conf

#+TITLE: vsftpd.conf
#+begin_src
..
uncomment following line
#write_enable=YES

change following line
listen_ipv6=YES --> NO
..
#+end_src

> check ftp daemon direcory
  cat /etc/passwd |grep ftp
  mkidr /data/srv
  usermod -d /data/ftp ftp
  #  chown root.ftp /data/srv

-- vsftpd
kys@gig:/etc/xinetd.d$ cat /etc/xinetd.d/vsftpd
#+TITLE: vsftpd in xinetd
#+begin_src
service ftp
{
        disable                 = no
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/vsftpd
        per_source              = 5
        instances               = 200
        no_access               = 10.1.1.10
        banner_fail             = /etc/vsftpd.busy
        log_on_success          += PID HOST DURATION
        log_on_failure          += HOST
}
#+end_src
kys@gig:/etc/xinetd.d$
[root@localhost xinetd.d]# service xinetd start
or
[root@localhost xinetd.d]# service xinetd restart


: * telnetd
: 1. instal vsftp or telnetd
:   > ex. centos telnet-server --> yum install telnet-server
:
: 2. Client가 telnet 으로 접속 시도할 경우, 디폴트 포트는 23
:   > /etc/services
:
: 3. etc/xinetd.d/telnet 파일에 밑의 내용 삽입.
:   설정되어있다면 disable이 yes로 되어 있는것을 no로 변환
:   telnet 말고 /etc/xinetd.conf에서도 수정 가능.

sudo vi telnet
#+TITLE: tlenetd
#+begin_src
service telnet
{
   flags  = REUSE
   socket_type = stream
   wait  = no
   user  = root
   server  = /usr/sbin/in.telnetd
   log_on_failure += USERID
   disable  = no
}
#+end_src

- xinetd restart
service xinetd restart

initial install packages

** firefox
- restore previous settings
  modify Path in -> ~/.mozill/firefox/profiles.ini


** telegram
- start and fix in luncher
  > change download directory -> ~/tmp


** sshd with OpenSSH
  install sshd  ---> openssh-server.html
  https://help.ubuntu.com/lts/serverguide/openssh-server.html

sudo apt-get install openssh-client
sudo apt-get install openssh-server

$ sudo vi /etc/ssh/sshd_config

#+TITLE: /etc/ssh/sshd_config
#+begin_src
...
   # change Port to --> 22222
   : leave it port 22 -e Port to --> 22
   uncomment ListenAddress 0.0.0.0
   comment   ListenAddress ::
    sshd 가 공개 키 기반의 로그인 신뢰서를 허용하게 하려면, /etc/ssh/sshd_config 다음 부분 변경
    PubkeyAuthentication yes
    If the line is already present, then ensure it is not commented out.

    서버에서 로그인하기 전에 보여줄 배너로 /etc/issue.net 파일의 내용을 표시
    Banner /etc/issue.net
    In the /etc/ssh/sshd_config file.
...
#+end_src

 sudo service ssh restart

** sudo apt-get install xinetd

web browser

  gnome - ubuntu alread install web browser
  "webbrowser-app"

Emacs

- server module 활성화
  1. ~/dot
  (load (concat emacs-lib-path "dot/init-server.el"))
(defun my-server-start () "server-start"
   (interactive)
   (load (concat emacs-lib-path "dot/init-server.el")))

  2. 프로그램 등록: (emacs client)
     시스템 설정 > 키보드 > 바로가기 > 사용자 설정 바로가기 > 등록
     emacsclient -c -n
  3. 단축키 지정: Control - Alt - q

  4. use: startup emacs (with normail click in laucher)
     then
     click: ctrl + ALt + q

- hanyu
 > install font: chinese.msyh.ttf
 > load init.hanyu
   ; emacs: (load (concat emacs-lib-path "dot/init-multi-lang.el")) ; i.hanyu v.2

 > key change: Alt+shift+Space

add language, xim setting, Gnome Key change

  1. 시스템 설정 > 언어지원 >  한국어, 중국어(간체), 러시아어, 일본어 추가
  2. 시스템 기본 언설 설정을 "한국어"로 바꾼다.
  3. 시스템 설정 > 하드웨어 > 키보드  로 이동한다.
     [바로가기] - [자판입력] 에서
     다음입력 소스로 전환 변경 -> Super(윈도우즈 키) + Space
     이전 입력 소스로 번환 -> Shiftp + Super + Space 로 바꾼다.

  4. fcitx 설정 변경
   > [Global Config] 혹은 [전역설정] 항목에서
     입력기 전환 (Trigger Input Method) => Hangul - Shift+Space  가 되도록 한다.
     file:hangul_key_input_fcitx.png
     file:hangul_key_input_fcitx.odt

  5. Before setting - backup-1
cd ~/.config
tar cvf fcitx_dist.tar fcitx
tar cvf fcitx-qimpanel_dist.tar fcitx-qimpanel/

  6. 화면 상단의 카보드 입력기 Fcitx 를 클릭한다.
: > Default: ubuntu 15.10
:   ; Super(winkey) + space  <--- 설치된 입력기간 순회
:   ; Ctrl+Space   <--- 이전 입력기로 이동 반복 <>=== 이맥스 마크 시작/종료와 충돌 됨
:     --> Ctrl+Space --> 한/영 키로 변경
: > change
:   화면상단 문자입력기 Panel 에 키보드 모양 클릭 > Configure Fcitx 클릭
:   ; 키보드 - 영어(미국) 기본 설정 상태에서 > 상단 [전역 설정] 클릭
:   ; 맨위 상 단에   [입력기 전환] > [Ctrl+Space] -- [Hangul]  에서
:     [Ctrl+Space] 를 클릭하면 키를 입력할 수 있음.
:     여기서 Ctrl+Shift+Space 로 눌러서 바꾼다.
:     (이렇게 하면 이맥스의 원래 키 지정으로 되어 었던 게 오버라이드 됨)

  7. After Setting - backup-2
cd ~/.config
tar cvf fcitx_v1.tar fcitx
tar cvf fcitx-qimpanel_v1.tar fcitx-qimpanel/
  ;  터미널에서 emacs 입력키를 무력화 shell 에서 실행하는 방법-> $ XMODIFIERS="" emacs

- search box <-- HUD
  > turn off search box ; file, web, <-- use other tool (see below sections)
    (Unity Tweak Tool 섹션 참조)

  > turn off the search box that appears when I press Alt or Hangul Key
    ; System Settings --> Keyboard --> Short-cuts. --> 실행아이콘
     --> [허드를 표시할 키] --> "한/영키 + Backslash" 로 변경
     --> [검색] --> "Alt+백스페이스" 로 변경


 8. gnome global key define

- global gnome key binding with customize
  > keyboard: add user definiton
   ㅁ. window
      Lower window :
      Lower window to the other window: -- super + (download arrow)
      Vertically Max. window: super + (up arrow)
      Horizentially Max. Window: super + (righ arrow)

   ㅁ. Screen Shot
      screen shot and save file dialog: Ctrl + F2
      screen shot with region select and copy it clipboard: Ctrl + F1

   ㅁ. emacsclient: Ctrl + Alt + Q

- alt + ` ; open laucher

permission check

- default permission change
> check permission
cd /data
ls -alh

> change permission (this will change all the prmission)
(be carefull)

 : sudo find [PATH] -type [d|f] -exec chmod 755 {} \;
 : change all sub directory with perm. 755 == rwxr-xr-x

find . -type d -exec chmod -R 755 {} \;
find . -type f -exec chmod -R 644 {} \;

755 -> -rwxr-xr-x  ; directory default
644 -> -rw-r--r--  ; file default

> mount permisiion
sudo chown (First_Account).(First_Account) /data

; /media is ubuntu linux default auto mount directory
sudo chown (First_Account).(First_Account) /media

- fstab option
 > assign user
  UUID=123.. /media/mnt_point ntfs defaults 0 0

 > Add to it the umask, uid and gid masks like this, be sureto change uid, gid
  UUID=123.. /media/mnt_point ntfs defaults,umask=007,uid=1000,gid=1000 0 0

change user home and restore (First_Account)

 - login with (Secondary_Account)

 - user account modify  home directory
   open terminal ( Ctrl - Alt - T)
   then change to root

$sudo su -
or
$sudo -i

- user modify with home
usermod -d /data/"First_Account" "First_Account"

- check
cat /etc/passwd  >> check First_Account directory
mv /home/(First_Account) /data/    <- move /home/(First_Account) to /data/(First_Account)
ls /data
(reboot)

restore backup files

 - if problem occur when mount
   ; xfs
   /dev/sdc2 /media/Recordings xfs rw,user,auto 0 0
   or if cannot writer partion after mount

 - sudo chmod ug+rwx /media/Recordings
  ; disk add
    sudo su -
    ls -alh /dev/sd*

 - extract and move
  terminal: gnome default Short cut is -> Ctrl+Alt+T

  cd /data
  touch /data/test.txt
  tar cvf (backuped_user_home).tar /home/(user_home)
  (reboot)

add disk with auto mount option

  - disk add then auto mount to /data
    Disk > Properties > Change Mount Option > Auto mount when system start마운트
    ; Mount Point --> /data
    ; (shell) make directory
     mkdir /data

  - fstab
#+TITLE: /etc/fstab
#+begin_src
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=2bb0fb06-7c1d-4bc2-b725-9333e66a55c3 /               xfs     defaults        0       1
# swap was on /dev/sda5 during installation
UUID=1ae909b2-3baa-45c2-bea4-09bf56150c4d none            swap    sw              0       0
#
UUID=3a68d535-0016-4f18-8df3-d4f5dd258bb1 /data           ext4    defaults        0       1
#+end_src

  - UUID could be found like following
$sudo ls -alh /dev/sd*
: brw-rw---- 1 root disk 8,  0 12월 26 12:16 /dev/sda
: brw-rw---- 1 root disk 8,  1 12월 26 12:16 /dev/sda1
: brw-rw---- 1 root disk 8,  2 12월 26 12:16 /dev/sda2
: brw-rw---- 1 root disk 8,  5 12월 26 12:16 /dev/sda5
: brw-rw---- 1 root disk 8, 16 12월 26 12:16 /dev/sdb
: brw-rw---- 1 root disk 8, 17 12월 26 12:16 /dev/sdb1

$ ls -l /dev/disk/by-uuid
: 2:16 1ae909b2-3baa-45c2-bea4-09bf56150c4d -> ../../sda5
: 2:16 2bb0fb06-7c1d-4bc2-b725-9333e66a55c3 -> ../../sda1
: 2:16 3a68d535-0016-4f18-8df3-d4f5dd258bb1 -> ../../sdb1

fresh os install

  - add disk with auto mount

   > menu
     system settings > add user > secondary account with admin role (for emergency)
    (reboot)

   > setup networks
    ; system settings > wired
      ip, dns ( google. 8.8.8.8 )
    ; skip wireless

   > add additonal laguage pack
    ; system settings > Language Support > download install then adjust items
      (Corean, Simplified Chinese, Russian, Japan)
      (reboot)

Installation - Ubuntu 15.10

* Installation - Ubuntu 15.10
- Start
  > un-plug outer monitor or secondary monitore
    ; insert dvd & install

  > Select language
    ; Your favorite language then Install Click

  > do not connect now > continue

  > partision
    /    117,760  xfs  (sda1)
    swap  10,334  swap (sda5)

  > name: kys
    computer: gig
    password:

Pranten

 Pranten