Saturday 22 February 2014

Apple iPod nano Gen6 on Linux Mint 64bit



Technically this iPod is not supported on linux.
Linux did recognize it and could mount the file system, gtkpod was also capable of reading the file list, however no changes could be made nor files added to the device (it will add in Amarok and gtkpod) but don't show up on the playlist.

After some digging around it was found that Apple use a new hash algorithm to check the files and database on the iPod.

Luckily someone reverse engineered and produced this mod libhashab_mod_14-04-13.tar.gz or here that will update your system with the correct libhashab32.so or libhashab64.so.

After this I could sucsesfully create a playlist and save a song into the playlist on a iPod nano Gen 6 with gtkpod. Amarok 2.8.1 still not working but onto it now.




Archi 2.6 and 64 bit linux

Archi 2.6 kept on crashing even after I anstalled a 32bit Java runtime environment (this was due to Archi still trying to use 64bit libraries)


Installed Java runtime environment for 32bit but Archi still crashed ( the moment you add a object onto a view).

The fix for this is to edit the Archi32.ini file and add the path to the vm it must use e.g.

Archi32.ini
-vm
/usr/lib/jvm/32/jdk1.7.0_51_32/jdk1.7.0_51/jre/bin/java
-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=256m
-Dosgi.requiredJavaVersion=1.6
-Dosgi.instance.area=@user.home/uk.ac.bolton/Archi
-Dosgi.configuration.area=@user.home/uk.ac.bolton/Archi/configuration

Then run Archi via Archi32-Ubuntu.sh and all should be fine.


Thursday 13 February 2014

Cisco config text highlighting with Gedit

The following files can be copied into the language folder to enable text highlighting for Cisco configurations

$ sudo cp ios.lang /usr/share/gtksourceview-3.0/language-specs/



ios.lang

<?xml version="1.0" encoding="UTF-8"?>
<language id="cisco-ios" _name="Cisco IOS" version="2.0" _section="Cisco">
  <metadata>
    <property name="mimetypes">text/plain</property>
    <property name="globs">*.cfg</property>
    <property name="comment-start">!</property>
  </metadata>
  <styles>
    <style id="comment" _name="Comment" map-to="def:comment"/>
    <style id="identifier" _name="Interface" map-to="def:identifier"/>
    <style id="list" _name="Access List" map-to="def:preprocessor"/>
    <style id="number" _name="Number" map-to="def:preprocessor"/>
  </styles>
  <definitions>
    <context id="comment" style-ref="comment" end-at-line-end="true">
      <start>!</start>
    </context>
    <context id="description" style-ref="comment" end-at-line-end="true">
      <start>description</start>
    </context>

    <context id="hostname" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>hostname</start>
    </context>
    <context id="interface" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>interface</start>
    </context>
    <context id="policy-map" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>policy-map</start>
    </context>
    <context id="class-map" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>class-map</start>
    </context>
    <context id="controller" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>controller</start>
    </context>
    <context id="linevty" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>line vty</start>
    </context>
    <context id="linecon" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>line con</start>
    </context>
    <context id="lineaux" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>line aux</start>
    </context>

    <context id="lists" style-ref="list">
      <keyword>access-list</keyword>
      <keyword>ip route</keyword>
      <keyword>ip nat</keyword>
    </context>

    <context id="routers" style-ref="identifier">
      <keyword>router rip</keyword>
      <keyword>router eigrp</keyword>
      <keyword>router igrp</keyword>
      <keyword>router ospf</keyword>
      <keyword>router bgp</keyword>
    </context>

    <context id="number" style-ref="number">
      <match>(\b[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</match>
    </context>
    <context id="cisco-ios">
      <include>
        <context ref="comment"/>
        <context ref="description"/>
        <context ref="hostname"/>
        <context ref="interface"/>
        <context ref="controller"/>
        <context ref="linevty"/>
        <context ref="linecon"/>
        <context ref="lineaux"/>
        <context ref="policy-map"/>
        <context ref="class-map"/>
        <context ref="lists"/>
        <context ref="routers"/>
        <context ref="number"/>
       </include>
    </context>
  </definitions>
</language>


asa.lang

<?xml version="1.0" encoding="UTF-8"?>
<language id="cisco-firewall" _name="Cisco PIX/ASA" version="2.0"
_section="Cisco">
  <metadata>
    <property name="mimetypes">text/plain</property>
    <property name="globs">*.txt;</property>
    <property name="comment-start">!</property>
  </metadata>
  <styles>
    <style id="comment" _name="Comment" map-to="def:comment"/>
    <style id="identifier" _name="Interface" map-to="def:keyword"/>
    <style id="access-list" _name="Access List" map-to="def:preprocessor"/>
    <style id="static" _name="Static" map-to="def:string"/>
    <style id="nat" _name="NAT" map-to="def:type"/>
    <style id="route" _name="Route" map-to="def:preprocessor"/>
    <style id="number" _name="Number" map-to="def:comment"/>
  </styles>
  <definitions>
    <context id="comment" style-ref="comment" end-at-line-end="true">
      <start>!</start>
    </context>
    <context id="description" style-ref="comment" end-at-line-end="true">
      <start>description</start>
    </context>

    <context id="hostname" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>hostname</start>
    </context>
    <context id="ip-address" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>ip address</start>
    </context>
    <context id="interface" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>interface</start>
    </context>
    <context id="policy-map" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>policy-map</start>
    </context>
    <context id="class-map" end-at-line-end="true" extend-parent="false"
style-ref="identifier">
      <start>class-map</start>
    </context>

    <context id="access-list" end-at-line-end="true" extend-parent="false"
style-ref="access-list">
      <start>access-list</start>
    </context>

    <context id="access-group" end-at-line-end="true" extend-parent="false"
style-ref="access-list">
      <start>access-group</start>
    </context>

    <context id="static" end-at-line-end="true" extend-parent="false"
style-ref="static">
      <start>static</start>
    </context>

    <context id="nat" end-at-line-end="true" extend-parent="false"
style-ref="nat">
      <start>nat</start>
    </context>

    <context id="route" end-at-line-end="true" extend-parent="false"
style-ref="route">
      <start>route</start>
    </context>

    <context id="number" style-ref="number">
      <match>(\b[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</match>
    </context>
    <context id="cisco-firewall">
      <include>
        <context ref="comment"/>
        <context ref="description"/>
        <context ref="ip-address"/>
        <context ref="hostname"/>
        <context ref="interface"/>
        <context ref="policy-map"/>
        <context ref="class-map"/>
        <context ref="access-list"/>
        <context ref="access-group"/>
        <context ref="static"/>
        <context ref="nat"/>
        <context ref="route"/>
        <context ref="number"/>
       </include>
    </context>
  </definitions>
</language>