2014-03-11

Rusty Tool


This rusty tool was dig out form the ground... probably long time was there...



I am lying about the tool, it's actually made from chocolate and already eaten! :)


2014-02-13

Running Skype 2.2 on Linux Mint 16




It works for 32bit and 64bit Mint 16 (I tested on Mate)
I use skype-ubuntu_2.2.0.35-1_i386.deb

if you try to start skype from teraminal, this is what you will see

$ skype
Segmentation fault


To fix this, download

libglib2.0-0_2.34.1-1ubuntu1_i386.deb

 from

http://packages.ubuntu.com/search?keywords=libglib2.0-0

quantal-updates (libs): GLib library of C routines
2.34.1-1ubuntu1: i386

extract deb file (you can do it whit the graphical archive extractor)

 and then start skype with prealoded lib like this:

$ Exec=env LD_PRELOAD=/home/{user}/Downloads/libglib2.0-0_2.34.1-1ubuntu1_i386/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3400.1 /usr/bin/skype

Test your skype, type in:

 (mushroom)

You should not see text! :) Like me! :)




Usefull link:
https://bbs.archlinux.org/viewtopic.php?id=154571&p=2

Mint 16 currently use "2.38.1" version of GLib C routines.
I tried preload newer version  "2.39.4", with the hope that they fix it,
 bus sadly they don't and the outcome was the same.   



Sharing file edit ability between two users in Linux

I create two Desktop users, “beggar” and “mr” using graphical tool “Users and Groups”.

By default every user have its own group with the same name, and some other groups.
You can check it with command

$id {userName}

$ id mr
uid=1001(mr) gid=1001(mr) groups=1001(mr)mr

$ id beggar
uid=1000(beggar) gid=1000(beggar) groups=1000(beggar),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),112(lpadmin),
119(sambashare)

By default when user creates new file, file permission is:
 read/write for owner and read only for group and others.
We have to change it to:
 read/write for owner and group and readonly for others.
Then users in the same group can edit files.

There is two configuration files.
Applies for files created by command line   ~/.bashrc
Applies for files created by X applications   ~/.profile
Add this line

umask 002

at the end of the file or create these files if they not exists. Do it for both users.

Permission Table:
Umask  Created Files   Created Directories
-------------------------------------------------------------
000  666 (rw-rw-rw-)     777  (rwxrwxrwx)
002  664 (rw-rw-r--)  775  (rwxrwxr-x)
022  644 (rw-r--r--)         755  (rwxr-xr-x)
027  640 (rw-r-----)         750  (rwxr-x---)
077  600 (rw-------)          700  (rwx------)
277  400 (r--------)            500  (r-x------)
-------------------------------------------------------------


I will use command usermod to add user to a group with these options:

-G, --groups GROUPS           new list of supplementary GROUPS
  -a, --append                  append the user to the supplemental GROUPS
                                mentioned by the -G option without removing
                                him/her from other groups

So, if I want to allow user “beggar” edit files created by user “mr”, I need to add user “beggar” to group “mr”.

$usermod -a -G mr beggar

Now “beggar” can edit files created by “mr”
And the opposite,  if I want to allow user “mr” edit files created by user “beggar”,  I need to add user “mr” to group “beggar”

$usermod -a -G beggar mr

then “mr” can edit files created by “beggar”

Before you can test it, you have to LOGOUT and LOGIN!

From now on  “beggar” and  “mr” can edit each others files! :)
Happy ending!

2014-02-12

MINT 16 XFCE Review

First of all very very good Desktop Environment. Great performance.
I liked a lot, everything what comes directly from XCFE.
And also new menu is great to!


If you use double click title bar to maximize window.
Unless you very fast clicker :) you may want to change default Double Click Time:

 


There is a trick with separator to manage panels properly.
If you want to keep some item in right corner you have to create transparent separator to take empty panel space, otherwise all items wil be arranged left.


Sadly XFCE don’t have some components for Desktop Environment, so you have to borrow from gnome

Login screen

Taken from gnome, looks like it works.

Users and Groups

Not exists, can do it in terminal or you can install “gnome-system-tools”, this way you can manage users graphically. It works OK, no issues and fits pretty good.

Screensaver - Lock screen - Switch user 


Aaa…
It looks like some embedded device not a PC.
I guess it’s some sort of funky workaround…
This part does not fit to the rest of the  MINT XFCE content.
You can install “gnome-screensaver” and remove “xscreensaver”, bud then you lose graphical settings of your screensaver. I was unable to find handle on that so by default screensaver starts after 10min if desktop is idle.
The issue is still unresolved and I already give up trying.
Now my target is MINT MATE 16.

One more remark

I did not understand what philosophy they use for new window location.
When you open new application or file browser window, it appears for example in bottom left corner, and it's not the last position where it was before.
So new applications windows jumping around the screen...
I'm not sure why and what this feature depend on...

2014-01-25

Bash script for Livestreamer to record twitch stream by schedule

 Install livesreamer from:

http://livestreamer.tanuki.se/en/latest/

Very very thankful for this tool, I search for something like this sense I hooked on StarCraft II!

To use script, just edit configuration part...  It's pretty self explanatory.
In my time zone, all GSL battles going when I'm at work.
This script allows me to record all and watch it when I come back home after work! :) 

I use livesreamer, not only for recording. Sorry, but Twitch page is lagging and I don't need other stuff, only video. And the best experience, in sense of avoiding video lagging or some sort of interrupts, is to stream to file and then watch it!
Also you can start streaming to file and watch from the file right away. Perhaps you should wait 10 or 15 seconds, this way player not going to catch the end of the file!


^^^^^^^^^^^^^^^^^^^^^^^^^^
#! /bin/bash
STREAM_URL="http://www.twitch.tv/gsl"
STREAM_QUALITY="best"
STREAMS_DUMP_DIR="/media/xbmc/Streams/"
STREAM_FILE_NAME="gsl_code_s_"

#                        month day year hour minutes
START_TIMESTAMP=$(date -d '10/04/2014 11:45' +%s)
END_TIMESTAMP=$(date -d '10/04/2014 19:00' +%s)
KILL_TIMESTAMP=$(date -d '10/04/2014 19:01' +%s)

^^^^^^^^^^^^^^^^^^^^^^^^^^

Bash version1




Bash version 2


It runs as a daemon. Just drop a simple text file to "shed" directory.
Text file should look like this:

^^^^^^^^^^^^^^^^^^^^^^^^^^
# twitch link
URL=http://www.twitch.tv/nathanias
#    Year Month Day
DATE=2014.12.23
#    Hours minutes
TIME=07.45
^^^^^^^^^^^^^^^^^^^^^^^^^^


Also set global configurations before start ("bash.conf"):


^^^^^^^^^^^^^^^^^^^^^^^^^^
# stream quality
QUALITY=best
# directory where steams will be saved
DIR=/media/8b58Volume830GiB/Streams/
# stream offline timeout to consider that stream is ended.
# at least one stream file should be created 
# in minutes
OFFLINE_TIMEOUT=20
^^^^^^^^^^^^^^^^^^^^^^^^^^




Extract archive and open terminal in "livestreamer-deamon" directory

$ ./livestreamer-deamon start


I run this on Raspberry-Pi. I can leave it online 24for7 it consumes ~5W of power and make no noise! It's environment friendly and wife approved! :)))

I added this to /etc/rc.local

^^^^^^^^^^^^^^^^^^^^^^^^^^
# livestreamer-deamon
cd /home/pi/wcs/
su pi /home/pi/wcs/livestreamer-deamon.bash start >> /dev/null 2>> /dev/null &
^^^^^^^^^^^^^^^^^^^^^^^^^^



 

Bash version 3


^^^^^^^^^^^^^^^^^^^^^^^^^^
# twitch link
URL=http://www.twitch.tv/nathanias
#    Year Month Day
DATE=2015.04.04
#    Hours minutes
TIME=19.34

#    Continue for ? days and record everything...
DAYS=3
#    log file
LOG=
^^^^^^^^^^^^^^^^^^^^^^^^^^
If days set to zero it will work as before.


Download :

livestreamer-bash


Enjoy!



2014-01-24

Facebook account cannot be deleted




It take me 30 minutes to find whare I can "delete" my facebook account. It says something about the site it self... It's not because of lack of my browsing skills :)
I did that couple years a go. Sense then I never ever even open facebook page, I'm not even talk about trying to log in.
Despite that from time to time they sending me this spam: 




You cloud think that someone else maybe  trying to hack may account , bud it's deleted and also this mail goes as "no replay", and there are no link that you can tell them "I did not try to login! Lave me alone!". So definitely not the case!

Once you try, they will be annoying as TV commercials or sellers that goes to your house, talk a lot, and don't mater what you say, thay know "you need their product"!

It is nice share some stuff on web, bud not the facebook way!