Showing posts with label Gnome. Show all posts
Showing posts with label Gnome. Show all posts

15 Feb 2010

Ubuntu default settings

The first time I used Ubuntu (Version 7 something) it just felt right out of the box. Nowadays, I will have to set quiet some config values after setting up a new one. Especially the default gnome configuration sucks big hairy monkey balls!

Some helpful default settings (for me) are:

# $Id$
# set up sane gnome config on ubuntu.

# update-notifier should stay in tray (pops up anooyingly if it detects updates)
gconftool -s --type bool /apps/update-notifier/auto_launch false

# enter paths manually in nautilus if needed
gconftool -s --type bool /apps/nautilus/preferences/always_use_location_entry true

# we want a browser, no fucking new window on every click
gconftool -s --type bool /apps/nautilus/preferences/always_use_browser true

# Delete baby, i want to delete, not move. if i want to move i use move FTW!
gconftool -s --type bool /apps/nautilus/preferences/enable_delete true

# show unix permissions in nautilus permission dalogs, not this mikey mouse ui
gconftool -s --type bool /apps/nautilus/preferences/show_advanced_permissions true

# default view should be listing in nautilus
gconftool -s --type string /apps/nautilus/preferences/default_folder_viewer "list_view"

# no text below toolbar icons, waste of scree nreal estate
gconftool -s --type string /desktop/gnome/interface/toolbar_style "icons"

# display unix permission, owner and group
gconftool-2 --set --type list --list-type=string /apps/nautilus/list_view/default_visible_columns \
[name,size,type,date_modified,permissions,owner,group]

# don't open inserted media in nautilus
gconftool -s --type bool /apps/nautilus/preferences/media_automount_open false

# do not confirm delete
gconftool -s --type bool  /apps/nautilus/preferences/confirm_trash false

30 Jul 2009

Selectable area for screenshots on gnome

Install required software:

$ sudo apt-get install zenity scrot xclip


Script for capturing screen areas (change targets at the beginning of the file):
#!/bin/bash

targetdir=/home/public-www/tmp/
targeturi=http://wunderlin.net/tmp/
icon=/usr/share/icons/gnome/22x22/apps/applets-screenshooter.png

# ask for filename
file=$(zenity --title="Screenshot" --width=800 --window-icon=$icon \
--text="Filename:" --filename="$targetdir" --file-selection)

if [[ "$file" == ".png" || -z "$file" ]]; then exit 1; fi

scrot --select "$file"

uri=$(echo "$file" | sed -e 's|'$targetdir'||')

echo "$targeturi$uri" | xclip -i -selection clip-board
# zenity --info --text="$targeturi$uri" --title="Screenshot URL" --window-icon=$icon
echo $file;

exit 0;


Steps for creating a custom hotkey to launch any application in GNOME:
  1. Open "gconf-editor" as the user as you're logged in in GNOME
  2. Go to "apps" -> "metacity" -> "keybinding_commands"
  3. Double click on e.g. "command_1"
  4. Type in the name of the application you want to launch, e.g. "gcalctool", the GNOME calculator
  5. Go to "apps" -> "metacity" -> "global_keybindings"
  6. Double click on e.g. "run_command_1"
  7. Type in e.g. <Control><Alt>c
  8. Note the < and > for the special function keys
  9. DONE! Close the gconf-editor and press CTRL-ALT-c and the calculator should come up