Tuesday, December 20, 2016

Sunday, November 13, 2016

pygame on ubuntu 16.10 installation

sudo apt install devscripts     # to install dget
dget -u  http://httpredir.debian.org/debian/pool/main/p/pygame/pygame_1.9.1release+dfsg-10.dsc

sudo apt install libsdl-ttf2.0 libportmidi-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsmpeg-dev


list of dependencies

sudo apt-get install mercurial python3-dev python3-setuptools python3-numpy python3-opengl libav-tools libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libtiff5-dev libx11-6 libx11-dev fluid-soundfont-gm timgm6mb-soundfont xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic fontconfig fonts-freefont-ttf libfreetype6-dev



Steps to install PyGame using pip
  1. Install build dependencies (on linux):
    sudo apt-get build-dep python-pygame
  2. Install mercurial to use hg (on linux):
    sudo apt-get install mercurial
    On Windows you can use the installer: http://mercurial.selenic.com/wiki/Download
  3. Use pip to install PyGame:
    pip install hg+http://bitbucket.org/pygame/pygame
    If the above gives freetype-config: not found error (on Linux), then try sudo apt-get install libfreetype6-dev and then repeat 3.
Alternative way:
# Grab source
hg clone https://bitbucket.org/pygame/pygame

# Finally build and install
cd pygame
python setup.py build
sudo python setup.py install

Friday, August 12, 2016

How to install Squeak 5.0 on Ubuntu 16.04 x64 64bits

This works in 64 bit Ubuntu 16.04:
In the directory where you unzipped the Squeak-5.0-All-in-One.zip archive, and that contains the squeak.sh file, put the following into a file named libs32.sh :
#!/bin/bash
objdump -p ./Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686/lib/squeak/5.0-3397/*|
grep NEEDED|
awk '{print $2}'|
sort -u|
xargs dpkg -S|
awk '{print $1}'|
sort -u|
sed 's/:amd64:/:i386:/'|
sort -u|
sed 's/:$//'
Make that file executable:
chmod +x ./libs32.sh
Run it:
./libs32.sh
You will get a list of libraries that need to be installed.
Run
./lib32.sh | xargs sudo apt install
to see what would be installed.
Run
./lib32.sh | xargs sudo apt install -y
to install it.

Monday, August 8, 2016

How to install steam client on Ubuntu 16.04


sudo apt install steam

rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libgcc_s.so.1

@jvriesem that's not a problem, as you'd have to remove it anyway. The point of this exercise is to make Steam use the system versions of certain core libraries instead of replacing them with versions that don't work. (Why they would ship incompatible versions of standard libraries in the first place is beyond me) – tjollans Jul 24 at 10:25

You can create script with the following content to run it instead of steam:
#!/bin/bash
# Export so all child processes are affected as well
export LD_PRELOAD='/usr/$LIB/libstdc++.so.6'
export DISPLAY=:0
#export LIBGL_DEBUG=verbose
steam
or issue this command from cli

LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam

Wednesday, April 27, 2016

How to setup centos as ntp client

# yum install ntp ntpdate ntp-doc
# chkconfig ntpd on

Synchronize the system clock with 0.pool.ntp.org server (use this command only once or as required):
# ntpdate pool.ntp.org



Start the NTP server. The following will continuously adjusts system time from upstream NTP server. No need to run ntpdate:
# /etc/init.d/ntpd start

Configure ntpd (optional)

Edit /etc/ntp.conf, enter:
# vi /etc/ntp.conf
Set public servers from the pool.ntp.org project:
server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org


Thailand — th.pool.ntp.org

There are not enough servers in this zone, so we recommend you use the Asia zone (asia.pool.ntp.org):
    server 0.asia.pool.ntp.org
    server 1.asia.pool.ntp.org
    server 2.asia.pool.ntp.org
    server 3.asia.pool.ntp.org

How to enable networking after install centos from minimal cd

$ vim /etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT=yes