<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Do Know Evil - A Blog by Tyler Mulligan &#187; open source</title> <atom:link href="http://www.doknowevil.net/category/computers/software/open-source/feed/" rel="self" type="application/rss+xml" /><link>http://www.doknowevil.net</link> <description>Tips and Tricks About Computers, Web Development, Linux, the Internet and the Like</description> <lastBuildDate>Sat, 16 Jul 2011 01:25:35 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.5</generator> <item><title>Customizing Colors for Your .bashrc</title><link>http://www.doknowevil.net/2010/10/21/customizing-colors-for-your-bashrc/</link> <comments>http://www.doknowevil.net/2010/10/21/customizing-colors-for-your-bashrc/#comments</comments> <pubDate>Thu, 21 Oct 2010 08:20:35 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Application Management]]></category> <category><![CDATA[Bash]]></category> <category><![CDATA[Command Line]]></category> <category><![CDATA[Computers]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[OSX]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[colors]]></category> <category><![CDATA[customization]]></category> <category><![CDATA[ps1]]></category> <category><![CDATA[Ubuntu]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=830</guid> <description><![CDATA[I&#8217;m working on organizing my dotfiles and part of that process has led me to clean up the way I address colors. I came across a few good sources, for .bashrc colors and decided it&#8217;d be better to create my own. I would like to have used the ones I found on the Arch wiki]]></description> <content:encoded><![CDATA[<p>I&#8217;m working on organizing my <a title="dot files for linux and unix bashrc, bash_aliases and application configuration files" href="http://github.com/z/dotfiles" target="_blank">dotfiles</a> and part of that process has led me to clean up the way I address colors.  I came across a <a title="for bashrc colors" href="http://tldp.org/LDP/abs/html/sample-bashrc.html" target="_blank">few good sources</a>, <a title="few good sources" href="http://wiki.archlinux.org/index.php/Color_Bash_Prompt" target="_blank">for .bashrc colors</a> and decided it&#8217;d be better to create my own.  I would like to have used the ones I found on the Arch wiki but the aliases were a bit odd to me.  They also break consistency as you scroll down.  I&#8217;m not sure if this is due to it being a collaborative wiki or it&#8217;s a way to teach multiple syntaxes/approaches.  In either case I figured the aliases weren&#8217;t as &#8220;standard&#8221; as I thought they might be in that world.</p><p>So I decided to copy them the best of the bunch into geany and modify them with regular expressions.  I used column selection to speed up some of the tasks, such as Title Case formatting and typing the prefixes.</p><pre class="brush:bash"># define colors
Black=&#039;\e[0;30m&#039;    # Black / Regular
Red=&#039;\e[0;31m&#039;      # Red
Green=&#039;\e[0;32m&#039;    # Green
Yellow=&#039;\e[0;33m&#039;   # Yellow
Blue=&#039;\e[0;34m&#039;     # Blue
Purple=&#039;\e[0;35m&#039;   # Purple
Cyan=&#039;\e[0;36m&#039;     # Cyan
White=&#039;\e[0;37m&#039;    # White

BBlack=&#039;\e[1;30m&#039;   # BBlack / Bold
BRed=&#039;\e[1;31m&#039;     # BRed
BGreen=&#039;\e[1;32m&#039;   # BGreen
BYellow=&#039;\e[1;33m&#039;  # BYellow
BBlue=&#039;\e[1;34m&#039;    # BBlue
BPurple=&#039;\e[1;35m&#039;  # BPurple
BCyan=&#039;\e[1;36m&#039;    # BCyan
BWhite=&#039;\e[1;37m&#039;   # BWhite

UBlack=&#039;\e[4;30m&#039;   # UBlack / Underline
URed=&#039;\e[4;31m&#039;     # URed
UGreen=&#039;\e[4;32m&#039;   # UGreen
UYellow=&#039;\e[4;33m&#039;  # UYellow
UBlue=&#039;\e[4;34m&#039;    # UBlue
UPurple=&#039;\e[4;35m&#039;  # UPurple
UCyan=&#039;\e[4;36m&#039;    # UCyan
UWhite=&#039;\e[4;37m&#039;   # UWhite

BGBlack=&#039;\e[40m&#039;    # BGBlack - background
BGRed=&#039;\e[41m&#039;      # BGRed
BGGeeen=&#039;\e[42m&#039;    # BGGreen
BGYellow=&#039;\e[43m&#039;   # BGYellow
BGBlue=&#039;\e[44m&#039;     # BGBlue
BGPurple=&#039;\e[45m&#039;   # BGPurple
BGCyan=&#039;\e[46m&#039;     # BGCyan
BGWhite=&#039;\e[47m&#039;    # BGWhite

NC=&#039;\e[0m&#039;          # Text Reset / No Color</pre><p>Here is a test case:</p><pre class="brush:bash">for c in {,B,U,BG}{Black,Red,Green,Yellow,Blue,Purple,Cyan,White}; do echo -e ${!c}$c${NC}; done; echo -e &quot;${NC}&quot;</pre><p>Here is the same test case without the aliases</p><pre class="brush:bash">for c in {0,1,4}\;{30..37} {40..47}; do echo -e \\e[${!c}${c}m${c}m\\e[0m; done;</pre><p>Here's a PS1 you can try it with</p><pre class="brush:bash">PS1=&quot;${debian_chroot:+($debian_chroot)}\[${BWhite}\]\u\[${NC}\]\[${Yellow}\]@\[${White}\]\h\[${NC}\]:\[${BBlue}\]\w\[${NC}\]$ &quot;</pre><p>I plan to use these quite often as I build out my .bash_aliases but the most immediate use you might find useful is the PS1 generation tool I&#8217;ve setup an alpha of <a href="http://interwebninja.com/ps1-o-matic">http://interwebninja.com/ps1-o-matic/</a></p><p><a href='http://www.doknowevil.net/wp-content/uploads/2010/10/ps1-o-matic-0.5.ogv'>ps1-o-matic-0.5 video in action</a></p><p><img src="http://www.doknowevil.net/wp-content/uploads/2010/10/screenshot383-300x29.png" alt="" title="screenshot383" width="300" height="29" class="alignnone size-medium wp-image-842" /><br /> <img src="http://www.doknowevil.net/wp-content/uploads/2010/10/screenshot384-300x30.png" alt="" title="screenshot384" width="300" height="30" class="alignnone size-medium wp-image-841" /><br /> <img src="http://www.doknowevil.net/wp-content/uploads/2010/10/screenshot386-300x28.png" alt="" title="screenshot386" width="300" height="28" class="alignnone size-medium wp-image-839" /><br /> <img src="http://www.doknowevil.net/wp-content/uploads/2010/10/screenshot387-300x41.png" alt="" title="screenshot387" width="300" height="41" class="alignnone size-medium wp-image-838" /></p><p>Below is a screenshot of how I&#8217;m revising the script to use only javascript objects rather than relying on html inputs to store values:<br /> <a href="http://www.doknowevil.net/wp-content/uploads/2010/10/screenshot394.png"><img src="http://www.doknowevil.net/wp-content/uploads/2010/10/screenshot394-1024x581.png" alt="" title="screenshot394" width="1024" height="581" class="alignnone size-large wp-image-866" /></a></p><p>I&#8217;m currently at the point where I&#8217;m using jquery ui&#8217;s draggable and sortable to allow segments to be moved around but I have nothing worth sharing yet.  Stay tuned, I&#8217;ll be checking the source into <a href="http://github.com/z" target="_blank">my github account</a> soon.</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/10/21/customizing-colors-for-your-bashrc/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <enclosure url="http://www.doknowevil.net/wp-content/uploads/2010/10/ps1-o-matic-0.5.ogv" length="4806169" type="video/ogg" /> </item> <item><title>Sorry screen, tmux is better (but here are some screen-like hotkeys)</title><link>http://www.doknowevil.net/2010/10/18/sorry-screen-tmux-is-better-but-here-are-some-screen-lik-hotkeys/</link> <comments>http://www.doknowevil.net/2010/10/18/sorry-screen-tmux-is-better-but-here-are-some-screen-lik-hotkeys/#comments</comments> <pubDate>Mon, 18 Oct 2010 22:30:13 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Computers]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[screen]]></category> <category><![CDATA[tmux]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=705</guid> <description><![CDATA[Introduction If you&#8217;re familiar with the command line on Linux or UNIX, you&#8217;ve likely heard of a program called &#8220;screen&#8221;, which allows you to create virtual terminal sessions inside of your current terminal. The major benefit to this is the ability to dettach and reattach screen sessions, leaving your programs to act as if you]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>If you&#8217;re familiar with the command line on Linux or UNIX, you&#8217;ve likely heard of a program called <a href="http://www.doknowevil.net/2010/10/18/using-terminal-program-screen-on-linux-unix/" title="screen for UNIX / Linux">&#8220;screen&#8221;, which allows you to create virtual terminal sessions inside of your current terminal</a>.  The major benefit to this is the ability to dettach and reattach screen sessions, leaving your programs to act as if you never left.  Additionally, you can have multiple buffers inside your screen that act like tabs, allowing you to flip between.</p><p>The major difference between screen and tmux is their ability to split and manage splits. Oh yeah, that and hotkeys.  I think they were trying to pay legacy (or force you to change back :-P) by setting up your main key to be &#8220;b&#8221; instead of &#8220;a&#8221;, which is an awkward reach.  Tux Wears Fedora below shares more screen like hotkeys, as do I with some minor tweaks that I combined with the default example in ubuntu /usr/share.</p><p>I became well acquainted at <a href="http://blog.yjl.im/2009/11/migrating-to-tmux-from-gnuscreen.html" target="_blank">Tux Wears Fedora&#8217;s post on tmux migrating from screen</a>.</p><p><a href="http://www.doknowevil.net/wp-content/uploads/2010/06/screenshot109.png"><img src="http://www.doknowevil.net/wp-content/uploads/2010/06/screenshot109-500x312.png" alt="" title="tmux in action" width="500" height="312" class="alignnone size-thumbnail wp-image-712" /></a></p><pre class="brush:bash">
# ~/.tmux.conf
# By Tyler Mulligan. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is a good starting point but you should check out the man page for more
# configuration options if you really want to get more out of tmux

### Unbind existing tmux key bindings (except 0-9).

# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix

# Bind appropriate commands similar to screen.
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server

# screen ^C c
unbind ^C
bind ^C new-window
bind c
bind c new-window

# detach ^D d
unbind ^D
bind ^D detach

# displays *
unbind *
bind * list-clients

# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind &quot; &quot;
bind &quot; &quot; next-window
unbind n
bind n next-window

# title A
unbind A
bind A command-prompt &quot;rename-window %%&quot;

# other ^A
unbind ^A
bind ^A last-window

# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window

# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows

# quit \
unbind \
bind \ confirm-before &quot;kill-server&quot;

# kill K k
unbind K
bind K confirm-before &quot;kill-window&quot;
unbind k
bind k confirm-before &quot;kill-window&quot;

# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client

# More straight forward key bindings for splitting
unbind %
bind | split-window -h
bind v split-window -h
unbind &#039;&quot;&#039;
bind - split-window -v
bind h split-window -v

# History
set -g history-limit 1000

# Pane
unbind o
bind C-s down-pane

# Terminal emulator window title
set -g set-titles on
set -g set-titles-string &#039;#S:#I.#P #W&#039;

# Status Bar
set -g status-bg black
set -g status-fg white
set -g status-interval 1
set -g status-left &#039;#[fg=green]#H#[default]&#039;
set -g status-right &#039;#[fg=yellow]#(cut -d &quot; &quot; -f 1-4 /proc/loadavg)#[default] #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]&#039;

# Notifying if other windows has activities
setw -g monitor-activity on
set -g visual-activity on

# Highlighting the active window in status bar
setw -g window-status-current-bg red

# Clock
setw -g clock-mode-colour green
setw -g clock-mode-style 24

# :kB: focus up
unbind Tab
bind Tab down-pane
unbind BTab
bind BTab up-pane

# &quot; windowlist -b
unbind &#039;&quot;&#039;
bind &#039;&quot;&#039; choose-window
</pre><p>Splitting is what initially caused me to migrate but there are plenty of other features that have lead me to stay. <a href="http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/" target="_blank">this article outlines the benefits in detail</a>.  Once you go tmux, you never go back.</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/10/18/sorry-screen-tmux-is-better-but-here-are-some-screen-lik-hotkeys/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Using Terminal Program &quot;screen&quot; on Linux / UNIX</title><link>http://www.doknowevil.net/2010/10/18/using-terminal-program-screen-on-linux-unix/</link> <comments>http://www.doknowevil.net/2010/10/18/using-terminal-program-screen-on-linux-unix/#comments</comments> <pubDate>Mon, 18 Oct 2010 22:30:06 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Command Line]]></category> <category><![CDATA[Computers]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[screen]]></category> <category><![CDATA[tmux]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=706</guid> <description><![CDATA[Introduction The terminal program &#8220;screen&#8221; for Linux / UNIX, is a command line tool that allows you to emulate terminals inside a currently running session and detach the &#8216;screen&#8217; to the background. This program may seem obscure to new users because of it&#8217;s abstract nature and unusual key bindings but once you start learning the]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>The terminal program &#8220;screen&#8221; for Linux / UNIX, is a command line tool that allows you to emulate terminals inside a currently running session and detach the &#8216;screen&#8217; to the background.  This program may seem obscure to new users because of it&#8217;s abstract nature and unusual key bindings but once you start learning the basics, the advanced usages don&#8217;t seem that scary.</p><p><b>If you consider yourself to have an advanced sense of the command line</b> and you&#8217;d like to go more advanced out of gate, <b>you should consider skipping ahead to <a href="http://www.doknowevil.net/2010/10/18/sorry-screen-tmux-is-better-but-here-are-some-screen-lik-hotkeys/">my article on the screen successor, tmux which allows for more advanced splitting</a> (and apparently better code).</b></p><h2>Getting Started</h2><p>Below is a walk through of an average screen scenario I&#8217;ve put together to give you an idea of how you might use this program in your workflow.</p><p>to start a basic screen session type:</p><pre class="brush:bash">
screen
</pre><p>this will put you in a virtual session.</p><p>to detach the screen press: ctrl+a, d</p><p>to reattach the screen type:</p><pre class="brush:bash">
screen -r
</pre><p>detach again, then type:</p><pre class="brush:bash">
screen
</pre><p>and detach this. You now have 2 screen sessions open, so when you type screen -r, instead of reattaching, it will list the possible screens to attach. You&#8217;ll see something like the following:</p><pre class="brush:bash">
There are several suitable screens on:
    31454.pts-2.quadjutsu    (10/10/2009 09:45:51 AM)    (Detached)
    31219.pts-2.quadjutsu    (10/10/2009 09:44:27 AM)    (Detached)
Type &quot;screen [-d] -r [pid.]tty.host&quot; to resume one of them.
</pre><p>So I&#8217;d type:</p><pre class="brush:bash">
screen -r 31454
</pre><p>to attach the first one. On systems with &#8216;pkill&#8217; you can type:</p><pre class="brush:bash">
pkill screen
</pre><p>to kill all the screen sesions.</p><p>That&#8217;s one way to separate screens&#8230; another is virtual &#8220;tabs&#8221; within a screen session.</p><p>so lets create a new screen session with:</p><pre class="brush:bash">
screen
</pre><p>Then type:</p><pre class="brush:bash">
ls
</pre><p>so you have some data to reference for which &#8220;tab&#8221; you&#8217;re in</p><p>Then hit: ctrl+a, c</p><p>This will create a new tab.</p><p>to cycle forward through the tabs (next), hit: ctrl+a, n or ctrl+a, [spacebar]<br /> to cycle backwards through the tabs (previous), hit: ctrl+a, p or ctrl+a, [backspace]</p><p>to kill a tab, type: exit</p><p>I found a <a href="http://www.pixelbeat.org/lkdb/screen.html" title="terminal screen program unix linux">good reference for &#8220;screen&#8221; hotkeys at pixelbeat.org</a> if you&#8217;d like to learn more.</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/10/18/using-terminal-program-screen-on-linux-unix/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Restricting a user&#8217;s shell permissions on Ubuntu Server 10.04 with lshell</title><link>http://www.doknowevil.net/2010/09/27/lshell-restricting-a-users-shell-permissions-on-ubuntu-server-10-04/</link> <comments>http://www.doknowevil.net/2010/09/27/lshell-restricting-a-users-shell-permissions-on-ubuntu-server-10-04/#comments</comments> <pubDate>Mon, 27 Sep 2010 23:19:37 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Bash]]></category> <category><![CDATA[Command Line]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[access control]]></category> <category><![CDATA[application permissions]]></category> <category><![CDATA[backups]]></category> <category><![CDATA[game servers]]></category> <category><![CDATA[limited users]]></category> <category><![CDATA[lshell]]></category> <category><![CDATA[security]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=785</guid> <description><![CDATA[As described by apt-cache, the method which I usually begin a package search for in a Ubuntu Server 10.04 environment: z@zentury ~$ apt-cache search lshell lshell - restricts a user&#039;s shell environment to limited sets of commands This is an extremely useful way to restrict a Linux users capabilities. Alternative shells, such as rssh, limit]]></description> <content:encoded><![CDATA[<p>As described by apt-cache, the method which I usually begin a package search for in a Ubuntu Server 10.04 environment:</p><pre class="brush:bash">z@zentury ~$ apt-cache search lshell
lshell - restricts a user&#039;s shell environment to limited sets of commands
</pre><p>This is an extremely useful way to restrict a Linux users capabilities.  Alternative shells, such as rssh, limit you to toggle a specific set of applications, (scp, sftp, cvs, svn, rsync or rdist).  A limited shell is helpful for reasons such as backups or game/application servers where you know/want the user to be able to execute only a specific set of actions. You can however, consider other reasons for restricting users on a Linux based machine.</p><p>A <a href="http://lshell.ghantoos.org/Use%20case" target="_blank">typical use case is provided in the lshell wiki</a>.</p><p>Ubuntu also provides a default in <strong>etc/lshell.conf</strong>, which serves as a good example:</p><pre class="brush:bash"># lshell.py configuration file
#
# $Id: lshell.conf,v 1.20 2009/06/09 19:53:46 ghantoos Exp $

[global]
##  log directory (default /var/log/lshell/ )
logpath         : /var/log/lshell/
##  set log level to 0, 1, 2 or 3  (0: no logs, 1: least verbose)
loglevel        : 2
##  configure log file name (default is %u i.e. username.log)
#logfilename     : %y%m%d-%u

[default]
##  a list of the allowed commands or &#039;all&#039; to allow all commands in user&#039;s PATH
allowed         : [&#039;ls&#039;,&#039;echo&#039;,&#039;cd&#039;,&#039;ll&#039;]

##  a list of forbidden character or commands
forbidden       : [&#039;;&#039;, &#039;&amp;&#039;, &#039;|&#039;,&#039;`&#039;,&#039;&gt;&#039;,&#039;&lt;&#039;, &#039;$(&#039;, &#039;${&#039;]

##  number of warnings when user enters a forbidden value before getting
##  exited from lshell
warning_counter : 2

##  command aliases list (similar to bash’s alias directive)
aliases         : {&#039;ll&#039;:&#039;ls -l&#039;, &#039;vi&#039;:&#039;vim&#039;}

##  a value in seconds for the session timer
#timer           : 5

##  list of path to restrict the user &quot;geographicaly&quot;
#path            : [&#039;/home/bla/&#039;,&#039;/etc&#039;]

##  set the home folder of your user. If not specified the home_path is set to
##  the $HOME environment variable
#home_path       : &#039;/home/bla/&#039;

##  update the environment variable $PATH of the user
#env_path        : &#039;:/usr/local/bin:/usr/sbin&#039;

##  allow or forbid the use of scp (set to 1 or 0)
#scp             : 1

##  allow of forbid the use of sftp (set to 1 or 0)
#sftp            : 1

##  list of command allowed to execute over ssh (e.g. rsync, rdiff-backup, etc.)
#overssh         : [&#039;ls&#039;, &#039;rsync&#039;]

##  logging strictness. If set to 1, any unknown command is considered as
##  forbidden, and user&#039;s warning counter is decreased. If set to 0, command is
##  considered as unknown, and user is only warned (i.e. *** unknown synthax)
#strict          : 1

##  force files sent through scp to a specific directory
#scpforce        : &#039;/home/bla/uploads/&#039;
</pre><p>If this looks like something you would like to be able to do, you can install it with apt-get:</p><pre class="brush:bash">z@zentury ~$ apt-get install lshell</pre><p>You can change a current user to have the limited shell with the following command:</p><pre class="brush:bash">sudo chsh -s /usr/bin/lshell backupbot</pre><p>You can add a new user with a limited shell with the following command (-m creates the home directory):</p><pre class="brush:bash">sudo useradd -m -s /usr/bin/lshell backupbot</pre><p>A <a href="http://lshell.ghantoos.org/Configuration" target="_blank">more detailed configuration guide can be found here</a></p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/09/27/lshell-restricting-a-users-shell-permissions-on-ubuntu-server-10-04/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Compiz 0.9.0 Released &#8211; Completely Rewritten in C++</title><link>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/</link> <comments>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/#comments</comments> <pubDate>Mon, 05 Jul 2010 02:44:16 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Application Management]]></category> <category><![CDATA[Compiz]]></category> <category><![CDATA[Computers]]></category> <category><![CDATA[Desktop Mods]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[open source]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=738</guid> <description><![CDATA[I was doing some in depth research / code hacking regarding the support of multi-headed output (dual monitors) on Linux. I won&#8217;t get into details but my video is being output to my monitors as &#8220;one screen&#8221; with a virtual distinctions handled by the window manager. Because of this, figuring out which of the monitors]]></description> <content:encoded><![CDATA[<p>I was doing some in depth research / code hacking regarding the support of multi-headed output (dual monitors) on Linux.  I won&#8217;t get into <a href="http://forum.compiz.org/viewtopic.php?f=89&#038;t=13362" title="managing windows across dual monitors in compiz?">details</a> but my video is being output to my monitors as &#8220;one screen&#8221; with a virtual distinctions handled by the window manager.  Because of this, figuring out which of the monitors you are on isn&#8217;t as straight forward as you might think.  Originally I was looking for a way to access the c functions in compiz through python but that point is now moot (likely for the better).</p><p>The <a href="http://lists.freedesktop.org/archives/compiz/2010-July/003429.html">first unstable release of the Compiz 0.9 series</a>, completely rewritten in C++.  As said, this &#8220;brings a whole new developer API, splits rendering into plugins, switches the buildsystem from automake to cmake and brings minor functionality improvements. This release represents the first developer and tester preview of what will eventually make the 0.10.x stable series. Please note that as such, it is not yet ready for general use as there are a number of known  ssues, regressions and incomplete functionality.&#8221;</p><p>Here is a <b>SLIGHTLY DATED</b> graph I got <a href="http://santiance.com/2009/10/compiz-code-comparison/">from Santiance.com</a>.</p><p><a href="http://www.doknowevil.net/wp-content/uploads/2010/07/compiz_comparison_chart.png"><img src="http://www.doknowevil.net/wp-content/uploads/2010/07/compiz_comparison_chart.png" alt="" title="compiz_comparison_chart" width="776" height="449" class="alignnone size-full wp-image-739" /></a></p><p>This is a really interesting turning point for the project and I&#8217;m glad I came across this while doing my research for multi-head handling in compiz. Knowing where the future lies could drastically change where I put my efforts in developing to support them.</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>scp-notifications for GNOME and Ubuntu &#8211; Expanding on My Original Python Script</title><link>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/</link> <comments>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/#comments</comments> <pubDate>Sun, 27 Jun 2010 00:11:15 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Compiz]]></category> <category><![CDATA[Computers]]></category> <category><![CDATA[Desktop Mods]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[The Internet]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Web Applications]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[libnotify]]></category> <category><![CDATA[notification-daemon]]></category> <category><![CDATA[pynotify]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=698</guid> <description><![CDATA[I&#8217;ve only been coding Python for ~12 hours total, so don&#8217;t expect this to be perfect. Knowing what I know about creating/testing other software and doing my best to scour through very light pynotify documentation, I&#8217;ve begun to build out this script to be more useful / portable / configurable. As the Version 0.6 indicates,]]></description> <content:encoded><![CDATA[<p>I&#8217;ve only been coding Python for ~12 hours total, so don&#8217;t expect this to be perfect.  Knowing what I know about creating/testing other software and doing my best to scour through very light pynotify documentation, I&#8217;ve begun to build out this script to be more useful / portable / configurable.  As the Version 0.6 indicates, I&#8217;m not quite at my goal yet and there is still more to learn to bring it up to that point.</p><p>I&#8217;m releasing this early on my blog just in case I caught any people yesterday who&#8217;ve been experimenting with my research / code so far.  I&#8217;ll share it on github when I evolve it just a bit more.</p><p><a href="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv">Video of it in Action</a></p><pre class="brush:python">
#!/usr/bin/env python
#
# Title: scp-notifications
# Author: Tyler Mulligan (tyler@detrition.net)
# Date: 06/26/2010
# Version: 0.6
# Description:
# Used in combination with an event, such as an action or cronjob, this script
# will scp the latest file from a folder to your server.
#
# Optionally, it can copy the url to your clipboard and/or show a popup with a
# link to the file after succesfully uploading
#
# Orginally developed to be piped to from compiz screenshot tool
# http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv
#
# The MIT License
#
# Copyright (c) 2010 Tyler Mulligan
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the &quot;Software&quot;), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE
#

import pygtk
pygtk.require(&#039;2.0&#039;)
import pynotify
import gtk
import sys
import os
import subprocess

# Set Variables
#####################################
user = &quot;user&quot;
host = &quot;server.com&quot;
# All should have trailing slashes
lfolder = &quot;/home/user/screenshots/&quot;
hfolder = &quot;/home/remote_user/screenshots/&quot;
httplink = &quot;http://&quot;+host+&quot;/screenshots/&quot;

# Display
#####################################
t1 = 5000 # timeout for screenshot upload dialog
t2 = 3000 # timeout for screenshot preview
t3 = 7000 # timeout for link dialog

screenshot_preview = 1 # If using with the compiz screenshot plugin, you may want this
popup_link = 1 # another popup
copy_to_clipboard = 0 # automatically copy text to keyboard

# Position
#####################################

# Get screensize &lt; &lt; used for relative positioning
display = gtk.gdk.display_get_default()
screen = display.get_default_screen()
x = screen.get_width() - 1
y = screen.get_height() - 1

# 0 for Automatic Placement
&quot;&quot;&quot;
x1 = 0
y1 = 0
x2 = 0
y2 = 0
x3 = 0
y3 = 0
&quot;&quot;&quot;
# Define Relative Position (assuming top-right)
x1 = x-1
y1 = 12
x2 = x1
y2 = y1 + 100
x3 = x-1
y3 = 12
# Define Static (1920 puts it on my second monitor)
&quot;&quot;&quot;
x1 = 1919
y1 = 12
x2 = x1
y2 = y1 + 100
x3 = 1920
y3 = 12
&quot;&quot;&quot;
#####################################

def upload_cb(n, action):
    assert action == &quot;upload&quot;

    subprocess.call([&quot;scp&quot;, os.path.join(lfolder, f), &#039;%s@%s:%s&#039; % (user, host, hfolder)])

    # setup URL in
    if copy_to_clipboard:
        clipboard = gtk.clipboard_get()
        clipboard.set_text(httplink + f)
        # make our data available to other applications
        clipboard.store()

    # Notification: Link for the clicking
    if popup_link:
        n3 = pynotify.Notification(&quot;Here is your link&quot;,&quot;&lt;a href=&#039;&quot; + httplink + f + &quot;&#039;&gt;&quot; + httplink + f + &quot;&quot;)

        helper = gtk.Button()
        icon = helper.render_icon(gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_DIALOG)
        n3.set_icon_from_pixbuf(icon)

        n3.set_urgency(pynotify.URGENCY_NORMAL)
        if x3:
            n3.set_hint(&quot;x&quot;, x3)
        if y3:
            n3.set_hint(&quot;y&quot;, y3)
        n3.set_timeout(t3)
        n3.connect(&quot;closed&quot;,closen3_cb)

        if not n3.show():
            print &quot;Failed to send notification&quot;
            sys.exit(1)

        closen1_cb(n1)
        closen2_cb(n2)

    gtk.main_quit()
    sys.exit(1)

# Notification 1 was closed
def closen1_cb(n):
    n1.close()
    if screenshot_preview:
        n2.close()
    gtk.main_quit()

# Notification 2 was closed
def closen2_cb(n):
    n2.close()
    gtk.main_quit()

# Notification 2 was closed
def closen3_cb(n):
    n3.close()
    gtk.main_quit()

# The Ignore button was clicked
def ignore_cb(n, action):
    assert action == &quot;ignore&quot;

    closen1_cb(n1)
    closen2_cb(n2)
    gtk.main_quit()

# Main
def main():
    gtk.main()

# Init
if __name__ == &#039;__main__&#039;:
    if not pynotify.init(&quot;Notifier &#039;scp&#039; Option&quot;):
        sys.exit(1)

    # Get latest file and build uri
    start = os.path.abspath(lfolder)
    f = max([(os.path.getmtime(os.path.join(start,p)),p)
         for p in os.listdir(start)])[1]
    uri = lfolder + f

    # Notification: Upload to Server
    n1 = pynotify.Notification(&quot;Upload to Server?&quot;,&quot;Copy the file &#039;&quot; + f + &quot;&#039; to the server?&quot;)

    helper = gtk.Button()
    icon = helper.render_icon(gtk.STOCK_DIALOG_QUESTION, gtk.ICON_SIZE_DIALOG)
    n1.set_icon_from_pixbuf(icon)

    n1.set_urgency(pynotify.URGENCY_NORMAL)
    if x1:
        n1.set_hint(&quot;x&quot;, x1)
    if y1:
        n1.set_hint(&quot;y&quot;, y1)
    n1.set_timeout(t1)
    n1.add_action(&quot;upload&quot;, &quot;Yes, Upload&quot;, upload_cb)
    n1.add_action(&quot;ignore&quot;, &quot;Ignore&quot;, ignore_cb)
    n1.connect(&quot;closed&quot;,closen1_cb)

    if not n1.show():
        print &quot;Failed to send notification&quot;
        sys.exit(1)

    # Notification: Screenshot Preview
    if screenshot_preview:
        n2 = pynotify.Notification(&quot;Screenshot Preview&quot;, &quot;&quot;, uri)
        n2.set_urgency(pynotify.URGENCY_LOW)
        if x2:
            n2.set_hint(&quot;x&quot;, x2)
        if y2:
            n2.set_hint(&quot;y&quot;, y2)
        n2.set_timeout(t2)
        n2.connect(&quot;closed&quot;,closen2_cb)

        if not n2.show():
            print &quot;Failed to send notification&quot;
            sys.exit(1)

    main()
</pre><p>.</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <enclosure url="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv" length="2797703" type="video/ogg" /> </item> <item><title>Ubuntu Notifications (osd-notify) Sucks, notifications-daemon Rocks &#8211; Exploiting the Goodness with Compiz</title><link>http://www.doknowevil.net/2010/06/25/ubuntu-notifications-osd-notify-sucks-notifications-daemon-rocks-exploiting-the-goodness-with-compiz/</link> <comments>http://www.doknowevil.net/2010/06/25/ubuntu-notifications-osd-notify-sucks-notifications-daemon-rocks-exploiting-the-goodness-with-compiz/#comments</comments> <pubDate>Sat, 26 Jun 2010 04:47:40 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Compiz]]></category> <category><![CDATA[Computers]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[gtk]]></category> <category><![CDATA[markedwontfix]]></category> <category><![CDATA[notifications]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=677</guid> <description><![CDATA[Introduction The long name for this blog used to be &#8220;Tyler Mulligan&#8217;s Tips and Tricks for Increasing your Efficiency&#8220;. I love finding ways to increase my efficiency and let computers do the work while I focus on more interests aspects of what the computer is providing me with. When I recognize an issue, I find]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>The long name for this blog used to be &#8220;<a href="http://www.doknowevil.net" target="_blank">Tyler Mulligan&#8217;s Tips and Tricks for Increasing your Efficiency</a>&#8220;.  I love finding ways to increase my efficiency and let computers do the work while I focus on more interests aspects of what the computer is providing me with.  When I recognize an issue, I find a way to cut out time by streamlining the process for the most accurate repetition, like any programmer would/should/could.</p><p>I noticed myself taking a lot of screenshots with compiz&#8217; built in screenshot tool (I can hold a hotkey and drag a box to take newspaper style clippings).  This is very fast and simple, I highly recommend enabling this option and getting used to it.  However, I don&#8217;t care much for clicking around on clunky websites to upload images.</p><p>This is where my adventure starts&#8230; when I find out <a href="http://ubuntuforums.org/showthread.php?t=1517950" title="notify-osd doesn't display popup balloons">a very useful feature was deprecated and not replaced in Ubuntu</a>.  I don&#8217;t use the new notification area, it has too much I don&#8217;t need, I never liked the behavior of these new osd-notify notifications which I found out now are even more worthless (sorry team).</p><h2>Using Sane Notifications in Ubuntu</h2><p>After <a href="http://ubuntuforums.org/showpost.php?p=8559795&#038;postcount=8">reinstalling the GNOME default notifications system in Ubuntu</a> I was able to use SANE notifications that actually&#8230; KICK ASS!  I don&#8217;t understand how osd-notify is better than these which even comes with it&#8217;s own notification properties panel.  Maybe it&#8217;s an under the hood thing&#8230;</p><p>Regardless, there is no doubt in my mind that notifications that you hover, can still slightly see but click through but cannot perform any actions, even a close, are just plan stupid and annoying..</p><p><img src="http://interwebninja.com/compiz-screenshots/screenshot5.png" title="Screenshot taken with Tyler Mulligan's Notification 'scp' Option python script for ubuntu and other Linux based operating systems" /><br /> Screenshot of the script I ended up writing using the &#8220;better&#8221; notification system to ask me if I want to upload the screenshot I just took to the server.</p><h2>Linking the notifications</h2><p>I linked the notifications the following way:</p><p><img src="http://interwebninja.com/compiz-screenshots/screenshot3.png" title="Screenshot taken with Tyler Mulligan's Notification 'scp' Option python script for ubuntu and other Linux based operating systems" /></p><h2>Python Script for Notification that Prompts for File Upload to Server</h2><p>Knowing diddly squat about Python, I chugged forward with my classic notification popups that allow for interaction as it had the most activity around it and some examples available in /usr/share/doc/python-notify/examples/</p><p>I ended coming up with the following script thanks to some help from a few people in #python on irc.freenode.org</p><p>This is outside of the scope of this blogpost but this script assumes you have setup passwordless ssh to your server.</p><pre class="brush:python">
#!/usr/bin/env python
#
# Title: Notification &#039;scp&#039; Option
# Author: Tyler Mulligan (tyler@detrition.net)
# Date: 06/25/2010
# Description:
# Used in combination with an event, such as an action or cron
# the latest file from a folder will be scped to your server and will copy
# the http location of the that file to your clipboard
#
# Orginally developed to be piped to from compiz screenshot tool
#
#
# The MIT License
#
# Copyright (c) 2010 Tyler Mulligan
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the &quot;Software&quot;), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE
#

import pygtk
pygtk.require(&#039;2.0&#039;)
import gtk
import pynotify
import sys
import os
import subprocess

user = &quot;user&quot;
host = &quot;server.com&quot;
lfolder = &quot;/home/user/screenshots/&quot;
hfolder = &quot;/home/remote_user/screenshots/&quot;
httplink = &quot;http://&quot;+host+&quot;/screenshots/&quot;
timeout = 5000

# Set position
display = gtk.gdk.display_get_default()
screen = display.get_default_screen()
x = screen.get_width() - 1
y = screen.get_height() - 1
#x = 1919
#y = 12

def upload_cb(n, action):
    assert action == &quot;upload&quot;

    start = os.path.abspath(lfolder)
    f = max([(os.path.getmtime(os.path.join(start,x)),x)
          for x in os.listdir(start)])[1]

	# setup URL in clipboard
    clipboard = gtk.clipboard_get()
    clipboard.set_text(httplink + f)
    # make our data available to other applications
    clipboard.store()

    os.system(&#039;scp &quot;%s&quot; &quot;%s@%s:%s&quot;&#039; % (lfolder + f, user, host, hfolder) ).wait()

    n.close()
    gtk.main_quit()

def ignore_cb(n, action):
    assert action == &quot;ignore&quot;
    n.close()
    gtk.main_quit()

if __name__ == &#039;__main__&#039;:
    if not pynotify.init(&quot;Notifier &#039;scp&#039; Option&quot;):
        sys.exit(1)

	# Setup Popup
    n = pynotify.Notification(&quot;Upload to Server?&quot;)
    n.set_urgency(pynotify.URGENCY_NORMAL)
    n.set_timeout(timeout)
    n.set_category(&quot;device&quot;)
    n.add_action(&quot;upload&quot;, &quot;Yes, Upload&quot;, upload_cb)
    n.add_action(&quot;ignore&quot;, &quot;Ignore&quot;, ignore_cb)

    # Set position
    n.set_hint(&quot;x&quot;, x)
    n.set_hint(&quot;y&quot;, y)

    if not n.show():
        print &quot;Failed to send notification&quot;
        sys.exit(1)

    gtk.main()
</pre><p>edit: I updated the script with some position information &#8212; I love that I can put the notifications ANYWHERE on my screen.  I also variablized the timeout.</p><p>edit 2: Here is a video of my improved script in action &#8212; I&#8217;ll post the source later</p><p>http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv</p><h2>Going Beyond</h2><p>The Compiz example is just something that server my immediate needs.  The possibilities are however endless.  You can for example, link this script to a cron job asking you if you want to sync some other sort of file.  Or perhaps you&#8217;d like to add multiple buttons to give yourself a folder / server choice.</p><p>Happy hacking</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/06/25/ubuntu-notifications-osd-notify-sucks-notifications-daemon-rocks-exploiting-the-goodness-with-compiz/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <enclosure url="http://cankill.us/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv" length="687321" type="video/ogg" /> <enclosure url="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv" length="687321" type="video/ogg" /> </item> <item><title>Some Issues I found with Dual Monitors in KDE</title><link>http://www.doknowevil.net/2010/05/13/some-issues-i-found-with-dual-monitors-in-kde/</link> <comments>http://www.doknowevil.net/2010/05/13/some-issues-i-found-with-dual-monitors-in-kde/#comments</comments> <pubDate>Thu, 13 May 2010 15:49:09 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Computers]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Window Management]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[dual monitors]]></category> <category><![CDATA[kde 4.4]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=613</guid> <description><![CDATA[I had originally made a thread on ubuntu forums essentially asking how to change the way kde or more specifically kwin treats dual monitors. When trying out KDE 4.4, I was trying to establish a similar workflow to what I have in my GNOME/compiz setup. I use dual monitors and heavily use the expo compiz]]></description> <content:encoded><![CDATA[<p>I had originally made a <a href="http://ubuntuforums.org/showthread.php?t=1416445" target="_blank">thread on ubuntu forums</a> essentially asking how to change the way kde or more specifically kwin treats dual monitors.</p><p>When trying out KDE 4.4, I was trying to establish a similar workflow to what I have in my GNOME/compiz setup.  I use dual monitors and heavily use the expo compiz plugin (equivalent to kwin&#8217;s &#8216;desktop grid&#8217;).  However, the behavior in KDE is a bit odd to me.</p><p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/JYzBGBy6bE8&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JYzBGBy6bE8&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object><br /> (not my video but gives you an idea about the effect, see below for how I lay mine out)</p><p>In compiz, I have 4 virtual desktops with dimensions that spanned both monitors.</p> <pr>[    ] | [    ]<br /> [    ] | [    ]</p><p>In KDE however, each monitor is considered it&#8217;s own &#8220;activity&#8221; and as such, I have 8 virtual desktops</p><pre>[ ][ ] | [ ][ ]
[ ][ ] | [ ][ ]</pre><p>This in and of itself isn&#8217;t all so bad.  What bothers me however, is how they behave.</p><p>Labeling the virtual desktops..</p><pre>[1][2] | [1][2]
[3][4] | [3][4]</pre><p>When I click virtual desktop [1] on the left monitor, [1] on the right monitor zooms with it.  The behavior I&#8217;m used to in compiz would be to have both [1][2] on the left desktop zoom if I were to click [1].</p><p>Sure, this behavior &#8220;makes sense&#8221; knowing how KDE treats multiple monitors as separate activities but even after setting up matching desktop backgrounds on the monitors, I find it confusing to my workflow.</p><p><a href="http://pics.nexuizninjaz.com/viewer.php?file=gu6b56r305xemr7esym.png"><img src="http://pics.nexuizninjaz.com/images/gu6b56r305xemr7esym_thumb.png" /></a></p><p>What&#8217;s more, is that KDE seems to know this is what I want&#8230; but ignores this fact when creating activities:</p><p><img src="http://pics.nexuizninjaz.com/images/t8ds66c2d39fpe93fxl6.png" /></p><p>Has anyone come up with a clever solution to achieve this? I didn&#8217;t see anything about it planned for 4.5.</p><p>If it matters, I&#8217;m using twinview.</pr> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/05/13/some-issues-i-found-with-dual-monitors-in-kde/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Reseting your system wide cursor theme in ubuntu</title><link>http://www.doknowevil.net/2010/05/11/reseting-your-system-wide-cursor-theme-in-ubuntu/</link> <comments>http://www.doknowevil.net/2010/05/11/reseting-your-system-wide-cursor-theme-in-ubuntu/#comments</comments> <pubDate>Wed, 12 May 2010 03:26:46 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Command Line]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[cursor]]></category> <category><![CDATA[kde]]></category> <category><![CDATA[mouse]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=607</guid> <description><![CDATA[If you installed KDE in ubuntu (GNOME based), you may have noticed that when you log back into GNOME, you keep the KDE cursor theme. To fix this, use update-alternatives like so: 0025&#124;z@zentury ~$ sudo update-alternatives --config x-cursor-theme There are 7 choices for the alternative x-cursor-theme (providing /usr/share/icons/default/index.theme). Selection Path Priority Status ------------------------------------------------------------ * 0]]></description> <content:encoded><![CDATA[<p>If you installed KDE in ubuntu (GNOME based), you may have noticed that when you log back into GNOME, you keep the KDE cursor theme.  To fix this, use update-alternatives like so:</p><pre class="brush:bash">0025|z@zentury ~$ sudo update-alternatives --config x-cursor-theme
There are 7 choices for the alternative x-cursor-theme (providing /usr/share/icons/default/index.theme).

  Selection    Path                                     Priority   Status
------------------------------------------------------------
* 0            /etc/X11/cursors/oxy-white.theme          50        auto mode
  1            /etc/X11/cursors/core.theme               30        manual mode
  2            /etc/X11/cursors/handhelds.theme          20        manual mode
  3            /etc/X11/cursors/oxy-white.theme          50        manual mode
  4            /etc/X11/cursors/redglass.theme           20        manual mode
  5            /etc/X11/cursors/whiteglass.theme         20        manual mode
  6            /usr/share/icons/DMZ-Black/cursor.theme   30        manual mode
  7            /usr/share/icons/DMZ-White/cursor.theme   50        manual mode

Press enter to keep the current choice[*], or type selection number:
</pre><p>press &#8220;7&#8243; for the default</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/05/11/reseting-your-system-wide-cursor-theme-in-ubuntu/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>[SOLVED] konversation has no window decorations in GNOME and forces fullscreen</title><link>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/</link> <comments>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/#comments</comments> <pubDate>Mon, 10 May 2010 04:29:40 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Computers]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[konversation]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[irc chat]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=585</guid> <description><![CDATA[This was a very annoying bug for me to deal with and it almost caused me to switch to kde 4 earlier than planned. Luckily I was able to pull up a fix which is simple to replicate but was a pain in the arse to solve. To fix this, go into CompizConfig Settings Manager]]></description> <content:encoded><![CDATA[<p>This was a very annoying bug for me to deal with and it <a href="http://www.doknowevil.net/2010/02/23/in-search-of-better-window-management">almost caused me to switch to kde 4 earlier than planned</a>.  Luckily I was able to pull up a fix which is simple to replicate but was a pain in the arse to solve.</p><p>To fix this, go into CompizConfig Settings Manager >> Workarounds >> uncheck &#8220;Legacy Fullscreen Support&#8221; as the red circle in the screenshot below indicates.</p><p><a href="http://www.doknowevil.net/wp-content/uploads/2010/05/to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this.png"><img src="http://www.doknowevil.net/wp-content/uploads/2010/05/to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this.png" alt="" title="to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this" width="1015" height="625" class="alignnone size-full wp-image-586" /></a></p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Object Caching 981/1039 objects using disk

Served from: www.doknowevil.net @ 2012-02-04 03:56:23 -->
