July 17 2017, 00:00#

Ragnarok Online sur Debian et FreeBSD

Ragnarok Online est un MMORPG coréen officiellement disponible uniquement sous Windows. Ce qui suit est un petit guide qui couvre uniquement l'installation du client officiel du serveur européen Ragnarok Europe sur Debian et FreeBSD à l'aide de Wine.

Téléchargement du client

Le client officiel est téléchargeable ici.

Installation de Wine

Sur Debian 9 amd64

dpkg --add-architecture i386
apt-get update
apt-get install wine32 winetricks

Sur FreeBSD 11

pkg inst i386-wine winetricks

Préparation du lecteur virtuel

export WINEPREFIX=~/.wine-euRO
WINEARCH=win32 winecfg

Installation des composants nécessaires au jeu

winetricks vcrun2008
winetricks ie8

À l'installation d'IE 8 :

  • Choisir I do not want to participate right now
  • Décocher Install updates
  • Cliquer sur Restart later puis répondre Yes

En cas d'erreur 404 lors du téléchargement des différents composants nécessaires à l'installation d'IE 8, voir ici pour récupérer ce qui manque et fournir ~/.cache/winetricks.

Installation du client

wine setup.exe

Enjoy!

Tags : unix jeu ragnarok linux freebsd debian wine

July 12 2017, 00:00#

Désactiver l'historique dans Chromium

Il est possible de désactiver l'enregistrement de l'historique dans Chromium en attribuant un droit de lecture seule sur le fichier History.

Mais avant tout il faut :

  1. purger les données de navigation (Ctrl + H et Clear browsing data)
  2. puis quitter le navigateur pour éviter tout conflit

Enfin :

chmod 444 ~/.config/chromium/Default/History

À priori cela ne perturbe pas le bon fonctionnement du navigateur.

Tags : unix linux web google chromium sécurité confidentialité

August 17 2016, 00:00#

Jekyll sur Debian 8

Prérequis

apt-get install curl build-essential ruby ruby-dev rubygems-integration

nodejs

Installation de la dernière version LTS de NodeJS

curl -sL https://deb.nodesource.com/setup_4.x | bash -
apt-get install nodejs

Installation

Installation de Jekyll

gem install jekyll

Tags : unix linux debian jekyll nodejs ruby

August 11 2016, 00:00#

Molly Guard

molly-guard est un petit outil (compatible systemd) permettant de se protéger des arrêts/redémarrages accidentels.

Pour la petite histoire : https://en.wiktionary.org/wiki/molly-guard

Installation

apt install molly-guard

Configuration

Ajouter ou décommenter la ligne suivante dans le fichier /etc/molly-guard/rc

ALWAYS_QUERY_HOSTNAME=true

Tags : unix linux debian systemd

August 09 2016, 00:00#

LXC on Debian 8

LXC (Linux Containers) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.

We will see how to quickly setting up a container.

Prerequisites

We need a network bridge br0. If needed, take a look on my post about that: "Setting up a network bridge on Debian 7".

Installation

# apt install lxc
# mkdir -p {/srv/lxc,/etc/lxc/auto}
# chmod 750 /srv/lxc

Creating a container

Copy the desired template and edit it.

# cp /usr/share/doc/lxc/examples/lxc-veth.conf /srv/lxc/example.conf

Configuration example

# Container with network virtualized using a pre-configured bridge named br0 and
# veth pair virtual network devices
lxc.utsname = example
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.hwaddr = 
lxc.network.ipv4 = 10.0.0.3/24
lxc.network.ipv4.gateway = 10.0.0.1

# Autostart
lxc.start.auto = 1
lxc.start.delay = 30

Creating a Debian container

The root password must be defined at the end of the creation process.

# lxc-create -n example -f /srv/lxc/example.conf --dir /srv/lxc/example -t debian

If we want to start automatically our container at boot, we have to link the configuration file into the /etc/lxc/auto directory.

# ln -s /var/lib/lxc/example/config /etc/lxc/auto/example

Network configuration

Edit /srv/lxc/example/etc/network/interfaces

To disable DHCP, comment iface eth0 inet dhcp.

auto lo
iface lo inet loopback

auto eth0
#iface eth0 inet dhcp

Informations about a container

# lxc-info -n example

Start

Normal mode

# lxc-start -n example

Daemon mode

# lxc-start -dn example

Console

Useful when the container run in the daemon mode

# lxc-console -n example

Stop

# lxc-stop -n example

Destroy

# lxc-destroy -n example

Tags : unix linux debian containerization virtualization

August 05 2016, 00:00#

Generate a self-signed certificate with OpenSSL

In my self-hosting adventure, I have to secure my web applications with SSL/TLS. The simple and free way is to generate my own certificates.

Edit 2020-10-09: today, for services exposed to the public, the best and simple way is to use Let's Encrypt.

Prerequisites

OpenSSL of course! :)

Install it on Debian GNU/Linux

apt install openssl

On FreeBSD

pkg install openssl

Generate

The following command generates a RSA key and a certificate valid for one year.

openssl req -x509 -nodes -newkey rsa:2048 -keyout example.key -out example.crt -days 365

Some questions will appear, fill it as your needs, but pay attention to the Common Name question.

For a website, this information must be a valid FQDN.

We can use wildcard to secure all subdomains. Example, if we want to secure www.example.com and blog.example.com, we can define the Common Name as *.example.com.

Tags : unix linux security ssl freebsd

May 31 2016, 00:00#

KVM virtualization on Debian 8

Kernel-based Virtual Machine (KVM) is a virtualization module in the Linux kernel that allows the kernel to function as a hypervisor. We will see how to setup quickly a hypervisor on Debian 8 using KVM.

Prerequisites

Check processor flags

KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V. So, we have to check if our processor has such an extension.

egrep 'svm|vmx' /proc/cpuinfo

You have to see at least one result.

Packages

apt install qemu-kvm libvirt-bin virtinst

GUI

If you need a GUI to manage your VMs, you can install virt-manager.

apt install virt-manager

virt-manager is able to provide a GUI for local KVM instance, but also for remote instances.

Network configuration

The main way to setup the network for the VMs is to make a network bridge. You can read my post "Setting up a network bridge on Debian 7" about that.

When the network bridge is up, we can configure the KVM network.

Edit /etc/libvirt/qemu/networks/host-bridge.xml

<network>
  <name>host-bridge</name>
  <forward mode="bridge"/>
  <bridge name="br0"/>
</network>

Then

virsh net-define /etc/libvirt/qemu/networks/host-bridge.xml

Finally, start the network.

virsh net-start host-bridge

Create a new pool

Now we will create a default pool for our VMs in /srv/kvm

mkdir -p /srv/kvm
virsh pool-create-as default dir --target /srv/kvm

Create a new virtual machine

Here is an example of creating a new CentOS VM:

  • OS CentOS 7
  • Type Linux RHEL7 (Red Hat Enterprise Linux 7)
  • Memory 512M
  • Disk 8G (qcow2 format)
  • Network host-bridge (defined previously)

Creating a VM can be done just in one command

virt-install --connect qemu:///system \
--virt-type kvm \
--name centos7 \
--ram 512 \
--disk /srv/kvm/centos7.qcow,format=qcow2,size=8 \
--cdrom /media/iso/os/linux/CentOS-7-x86_64-Minimal-1511.iso \
-w network=host-bridge \
--vnc \
--os-type linux --os-variant rhel7

Need explanations about the arguments? Please, take a look in the manual.

man virt-install

libvirt group

If you want to manage your VMs without passing through the root user, you can add your user into the libvirt group.

gpasswd -a user libvirt

Tags : unix linux debian virtualization kvm

April 23 2016, 00:00#

Add a Certification Authority on Debian 8

This is just a little note to remember how to add properly a new Certification Authority (CA) on Debian 8.

Copy the certificate
# cp example-ca.crt /usr/local/share/ca-certificates/
Update
# update-ca-certificates
Checking
$ ls -la /etc/ssl/certs | grep "example-ca"

The certificate is now present in the /etc/ssl/certs directory.

Tags : linux debian securité

April 23 2016, 00:00#

Txt2tags files syntax coloring in Vim

This is a little note to remember how to enable syntax highlighting for Txt2tags .t2t files in Vim.

Prerequisite

Download the Vim script txt2tags.vim here.

Installation

$ if [ ! -d "$HOME/.vim/syntax" ] ; then mkdir -p $HOME/.vim/syntax ; fi
$ cp txt2tags.vim $HOME/.vim/syntax/

Activation

Edit your .vimrc file at $HOME/.vimrc and add the following line

au BufNewFile,BufRead *.t2t set ft=txt2tags

Tags : unix software

April 22 2016, 00:00#

Build Homebank on Debian 8

Homebank is a free software that will assist you to manage your personal accounting. Designed to be easy to use and to be able to analyse your personal finance and budget in detail using powerful filtering tools and beautiful charts.

At the time of this writing the 5.0.6 version is not available in the Debian 8 repositories. So, we will see how to built it from source code.

Prerequisites

 # apt install build-essential libgtk-3-dev libofx6 libofx-dev intltool

Download the source code

$ wget https://get.nosheep.fr/src/homebank/homebank-5.0.6.tar.gz

Compilation

$ cp homebank-5.0.6.tar.gz /tmp/
$ cd /tmp
$ tar -xzpf homebank-5.0.6.tar.gz
$ cd homebank-5.0.6
$ ./configure --prefix=/usr
$ make

Installation

As root user

# cd /tmp/homebank-5.0.6
# make install

Tags : unix linux debian software

February 06 2016, 00:00#

Setup Radicale server on Debian 8

Radicale is a small but powerful CalDAV (calendars, to-do lists) and CardDAV (contacts) server.

We will see how to setup it quickly with a basic HTTP authentication using a file to store the users credentials.

Prerequisites

# apt install radicale apache2-utils

Authentication

Create the users file.

# htpasswd -cd /etc/radicale/users johndoe
# chown root:radicale /etc/radicale/users
# chmod 640 /etc/radicale/users

Add a new user or change his password

# htpasswd -d /etc/radicale/users katsmith

Delete a user

# htpasswd -D /etc/radicale/users katsmith

Data

Create the data directory

# mkdir -p /srv/radicale/collections
# chown -R radicale:radicale /srv/radicale
# chmod 750 /srv/radicale

The user and group radicale are generated automatically during the package installation.

Configuration

Edit /etc/radicale/config

# Authentication method
type = htpasswd

# Rights backend
type = owner_write

# Folder for storing local collections, created if not present
filesystem_folder = /srv/radicale/collections

Edit /etc/default/radicale and uncomment the following line

ENABLE_RADICALE=yes

Reboot

Tags : unix linux debian server

September 25 2015, 00:00#

Microsoft TrueType core fonts on Manjaro Linux

We will see how to install the Microsoft's TrueType core fonts on Manjaro Linux.

Prerequisites

cabextract is a little soft which can extract the files from a .cab Microsoft file.

Install it now as root user

pacman -Sy cabextract

Download the fonts

The fonts are available on the corefonts project website.

Extraction

Example with the Impact font

cabextract -F *.TTF impact32.exe
Extracting cabinet: impact32.exe
  extracting Impact.TTF

All done, no errors.

Installation

So, now just move the font on your ~/.fonts folder.

mkdir ~/.fonts
mv Impact.TTF ~/.fonts/

Tags : unix linux manjaro

August 16 2015, 00:00#

Setting up a network bridge on Debian 7

I need to setup a network bridge br0 to connect my virtual machines under KVM to the wired network eth0 without DHCP. I do not use Network Manager, but the /etc/network/interfaces configuration file.

Install the prerequisites as root user

aptitude install bridge-utils

Disable eth0 as root user

ifdown eth0

Setting up the network interfaces

Edit /etc/network/interfaces

auto lo br0
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual

iface br0 inet static
    address 192.168.1.3
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    bridge_ports eth0
    # I use the OpenDNS nameservers
    dns-nameserver 208.67.222.222
    dns-nameserver 208.67.220.220

Activate interfaces as root user

ifup eth0 br0

Tags : linux debian réseau kvm

August 16 2015, 00:00#

Setup Wake On Lan on Debian 7

Wake On Lan (WOL) is a standard which allow to wake up remotely a sleeping machine by sending a magic packet.

WOL on the server side

Check the WOL support

Before all, it's necessary to ensure that your network controller supports the WOL and it is enabled in the BIOS. This part is not covered by this post.

The next step is to check on the OS level.

Install ethtool

As root user

aptitude install ethtool

Get the informations

As root user

ethtool eth0 | grep 'Wake-on:'

If the command does not return any result, consider that the WOL is not supported by your network controller.

In my case, I got a positive result:

Supports Wake-on: pg
Wake-on: d

The first line indicates what is supported on my network controller. The expected value is g for WOL.

The second line indicates what is activated. The d value seems tell that the WOL is disabled.

To be more clear, in my case WOL seems to be supported, but disabled. So, I need to enable it now.

Enable WOL

As root user

ethtool -s eth0 wol g

Checking

ethtool eth0 | grep 'Wake-on:'
  Supports Wake-on: pg
  Wake-on: g

WOL is now enabled on eth0 of my remote machine.

Get the MAC address

Before configuring the client, I need to get the MAC address of eth0.

As root user

ifconfig eth0 | grep 'HWaddr'
eth0      Link encap:Ethernet  HWaddr 0b:f1:a0:25:74:9b

WOL on the client side

How to wake up the remote machine?

Install wakeonlan

As root user

aptitude install wakeonlan

Send a magic packet

To wake up the remote machine, I send it a magic packet. To do it, I call the wakeonlan command and pass it the IP and MAC address of the remote machine.

As a normal user

wakeonlan -i 10.0.0.10 0b:f1:a0:25:74:9b

Be sure that the UDP port 9 is open on the remote machine.

Tags : unix linux debian network

August 12 2015, 00:00#

Install Jekyll on Manjaro Linux using rubygems

This website is built using Jekyll, a powerful static website generator. I will explain how to install it on Manjaro Linux.

At the time of this writing, the installation of the ruby-jekyll package does not work because the dependency ruby-kramdown is missing.

A possible workaround is to install it with rubygems.

Install the dependencies as root user

pacman -Sy ruby nodejs

Install Jekyll as a normal user

gem install jekyll

Setting up

Edit your .bashrc file and add the gems binaries into the $PATH environment variable, like this:

# Add gems binaries to my PATH
export PATH=${PATH}:${HOME}/.gem/ruby/2.2.0/bin

Tags : unix linux manjaro ruby

June 16 2015, 08:47#

Citizenfour
Le #film #documentaire qui nous fait revivre l'affaire Snowden, mais cette fois-ci, de l'autre côté de l'écran.. A voir et à revoir !

June 15 2015, 13:05#

Jamendo
Jamendo, la #musique indépendante en libre diffusion.

June 10 2015, 07:10#

"Dites-moi et j’oublierai. Montrez-moi et je me souviendrai. Impliquez-moi et je comprendrai" Confucius

June 05 2015, 11:24#

Smartphone Jolla
Jolla ne serait pas dans l’idée d’annoncer un nouveau smartphone, mais un fabricant semble être intéressé par Sailfish OS.

June 04 2015, 19:58#

Coup de coeur pour ce #wallpaper..
mini-Wallpaper