Wednesday, September 30, 2015

Filesystem Hierarchy Standard in Linux

[1] http://askubuntu.com/questions/138547/how-to-understand-the-ubuntu-file-system-layout/138551#138551
[2] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard



Linux File System version is 2.3, announced on January 29, 2004. [1]




etc/    

Since the publication of early documentation, the directory name has been re-explained in various ways. Recent interpretations include backronyms such as "Editable Text Configuration" or "Extended Tool Chest". [2] 

Sunday, September 27, 2015

SVN Check out failure on Dbian - SSL error: Key usage violation in certificate has been detected

[1] http://stackoverflow.com/questions/18998025/ssl-handshake-failed-ssl-error-key-usage-violation-in-certificate-has-been-det
[2] https://www.visualsvn.com/support/topic/00056/

sudo apt-get install libneon27
cd /usr/lib
sudo rm libneon-gnutls.so.27
sudo ln -s /usr/lib/libneon.so.27 libneon-gnutls.so.27 (double check that symbolic link is created)

Another way  is to upgrade SVN client to latest SVN 1.8.xx which already handles http/https access.

Reasons behind this [2]
GnuTLS library is an alternative to OpenSSL. Most Subversion clients for Windows are built against OpenSSL and are not affected by this issue. While some Subversion packages (available mostly on Linux-based operating systems such as Ubuntu and Debian) are built against GnuTLS and are affected.

Install gcc / g++ man page manually on Debian.

[1] http://unix.stackexchange.com/questions/42474/find-and-install-man-file-manually


 Install gcc / g++ man page manually on Debian.

Edit /etc/apt/sources.list to include non-free repositories.

#apt-get update

#apt-get install gcc-doc

Wednesday, September 23, 2015

Linux package collection

[1] http://www.cyberciti.biz/tips/how-to-controlling-access-to-linux-services.html
[2] https://technicalsanctuary.wordpress.com/2016/05/28/installing-cisco-anyconnect-vpn-on-ubuntu-16-04/
[3] https://www.imagemagick.org/script/index.php

#apt-get autoremove                    clean up unused packages
#apt-get -f install                         fixing broken dependencies
#apt-get update                            update apt-get repository
#apt-get upgrade                          upgrade all apt packages
#apt-cache search keywordofpackage    search for an apt package in Ubuntu
#apt update
#add-apt-repository ppa:teatime/ppa
#apt install teatime-unity
#dpkg --list                                             list all installed package in Ubuntu
#dpkg -i xxxx.deb                       Install from downloaded package.


#yum search keywordofyumpackage     search for an yum package in Fedora

$systemctl daemon-reload



DEVELOPMENT
----------------------------
#apt-get install gcc-4.9
#apt-get install g++-4.9
#apt-get install gcc
#apt-get install g++
#yum install libstdc++-docs            libstdc++-docs.x86_64 0:4.8.3-7.fc20  man page for C++ lib
#apt-get install manpages-posix manpages-posix-dev
#yum install man-pages             man-pages.noarch 0:3.53-6.fc20  showing $man ldd $man pthread_mutex_lock after installation

#apt-get install libasio-dev           modern c++ library for network programming
#apt-get install libasio-doc
#apt-get install make

#apt-get install cmake
#apt-get install cmake-qt-gui         replacement for cmake -i wizard option

#apt-get install ipython
     Suggested packages:
     ipython-doc ipython-notebook ipython-qtconsole python-matplotlib
     python-numpy python-zmq python-pexpect-doc
     The following NEW packages will be installed:
     ipython python-decorator python-pexpect python-simplegeneric
#apt-get install python-matplotlib


sudo apt-get install qt4-designer --fix-missing

#apt-get install  vim-gnome
#sudo apt-get install ctags            then install tagsbar plug in
#sudo apt-get install exuberant-ctags    exuberant-ctags better than ctags which covers only c
#apt-get install cscope              

#apt-get install meld                  visual file comparison tool
#apt-get install subversion
#apt-get install git

#apt-get install kompare      similar like meld....visual file comparison

MISC-DEV
----------------
#apt-get install gawk                    to change from mawk to gawk to use --field-separater option in awk command line
#apt-get install ack-grep
#apt-get install screen                 screen/terminal logging tool
#apt-get install trace-route       to avoid modern firewall, u can use trace-route xxxx -T via tcp socket
#apt-get install dos2unix             convert dos format text file to unix format
#apt-get install nfs-common nfs-kernel-server            Then modify /etc/export and firewall settings to set up NFS server.

#apt-get install arp-scan           ip-scan for LAN

#dpkg -i ~/Downloads/pac-4.5.5.7-all.deb      PAC Manager, Perl/Gtk approach to sssh/telnet/rdp/... connections managing.




REMOTE ACCESS
------------------------------
#apt-get install openssh-server

#apt-get install freerdp-x11            to remote desktop From Linux to Windows
       qyang@lubuntu-laptop:~$ xfreerdp /u:UserName /p:Password /v:10.1.1.218 /f

#apt-get install tightvncserver       to remote desktop from Windows to Linux (faster than xrdp and x11vnc)
#apt-get install xtightvncviewer
#apt-get install autocutsel

$vino-preferences will bring ubuntu14.04.3 default installed desktop sharing options.


#apt-get install pptp-linux network-manager-pptp network-manager-pptp-gnome  for VPN connection to Microsoft VPN server

#apt-get install network-manager-vpnc                       for VPN connection using Cisco Compatible VPN (vpnc)
#apt-get install network-manager-vpnc-gnome           for VPN GUI integration with Gnome

#apt-get install lib32z1 lib32ncurses5                         required package for Cisco AnyConnect client installation
#apt-get install network-manager-openconnect-gnome    openconnect client
#./vpnsetup.sh                                                             for VPN connection using Cisco AnyConnect
                                                                                    Scripts downloaded when browsing https://vpn.dmglobal.com to install Cisco AnyConnect Client in Linux


run $systemctl daemon-reload if seeing error "Failed to start vpnagentd.service: Unit vpnagentd.service not found." [2]

#apt-get install ufw                                       ufw - program for managing a netfilter firewall





SYSTEM
-----------
#apt-get install sysv-rc-con          debian service config package installed on lubuntu-laptop
( #apt-get install rcconf                    service control)
( #apt-get install sysvconfig              chkconfig like service config on debian  [1] )
#yum install chkconfig                   fedora service control



MISC - MustHave
-----------------------
#apt-get install xpad                              sticky notes counterpart in Linux (others similar have knote,tomboy etc)
#apt-get install tree                                list folder structure
#apt-get install libreoffice
#apt-get install shutter                           screen shot tool, similar like snipping tool in win7. build-in pic annotation.
#apt-get install gnome-screenshot         gnome build-in screen shot tool shift+prtscn
                                                               $gnome-screenshot –file=[FILENAME]    
                                                               $gnome-screenshot -i  
                                                               $gnome-screenshot -a  
                                                               $gnome-screenshot -w
#sudo apt-get install file-roller              a tool to open and view *.tar *.tar.gz
#clock or teatimer                               a good tool for timer remind
#apt-get install imagemagick                a good tool to convert multiple images into one pdf file using 'convert' command line as part of imagemagick.

MISC
---------
#apt-get install docky
#apt-get install xcompmgr                      enable 3D effect for docky applicataion
#apt-get install seahorse             front-end to reset/change key ring password
#apt-get install gconf-editor            alt+f2 bring cmd prompt, type 'gconf-editor' config docky position
sudo apt-get install gtypist
sudo apt-get install dvorak7min
sudo apt-get install typespeed
sudo apt-get install transmission     default official BitTorrent client in ubuntu, transmission-gtk, transmission-common


MultiMedia
----------------
#sudo apt-get install ubuntu-restricted-extras
#sudo apt-get install libdvd-pkg  (> 15.04)
#sudo dpkg-reconfigure libdvd-pkg

Linux App Collection

Ref [1] https://en.wikipedia.org/wiki/Banshee_(media_player)
Ref [2] https://wiki.gnome.org/Apps/Tomboy
Ref [3] http://alternativeto.net/software/snipping-tool/?platform=linux
Ref [4] https://www.youtube.com/watch?v=3MnWksuLTb8
Ref [5] https://www.youtube.com/watch?v=U3VNNJVX5AE
Ref [6] https://wiki.debian.org/PDF#Editors_.2F_Generators
Ref [7] http://www.makeuseof.com/tag/how-chromes-built-in-pdf-viewer-lets-you-do-more-than-just-read-pdfs/

Music Player:                                                                      Banshee  [1]
Notes:                                                                                 Tomboy Note [2]
Win7 Snipping Tool Counter Part on Linux:                         Shutter [3]
Dock:                                                               Cario-Dock,Docky [5]   Plank [4]
Pdf Editor                                            pdfedit not usable,inkspace do one page only at one time.
                              Using liboffice draw to import all pages and edit by adding text on top of doc.[6]
                         Fill up once, not edit later then using Chrome build-in pdf viewer to edit and print.[7]
TerminalLogging                                                                  screen





Screen
-------------------------------
$screen -L    start logging
Ctrl+a d to detach screen
$screen -r   to resume screen

Run windows app on Linux using Wine.

[1] www.linux.com/ how-to-install-and-use-wine-to-run-windows-applications-on-linux

[2] www.linux.com/ 910-i-have-just-switched-from-win7-to-zorin-ubuntu-i-have-been-working-with-an-ai-program-called-verbot-for-awhile-and-my-question-is-how-do-i-run-it-and-net-framework-on-zorin-please-help

[3] askubuntu.com/ difference-between-wine-and-mono

If your Linux PC has limited RAM and you don't want to sacrifice large chunk of RAM to run VM just to be able to run one or two windows app. Wine is your answer. You save buying one window license to run window app.

[1] Shows you how.

PlayOnlinux is also mentioned as a wonderful tool to make it possible to handle different versions of wine and wine configs because if you use it for more then one app it's sometimes necessary to install different wine versions.

You can use Wine for that purpose. but it only works on .net 2.0 / 3.0, Most probably, .net 4 is beyond the capacity right now. Ur best bet is for .net support on Linux is MONO. [2]

Monday, September 21, 2015

Remote desktop from Windows to Linux

[1] http://www.linux.org/threads/rdp-into-your-linux-desktop.8/
[2] http://ubuntuwiki.net/index.php/Xrdp,_installing
[3] http://askubuntu.com/questions/235905/use-xrdp-to-connect-to-desktop-session

Through VNC as most people traditionally did.
Through RDP. [1]


 yum install xrdp -y
# chkconfig --levels 35 xrdp on
# service xrdp start

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm


Under debian using xrdp + vino [2] [3]
 vi /etc/xrdp/xrdp.ini
[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=low
channel_code=1

# set empty username because VNC auth 
# doesn't actually use username, so no
# point in asking the user for one.

[xrdp1]
name=Active Local Login
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=5900

[xrdp2]
name=Clean Session
lib=libvnc.so
username=
password=ask
ip=127.0.0.1 
port=5901 
 
 
$sudo vino-preferences
 



 

Remote desktop from Linux to Windows

Ref
[1] http://www.techrepublic.com/blog/windows-and-office/how-do-i-connect-to-a-remote-windows-7-desktop-from-a-linux-machine/
 [2]   http://www.unixmen.com/remote-desktop-from-linux-to-windows-using-rdesktop-and-gnome-rdp/



Termninal Server Client....Search 'terminal server' package name in ubuntu.[1]

(Seems not available in lubuntu, so installed freerdp-x11 on lubuntu 15.04

qyang@lubuntu-laptop:~$ xfreerdp /u:username /p:password /v:10.1.1.218


'rdesktop' package for both ubuntu and fedora [2]

'gnome-rdp' GUI set up. [2]

Saturday, September 19, 2015

Mount ISO file as a disk in Linux

[Ref] http://wiki.sugarlabs.org/go/Sugar_on_a_Stick/Installation


#mount /path/to/downloaded.iso /run/soas/




[root@fedora20 soas]# umount /run/media/q.yang/KINGSTON

[root@fedora20 mntUSBFlash]# /home/q.yang/run/soas/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb 160 --home-size-mb 170 --unencrypted-home /home/q.yang/mntWin7Desktop/Fedora-Live-SoaS-i686-22-3.iso /dev/sdb1
Verifying image...
/home/q.yang/mntWin7Desktop/Fedora-Live-SoaS-i686-22-3.iso:   7101474df5e036dedae3ecca5bd918a1
Fragment sums: 6d845885a71ffb934a43ea879cfa8fffdbc16c495a88862419c0f9bf6a2d
Fragment count: 20
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.

/dev/sdb1 is mounted, please unmount for safety

Saturday, September 5, 2015

AWS Free Tier - Amazon Web Service free trial




AWS provide one year free tier service. It can be applied from https://aws.amazon.com/



Below is the application procedure, but it needs to be applied with your valid credit card info and contact phone number.




More details about what's covered in this free tier, see Amazon web site for updated full details.