I use Dropbox as cloud storage for a few things. My college schoolwork mainly, but I also have some files up there related to my robot design and programming. Day before yesterday an update to Dropbox cuased dropbox to 'break'. In the old days of GNU/Linux on the desktop (just a few years ago), it was not uncommon for an software update to cause one application or another to crash somehow. Usually it was a trivial mistake, but not always. And sometimes it occured to critical system files...this was not fun.
I use Ubuntu GNU/Linux, and I only update to the LTS releases of thiers. I have not had an application break in so long I had forgotten all about it. And of course, the fault is truly trivial to fix. I did a quick search of the 'net and found this little gem.
Fixing “Authentication is needed to run /usr/bin/dropbox as the super user” Issue In Ubuntu
Allow me to rephrase the critical portions of that article in case it falls into the memory hole some day. From the search I did this has been going on for one reason or another to one distribution of GNU/Linux or another for at least two years now so it is likely to continue happening into the future for a while and this information might come in handy.
In a terminal, use the ‘which’ command to check on the installed location. In the example, and on my machine this went like this:
olysoft-dave@Red-Avenger:~$ which dropbox
This file is the executable script that starts all the magic of Dropbox. And we need to fix it...just a little bit. Being it is a script we will use a text editor. The author of the article uses an editor that runs in the terminal.
olysoft-dave@Red-Avenger:~$ sudo nano /usr/bin/dropbox
[sudo] password for olysoft-dave:
Since there is a terminal already open from using the ‘which’ command, this is not a problem. But I like to use an application called ‘Geany’. So to use Geany, the command would be:
olysoft-dave@Red-Avenger:~$ sudo geany /usr/bin/dropbox
[sudo] password for olysoft-dave:
(geany:5995): IBUS-WARNING **: The owner of /home/olysoft-dave/.config/ibus/bus is not root!
Notice the warning message. This is not a problem here, but it does indicate that what we are doing is not really recommended. Using an application as a user (in this case the user known as ‘root’) other than the user that is logged in could create problems. But since we elevated this to administer privileges, who can do any command on the system, this solves all things in this case.
Geany picks up that this is a Python script and displays the script in good syntactical colors by the first line of the file. It does this just like the operating system does when it is trying to figure out how to run the script. The first line is ”#! /usr/bin/python”. This is commonly called the shebang, pronounced ‘sheh-bang’ for the “#” character called the ‘sharp’ and the “!” character called the ‘bang’. A BASH script would have the shebang line looking like “#! /usr/bin/bash”. Basically a pointer to the proper interpreter for the script to run.
Look at the two images below. Notice the text is different in-between the quote marks there. As the original article says, the problem is the updates sometimes leave this set for an area that only the super-user, or root, can access. But on Ubuntu, and lots of other Debian-based distributions, this is not how things are done. Applications use only the rights of the person logged in and never receive Super-user, or administration, rights as this is how bugs get exploited that effect the whole system.
This is what the incorrect file has in it:
Currently this is on line 63, the line that starts PARENT_DIR = os.path.expanduser("/var/lib/dropbox"). Change the text between the quotes to the tilde character "~". As in the following image.
What this does is change the default location for the dropbox configuration files and such from being in /var/lib to residing in the home directory of the currently logged in user. To the interpreter, the "~" character is terminal command shorthand for the current user. Once the text has been changed, save the file (do not 'save-as' with any other name), and exit Geany. Then type:
dropbox start -i
This will restart dropbox...or just click the icon in your list of applications.
Advocacy paper: More F/LOSS should be used in government and public schools
In the preamble of the United States Constitution there are several key aspects that our representative government is supposed to use as the driving factors in everything they do. Among them are exhortations to establish Justice, insure domestic tranquility, provide for the defense of the country, and to promote the general welfare of the citizens of the United States currently alive as well as those yet to come. (Constitution Transcript) In this, the information age, there exists a set of tools and methodologies that could be brought to bear to help alleviate the digital divide, increase national security, and allow this country to benefit from the global community of software engineers while at the same time ensuring the sovereignty of our fundamental information technology infrastructure. The tool is Free/Libre' Open Source Software, and the methodology is the great bazaar of ideas that the open source paradigm leverages in order to produce the most stable, secure, and powerful software yet created (Cathedral and the Bazaar), and this incredibly powerful resource should be used in our governmental offices and our public schools to the exclusion of any other form of information technology due to it's efficiency, power, stabilty, and security.
Every law made, every tax laid, every dollar spent inside and outside of this country should be done in pursuit of the basic goals set down in that preamble. As far as the taxes laid and dollars spent, we need to make sure that as a nation, we are getting as much value returned by each dollar spent as possible. To this end, utilizing F/LOSS is perhaps the easiest decision that could possibly be made. From the amazing beginnings of the Free Software license in the mind of Richard M. Stallman around 1985 (Interview: Richard M. Stallman), free software has grown from a software system that took a grad-school-level software engineer to make use of, to a vibrant and global ecosystem that powers the very heart of today's highest financial centers, provides the computational power required by our space agency and scientific community in general, is stable enough to reliably run the servers that make up the global Internet, yet simple enough to use to become the predominant operating system in our hand-held smart phones and tablets.
It needs to be said that the manner in which the word 'free' is used here is specifically "Free as in Free Speech", not "Free as in Free Beer". Discussing most F/LOSS products as being available at no charge has sometimes been a sticking point for people to understand. Since the tendency in the U.S. is to conflate things that are available at no charge as being "cheap, shoddy, worthless" ~ E.Raymond, the term Open Source was coined (Revolution OS). Current best practice when referring to software developed in the 'distributed' or 'bazaar' peer-to-peer model is Free/Libre Open Source Software, or F/LOSS. Here the Spanish 'libre' modifies the word 'free' to make very clear that for this form of software, the license under which the software is released provides continuing freedom to it's users. This insures that as the software matures and grows it continues to be fully open and availability to use, examine, distribute, and change according to the basic four rights provided by the free software definition (The Free Software Definition), by our posterity.
As it turns out, software developed this way quickly becomes technically advanced, stable, and secure. This effect has come to be known as 'Linus's Law' (The Cathedral and the Bazaar), where Linus famously said "With enough eyeballs, all bugs are shallow". Because of the business model of F/LOSS, the vast majority of the software whether operating system or application is generally available free of charge, gratis, so it is a great value when most other quality software requires original purchases and then later has licensing requirements that must be met for certain types of use or allowing additional numbers of users of the software.
This licensing requirement can quickly escalate, putting good software out of reach of many people, or encouraging people to obtain software in nefarious ways. The following is from a case study by Inuit on businesses migrating to the GNU/Linux operating system specifically and F/LOSS applications more generally: "When you combine business and financial packages with Linux you can earn an incredible cost savings due to the thousands of dollars saved on Windows licensing fees, fewer administration and maintenance expenses, and decreased downtime costs". This financial benefit is occurs regardless if the institution is a private or public one. In the case of public institutions like our government or subsidized non-profits, this could enable the various programs to do much more with the same tax dollars they now get. While at the same time having simply better software to use.
In an article published by PCWorld in 2013, Tony Bradley wrote "Linux tends to be less of a resource hog than other platforms, and it can perform admirably on older processors and with less RAM or hard-drive storage than Windows or OS X". So F/LOSS is available gratis, is continually improving, and requires much less re-investment of hardware that upgrade cycles typically require using closed-source competing software. Being less expensive by, possibly a great deal, than other software offerings is only half the story. F/LOSS is technically better, providing much better performance for much lower requirements, running more stably, and being more secure by design than competing closed software products.
As examples, GNU/Linux and F/LOSS software stacks are at the heart of the Tokyo stock exchange, the New York Stock Exchange, and the London Stock Exchange. These had been run by close source competitors, but in 2007 the NYSE went with RedHat GNU/Linux and a F/LOSS solution, in the 2009 London went open, then in 2010 Tokyo did the same (The Linux of Stock Markets). The reasons? Microsecond trading and high reliability. For these three entities cost was not the driving issue, F/LOSS was chosen here because it is simply better. F/LOSS is vastly more stable and also much faster than close source alternatives. These three are not outliers. 485 out of the top 500 supercomputers on earth run one version of the F/LOSS operating system, GNU/Linux.
In addition to very low cost, superior stability and performance, the security built into F/LOSS applications and the GNU/Linux operating system specifically are legendary. In 2011 there were about 1 million new virus variants for Windows surfacing per day (Malware Authors Using New Techniques to Evade Automated Threat Analysis Systems), I could find no good numbers for today's estimated virus proliferation after 2012 anywhere. It is important to note that in contrast with this number there are a total of less than 100 viruses/worms for GNU/Linux. With none currently active in 'the wild'. Recently the U.S. Navy dumped Microsoft Windows in favor of GNU/Linux and F/LOSS. There are several technical reasons for this having always been a good decision, but a single event is likely to have played a part in the final shifting. A virus was found in an Air Force drone control system (Linux grabs its single biggest win).
The U.S. Navy and U.S. Army are now large users of F/LOSS, with the U.S. Army proudly being Red Hat's largest single customer (Red Hat's Decade of Collaboration with Government and the Open Source Community). There are contrary arguments however. Usually from people who do not like the very idea of copyleft, but sometimes from people who simply are comfortable with the way Windows or OSX runs for them. It is fine to have preferences that are not entirely driven by what product is better, but the reasons given for not trying software that costs nothing and is easy to use and install are usually fairly thin. There are four primary arguments, the most common two are F/LOSS applications are either immature or the applications needed for 'serious work' don't exist. These are normally from people who have not even tried to use F/LOSS applications, let alone given a reasonable amount of time to learn to work the tools.
There exist well-rounded and professional applications for all the basics, office productivity, photo retouching, art, diagramming, page-setting, video production/editing, 3d Modeling, audio production, the list goes on and on (100 Open Source Apps To Replace Everyday Software). As a for-instance; Libre'Office is a drop-in replacement for Microsoft Office (Do You Really Need Microsoft Office Anymore?), but it is different to use in some important ways. Without a few days at least, there is no way anyone can claim they gave it a fair trial.
As for the immature argument falls flat as well. Many of the staple applications along with the operating system GNU/Linux are so well established in their various uses that there is almost no longer a possibility they can be even challenged by a closed-source alternative. Businesses like major stock exchanges, Google, Amazon, Facebook, Twitter (30 Big Companies and Devices Running on GNU/Linux), Disney/Pixar (Linux Invades Hollywood) and more. Governmental institutional use by all Russian Schools and Government offices, much of the EU, India, China (Linux Is Everywhere. We Show You Exactly Where), NASA, NOAA, the U.S. military, and many more large-scale installations entirely based around F/LOSS applications and the GNU/Linux operating system. None of this would be true were needed applications either not available or immature.
The last two arguments against using F/LOSS are no support, and that windows is as or more secure than F/LOSS software. The no support argument is given because supposedly F/LOSS only has fan-boy hacker types writing code and no proper stable companies available for support. This is completely smoke because some of the earliest businesses in the F/LOSS ecosystem had a business model expressly supporting Linux (Revolution OS), and today 3 of the larges F/LOSS vendors, Red Hat who publishes Red Hat Linux, Canonical of Ubuntu GNU/Linux, and Novell with Suse Linux. All three of these companies have support either as their only or primary business model. There are of course smaller, local companies in almost any major city available to SMB as well. While as far as the security argument goes, this paper has already provided many examples of why F/LOSS applications and the GNU/Linux operating system are more secure.
Over the course of this paper the major points covered were lower costs due to no licensing fees, savings in hardware, greater stability and security allow administrators to do more planning for future needs and less busywork verifying and applying patches or trouble shooting unstable installations. All these together would mean the money we spend on governmental office I.T. as well as schools could be reduced and more could be spent on improving the services these agencies offer to the public along with better securing our networked I.T. assets from cyber attacks. This is a national security issue as much as terrorism or any other external threat. This paper has also shown that the best arguments against using F/LOSS fail simply on the face of the thrust of the arguments. There simply is no data to support them; all the data shows they are simply not accurate portrayals of the situation. The last point to make is specifically for use in schools of all levels. Our students will wind up working in a world that is no longer windows-centric. F/LOSS has proven itself to be a better way to make better software, so in business, in the military, and all over the world, F/LOSS is already widely used and indications leave no doubt that this will increase rapidly simply to maximize the benefits (The real cost of switching to Linux). We need to provide training to students that will be useful once they leave school and enter the workforce nationally and globally.
Margulius, D. (2015, January). The real cost of switching to Linux.
Retrieved from http://www.computerweekly.com/feature/The-real-cost-of-switching-to-Linux
Kumar, A. (2014, February 25). 30 big companies and devices running on GNU/Linux.
Retrieved from http://www.tecmint.com/big-companies-and-devices-running-on-gnulinux/
Linux is everywhere. We show you exactly where. (2013, December 27).
Retrieved from http://www.malaysiandigest.com/technology/482848-linux-is-everywhere-we-show-you-exactly-where.html
Stern, J. (2014, August 12). Do you really need Microsoft Office anymore?
Retrieved from http://www.wsj.com/articles/do-you-really-need-microsoft-office-anymore-1407873198
Harvey, C. (2014, January 21). 100 open source apps to replace everyday software
Retrieved from http://www.datamation.com/open-source/100-open-source-apps-to-replace-everyday-software-1.html
Red Hat's decade of collaboration with government and the open source community. (2012, May 11).
Retrieved from http://www.redhat.com/en/about/blog/red-Hats-decade-of-collaboration-with-government-and-the-open-source-community
Shinotsuka, H. (2012, October 26). Malware authors using new techniques to evade automated threat analysis systems
Retrieved from http://www.symantec.com/connect/blogs/malware-authors-using-new-techniques-evade-automated-threat-analysis-systems
Diaz, R. (2008). Reduce Costs and Improve Business Performance with Linux
Retrieved from http://http-download.intuit.com/http.intuit/CMO/qbes/resources/pdfs/QuickBooks_Enterprise_Solutions_Linux_Advantage.pdf
The Free Software Definition. (2014, August 5).
Retrieved from https://www.gnu.org/philosophy/free-sw.html
Wonderview Productions. (2002). RevolutionOS (Linux story) [Video file].
Retrieved from https://www.youtube.com/watch?v=iBVgcjhYV2A
Stallman, R. M. (2001). Interview: Richard M. Stallman. Interview by L. Suarez-Potts.
Retrieved from https://www.gnu.org/philosophy/luispo-rms-interview.html
Raymond, E. (2002, August 2). The Cathedral and the Bazaar
Retrieved from http://www.catb.org/esr/writings/cathedral-bazaar/cathedral-bazaar/
The Constitution of the United States: A Transcription. (1787, September 17).
Retrieved from http://www.archives.gov/exhibits/charters/constitution_transcript.html
Rowe, R. (2001, September). Linux Invades Hollywood
Retrieved from http://www.cgw.com/Publications/CGW/2001/Volume-24-Issue-9-September-2001-/Linux-Invades-Hollywood.aspx
Ok, this is the code running in the video. I changed the pin location, opened up some of the
led action methods that were commented out, but the rest of the code is all stock. I purchased
a Vilros USK(Ultimate Starter Kit), which came with a handbook written in clear English with
decent illustrations, and a link to download a set of demo sketches for the Arduino to run with
the various components to familiarize yourself with how the Arduino communicates with various
sensors and motors.
Read more ...
So, you are browsing through some pics that you snatched from some cool pages a friend on FB linked and you find one that you like. You set it as the wallaper and go on about your day...later that week you have an idea to add some detail to the image. Maybe make it a little less green and add a title to it, or you want to crop it a bit and add it to another image that it would go really well with. Only now you don't know exactly what folder it was in so you can't start with the original!!!
No problem! If you can cut/paste into a terminal then you can get the filename you need.
gsettings get org.gnome.desktop.background picture-uri
Just copy and past the above text into a terminal and it will spit out the fully-qualified filename-path for your current wallpaper. Your welcome!
I've decided to go all in with building a robot in order to learn microcontroller programing and general 'making' techniques. I have an actual goal that I am still working on flushing out and this robot will be a test bed for all the technology and such that I need to understand in order to realize that goal. I don't know how long it will take for everything to come together but I will keep a log of it all here.
I call this project Robot 1.
Step one: build it and get it moving. CHECK!
Step two: controlling movement; making movement reliable and measurable.
Read more ...