Category Archives: Kubuntu

Mount EFI Partition from Linux

This blog (http://www.pjc.me.uk/efi-gpt/) is the only one that gets to anywhere close to answering this question. However you need to substitute “auto” instead of “fat32” in the mount command to get it to work. “xfs” and “fat32” threw out errors – actually the mount command after mounting shows it was “vfat”!

Here’s how I mounted the EFI partition on my external 500GB drive:

sudo parted -l print
Model: ATA ST3500630AS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name                  Flags
1      1049kB  135MB   134MB                                          bios_grub
2      135MB   345MB   210MB   fat32                                  boot
3      345MB   479MB   134MB   fat32                                  msftres
4      479MB   54.2GB  53.7GB  ntfs                                   msftdata
5      54.2GB  108GB   53.7GB  ntfs                                   msftdata
6      108GB   162GB   53.7GB  ntfs                                   msftdata
7      162GB   172GB   10.7GB  ext4
8      172GB   184GB   11.8GB  ext4
9      184GB   185GB   1074MB  linux-swap(v1)
10      185GB   228GB   42.8GB  hfs+            Apple_HFS_Untitled_2
11      228GB   282GB   53.6GB  hfs+            Apple_HFS_Untitled_3
12      282GB   335GB   53.6GB  hfs+            Apple_HFS_Untitled_4
13      335GB   389GB   53.6GB  hfs+            Apple_HFS_Untitled_5
14      389GB   488GB   99.2GB  hfs+            Apple_HFS_Untitled_6
15      488GB   489GB   650MB   hfs+            Recovery HD
16      489GB   500GB   10.9GB  hfs+            Apple_HFS_Untitled_2

sudo mount -t auto /dev/sdb2 /mnt/test

cd /mnt/test/
ls
boot  EFI

Use kdesudo Dolphin (as Root) to view and edit files on the EFI partition

Note use of Parted (supports GPT drives) to get the partition number

Download project folder from GitHub using subversion

Install Subversion (SVN) as follows:

sudo apt-get install subversion

This command exports the GitHub PROJECT folder and subfolders and to DEST

svn export https://github.com/USER/PROJECT/trunk/PATH DEST

Suffix the PROJECT folder with /trunk and append the folder /PATH you wish to download. If the DEST folder does not exist it is automatically created.

For example the following command copies Tutsplus 30-days-to-jquery/lessons folder to lessons folder on the local drive:

svn export https://github.com/tutsplus/30-days-to-jquery/trunk/lessons lessons

 

 

Kate editor not parsing @media queries correctly

This problem exhibits itself when viewing css files with @media {…} queries with Kate text editor versions < v3.14. Kate highlights these sections incorrectly with  red underline or similar.

The fix for this bug is to add <DetectSpaces/> to the MQEV context of Kate’s  css.xml highlighting file so that it parses spaces after @media attribute and before the curly brace correctly.

In Kubuntu 14.04 css.xml is located in /usr/share/kde4/apps/katepart/syntax/css.xml

Edit this file with Kate as follows

kdesudo kate /usr/share/kde4/apps/katepart/syntax/css.xml

Find the second occurrence of “MQEV” to locote code section to add <DetectSpaces/> as shown below:

Code before:

<context attribute="Media" lineEndContext="#stay" name="MQEV">
<!-- this should be seperate for different features, for now it is all the same -->
<RegExpr attribute="Value" context="#pop" String="[1-9][0-9.]*\s*/\s*[1-9][0-9.]*" />
<RegExpr attribute="Value" context="#pop" String="[0-9.]+(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz|dpi|dpcm)\b" />
<RegExpr attribute="Value" context="#pop" String="[0-9.]+[%]?" />
<RegExpr attribute="Value" context="#pop" String="(portrait|landscape)" />
<RegExpr attribute="Error" context="#stay" String=".*"/>
</context>

Code after:

<context attribute="Media" lineEndContext="#stay" name="MQEV">
<DetectSpaces/>
<!-- this should be seperate for different features, for now it is all the same -->
<RegExpr attribute="Value" context="#pop" String="[1-9][0-9.]*\s*/\s*[1-9][0-9.]*" />
<RegExpr attribute="Value" context="#pop" String="[0-9.]+(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz|dpi|dpcm)\b" />
<RegExpr attribute="Value" context="#pop" String="[0-9.]+[%]?" />
<RegExpr attribute="Value" context="#pop" String="(portrait|landscape)" />
<RegExpr attribute="Error" context="#stay" String=".*"/>
</context>

Save change and restart Kate. You should now see your css @media code displayed normally.

Credits: Fix bug #335744: Kate/KWrite CSS highlighting problems with media queries. Published by  Martin Walch 2014-06-03 13:48:59 UTC https://bugs.kde.org/show_bug.cgi?id=335744