Category Archives: Debian

install new #crontab from #bash script

you need to:

  1. save the current cron jobs for the user
  2. create a file with the new job description (pun intended)
  3. insert the new configuration
  4. check the new conf

crontab -l > /tmp/current_cron
or, even better. append directly to your cron conf
crontab -l >> cronconf.txt

the file should look like
cat cronconf.txt
*/1 * * * * /bin/ls >> /tmp/ls
*/1 * * * * /bin/touch /tmp/me

Insert the new conf by calling crontab
crontab cronconf.txt

check the new conf with
crontab -l

ffmeg with #HEVC support on the #raspberrypi

as root:
* add deb-multimedia repository “deb testing main non-free
howto here
* apt-get install libsdl1.2-dev libfaac-dev libx264-dev (libs, codecs and stuff)
* apt-get install mercurial cmake cmake-curses-gui build-essential yasm (tools to retrieve & build ffmpeg)

as user:
* hg clone
* cd x265/build/linux


as root:

make install

git clone git:// (you need to have git installed)
cd ffmpeg
./configure –enable-libfaac –enable-libx264 –enable-gpl –enable-nonfree –enable-libx265 –enable-ffplay –enable-pic
make install

reconnecting to #WiFi with #wicd-cli on #debian

I was unable to (re)connect to WiFi using the network name, known bug of wicd-cli (look here).

I came up with this

wicd-cli -y -c -n `wicd-cli -y -l -S| grep "XX:XX:XX:XX:XX:XX" | awk -F ' ' '{print $1}'`

I launch this on my /etc/rc.local and it works like a charm.

sleep 60
function wifiup {
wicd-cli -y -c -n `wicd-cli -y -l -S| grep "XX:XX:XX:XX:XX:XX" | awk -F ' ' '{print $1}'`

while true; 
#do fping -c1 -q -a || echo "no internet"; ## debug
do fping -c1 -q -a || wifiup; 
sleep 60 

sharing keyboard/mouse between #Linux machines

on the “remote” or keyboardless machine

apt-get instal x2x

then make sur X is running


on the machine where you have the keyboard:

ssh -XC user@ip x2x -north -to :0.0 

(where :0.0 is the output of $DISPLAY on the “remote” machine)

sharing mouse/keyboard between #debian and #windows

first step
On debian:
apt-get install x2vnc

On windows:
Install VNC Server, get the key, activate, the usual hassle.
Run VNC Server, set a password

second step
On debian:

 x2vnc 172.27.xx.xx:0 -west (then you will be prompted to type the password)

– 172.27.xx.xx is the IP from the windows machine
– :0 is the screen on the windows machine
– -west is the location of the windows screen from the Linux screen(s) (you can user north, south, east, west)

squid3 with basic auth #debian

apt-get install squid3 apache2-utils
htpasswd /etc/squid3/passwd user1
dpkg -L squid3 | grep ncsa_auth 

=> /usr/lib/squid3/basic_ncsa_auth

Edit /etc/squid3/squid.conf file and add:

auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users

restart squid

If firefox does not display the user/password pop-up, see here and/or here.


i915 #glx issues #debian

sudo apt-get purge nvidia*
sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
and then reboot ...

Source: here