Showing posts with label Unity. Show all posts
Showing posts with label Unity. Show all posts

Saturday, January 12, 2013

How to Take Screenshots of the Login Screen in Ubuntu 12.10



Last month when I posted about installing multiple desktops environments within Ubuntu, I found myself needing to take a screenshot of the login screen. It wasn't immediately obvious how this could be done but after a bit of fiddling around I managed to find a good solution that I thought I would share. First off, you will need to make sure imagemagick is installed. Open the terminal and type:




  • sudo apt-get install imagemagick

After it installs we are going to create a script to take the screenshot for us. I like to keep my scripts in a folder called “Scripts” within my home directory but you can create it anywhere you like. In the terminal type:

  • sudo nano screenshot.sh

This will open nano, a simple terminal based text editor. On the first line type:

  • chvt 7; sleep 5s; DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 xwd -root -out ~/temp.xwd; convert ~/temp.xwd ~/screenshot.png; rm ~/temp.xwd

This script will exit the console mode, wait for five seconds (you can change this to anything you like), capture the screen into a file called temp.xwd and finally convert it to a png. Now type ctrl-x to save the script. In order to run it however, we will need to make it executable, so type:

  • sudo chmod +x screenshot.sh

Now log out of your session and once you are back to the login screen type ctrl-alt-1 to open the console mode. You will have to login with your username and password, and then navigate to the folder where the script is located and type:

  • sudo ./screenshot.sh

Enter your password and the script will boot you back into lightdm and after five seconds it will capture the screen. To see the image log back in to ubuntu and navigate to your home folder. There you should find a new file called screenshot.png

Thursday, January 10, 2013

Removing Unsupported Game Entries from Steam Beta

I’ve been playing around with steam beta for linux a bit this week and I am super excited to see this amazing project working so well in Ubuntu. After adding some games I purchased from the Indie Humble Bundle I noticed a little bug that I thought I would touch on. When you view your list of “Linux Games”, Steam will show games that are compatible with linux but unfortunately not all of them are officially supported yet. The easiest way to check if the installation will work is to click the install button and on the window that pops up, check if the disk space required information is visible. If it is blank, like the screenshot below, it will likely not install properly.


If you have accidently installed an unsupported game, steam will throw an “invalid app config“ error when you try to run it. To get rid of the application entry do the following. Make sure steam is closed then open a terminal and navigate to ~/.local/share/Steam/SteamApps/common .Then type the following:


  • rmdir {name of game}

in my case it was:

  • rmdir snapshot

This will remove the directory. Next navigate to ~/.local/share/Steam/config/ and type:

  • sudo nano config.vdf

This will bring up the text editor. Find the section called “apps” and locate the block that references the game you wish to remove. It will start with a number code followed by an open and closed curly brace. Check the “Installdir” section for clues to which entry is which. Write down the number code before continuing. Delete the entire entry, including the number code, the open and closed curly braces and everything in between them. In my case I deleted:

"204220"
{
    "installdir" "~/.local/share/Steam/SteamApps/common/snapshot"
    "HasAllLocalContent" "1"
    “UpToDate" "1"
}

Press ctrl+x to save and then navigate back to ~/.local/share/Steam/SteamApps/ Now type:

  • rm appmanifest_{number code}.acf

in my case it was:

  • rm appmanifest_204220.acf

Now start up steam and it will no longer think you have the game installed.

Saturday, November 24, 2012

Install Multiple Desktop Environments in Ubuntu

As I was testing different distributions I was really blown away at the variety and quality of the different desktop environments. I was incredibly impressed by how robust and powerful some were, such as KDE, and how functional and sleek others were, like Cinnamon. While I did eventually decide to settle on Ubuntu because of their massive user base and application support (Steam, Lightworks, etc.), it was not an easy decision to make, mostly because of how much I had enjoyed many of these desktop experiences. I could really see how certain desktops would be perfect for certain tasks, and finding one that was good for all tasks was almost impossible, at least for my multifaceted workflow that is. Wouldn’t it be great if you could use Ubuntu as a base and choose which desktop environment happens to suit your current needs. Well, as it turns out, you can and it’s actually incredibly simple to do. I want to give a quick run through of how I setup my Ubuntu 12.10 system to allow me to choose between my favorite desktop environments at login.

Unity

This one comes standard with a new install of Ubuntu 12.10 and while it gets a lot of mixed reviews, I actually really like it. It’s a great interface for when I’m working with web applications. With web app support for google docs, reddit, google+ and many more, I find myself using Unity when I’m in a browsing mood. No special steps required to get this one rolling.

LXDE

This is a super lightweight, low profile desktop environment. It loads up insanely fast and takes very little system resources to run. Although I wouldn’t say it’s exactly beautiful to look at, when I need to get some real computing done, thats the last thing I care about. I have been playing with Blender over the past couple of weeks and I could definitely see the benefit of this option when building and rendering complex scenes. To get this desktop simply open the terminal and enter the following:

  • sudo apt-get install lxde

KDE

I’m still discovering all the awesomeness that is kde. I love the idea of activities and could see this being incredibly helpful. I also found it really useful for setting up application menu entries, which I discovered totally by accident. I had downloaded the latest blender release from blender.org (not from the ubuntu software centre) and extracted the files to a folder in my home directory called “Blender”. Although I could start the application by double clicking the blender executable file, I wasn’t able to see it in my application lens. Not the end of the world, but something I wanted to eventually rectify. After installing kde and booting it up, I dragged that same blender executable file to the main panel, right clicked it and chose "icon settings". After clicking on the icon within the next window I was able to browse to the svg file that blender provides in the package and the icon was applied to the file. Interestingly, when I had switched back to unity, blender now shows up with it’s beautiful vector icon in my application lens. I would encourage everyone to at least try kde, it’s a bit of a bigger download (around 300MB) so if you are really low on storage keep that in mind. To install it just open the terminal and enter:

  • sudo apt-get install kde-plasma-desktop

Cinnamon

I was really impressed by this desktop. I was immediately comfortable moving around its workspace, and everything just felt good. I think this desktop is a great option for those switching from windows as its layout will feel pleasantly familiar. It’s simple yet elegant and puts the focus on the applications you are running. To get this desktop up and running, just open the terminal and enter the following:

  • sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
  • sudo apt-get update
  • sudo apt-get install cinnamon

Chrome OS

I had been curios about google’s chrome operating system for a while, so when I saw that it was possible to install it on Ubuntu I just had to give it a shot. I think it only works on a 64 bit system, so make sure that’s what you’re running. Open the terminal and enter the following:

  • wget https://github.com/downloads/dz0ny/lightdm-login-chromeos/lightdm-login-chromiumos_1.0_amd64.deb
  • sudo dpkg -i lightdm-login-chromiumos_1.0_amd64.deb

Cleaning Up the Login Screen

So now that we have a variety of desktops installed, it’s time to try them out. Just log out of your session to get back to the login screen. From here click on the little Ubuntu logo to see all your options. You will probably notice that there is a bunch of desktops that got added that you may not need or want as it can start to get a little cluttered, not to mention unusable if you are on a low resolution monitor. For example, after installing cinnamon, I noticed there were two versions available in the list; Cinnamon and Cinnamon 2D. After using Cinnamon, and seeing that it loaded and worked great, I wanted to remove Cinnamon 2D from the list (along with a few others) and to do this is fairly easy. Just log back into any of your desktop environments and open the terminal. The different options are stored in *.desktop files within the folder /usr/share/xsessions. To remove desktop entries from the login menu, you simply need to rename the ones you don’t want. In the terminal navigate to the folder and rename the appropriate files:

  • cd /usr/share/xsessions
  • sudo mv cinnamon2d.desktop cinnamon2d.desktop.bac


Continue this method for all the options you wish to remove and the next time you log out, you will see the change. To get an option back just rename it back to the original:

  • cd /usr/share/xsessions
  • sudo mv cinnamon2d.desktop.bac cinnamon2d.desktop




Wednesday, November 21, 2012

Fixing Broken NVIDIA Drivers in Ubuntu

Once I got Ubuntu installed I ran into a few issues with the NVIDIA drivers. One of top suggestions people have when starting Ubuntu for the first time is switching to the newest graphics driver. By default the system is set to use the Nouveau driver and for me it worked great without any issue. However when I would switch to any of the other drivers, upon reboot, the login screen would come up a very low resolution and unity wouldn’t pop up at all. I was able to right click the desktop and choose “change desktop background” to get into the settings and change it back, but I couldn't figure out why none of the other drivers worked. After a bit of research and playing around I have discovered a fix to the problem. I needed to install the kernel headers in order to make it work. I opened the terminal and entered the following:

  • sudo apt-get install linux-headers-$(uname -r)

After I entered my password the headers were installed and I switched to the NVIDIA driver and rebooted. This has fixed the issue and I can now successfully use all the NVIDIA drivers.