Saturday, June 8, 2013

goodbye Google!...

posts from this blog are archived and new posts will come here:

trustdarkness.com/wordpress.

once I finish untethering my from the big G, this blog will go away.  as if anyone is reading it anyway.

Wednesday, January 2, 2013

xfce menus in awn (avant-window-navigator)

from http://www.linuxquestions.org/questions/linux-newbie-8/xfce-menus-in-awn-solution-924472/:

1) Make the gnome menu files unreachable:

cd /etc/xdg/menus
sudo mv gnome-applications.menu original.gnome-applications.menu
sudo mv gnome-settings.menu original.gnome-settings.menu
sudo mv gnomecc.menu original.gnomecc.menu


2) make AWN think that your local XFCE menu file is the Gnome menu file:

cd ~/.config/menus
ln -s xfce-applications.menu gnome-applications.menu


Then the settings entry in the menu, a bit more complicated:

3) copy the settings entries into your local folder so you can modify them:

cd /usr/share/applications
cp *.desktop ~/.local/share/applications


4) Make the XFCE settings menu entries show up in AWN:

cd ~/.local/share/applications
find -type f -exec sed -i 's/OnlyShowIn=XFCE;//g' {} \;


5) Hide the Gnome-specific settings (the ones I could think of anyway)


find -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
echo 'OnlyShowIn=OPENBOX;' >> gnome-font-viewer.desktop


 

Friday, December 28, 2012

remove items from the debian menu

Easier than i thought.  Look for .desktop files for the application you want to remove in .local/share/applications and /usr/share/applications

Real firefox on debian

Courtesy of http://superuser.com/questions/322376/how-to-install-real-firefox-on-debian

(apt-get remove iceweasel first if you have it installed)

sudo apt-get remove iceweasel
sudo echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
sudo apt-get update
sudo apt-get install firefox-mozilla-build



remove unnecessary packages from your debian install

sudo aptitude remove `deborphan --guess-all`

nothing to it.

if you then want to free up disk space by getting rid of all the deb packages apt has cached, run

sudo aptitude autoclean

Tuesday, September 11, 2012

For the ultra paranoid... randomizing your MAC address.

I recently wanted to write some python since I've been relegated to the worlds of Java and sometimes C being a college student again.  As a fun and paranoid project, I put together a little script that generates a random mac address and optionally assigns that MAC address to an interface and restarts your network connection.

I initially haven't made it all that complicated or general purpose (for instance, it assumes you're using network-manager, as I guess most of us are now).  The relevant functions are below, but I'd be happy to post the whole script or make it more versatile / general if anyone is interested... post a comment or send me an email.

def mac():
  """
  Returns a randomly generated Unicast MAC Address.

  Returns:
    String - A mac address.
  """
  mac = '';
  i = 0
  count = 6
  while i < count:
    # If the least significant bit of the first bite is onw,
    # ifconfig will fail because those addrs are reserved for multicast
    odd_hex = ['1', '3', '5', '7', '9', 'b', 'd', 'f']
    octet = hex(random.randint(0, 255))
    octet = octet.replace('0x', '')
    if len (octet) == 1:
      octet = '0' + octet
    if (i != 0) or (octet[len(octet)-1] not in odd_hex):
      mac += octet
      if i != 5:
        mac += ':'
      i=i+1
  return mac


 def restartNetwork(iface):
  """
  Assign a random mac address to the given interface and
  restarts network-manager to pick up the changes.

  TODO: error checking for a valid iface.

  Args:
    iface: String representing an assumed valid network interface.
  """
  new_mac = mac()
  subprocess.call(['/etc/init.d/network-manager', 'stop'])
  ifconfig = ['/sbin/ifconfig', iface, 'down']
  subprocess.call(ifconfig)
  #print subprocess.call('/sbin/ifconfig')
  ifconfig = ['/sbin/ifconfig', iface, 'hw','ether', new_mac]
  subprocess.call(ifconfig)
  subprocess.call(['/etc/init.d/network-manager', 'start'])
  print "If everything went as planned, %s should now have " \
    "mac address:" % iface
  print new_mac

Sunday, December 25, 2011

Installing cinnamon on LMDE

Installs but does not run.... working on it... please comment if you've had better luck.

Follow instructions to upgrade to gnome-shell 3.2 here:

http://forums.linuxmint.com/viewtopic.php?f=197&t=89327

Dependencies, even on the debian package, have the wrong package name, though some of these can be upgraded -- look for equivalent packages in your debian repos (in sid and experimental as well).

once you've upgraded everything you can, and have downloaded cinnamon run something like this:

sudo dpkg --ignore-depends=libecal1.2-10,libedataserver1.2-15,libgjs0c,libmozjs185-1.0,libpulse-mainloop-glib0,libpulse0 -i Downloads/cinnamon_1.1.2_amd64.deb