Zorin OS (Linux) source update

Today I finally decided to fix several
errors that were happening while I was updating a Zorin OS box.

I update over the network using ssh, but this will also work if you do it
from the terminal.

First, we will update the source list

sudo apt-get update

Now we will run the updates

Sudo apt-get upgrade

All normal now. I mean, we run these commands weekly right? (or at least you
have your system to auto update)

The difference today is that we will read the output.

Lets fix the easy parts fix. Most likely we have old kernels (when running
upgrade it would have notified you)

sudo apt-get autoremove

That was easy…but wait, it is possible that it will complaint about running the auto
loader because a symbolic is damaged. Silly link. Usually this does not cause
problem, but lets just fix it. The exact error is “The link /initrd.img.old is a
damaged link “ “you may need to re-run your boot loader[grub]”

sudo update-grub

OK, now that is fixed, lets fix the other possible errors.

Running update we could get either or both of these errors

We could google the errors. That is the easiest way, and probably how you got
here, but let’s do the short version instead.

The Google error looks worse so lets take a look at it.

It is complaining that the package could not be found. This is because Google
Chrome is not available in 32-bit anymore. So first lets check If your system is
running a 64-bit OS

uname -a or you can also use arch

If you would like more information check this page


http://www.howtogeek.com/198615/how-to-check-if-your-linux-system-is-32-bit-or-64-bit/

If your system is i386 or 686 then the best option is to uninstall Chrome,
or re-install Linux using 64-bit. If you are running 64 bit (x86_64) then we can
switch the repository.

To switch the repository to 64 bit you will have to modify the google sources

cd /etc/apt/sources.list.d/

Once inside the folder then we will edit using nano

sudo nano google-chrome.list

Once we have the list open, we can
see that most likely there is only 1 entry and it is for Chrome. To this entry
we will add right after deb and before the link,
[arch=amd64]
. This will force apt to download the 64 bit
binaries. The line should look as

deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

Now we can update the repositories again and that error will be gone. Then
run an upgrade to update Chrome. You can also for an install by entering

sudo apt-get install google-chrome-stable

This is easier and faster than it seems, but I don’t like to post commands
without explaining what they do

That is all. Good night…..Just kidding, we still have an Opera issue.

Opera has been moved to the repository, so the easiest thing to do is just
remove the source. Remember that to fix Chrome we went to the sounces.list.d
folder? We should still be there. Run a directory listing (ls -la) and you will
see 2 files.

  • opera.list
  • opera.list.save

You have 2 options. You can comment out the line or just directly remove the
file.

Before though, I would check whether you have it installed.

sudo dpkg --get-selections | grep opera

If nothing shows, then it is not installed. Simply comment out or delete the files (I suggest to delete to keep a clean system).
That is it.

If it was installed, simply remove it, then comment out or delete the source
file.

If you like Opera download the deb from their web page


http://www.opera.com/computer/linux

It seems like a lot of work, but honestly I have no paid attention to the
errors for quite a while. So it is not as bad. All of these can take less than
10 minutes to fix if you just enter the commands.

I had to search a bit, and still took me about 30 minutes to get everything
fixed, which is not bad.

The Chrome information I got it mainly from a Reddit page. Opera from the
Ubuntu forum. I had to customize a bit the commands because they were for Ubuntu
Vanilla, and I am working from a Zorin OS (based on Ubuntu/Mint), but the
commands should work in all flavors. This is the main reason I explained what
they do

At the end I also like to do a reboot to make sure everything is working
peachy :). It is a good practice, because if something is not working as it
should, the information is still fresh in your mind and it is easier to
troubleshoot. To make it clean I also always restart before I start.

Advertisements

Creating virtual Servers in Apache2 using Webmin

I like Webmin. I can edit configuration files, but I have to confess that I don’t memorize the syntax and options, so I only edit configuration files when I need to copy and change something quick.

If I am going to start from scratch, then Webmin is my tool of choice.

I won’t cover in detail how to install Webmin, but here is the short version:

Using apt-get

sudo sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list' wget -qO - http://www.webmin.com/jcameron-key.asc | sudo apt-key add - sudo apt-get update sudo apt-get install webmin

If you use Yum:

(echo "[Webmin] name=Webmin Distribution Neutral baseurl=http://download.webmin.com/download/yum enabled=1 gpgcheck=1 gpgkey=http://www.webmin.com/jcameron-key.asc" >/etc/yum.repos.d/webmin.repo; yum -y install webmin)

I recently created a few WordPress sites, and I had to create the Virtual Servers for it, and I run into a tiny problem where it was not working correctly. It drove me crazy, but I took some notes.

Using Webmin is easy to create virtual Server. The process is documented in the Wiki at http://doxfer.webmin.com/Webmin/Apache_Webserver#Creating_a_new_virtual_host

However, we all know that we can’t read that much.

To create a Virtual host (virtual Server) go to Servers>Apache Webserver. Then click the tab that says “Create virtual host” (yes, to create a Virtual Server, you create a virtual host).

The options here are pretty simple. VERY SIMPLE!!

Handle connection to address. Basically this is for multi-homed servers more than anything. If you have an IP address per site, here is where you specify it.

Port: This is the tricky part. You would be tempted to put any right? Here most of the time you actually need to listen the port, which most of the time will be port 80.

Why? Well, because in my case I am using a specific server name, and in most cases you would too, so it seems to work better when you set the port instead of just using default (at least with WordPress).

If you need to use https, then you will have to have a certificate per site, and also a IP address per site. So that will change the previous setting. Adding SSL is similar, but the port would be 443, and you need to have mod_ssl enabled too.

Next enter the root location for the site (for WordPress for example it is /usr/share/wordpress).

After that enter the server name. This would be thisismywebsite.com for example

The Add virtual server to file section should be as it is. The default is to add to sites-available, and then it creates the link in sites enabled.

Finally you can copy directives if needed (this is useful when you have special folders, or if using SSL with a wildcard certificate).

Then click on Create Now, and then apply changes. Your site should be working now.

There are more settings, and it is a good idea to refer to Webmin documentation, or the Apache documentation for them, but my most used settings are

Alias and Redirects. I use it when I have sites located under a master root, but the folders are in other parts of the system. I do this a lot to save files in a separate partition.

In Networking and Addresses you can add alternate virtual server names.

Directory indexing is another section you might change, if you need to edit access to files.

Edit directives is basically a quick access to the configuration file for the site. So also useful.

That is it!!! Were you expecting something more complex? You can do more complex, but it is always good start simple, and then more from there. The 2 things to watch out for is port 80 instead of any, and dedicate an IP address per site when using SSL.

Of course there are a ton of configurations changes and mix and match settings, but this way you can quickly have multiple sites running.

Updates coming

Ok, so I have been neglecting the blog for a while, such is life.

However I have been playing with some new technology, and different projects, so I have new ideas, and I would like to share them. Worst case scenario this would be my documentation of the ideas

Digital Signage Thoughts

Digital Signage is what you see everywhere now a days. The concept looks rather simple, it is a large format TV displaying some kind of content, usually promotions. The implementation though, it is not as easy.

I have been working in a digital signage project for a few years now. I have put a lot of time, but probably not as much as it needs on the project.

This will be the first in a series of articles, but I wanted to start with some thoughts on it before I go more in deep. This will help anyone also considering digital signage.

  • Cost of Hardware: This is an easy thing to consider. The problem is that we should not put too much emphasis on it. For example, the cost would be TV cost + player (usually a computer or Android based device)
  • Cost of Installation: Another part that needs to be accounted well. Mounting TVs in drywall is a challenge to do it right. If you are not confident enough to do pull ups from the mounting bracket then it is not mounted right. When possible consider professional installation. After installing several I was taking about 1 hour or more per TV (routing power, network cables as well, and finally using the right hardware)
  • Cost of maintaining the project: This is the big part that gets overlooked. And it will vary according to your environment. Don’t go with the cheapest solution, if it will require more time to implement and have running. The reason, is that human resource time needs to be considered as well. I am constantly managing people because they do not know how to maintain the TV for the digital signage. It sounds easy, but the truth is that people will not do basic steps like turning on the TV. This goes with Cost of Hardware point.
  • Distribution of content: this is how you will distribute the content, either using a digital signage distribution system or something homebrew (like HTML)

Now that you have this basic points let me expand a little as a reference.

When considering the hardware you have digital signage base TVs and regular consumer TVs. After a bit of search, we used LG consumer models. They were priced right and have pretty good quality. They were also half the cost of the digital signage model, so this allowed us to use 55″ instead of 42″. Then we used Android base sticks (these are really old now), and Lenovo Tiny M73 computers. The initial test worked great, so we deployed 50 of these.

And that is where the problems starting surfacing

We did not account for people not knowing how to use TVs. People forget to turn them on, did not understand what an input is, and cannot configure the TV.

Our next problem was misinformation. At the beginning we were going to use a smart stick that was powered by the TVs USB port, but we had to change it because the Android device was slow. The users still though just turning the TV turned the PC as well. The problem there was that information got simplified when it was presented the first time (almost a year before full deployment) and the new information was not retained.

We also did not like Windows 7 (Windows 8, and later 8.1) were better for large display, and installation increased deployment time.

(I will expand on the deployment in another article)

What is the underlying problem?

Accountability. If you are using your own equipment, you make sure Wi-Fi is connected and the laptop is on. When it is the company’s, the user simply “does not want to be bothered with it”.

Sounds easy to fix. Simple enough….We covered the issue on meetings, all management agreed, but still something happened when deploying communication downstream. A few weeks later the same problem happened.

What is the solution?

Doing the proper research before the project, and putting all numbers together. We saved a lot of money in hardware, but we spent more on maintaining and making sure it is running. Now the project is running smoother, but not as much as it should.

Quick Recommendations

Use digital signage equipment. Not because it is rated to run 24/7, but because it can be remotely controlled. For example Samsung/LG/NEC/[take your pick] will have a RS232 port, or some connectivity for a controller card. This will allow you to set the TV to turn on automatically, and turn off automatically. It can disable all input ports but what is selected, and will remove end user errors. The cost per installation will double, but the ongoing maintenance will be reduced.

Also, set the right expectations. We went crazy with what we wanted this project to do. 80% of what we were planning was not implemented, and we could have done a simpler job

What is next?

On the next article I will describe what we did, and how we did it, with the challenges we discovered. After that, what I think we should have done with what I learn. Hopefully you can avoid the learning curve.

SteamOS and Steam Hardware thoughts

You might have heard of SteamOS or read an article about how it will impact consoles.

SteamOS is basically to PC games what ChromeOS is to web browsing. It is an Operative System (the OS section) that is designed specifically to run steam games.

Steam is a publishing platform for video games and other general software. What made steam successful was the easy to distribute games, however there are other things that favor steam.

The average gamer will buy 1 game a month or so, and usually at its $60 price tag. There are exceptions and variations, but this is what console makers based on. It is because of this that big franchises games, like Halo and  Call of Duty sell so well. Halo 4 grossed $220 million on the first day. So it is a big industry. Because of this, most console center around the blockbusters.

However there are a ton of other good games around, and not all gamers are willing to spend $60 for a game. When this happens, Steam shines.

PC games also have a great concept. I can still Play Need for Speed 2, which was released on 1997, or play Silent Hill 2, released on 2001. While a remake was released for Silent Hill 2, I would have to pay $30 to get the remake (with similar graphics as the PC version) and Silent Hill 3. While it is a great price for 2 games with better graphics, and I do recommend it, it is an extra cost while I already own both for PC.

Silent Hill 2 has some compatibilities problems with Vista and up, but runs great on XP, in a virtual machine, or in Linux even using Wine.

Steam has available Final Fantasy VII. So now you can play the game released in 1997 without having to tweak the PC. This is another point where Steam shines. The games usually just run.

Gog.com offers similar experience, but it does not have the all in interface.

There is another big win for Steam that console and other distribution platforms have not mastered. The PROMOTIONS. For example, at the moment of writing Steam has a promotion for Flatout complete Pack, which includes 4 flatout games for $9.99. The promotion says it is $75 off out of $39.99. While Xbox and PSN have similar promotions, the prices are usually not adjusted. So Flatout would cost in comparison $39.99 on these networks. I could not find the game to buy online on the networks but…

Lets take a look at Painkiller Hell and Damnation. $29.99 in Xbox Marketplace, but it is $19.99 in Steam. That is $10 difference. Considering Steam runs promotions it would not be rare to find a Painkiller promotion with all the games for the price of 1. The average 1 year old game is about $30 on Xbox360 and PS3, but for PC that game would cost $15 or less.

Considering most distribution platforms require you to be online to play Steam has a clear advantage here.

The problem they face is to provide a consistent experience for players. Not all computer games are enjoyable with a Joystick. Playstation and Xbox lose money on the console, but regain it in the games. PC games have a higher upfront on the computer, but the games are cheaper (there is no license to pay to the console makers).

However considering a new Xbox One cost $500, which is the cost of a decent PC, and you can get a fairly decent video card for $150, PC is not so expensive compared to consoles.

Lets consider, even if you were to spend $1000 on a PC (or Steam hardware), you could run any of the games you already own on the PC, plus you can run your software (Productivity programs, photo editing, etc), watch online media like Hulu, Netfix, Amazon on demand and with Steam you can ply your games in the TV (you can technically play any game on the TV since it is a big monitor). Depending on how many games you buy, and if you can stay away from brand new games, you could be saving a ton of money and recovering the cost of the PC quick.

12 games at $60 each is $720. I make it a point of not spending more than $10 per game (I buy online, from gog.com, steam, amazon and gamestop). Even at top price of my game, I would buy 72 games. If I buy packs, then I could have over 100 games in a year.

I currently have 170+ games on steam, but I have over 700 games in total, and at least over 400 of those are PC games. I have been playing PC games since 1992, and every once in a while it is nice to play an old game. For example X-Wing, which you can buy now for almost $100 thanks to being a collector’s item. If you wanted to play an old console game, you would have to connect your old console, or buy the game again in the console market (which might not work with the next generation console).

In PC gaming, there is always a way to make the game work.

So, I think the steam hardware is a good idea. Because of the flexibility of PC gaming, it will be though for Steam, but more choices cannot hurt the player, but rather give more power.

BTW, I had a PC connected to the main TV before. It is not connected anymore because Xbox does what we need most of the time (Hulu and Netflix with occasional gaming), but I end up doing most of my gaming downstairs in my main PC. However PCs now can be small and have enough power to run most games, so it is a possibility.

Gaming PC is a viable gaming type, and it has a user base. Steam Hardware will have its place as well so I think that although it might have a rough start, it can be rewarding for people that want to try it. Since I have spare PCs at home, I will try Steam OS.

Let me know your thoughts

Puppy Grub2 boot menu and Atom netbook

I have an Asus Atom netbook/tablet

http://www.newegg.com/Product/Product.aspx?Item=N82E16834220661

http://www.asus.com/Eee/Eee_PC/Eee_PC_T91MT/

Nice right? It has multi touch screen and windows 7 Home Premium so the multi touch screen actually works.

So, why install Linux? well, it work so slow on Windows 7

I wanted a Windows 7 tablet because that way I can install some software that we use at work that only runs on Windows, but it is so slow, that we don’t use the netbook. So finally I decided to put some new life into it and install Linux Mint 11.

Now, Linux Mint 11 works great, even the touch screen works. Not the multi-touch, and it is not perfect yet. The mouse pointer for example does not follow the screen, but at least the netbook is still useful. I even got Onboard (screen keyboard) working

Ubuntu with Unity on the other hand would have been better since the screen is made for tablet, but it would not install (problems with the Intel video drivers).

So, here comes Puppy. It works awesome. It runs fast. It does not work with touch screen except for the click itself, so it is not for tablets. What it does do, and does it really well is run fast. It boots up quick, it shuts down even quicker, so I don’t even need to put the netbook to sleep. I can just shut it down.

What I wanted was a quick Linux distro to browse the web, after all the network cannot do much more than that. I could run Puppy from a USB, or SD card, and have a persistent state since it was designed for that, but I don’t carry either with this netbook, and since it only takes about 500 MB (even less, but I installed more pets) I wanted in the hard drive (SSD drive), so I did a frugal install.

Unfortunately the frugal install has instructions for Grub, which is almost not used anymore.

Well, Grub2 I found out is actually easier to configure.

Simply go to /etc/grub.d/

in here you will see several files. These are the grub2 config files. Grub will load them in alphabetical order, starting with 00_header and so on. But the file we want to change is 40_custom, so open that file

$ sudo nano /etc/grub.d/40_custom

Add at the end

menuentry “Puppy 528 frugal on sda5” {

set root=(hd0,5)

linux /puppy528/vmlinuz psubdir=puppy528

initrd /puppy528/initrd.gz

}

EOF

That is all.

Of course, the menuentry is the name you want to give it in the boot menu. I like to put the version number and the drive it is booting from.

set root sets the hard drive that puppy is booting from. In grub2, the drives match now. sda5 is the fifth partition on the first drive drive. hd0 would be the first drive, and the ,5 is the fifth partition. So, if you installed puppy to sda3 it would be hd0,3, If installed in sdb2 it would be hd1,2.

The next 2 lines are the locations of vmlinuz and initrd.gz The one trick is the psubdir entry. I didn’t add it first and puppy wasn’t booting. But try it first without it

Remember to close the entry using } (you opened { after the menu entry)

The EOF (end of File) is also very important. Even if you have everything else right it will now boot without it

 

NOTE: This is an old post that I worked on a while ago. I now have Bodhi Linux in the netbook, which runs great, but I need to switch sessions to see the login screen (ctrl+alt+F1 and then ctrl+alt+f7 to go back to GUI)

How to Recover Files From a Dead Computer

Broken Laptop Screen
Broken Laptop Screen

I receive a newsletter from How-To Geek. It has a lot of good articles so I will share them as I see them.
DehcTech can do recovery of hard drives. We use similar techniques as described here, and we can also recover with recovery software when the data has been overwritten for example.
If you are familiar with computers than this tips will help you recover data.

(from How-To Geek)[Original Article]
Uh-oh, your computer isn’t booting anymore. Maybe it’s a problem with Windows, or maybe the computer’s hardware is fried. If you have important files trapped inside your malfunctioning computer, this guide will help you recover them.

There’s no guarantee your data is recoverable. If your computer isn’t working because the hard drive died, there may be no recovering the files — not without some sort of expensive professional data recovery service, at least

Continue reading “How to Recover Files From a Dead Computer”