Saturday, September 19, 2015

Online Python Learning Resources


https://www.codecademy.com/en/tracks/python

https://www.python.org/about/gettingstarted/

https://www.udacity.com/courses/all?technology=python

https://www.codementor.io/learn-python-online

https://wiki.python.org/moin/BeginnersGuide/Programmers

https://alison.com/courses/Introduction-to-Programming-with-Python

Friday, September 4, 2015

MATE Is Creating A Challenge With Porting GnoMenu

Well as the saying goes anything worth doing will not come without challenges. Case in point is bringing back the abilities of GnoMenu, which was originally made to work with Gnome 2 to MATE which is a continuation of the afore mentioned Gnome 2. Now oddly enough the challenge is caused by the deprecation of the one thing that caused the GnoMenu the most issues, Bonobo.

Bonobo was a component model for creating reusable software components and compound documents in GNOME 2. Bonobo was deprecated in both MATE and GNOME 3 (officially deprecated in GNOME 2.4) and MATE for the sake of backwards compatibility implemented their version of Bonobo which was a short lived stop gap to allow panel apps in MATE to continue functioning while the MATE developers to move the new D-BUS implementation via GSettings/DBUS. To understand how much this changes things you need to understand that syntax is vital in programming. The switch from Bonobo to DBUS changes not only the command and calls but the syntax as well. As an example here is piece of code used in MNWMenu.py that needs to redone to use Gsettings/DBUS:



import gtk
import pygtk
pygtk.require('2.0')
import commands
import sys
import gobject
try:
import mateapplet
except:
from gi.repository import MatePanelApplet as mateapplet
import os

if not os.path.exists(os.path.expanduser("~") + '/.mnwmenu') or not os.path.isdir(os.path.expanduser("~") + '/.mnwmenu'):
os.system('mkdir ~/.mnwmenu')


import gconf

Now here is an example of code that performs this same base function with the new syntax:

import gi
gi.require_version("Gtk", "2.0")

from gi.repository import Gtk
from gi.repository import MatePanelApplet

def applet_fill(applet):

    # you can use this path with gio/gsettings
    settings_path = applet.get_preferences_path()

    label = Gtk.Label("My MATE applet in Python")
    applet.add(label)
    applet.show_all()

def applet_factory(applet, iid, data):
    if iid != "TestApplet":
       return False

    applet_fill(applet)

    return True

MatePanelApplet.Applet.factory_main("TestAppletFactory", True,
                                    MatePanelApplet.Applet.__gtype__,
                                    applet_factory, None)

Though this is not a pure function to function or process to process example it shows how the syntax has changed. Not all syntax changes can be attributed to the change from Bonobo to D-BUS either as Python also has had some changes to its base syntax as well.

I'm just learning Python and haven't written a program in years in any computer language. Beyond shell scripting and some HTML CSS stuff I really haven't kept up with it. Even with shell scripts like pygi-mate-convert.sh to help convert the Python code, because of the changes in the syntax structure, that are required, I quickly realized I am going to have rewrite nearly all of the modules from GnoMenu from scratch to comply with syntax structure and ensure that the proper commands and functions are used. I contacted Helder Fraga and unfortunately he no longer has any notes on GnoMenu, which means (drum roll please) I'm going to have to reverse engineer the GnoMenu code (which means creating lots of flow charts) so I can recreate the app.

You can bet you A$$ there will be follow ups to this Post.

Thursday, August 27, 2015

Notes For My Ultimate Linux Desktop System

Needs to be done
Based on Debian but separate like Ubuntu (but not Ubuntu based, though forking some of their applications and tools is always an option.)
Full emphasis on the MATE desktop and GTK3, porting programs from other Desktop Environments such as K3B and KDEConnect to GTK3. The Desktop needs to be simple to use but also allow more advanced and power users to have the control over their system and desktop that they desire.
Return GnoMenu (and rename it) to the desktop, porting from Python to GTK3 and cleaning up existing bugs. Add abilities to bring more menu layout functions and options. Should be able to work with mouse based and touch screen based systems allowing for themes to work with either or both.
Compiz and Emerald both need to be revived and Compiz needs to be forked from Canonicals current development branch. This includes returning the functions and plugins either modified or removed by Canonical to suit their Unity Desktop Environment. Integrate Compiz and Emerald into MATE to be the compositing system. Start adding Wayland support. Fix issues caused by the Unity support (possibly removing all Unity support code.)
Return full Eye Candy support and theming options. Not everyone likes the flat look being pushed on most Desktop Environments today. Users should always have the option to make their desktops look the way they want. MATE is capable of being modified in such a way when the right options are available.
Develop a ISO creation tool that allows people to create customized ISO images that is simple to use for novice and expert alike. Something like Systemback.
Things that should be done.
Finish the job of transporting Nautilus options and plugins that were available to Nautilus in Gnome 2 to Caja. While the main plugins have been done many other excellent ones have not.
Bring the options from third party tools used by MATE such as Touchpad Indicator and add them to the existing Control Center tools. (To me this is a no brainer and should have been done from the beginning. Many of these options should be native and not from third party add ons.) Consolidate the Control Center options, Emerald Theme Manager should be part of the Appearance control etcetera. Also many of the Control Center options are not properly catagorized. Case in point, Firewall Configuration (GUFW) belongs under Internet and Network not Other and Network Options under System should also be under Network, and part of the Network Settings under that. Gparted should be in Hardware not System, as examples.
Update Gkrellm and plugins specifically for MATE. Add true transparency and Wayland support. Update plugins, both built ins and add ons, to use newer tools and commands. Add support for new hardware and software. Allow horizontal placement. Add left and right click options to some of the modules (an example would be accessing the desktop calendar from the system time plugin, or accessing system power options from the battery monitor plugin.) Gkrellm itself should function as a extension of the system tray as well as a system stack monitor. Removes redundancy and declutters the desktop experience.

Monday, August 3, 2015

Emerald for Debian Jessie and LMDE 2 Betsy

In my post concerning how to Install Compiz on Jessie and LMDE Betsy I stated that Emerald Decorator would be my next target to get working. I am happy to say I have accomplished this and tested it. The dependency issue is fixed and it installs without any broken package issues. Its also the first deb file I have ever packaged, which is cool.

The deb file can be downloaded here.

Enjoy--


Tuesday, July 28, 2015

Has Your Network Manager Icon Disappeared?

A recent issue has reared up with the Network Manager Applet not loading in Debian and Ubuntu. AFAIK it effects Unity, MATE and Gnome and possibly other Desktop Environments. In all cases the solution is quick and simple.

In your startup add the following command:

dbus-launch nm-applet

Then logout out and log back in, or restart.

This appears to be caused by an update but I have no idea which update package is the culprit. I don't recall an update for Network Manager recently but then I just may not have noticed it.

Sunday, July 19, 2015

How I Got Compiz Working In Debian 8.1 Jessie

If you love having the desktop cube or other goodies in Linux via Compiz but use a Debian based distribution other than Ubuntu you have probably noticed that its is no longer in the repositories, including testing and SID. Well fear not you can now get it. I use Linux Mint Debian Edition which is based on Debian 8.1 Jessie release.

After trying several different methods to get it installed, including compiling the source code (epic failure) I did my usual investigation to determine what needed to be done to resolve this. To me Compiz is a vital component, effects aside I rely on the Desktop Cube. It organizes my work flow and allows me to perform operations with less clutter from having several things open at once.

The problem in getting Compiz to work was the missing dependencies from the Debian Repositories so no matter what method I went with I would either get broken packages or outright failures in these attempts. That being said I went to one last (by last I mean it was my absolute final attempt) effort to install Compiz.

In a nutshell Compiz development is only being done by Canonical right now. Its an integral part of their Unity Desktop so they are actively developing it. However, as many have noted the version in Ubuntu 15.04 doesn't work with Debian 8.1. Well fear not because the version in the upcoming 15.10 release does. Wily Werewolf is the solution to our Compiz dilemma.

Add the following line to /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ wily main universe

Update your sources, install Compiz, the plugins and ccsm then either remove, or comment out, the line.

I am currently using Compiz on my system.

For my next magic trick, Emerald Decorator.

Wednesday, February 25, 2015

Caffeine Plus returns manual toggling of screensaver / lock screen in Ubuntu and Kubuntu

I'm not going to reinvent the wheel and write a long winded blog here as its just best to send you to the Webupd8 Blog that has all the information you need and install instructions. I'll just say its good to have this function back.