Enabling Wi-Fi on LXDE Network Manager


Switching from MATE to LXDE with the new Debian 9 upgrade requires some extra work, especially if you are using a bcm43xx network interface controller. One such issue may be requiring root access to enable the network switch.

With major updates to root access security in the newest release of Debian, I found it difficult to use WICD so much so that I changed my nic interface to Network Manager and used Gnome’s applet as a GUI. The Debian packages are network-manager && network-manager-gnome.

Before installing Network Manager, it is best to remove wicd first.

First go to LXDE Services and disable wicd. This is done by pressing the launch button. Look under Preferences and click Services.

Scroll to the button and uncheck wicd.

Remove wicd with the following.

apt-get remove wicd wicd-gtk

This command removes the application from your system and dash.

Next restart your computer.

After restarting, you can check to see if wicd is still autostarting. If it does not, you are ready to install Network Manager.

Add the following to your system.

apt-get install network-manager network-manager-gnome

Go to your configuration file.

nano /etc/NetworkManager/NetworkManager.conf

And set managed=false to managed=true under [ifupdown].

If wireless must be enabled, use the rfkill command.

rfkill unblock 1

You should now have Wi-Fi access to your computer.


End of Month Update


I decided to update this space on where I am of late. Today I made many changes to my software journal project py-journal, organized its class structures, which helps reading the code. I’ve also began research in gitgud, a Git Python application that makes contributing to projects much easier. Finally, I made several pull requests to dw-free. A list follows this paragraph with a little more information.

py-journal

  • you can now read and write journal entries
  • entry structures should be stable, so you can start using the software
  • designed for debian

gitgud

  • began plans for installing

Script from Bits and Bytes 1


Hello, this is Bits and Bytes meeting, a regular talk about computer science. Since this is our first meeting, we are looking at the essentials of computer science. This month we’re talking about algorithms. Later we will go into more advanced topics like programming, computer hardware, and efficiency.

((Opinion: the call for interaction here would be boring unless people already know what an algorithm is but even that would be boring. And if they do know, they would be tempted to give out the full explanation. Therefore it is better to go through this very quickly instead of dwelling on “what is an algorithm,” because anyone who doesn’t know what an algorithm is won’t know at the end of the class. But they will know after thinking about it.))

If the word algorithm or computer science invokes fear, do not feel ashamed. I too thought computer science was a mystery (black box). Prior to my education, I had thought that programming was designated for a special person and that normal people couldn’t learn how to program. Fortunately, computers were designed for everyday people, so it doesn’t take divine intervention to learn computer science, it just takes some mentoring and effort.

One question you might have is why learn computer science. Computer science today intersects so many different professions, that it may one day be a required skill set like Microsoft Office is today. One day everyone in the office might be expected to know code. Today children are learning code, and in 10 years, we will have high school graduates with that many years of experience in programming. That means in the land of tomorrow, the regular fast food employee will know computer science. This is great. And we can be part of this future by accepting the challenge of thinking programatically [coined from MIT’s CS department of undergraduate studies].

Go to board for writing down diagram and example with input, function, and output as terms.

Thinking programatically is simply a process to solve a problem. Programs in computers solve problems. [Drawing.] Computer programs take a value, places it into a box, and then shoots out an answer. The process of receiving a value is called input. The box where that input goes is called a function, such as adding the values 2 and 2 to make 4. The inputs are 2 and 2. Therefore we get the output, which is 4. The number that comes out of the box is called the output.

Input: 2 2 Function: addition Output: 4

Write algorithm under diagram. Write “Algorithms solve problems.”

This entire procedure is called an algorithm. Algorithms solve problems.

What is an example of a problem that computers solve? [Don’t wait for response.] Counting. Computers are well-adapted to counting. But so are we. We have ten fingers that can represent different numbers. [Raise fingers to represent numbers.] One. Two. Three. Ten. After ten, we run into some difficulties. So we can use tallies (or unary notation) of five. [Write down ten tallies.] This is an abstraction of our fingers. There are ten tallies. I have ten fingers. The ten tallies represents ten fingers used; however, because I’m not actually holding up ten fingers, I can go onward to twenty tallies, which can represent two people holding up ten fingers. For even more complicated numbers, I use symbols such as 1, 2, 3, 10. The number 10 is ten tallies. Two different ideas, yet they’re layers of abstraction. Ten fingers to ten tallies to the number 10. The design of computer relies on this sort of abstraction to project data on a screen.

Computers use and manage electricity as signals. After many decades of technological advances, computer scientists were able to create a machine that fluctuates the input of energy into information. There are two states of electricity. On and off. When we attribute values to those states between on and off, we create a binary value system of 1 and 0: 1 is on, and 0 is off.

The problem with a binary system is that it’s made of two values, off and on. Alone, communications could only work similarly to how the telegram worked: a series of short and prolonged on and off signals. Computers combine values of binary into sequence. A bit is 4 binary values. A byte is 8 binary values. Each value works like numbers. There is a 1’s place, a 10’s place, and a 100’s place.


Learning Git Work Processes in DW


Today I intended to spend the entire day working on low-hanging fruit for dw-free repos on GitHub. Dreamwidth is an open source LiveJournal fork that has now become more popular due to current events with upstream (actually, it’s not really an upstream, since LJ is no longer open source). What I found found instead was a merge conflict, which turned into a huge lesson for me and maintaining pull requests in a community project.

First, the day prior, I was working on an issue of adding Medium to DW profiles 2110. This was an old issue. And I did the regular push into develop branch without a thought.

The next day (or today), I decided to pick up a new ticket 2108. Here too I pushed, initially, to the develop branch.

Here intersects two conflicts.

1) GitHub accepted my pushes to develop and organizes it into one pull request.

2) Because I have not updated my develop branch, I was +500 commits behind the current develop branch.

The result was a pull request with merge conflicts that require manual merge conflict resolution. And if you’re a programmer, the words “manual resolution” should scare you.

I thought: “There must be a better way.”

Well, there is.

The first few steps in this article really take you on the right path.

So I thought, I should make a script.

This is for bash, and it requires manual implementation (sorry). But I hope to create an automated script here later. :)

Go to your repos containing the project you want to make a PR to.

Do not make any changes to the code.

If you’ve already made changes, perhaps you should just start over. Remove the local repos, re-fork it on GitHub (delete your fork), and then pull a new local repos without the commits you’ve made.

Or you can try removing the most recent commits you’ve made. More here.

First, make sure you update your repos to meet the current master branch. In this example, we will be using dw-free.

git fetch dreamwidth
git checkout develop && git pull --ff-only dreamwidth develop:develop
git push origin develop

You now have an updated develop branch. You are ready to make your patch branch.

git branch [your new branch name]
git checkout [branch]

Make the changes to your dw-free files.

Add the changes normally.

git add .
git commit -m "[message]"
git push

You will probably receive an error. Just follow the instructions.

Remember to checkout of this branch.

git checkout develop

This way when you update your repos in the future, you will be able to do it in the correct branch.

Go to GitHub. Make a new pull request. Compare the heads of two repos. Add yours to the right. Select the branch you created above.

Then you’re done. Repeat this for the next pull request.


The Importance of Rebase


Today I learned the importance of rebasing my branch of dw-free to the latest.

The process is quite easy. I learned the concept in IRC. Here’s the log.

(09:24:11 PM) srukle: Does anyone have any idea why this merge has conflicts?
(09:24:11 PM) srukle: https://github.com/dreamwidth/dw-free/pull/2008
(09:29:29 PM) geekosaur: usually means someone else changed the file in the meantime. git fetch and rebase?
(09:34:35 PM) geekosaur: hm, in fact what's on develop seems reordered compared to yours
(09:35:39 PM) geekosaur: no, not reordered, the property immediately before the one you added (userprops.mailencoding) was removed
(09:35:45 PM) geekosaur: along with some others
(09:35:52 PM) srukle: Oh boy.
(09:35:53 PM) geekosaur: so yes, you need to rebase
(09:36:27 PM) srukle: ty geekosaur
(09:39:40 PM) geekosaur: word to the wise, add the original as a remote "upstream" and rebase against it regularly to catch stuff like this. https://help.github.com/articles/syncing-a-fork/
(09:45:13 PM) srukle: I was able to rebase. Thank you! That was effortless and worthwhile. :)

If you want to rebase dw-free, the process is simple.

Go to your local dw-free git directory.

Enter the following commands:

git remote -v
git remote add upstream https://github.com/dreamwidth/dw-free
git remote -v

Notice how you added the dw-free remote branch.

Now you must fetch the changes.

git fetch upstream

Depending on your version of Git, you should be fine. But you may also want to merge the branchs.

To do this, simply check out master and merge.

git checkout master
git merge upstream

You should now be ready to send a PR to dw-free for review.


How to Add Other Services to dw-free


The problem of adding a new option for other services is a strange one that I wish to document in case anyone else runs into this problem in the future. My attempt to add Deviant Art and Medium prompts can be found in two issue tickets on GitHub.

Medium: https://github.com/dreamwidth/dw-free/issues/1997

Deviant Art: https://github.com/dreamwidth/dw-free/issues/1674

The first problem actually arrives after you’re done mimicking the code above. Once you’ve added a service, you must test it. However, if you simply launch your Dreamhack and run apache, the service won’t be added. Instead you will get a very generic list or errors. The most common is something like this: Error: Invalid userprop medium passed to preload_props. How do you resolve this?

Easily enough, kareila asks us to run this command after adding our code (it can be found within the dw folder of your Dreamhack):

/bin/upgrading/update-db.pl -r -p

This updates your database (as I imagine, didn’t look too far into it), which then permits you to add whatever service you added to your code.

Create a user. Then test out the new field. It should work.


Carrier 2


I worked 2 hours on carrier.py today, making changes to a better client. What I’ve created so far is a client that relies on no third-party dependencies, which is good – since all I need to call are the default set modules to call an xml file online and extract the data I need for articles. In the future, I can use the software to compile information for civil sites to inform people about on-goings, events, and news. Carrier should also be optimized to format information into HTML.

The completed changes so far allow for two scripts. One looks for data. Another looks for various elements, parses it, and prints it to terminal.

The next update is to look for a specific data within the elements.

This will be important as the main feature of Carrier is to analyze data for some simple features such as determining length of element, pushing element contents to HTML, etc.

I haven’t decided if this will be API or software. I’m thinking about creating heavy software as an API may not be used.

More to come later.


Creating Crossposting


So I just created a Python program to crosspost my journal posts to a static site. This is done whenever I post a journal entry with the tag "gitblog." Hopefully this will mean I can have my technical blog and also my non-technical blog kept in separate places with minimal effort in design and crossposting.


Blog Search

Side Widget Well

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore, perspiciatis adipisci accusamus laudantium odit aliquam repellat tempore quos aspernatur vero.