ascii image


0010101000011111101001101010000010011000
1110101110110101011011111010010010001011
0001011100011101111001010011010010111110
0000010111101001100000110011101100001000
0011000000111010001111111000100110000001
1010110110000000000001011001000110001010
0101100010101100000100000010100100010101
0001011001011101100011000101110111101110
0110010100110100111101110100110011111101
0010111100110011010010110010101111011011
0100000000001001001011000010110100101001
1101000111100000110111011100110111000010
1111110001111111101101001010000111101100
0010110000100000111011000000101100010110
0101111000011100111010000000011111101111
0010010011110010011101001000110101000101
0000000001000100001111111100111010001111
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, 30 June 2015

Ubuntu 14.04 - window buttons to the right


Read this.

https://askubuntu.com/a/451330

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install gnome-session-flashback

log out, and select gnome flashback as the Desktop

now run this

gsettings set org.gnome.desktop.wm.preferences button-layout 'menu:minimize,maximize,close' 

a bit more saner :)

Changing Ubuntu 14.04 scroll bar colors


Install  gnome-tweak-tool, this will sort out Firefox etc.

$ sudo apt-get install gnome-tweak-tool

Next fix GTK 3.0

Make sure you pick the right theme :)  current as of June 2015

$ sudo gedit /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css


Add the stepper buttons

/* search for the stepper and change the size */

-GtkRange-stepper-size: 20;   /* was 13 */

/* enable the stepper */

/*************
 * scrollbar *
 *************/
.scrollbar,
.scrollbar.vertical {
    -GtkScrollbar-has-backward-stepper: 1;   /* 1 = enable */
    -GtkScrollbar-has-forward-stepper: 1;
    -GtkRange-slider-width: 20;   /* change width, was 13 */




/* change the colors */

/* VERTICAL */

.scrollbar.slider,
.scrollbar.slider:hover,
.scrollbar.button,
.scrollbar.slider.vertical,
.scrollbar.slider.vertical:hover,
.scrollbar.button.vertical {
    border-width: 1px;
    border-style: solid;
    border-color: shade (@bg_color, 0.86);
    background-image: -gtk-gradient (linear, left top, right top,
                                     from (shade (#00BFFF, 1.08)),   /* was @button_bg_color */
                                     color-stop (0.5, #00BFFF),      /* was @button_bg_color */
                                     to (shade (#00BFFF, 0.94)));    /* was @button_bg_color */



/* HORIZONTAL */

.scrollbar.slider.horizontal,
.scrollbar.slider.horizontal:hover,
.scrollbar.button.horizontal {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (#00BFFF, 1.08)),    /* was @button_bg_color */
                                     color-stop (0.5, #00BFFF),       /* was @button_bg_color */
                                     to (shade (#00BFFF, 0.94)));     /* was @button_bg_color */


Wednesday, 9 March 2011

Linux root disk resize with raid, ext4 and grub2

There are lots of decent how-to pages on the 'net;

And here are my notes;
  • Make sure you add a small <5MB partition for the boot loader as these are the boot disks

    # gdisk -l /dev/sdc
    GPT fdisk (gdisk) version 0.5.1

    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present

    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sdc: 1953525168 sectors, 931.5 GiB
    Disk identifier (GUID): 1213CECB-D072-12C2-4846-60804FA91405
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1953525134
    Total free space is 0 sectors (0 bytes)

    Number  Start (sector)    End (sector)  Size       Code  Name
       1              34            6144   3.0 MiB     EF02  BIOS boot partition
       2            6145      1953525134   931.5 GiB   FD00  Linux RAID


  • Set the grub_bios flag on the small partition

    sudo parted /dev/sdc set <partition_number> bios_grub on

  • Once you have swapped out the disks each time, re-sync-ed and grown the raid.
    Boot via a rescue disk and fsck the raid metadevice and then resize the filesystem.

    e2fsck -f /dev/md0

    resize2fs /dev/md0

    mkdir /tmp/a
    mount /tmp/a /dev/md0
    df -h

  •  Reboot and you are done.

    # df -h | egrep "md|Filesys"
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/md0              917G  8.0G  863G   1% /
    /dev/md2              1.8T  456G  1.3T  27% /data


Resync on the old disks

md0 : active raid1 sdd1[2] sdc1[0]
      74920896 blocks [2/1] [U_]
      [>....................]  recovery =  2.6% (2012992/74920896) finish=41.5min speed=29240K/sec


Resync on the new

md0 : active raid1 sdd2[1] sdc2[0]
      976759424 blocks [2/2] [UU]
      [=>...................]  resync =  8.1% (79639488/976759424) finish=181.6min speed=82296K/sec

Some what faster - and a hell of a lot quieter.

Friday, 31 December 2010

Adding a 4 port RS232 serial pci card to ubuntu

I bought a 4 port RS232 serial card for my box, the supplier said it was Linux supported.
Though as you can see before it wasn't that clear cut, some fiddling was needed - pretty much like how most devices needed setting in the old Linux days...  before user friendly linux distros.
It said it has Sun1040 chips???  Does that mean anything to anyone?  LOL  As you can see below Linux thinks it is "LSI Logic / Symbios Logic" so not Sun 1040...

Look for the card...

root@ubuntu:~# lspci