Friday, November 25

Where has root gone?

You may of noticed you can no longer check which physical drive root is mounted on via "mount"

tim.bowers@localhost ~ $ mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,noatime,errors=continue,barrier=0,data=writeback)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
Herpa derpa!

So.... how do we now check where / is mounted? We could check fstab....

cat /etc/fstab
 ...some stuff...

/dev/sda3        /        ext3        noatime        0 1
But I'm not sure /etc/fstab is always readable.... another way is :

tim.bowers@localhost ~ $  ls -ilah /dev/root
1744 lrwxrwxrwx 1 root root 4 Oct 21 08:50 /dev/root -> sda3

Enjoy!

Sunday, November 6

Firefox changing h in address bar into w

In one of the most stupid changes ever firefox devs decided that the http:// prefix shouldn't exist, and so you shouldn't be able to type it either.

In firefox 7 if you type a h into the address bar, it presumes you don't understand you don't need the http:// prefix and instead changes your h into a w, as if you were about to type "www".... Now, I'm not even going to go into why this is broken as you need a seperate DNS record (or catch all) for the www. prefix anyway....

To turn it off this stupid behaviour :

about:config
search for 'browser.urlbar.trimURLs'
Change to false.

Done.

Note: You MAY want to see the http prefix, because if its http and not https as you were expecting, this is the first sign something may of gone wrong.

Sunday, September 4

Editing xfce4 themes

I presumed that editing gtk themes (thats what xfce4/xfwm4 uses) would be a total PITA. It wasn't. Infact it was so simple I'm concidering starting to make my own... Could be really interesting and add something back to the community.

So this is how :

cd /usr/share/themes/
# make a copy of the theme your editing - "Just in case"
cp ./Xfce4-dusk ./Xfce4-dusk-edited-by-smiley
# I use nano - you may prefer vi/ed/something else...
sudo nano -w ./Xfce4-dusk-edited-by-smiley/gtk-2.0/gtkrc

Now, for something simple like a window border you are looking for:
# This is for the window borders (xfwm4 & metacity)
#
style "titlebar"
{
    bg[SELECTED]      = "#D55C00"
    fg[SELECTED]      = "#ffffff"
    bg[INSENSITIVE]   = "#A14600"
    fg[INSENSITIVE]   = "#DC894A"
}

Where bg[SELECTED] is the hex colour code for the border of the selected window, fg[SELECTED] is the hex colour of the text of the title bar.
Simularly bg[INSENSTIVE] is the border colour of a non-selected window, which is generally a darker colour to indicate the non-active status of this and fg[INSENSTIVE] is the text colour of the title bar when that window is inactive.

Once you've edited this, simply change your theme via the appearance settings of your window manage/desktop enviroment - for Xfce4 this is via settings -> appearance. Select your new theme and happy days :)

## WARNING - I'm not sure what'd happen if you edit themes in place while being used. They may update the wm "live" or it might explode in your face. :)

Monday, August 8

Getting ssh-agent to play nice

Want ssh agent to play nicely?

Simples!

nano -w ~/.bashrc

Add this to the end

ssh-agent -t 1d
eval `keychain --eval --agents ssh id_dsa`


----

What are we doing? Loading ssh-agent with 1 day time out - adjust as needed.
Load the keychain for ssh. It'll request the passphase when you start a shell :)

Search This Blog

Loading...

Blog Archive