/kernel_reloaded/

Author:

Other contacts

Novi članci

Flickr Goodness

Categories

linux Archive

March 18, 2014 @ 19:50

Linux Mint sets-up wrong default PDF viewer and folder launchers

 
Linux Mint has issue with some default apps that are launched from Firefox and Chrome browsers. For example instead of PDF viewer GIMP is lauched as PDF viewer. After investigating this issue looks like it is a common issue for lots of people who are using Mate version of Linux Mint. Probably some updates are to blame.
 
As usual best place to find good info is Arch Wiki which has some great info about setting default app launchers.
 
Issues for me was opening PDF files and directories from Firefox and Chrome. To check current default apps ‘xdg-mime’ is used:
xdg-mime query default inode/directory
xdg-mime query default application/pdf

 
and a quick fix for my two issues was:
xdg-mime default atril.desktop application/pdf
xdg-mime default caja.desktop inode/directory

 
and now just to test if new launchers work as you expected:
xdg-open ~/Desktop/
xdg-open ~Downloads/Demo.pdf

 

ps. Ask Fedora has really informative page regarding default apps on Fedora.
 

Filed under english, linux, tips&tricks · No Comments »

February 17, 2014 @ 1:21

OpenVPN client on Raspberry Pi

 
This article is writen in spite of lots of blog posts on this topic, but most of them don’t take in account some best practices and have redundant and sometimes wrong information.
 
So if you wish to use your Raspberry Pi as OpenVPN client and make configure your Raspberry Pi the RightWay(tm) then you have come to the right place :)
 
First you need to have certificate files, if you are admin on the OpenVPN server also then you need to know how to create these files (not covered in this article) and if you are not then you should ask admin of OpenVPN server to send these files to you.
 
First file you need is Certificate Authority Certificate file usually named ca.crt, and two are client specific and unique for each client, for this example I’ll use raspberry.key and raspberry.crt
 
First install openvpn package:
sudo apt-get install openvpn
 
Now create config file for OpenVPN:
vi / etc/openvpn/client.conf
and use these settings:
client
dev tun
port 1194
proto udp

remote CHANGE-ME-SERVER 1194 # VPN server IP : PORT
nobind

ca / etc/openvpn/ca.crt
cert / etc/openvpn/raspberry.crt
key / etc/openvpn/raspberry.key

comp-lzo
persist-key
persist-tun

verb 3
 
Copy certificates and key to / etc/openvpn/ directory on your Raspberry Pi
 
Start OpenVPN service
sudo / etc/init.d/openvpn start
 
Trubleshooting
If OpenVPN service is not starting take a peek into your log file:
tail /var/log/daemon.log
 
External links:

  • OpenVPN on Debian WIKI
  • Filed under english, linux, tips&tricks · No Comments »

    December 9, 2013 @ 19:26

    Bonbon i OpenWrt

     
    Bonbon omogućava vrlo pristupačan pristup Internetu. No ukoliko želite vezu podijeliti s više ljudi onda je vam treba i prijenosti wifi access point, naravno pogonjen OpenWrt-om :)
     
    Sva sreća pa nije preteško napraviti na OpenWrt-u postavke za izlaz na Internet preko UMTS usb sticka.
     
    Sve što treba je dodati novu wan konekciju za UMTS sub stick, no prije toga instalirati pakete za usb i umts podršku.
     
    opkg update
    opkg install comgt usb-modeswitch kmod-usb-serial-option kmod-usb-ohci kmod-usb2

     
    I nakon toga dodati wan konekciju:
     
    config interface 'wan'
    option proto '3g'
    option device '/dev/ttyUSB0'
    option service 'umts'
    option apn 'web.htgprs'
    option pincode '0000' # ovdje ide vas pin broj

     
    I to je to.
     

    Filed under croatian, linux, tips&tricks · No Comments »

    December 2, 2013 @ 21:35

    compile latest tilda and enjoy solarized terminal

    tilda_002
     
    Anybody who uses Linux desktop as workstation for prolonged times knows what difference good colour scheme can make in reducing eye strain.
    After discovering Solarized theme for me there was no going back.
     
    One of my recent discoveries was tilda, an awesome drop-down terminal. Only thing missing in tilda that would make it perfect tool was solarized theme. But fear not! Support for solarized theme is coming in upcoming tilda 1.2. If you can’t wait for official update to come out then you can compile it yourself.
     
    Install dependencies for Ubuntu:
    sudo apt-get install libgtk-3-dev libvte-2.90-dev libconfuse-dev
     
    For Fedora install these dependencies:
    sudo yum install git automake libconfuse-devel vte3-devel gtk3-devel glib-devel gettext-devel gcc
     
    And now grab sources, configure and compile tilda:

    git clone https://github.com/lanoxx/tilda.git
    cd tilda/
    ./autogen.sh --prefix=/usr
    make --silent
    sudo make install

     
    And that is it! Enjoy.
     

    Filed under english, linux, tips&tricks, ubuntu · 2 Comments »

    September 11, 2013 @ 10:26

    Adding undetected resolutions on Linux

     
    If you have a monitor that is misbehaving, like I do, then this article is for you. Lenovo ThinkVision L2250p Wide I have at my workplace doesn’t report resolutions it supports, so I have to manually add resolution it supports via xrandr.
     
    Most useful resource on Internets is, as usual, Arch Wiki.
     
    I know that my monitor supports resolution of 1680×1050 with 60Hz refresh rate, so to calculate modeline I just used cvt command and then loaded new mode. Worked like a charm.


    cvt 1680 1050 60
    xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
    xrandr --addmode VGA1 1680x1050_60.00

     
    To make changes permanent create .xprofile file and add any xrandr command that you would usually manually write.
    Ubuntu has really nice wiki page that explains all different methods for setting display resolution.
     

    Filed under english, linux, tips&tricks · No Comments »

    July 3, 2013 @ 9:05

    Stop laptop fans from working full speed on Linux after suspend!

     
    After restoring most laptops that I work on fans start goind full speed after suspend and resume instead reularing speed as they usually do.
    If you are afflicted with this bug then you are probably also very annoyed by this kernel bug
     
    Read rest of story…

    Filed under diy, english, fedora, linux, tips&tricks · 1 Comment »

    April 13, 2013 @ 19:52

    Tweak Wireless Power Output on OpenWrt and Linux

     
    This post is just to remind me later of few misc openwrt wireless commands.
     
    First there is no iwconfig you need to install it:
    opkg update
    opkg install wireless-tools

     
    iwconfig command shows current wireless power outpu:
    # iwconfig
    wlan0 IEEE 802.11bgn Mode:Master Tx-Power=20 dBm

     
    Maximal power is defined by multiple capability of your hardware and by laws in your country (regulatory domain).
     
    Read rest of story…

    Filed under diy, english, linux, tips&tricks, wireless · No Comments »

    March 2, 2013 @ 22:42

    Formatting output from Raspberry Pi temperature sensors

     
    Raspberry Pi crew released tools and drivers than enabled reading from CPU and GPU temperature sensors.
     
    In order to read GPU temperature use:
    $ /opt/vc/bin/vcgencmd measure_temp
    $ temp=43.3′C
     
    Reading CPU temperature is similar, just read value from sys file system:
    $ cat /sys/class/thermal/thermal_zone0/temp
    $ 43850
     
    As you can see both outputs need additional formatting to get only number values from them, and if you wish to have decimal precision then it gets a bit more complicated…
     
    Read rest of story…

    Filed under diy, english, gadgets, linux, tips&tricks · 5 Comments »

    February 13, 2013 @ 19:15

    Fix Arduino Mega 2560 avr-libc issue

    Arduino MEGA2560_09
     
    If you have Arduino Mega 2560 on any updated Linux distro with avr-libc 1.8 you probably have an issue with compiling.
     
    Read rest of story…

    Filed under english, gadgets, linux · No Comments »

    January 12, 2013 @ 22:56

    Benchmark flash memory on Linux

     
    I gathered all my flash based memory devices (USB flash memory sticks and SHDC cards) and wanted to see how do they compare to each other.
     

    Quick google search revealed that dd tool could be used for benchmarking so that is what I used. Have you done benchamrs some other way? Please share your method.
     

    Be really, really careful if you choose do to write test, because that will ERASE your existing data so test write speed only on EMPTY flash memory devices. Also triple check which device is your flash memory device. Simple typo could render your data partition unusable!
     

    I didn’t want to write on the first 1GB of flash memory because that part is probably most often used, I know there are some wear-leveling chips that should take care of that but you can use skip parameter if you wish to be safe. To prefent mesuring your cache performance but actual device performance use iflag and oflag options. 
     

    read speed benchmark:

    $ sudo dd if=/dev/sdX1 of=/dev/zero bs=1M count=400 iflag=direct

    write speed benchmark :

    $ sudo dd if=/dev/zero of=/dev/sdX1 bs=1M count=400 skip=1000 oflag=direct


    SDHC Card Read speed Write speed
    Adata 8GB class 10 20.8 MB/s 10.6 MB/s
    Apacer 4GB class 4 15.4 MB/s 3.6 MB/s
    LG 2GB class unknown 20.9 MB/s 8.1 MB/s


    USB memory stick Read speed Write speed
    2GB Transceng VF V90 19.2 MB/s 11.6 MB/s
    4GB Kingston DT 108 15.2 MB/s 7.2 MB/s
    8GB Kingston DT 2.0 19.0 MB/s 16.0 MB/s
    8GB Kingston DT SE9 20.1 MB/s 14.9 MB/s
    4GB Red USB 19.8 MB/s 9.0 MB/s
    8GB Silicon Power SP 810 24.8 MB/s 5 MB/s

    Filed under english, linux, tips&tricks · 4 Comments »

      Archives

      Flickr photostream

      User not found

      Meta meta :)