Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

2014-06-20

Dropbox Icon missing in Ubuntu

On Ubuntu 12.04 as well as 14.04 with recent versions of compiz, dropbox or whatever other module the Dropbox icon may be missing in the upper right corner (system tray) after login.

This is in general just an annoyance because Dropbox is still running in background (you can check this by opening your Dropbox folder and you will see the checkmark icons and the dropbox context menu entry when right-clicking a file - which are only visible when Dropbox is running).

However, I found several forum and blog posts mentioning that
sudo apt-get install libappindicator1
solves the issue or
sudo apt-get install nautilus-dropbox
solves it. I already had libappindicator1 However in reality the latter is obsolete as the nautilus integration is no separate thing any more. So both did not solve the issue for me.

I solved it permanently only by writing a short shell script (which i put into /opt directory):
 #!/bin/bash  
 sleep 60s  
 dropbox stop && dropbox start -i &  
(mark as executable) and then click on the Ubuntu button on the left upper corner, type "startup" and there add an entry to call that start that shell script /opt/dropboxrestart.sh.

2013-10-12

LibreOffice v4.1.* and Ubuntu 12.04 Unity-Integration

As I use Ubuntu on my productive work+private machine, I prefer to use stable versions - so I switched to use LTS versions only. However, for LibreOffice I have enabled the LibreOffice repository using

# Adding repository for getting most current LibreOffice # (taken from https://wiki.ubuntu.com/LibreOffice) add-apt-repository -y ppa:libreoffice/ppa
 That slurps the current LibreOffice release into my Ubuntu 12.04 LTS stream of updates (the poor Windows users don't have an idea of such a comfort).

The reason for this was mainly to get the latest additions for Microsoft Office formats support (Microsoft is still good in their attempt to squeeze people into staying with MS Office).

Unfortunately with LibreOffice v4.1.* a unity-related problem (users of other flavors of Ubuntu can stop reading here) was introduced that has not been addressed yet by the Ubuntu folks - at least not for 12.04 LTS:

When opening several documents in Writer, Calc etc the windows are not grouped to a single Unity icon.

As you might know from earlier posts I like the Unity desktop very much (and it also has become very stable) and so I am very glad for the workaround that has been posted to the according bug report at https://bugs.launchpad.net/bamf/+bug/1026426 (comment #166 by Marco Trevisan) which is just one command in the terminal window:
sudo sed '/StartupWMClas
s=.*/d' -i /usr/share/applications/libreoffice-*.desktop
(all one line).

Problem solved, thank you very much, Marco!

Related posts: Open Office and Libre Office starts slow, Normal.dot in OpenOffice or LibreOffice, Default Paper Size in Open Office.

2012-08-07

The truth about hardware support

Since the time I first started using Linux at home I know that one must be careful when choosing hardware to avoid pain when installing Linux.

When people say that Windows supports more hardware than Linux I always confirmed from my own experience.

But: Linux - out-of-the-box supports more hardware than Windows does (out-of-the-box)! Microsoft "outsourced" most hardware support to the vendors and when you buy new hardware with Windows preinstalled, vendors did the job in getting everything to work!

Lately I wanted to help out a new co-worker reinstalling Windows on his work laptop (HP Pavilion g6). There was an extra partition prepared by the vendor which probably contained possible required drivers. However, somehow it was inaccessible so we couldn't get drivers from there. After a clean Windows 7 installation: No WLAN, no sound and no ethernet either! After long search on the net (from another machine of course), my co-worker found the most important download (ethernet driver) on a separate site from HP for businesses (after finally also identifying the exact sub-model of the g6) - more than 100 MB download - for a freakin' ethernet card!

After that I was so frustrated loosing so much time just to get the normal ethernet to work (let alone WLAN and the rest), that I left the rest up to him. Later in the evening he called me about activating Windows and Office and I could not get to the Microsoft action pack site because somehow the login did not work any more.

The next day he arrived at the office with Ubuntu installed on the HP Pavilion g6 - everything worked out-of-the-box - no single extra driver required and of course fully usable (without the need of activating any software)!

But this is not always the case. There are plenty of vendors that do not write drivers for Linux and many even do not publish the specifications so that somebody else could write the driver. If there is an open source driver - or at least a free driver available, Linux already contains it, where on Windows you need to get separate driver setups or CDs from the appropriate box or vendor site.

There are currently software updates running on a Dell Latitude E6530 next to me. As usual, all I need to tell Dell: I need a laptop and I don't pay the Microsoft tax, I will install Ubuntu on it and the hardware must support it. I don't want and don't need to search forums for possible problems, I can rely on Dell shipping fully supported hardware - everything out-of-the-box - also no additional drivers required.

My recommendation: Even if you don't plan yet to use Linux, tell your vendor when buying a new PC or laptop that you want the hardware to be Windows AND Linux compatible. If you plan to use Windows: Hope that you don't need to reinstall yourself grabbing all the required drivers from the internet!

Related posts: Ubuntu compatible hardware, About Dell, The hardware.

2012-06-22

Ubuntu 12.04 LTS Precise Pangolin - Optimized


Preamble:
If you are a recent Linux convert, just new to Linux or only a casual computer user, you don't have to worry: Whatever of the main Linux desktop distributions you are choosing (be it Ubuntu, Zorin OS, Linux Mint, Fedora, ... - whatever flavor of those) to use or try out - you are ok. The following is for power users who want to save clicks and mouse-miles to the absolute minimum required.

This article partly applies also for other distributions that offer compiz.


Introduction:
Since Ubuntu 11.04 which first introduced the new Unity interface for the main desktop instead of Gnome, I was testing many different Linux desktop alternatives because I worried about the future of the Ubuntu desktop. After testing several distributions (see preamble above) and all the main desktop environments including XFCE, LXDE, KDE, Gnome3+AWN, Gnome3+Cairo Dock I came back and settled with Unity on the current Ubuntu 12.04 LTS (Precise Pangolin) production work desktop. I do consider myself as a Linux Desktop power user on a daily basis at home and work and I focus on usability, efficiency and stability. On 10.04 I was experimenting with Gnome 2 plus AWN or Cairo Dock finding a more efficient desktop configuration. Basically I ended up with something similar to Unity. Except: I was doing hard work on configuration ending up with several small but annoying problems (including crashes of particular applets now and then).

Honestly, I find Unity on Ubuntu 12.04 (not so in the versions before) very stable and useful out-of-the box. There are still a few very first actions, but anyway far less post-install-configuration work than everywhere else (not to talk about Windows which is the OS with the most-post-install work ever existed).

First actions after install (applies to debian based distributions such as Ubuntu, Mint or Zorin OS):
  1. Click Settings/Power Icon in the right upper corner, then "System Settings"->"Appearance"->reduce "Launcher icon size" to 32. Default size is just too big to get most icons fully displayed that I need on a daily basis (ok this first one is only for Ubuntu users with Unity).
     
  2. Start Nautilus (Windows/Ubuntu/Super key + 1), move mouse to top of screen (new way to get to the active application's menu) and choose "Edit"->"Preferences" and change "default view" to "List View".
    And in tab "Display" I also change the date format to ISO (yyyy-mm-dd) - you might want to keep the default.
     
  3. Start Firefox and under "View"->"Toolbars" check "Bookmarks Toolbar".
     
  4. On the commandline (open a terminal):
    sudo apt-get install synaptic

    I now, there is a nice app store now - pretty fine for the normal user and even for me if I want to look around for interesting stuff. But I still like to see the original package names, have overview and full control about the repositories and the like. therefore I still like synaptic - in addition to what comes with Ubuntu.
     
  5. On the commandline (if on Ubuntu or other distribution with Desktop environment that offers/works with compiz):
    sudo apt-get install compizconfig-settings-manager compiz-plugins-extra

    That's for configuring my desktop to get the best usability and efficiency.
     
  6. Enable partner repositories:Press ALT+F2 and type synaptic then press Enter.
    In the menu select Settings->Repositories.
    Enable the partner and independent repositories.
    Close the sources dialog and on the synaptic main window click on the reload button (this is the same as the commandline "sudo apt-get update" - without the quotes).
     
  7. Managing passwords:
    It is always recommended to use different passwords on different sites where you register and login. After several registrations nobody can remember all the passwords. Therefore it is helpful to use a password manager. My current favorite is keepass2. It can be installed this way:
    sudo apt-add-repository -y ppa:jtaylor/keepass
    sudo apt-get update
    sudo apt-get install keepass2
     
  8. And then I install a lot of other tools - such as (on the commandline again - this is all one line):
    sudo apt-get install ubuntu-restricted-extras ubuntu-restricted-addons adobe-flashplugin ffmpeg vim cups-pdf gnome-utils thunderbird k3b p7zip-full gufw libdvdcss2 xdotool gthumb vlc shutter gtk-recordmydesktop openjdk-6-jre icedtea-plugin openjdk-7-jre grsync galternatives soundconverter winff asunder ogmrip thoggen k9copy google-talkplugin skype pidgin emesene mc htop traceroute secure-delete pdftk imagemagick rar unrar jhead what-utils ttf-linux-libertine ttf-isabella ttf-dejavu-extra ttf-inconsolata ttf-sil-gentium ttf-junicode ttf-rufscript ttf-radisnoir remmina remmina-plugin-gnome remmina-plugin-xdmcp remmina-plugin-nx freerdp-x11rem chmsee jxplorer mdbtools-gmdb nautilus-filename-repairer smbclient clamav clamav-freshclam clamtk libmotif4 curl network-manager-openconnect-gnome network-manager-openvpn-gnome network-manager-vpnc-gnome openconnect ttf-mscorefonts-installer acroread
    Note: You need to enable a few repositories before:
    #Adding medibuntu (all the next on one line)
    wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && apt-get --quiet update && apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && apt-get --quiet update

    #For Google-Talk-Plugin (2 lines)
    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

    sudo sh -c 'echo "deb http://dl.google.com/linux/talkplugin/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

     
  9. On Ubuntu with Unity? - Then these help:
    sudo apt-get install classicmenu-indicator lo-menubar unsettings myunity indicator-weather
     
  10. For the professional IT guys (continue on the commandline - again all one line):sudo apt-get install gparted dconf-tools gconf-editor gisomount bum vim-gnome gedit-plugins geany geany-plugins scite meld diffutils diffuse diffpdf gitg bless ghex build-essential xmlcopyeditor
     
  11. For the developers or server guys more might be highly relevant (on the commandline one line again):
    sudo apt-get install mysql-server mysql-client mysql-query-browser mysql-gui-tools-common mysql-admin pgadmin3 gsql
     
Enhanced usability:
Now - if you are on Unity or using a desktop environment with compiz - here are the tweaks to maximize usability:
  1. Start ccsm (e.g. Press ALT+F2 and type ccsm and press Enter). This is the compizconfig-settings-manager.
     
  2. Choose "Desktop Wall Plugin" under "Bindings" category and set "Move Left" to "Bottom Edge + Button 1" and "Move Right" to "Bottom Edge + Button 3. - That let you switch the desktop left and right easily with the mouse on the bottom edge.
     
  3. Still in "Desktop Wall Plugin" go to "Edge Flipping" and uncheck "Edge flip move" as well as "Edge Flip DND".
     
  4. Go back to main screen and select "Scale plugin". Go to "Bindings" and set the "Initiate Window picker" to "BottomRight" and/or "TopLeft".
     
  5. Go back and switch to "Application Switcher" plugin. Under "Bindings" choose for "Next Window" the TopEdge+Button 1.
     
  6. Set "Next Window (all Windows)" to "TopEdge+Button3".
Related posts: Locale configuration on Ubuntu, Firefox change default page format, OpenOffice and LibreOffice starts slow, Default paper size in Open Office, Normal.dot in OpenOffice or LibreOffice.

2012-04-10

A few Linux related videos

Here are a few easy and overview videos related to Linux that might increase your interest:

Ubuntu spot:

How Linux is built:

Linux vs Windows (in brief):

Linus Torvalds: Why Linux is not successful on the Desktop:


Ubuntu TV:

Ubuntu for Android Demo:


Linux is better than Windows:

Unity technology overview:


Microsoft Office vs OpenOffice / LibreOffice:

Linux does what Windows does not:

10 reasons Windows 8 will fail:

Related posts: Why Linux?, Going Linux, The Open Source idea, User lock down, The community, Popular Ubuntu desktop myths, Why companies do not use Linux on the desktop, Distribution choice.

2012-03-12

Efficient desktop environment

I consider myself as a power user. Every day (and sometimes also nights ;-) ) I make intensive use of computers to get things done. Of course I am not a farmer - I am working in IT business. - However, intensive use of computers is by far not limited to IT people.

Of course, for people spending a major part of their time in front of a computer lousy software has a bigger impact on efficiency. While many people can live with the fact to reinstall their Windows PC every 6 months, I get angry when some of my most often used features take two clicks to much as it could be.

There are two major kinds of computer users: Those who are using one or two applications most of the time and those who use a larger set of applications. To the first group people belong who will respond to the question "Which operating system are you using?" with something like "Word - Microsoft Word". ;-) - While for the first group the underlying OS is of minor relevance, for the latter group of people using a bunch of applications, the underlying operating system can be a critical factor.

I am an Ubuntu user and in the Ubuntu world the last months were full of discussions about the new desktop environment developed by Canonical, namely Unity. Many argued about bad user experience. I myself did play around with a lot of additional components to bump up my desktop. I tested several dock components like Cairo-Dock, AWN and others. Although I finally did not use any of those due to other reasons (stability, performance or simply no time to tweak it to fit my needs perfectly), I had a quite nice configuration with Gnome 2 and AWN on my Ubuntu 10.04 machine. Surprisingly that configuration looked quite similar to Unity.

Many of my peers switched to Linux Mint which is Ubuntu-based but is going for a different strategy regarding desktop look and feel. If you like Ubuntu, but don't like Unity, you can either use "classic" Gnome3 or install Cairo-Dock which then offers an option to go with Classic Gnome + Cairo Dock right on login (at least starting with 12.04 beta 1) and I even managed to create an AWN session with the help of TuxGarage. (The example there is outdated - you need to look at your current ubuntu.session file and take this as a sample or look below in the comments on that post).

However I found - after testing a while - that Unity fits best for me - at least with the least effort to put into getting it efficient. Important from my point of view is that with mouse OR keyboard everything can be reached quickly, that includes: Virtual desktops, Launchers, Open Application Windows, Menus, File system.

Out-of-the-box Unity offers a lot of cool hotkeys, besides ALT+TAB for switching between open applications you can use ALT+^ to switch between open windows/instances of the same application or after ALT+TAB you can collapse and expand application windows with the UP/DOWN keys. Pressing and releasing ALT offers the HUD menu (F10 still brings you to the normal menu). STRG+ALT+LEFT/RIGHT switches between virtual desktops. The only thing I immediately missed was a quick way to switch desktops with the mouse. My former way of configuring this was installing compizconfig-settings-manager and configuring desktop wall accordingly to switch to next and previous desktop doing a right-click on the left or right edge on the screen. That does not work any more when Unity is active on the left. I did not change that to now use left and right mouse button on the bottom edge and that works. In addition to that I reduced the icon size to 32 (can be done using compizconfig Unity plugin, installing MyUnity or also via commandline).

People who don't like Unity have different reasons but one might be the dock-style (which even Windows adopted later). The dock with launcher and window list in combination has one big advantage: The icons are always on the same position - no matter in what order you launch them. This is essential if you open a lot of applications during the day and end up in continously searching your app windows. Although I used to hate window grouping, Unity behaves differently whether you click on a different application launcher or not - which I found reduces necessary clicks.

These and a few other things I missed in all the other desktop environments - like e.g. configuring different times - not just one (I like to see New York or other time zones when clicking on the clock). Although other dock components have a lot more customizing options and features, I find Unity simpler and I found minor bugs in Cairo-Dock and AWN which resulted in my decision that I do not want to bother with finding my own fully customized X-Session and then probably experiencing more troubles. Would have tried longer if I would have found Unity unacceptable. But: After all my tests I still find Unity the best.

I definitely find that the time of a classic task bar (as known from Windows XP, KDE, XFCE or LXDE) is over - mostly because of the unsure icon position in a classical taskbar and the fact that the first thought always needed to be: "Did I already start this or not?" - depending on the answer a different icon had to be clicked. And even on larger screens it is annoying to waste screen space with additional panels (quickstart and windows). My attempts to get a combination of XFCE or LXDE with Cairo-Dock or AWN working well together failed because I either had some crashes, or too many panels remaining. BTW: XFCE comes with a bottom launcher which only is set to autohide by default.

There are still a few things I would like to see in Unity - like easier configuration of the unity launchers or including a classic Gnome menu launcher by default, but I think that Unity is on a good way - I got familiar with it quite fast and so new users will, I think. Of course many people find many things to tweak after a first installation of Ubuntu. I probably will come up with my one set of tweaks after the final Ubuntu 12.04 LTS came out...

Related posts: Popular Ubuntu desktop myths, Why companies do not use Linux on the desktop, Ubuntu 12.04 LTS Precise Pangolin optimized.

2011-09-04

Distribution choice

Lately I am testing a lot of different Linux distributions for the desktop.
There were some discussions about Unity (the new default desktop used in Ubuntu) and Gnome3 (the new Gnome default desktop) and that made me think and test other distributions.

Maybe I should point out the major differences seen in different flavors of Linux. These are the core points where they are different:
  • Base distribution from which it is derived from.
    Many distributions are based on others, only a few are doing everything from scratch in their own way. Some are based on Debian or Redhat for example. Somehow relevant is then also the company that stands behind the distribution as main contributor (if there is one particular company behind).
  • Package Management System - some use apt (debian) some yum (redhat) for example)
  • Default Desktop environment and window managers used (can be Gnome, KDE, XFCE, LXDE, Fluxbox etc etc).
  • Default packaged applications (the set of applications installed by default when installing the distribution).
  • Core objective (be it use as a Server, on the desktop, on routers or net storage systems, etc).
  • Hardware support. Although all Linux distributions share the same core parts (Kernel), different distributions are based on different versions of the kernel, apply different patches and some do add several drivers where no source code is available (while others do strictly include only open-source drivers). Because of these differences not all distributions support all sets of hardware. So it is very probable that this last point is the most important one.
  • Oh, and there are plenty of navigation bars that can be used - for example AWN, Cairo Dock, Docky and many, many more. Those are GUI elements for application launchers, taskbar management and things like that. Here you have to choose - if you are not satisfied with what your favorite distribution brings - mixing them is not a good idea...
Here is an overview of relevant components mentioned above:
Overwhelmed?
For those who are now overwhelmed with options and cannot decide, remember that you can install either all desktop environments together on one machine and decide what you want to use at each login! You can either use Gnome for example but install and run applications written for KDE either while logged in using Gnome Desktop. You can run a mix of Gnome or KDE etc applications, whatever desktop environment you are currently using. So there is no exclusive OR in desktop environment or particular applications. The only thing that is not interchangeable (at least not so easy) is just the package management system - which is usually of secondary importance for the normal user.

Regarding hardware choice there are two options:
  • Inform yourself, what hardware is supported by your favorite Linux distribution and buy those - or
  • Go to any shop of your choice and just tell them that you want a machine that is compatible with "<Put Linux distribution of your choice>" and if not you will throw them their piece back on the counter.
I use a mix of these strategies. :]

For choosing a distribution, my advice is:
  1. Look at the screen shots of different distributions. Those you find horrible to look at in general, are probably the ones you would like less. That said, often it is sufficient to switch the theme to get a much more friendlier desktop.
  2. Watch demo videos of different desktop environments on youtube (or other channels).
  3. Try them. Most Linux distributions offer Live-CDs for download. That means: You download a CD image, burn it on CD and then boot the computer with that CD that offers to start Linux without changing your current installation - everything is run from the CD. That is of course slower as if it would run from the hard disk, but doesn't change anything on your current machine.
  4. Search the repositories (software center or however it is called in the distribution) for applications you might want to try. Don't search for applications by typing "Microsoft Word" - no - try "word processor" or instead of "Excel" or "Photoshop" try "Spreadsheet" and "photo editor". The idea is to use search keywords that describe what you want to do. The reason for this is: For your favorite photo editor you used on Windows might not exist a Linux-version. But there might be plenty of other applications doing the same stuff on Linux.

Here are the distributions I tested since 2005 (skipping all those I only took a very short look at):
  • Fedora (with which I started in about 2005)
  • Ubuntu (my current primary OS in the office and at home in version 10.04 with latest updates). I also tested other flavors like Kubuntu (Ubuntu with KDE), Xubuntu (Ubuntu with XFCE), Lubuntu (Ubuntu with LXDE).
  • Mint (including different flavors)
  • Puppy Linux
  • Debian (Stable and Testing)
  • Zorin OS
Maybe you are missing OpenSUSE here - as it is also a widely used distribution. I skipped it because from all major distributions I know, SUSE is the one that works closer with Microsoft. Because of the business conduct of Microsoft I want to be as far from them as possible and that's why I didn't either test OpenSUSE. Apart from that I heard many complaints about it.

Although I am pretty convinced of the stability of a Debian server, on the desktop even the testing version contains outdated program versions. (On my last tests the second website I visited complained about outdated browser ;-) ).

These are currently my favorite distributions:
  1. Ubuntu (of course, as it is my primary OS, based on Debian)
  2. Mint (based on Ubuntu)
  3. Zorin OS (also based on Ubuntu)
     -
    it quite nicely implements a very Windows 7 like desktop environment. Those who like the Windows 7 taskbar, will like the Zorin OS. Of course it brings a cleaner menu and a package manager - things you don't get on Windows 7 ;-) .
All those offer the install of different desktop environments, so you can hop desktop environment for each single logon. You can find them searching for kubuntu-desktop, xubuntu-desktop or lubuntu-desktop in synaptic package manager.

Remember that depending on your type of job and the needs it brings - and depending on personal flavors you might find a different distribution or desktop environment to fit best!

Related posts: Popular Ubuntu myths, Why I switched to Ubuntu, Going Linux, The individual desktop.

2011-05-24

OpenOffice and LibreOffice starts slow

Sometimes there can be even annoying problems with Open Source software.

A few days ago I got annoyed by OpenOffice starting slow. Then I decided to switch to LibreOffice and first thought it helped. Then a day after it was slow again.

Finally I found out that it starts slow whenever I have the VPN connection open (using SonicWall NetExtender).

After searching the internet a lot without finding anything that helped I landed at LinuxQuestions at this thread: http://www.linuxquestions.org/questions/linux-software-2/double-clicking-on-open-office-files-leads-to-very-slow-opening-808048/

Running
sudo tcpdump -nnl -i any -s 1536 dst port 53

on the commandline discovered that LibreOffice was searching for .(none) via DNS and the VPN inserts it's DNS servers right in front of every other DNS entry in /etc/resolv.conf - grmpf!

So similar to what is mentioned in the thread above, I had to add
127.0.0.1    myhostname.(none)

to the file /etc/hosts - done. This and some other small, but annoying changes in reality need to be done at each install of a new system. - Of course, there are even more of those annoyances on Windows, but it seems you can't get rid completely of those... :-(

Related posts: Ubuntu 10.04 & docking station part 1 + part 2, Locale configuration on Ubuntu, Firefox change default page format.

2011-03-02

Popular Ubuntu desktop myths

Some opinions around Ubuntu on the desktop - or Linux in general seem to be never dying although they should be really outdated. A few are:
  1. Linux/Ubuntu is only for PC freaks.
    This is simply not true. Ubuntu/Linux is at least easy to use as Windows. For the normal user it is less painful for sure: You are faster up and running (because after installation also many apps are already there), you don't need to search your shitty licence code you probably already thrown away accidently a year ago, you don't get penty annoying questions when first starting your browser, you can install easily whatever language you need for whatever family member or friend who might visit you and you want to share the computer with, you can buy Ubuntu already installed on a USB stick that you can carry around and use it on whatever computer you go, you can easily use any file as a template and many, many more.
  2. Installation of applications is difficult (need to be compiled).
    There are distributions that compile everything from source, but even there you don't need to do it on your own. Anyway, most distributions don't require compiling things on your own (however, this is always an option you have, even if mostly not recommended). - Installation of software is usually simpler than on Windows: You start a program (menu entry) which contains a list of available applications, you can search, scroll through the list, just tick the checkbox in front of the application(s) you like to install and click "Apply". Download and installation done automatically then. For uninstall - guess what: Just uncheck and apply again. If you are funny, you can search the internet for a more up-to-date installation package or other application not in the repositories and install it by double-clicking it after download just as you do it on Windows. What is so difficult then? Even a trained monkey can do it. ;-)
  3. Everything must be done on the command line.
    Most things nowadays can be done through a graphical user interface also. One reason why much is done on the commandline: It is far easier in a forum or blog post to respond to a question with a few commands that just need to be pasted to a terminal window than it is to explain it with plenty of clicks and menu items (with the ribbons situation is even worse). For the person that receives the help it is also easier. And other than on Windows, everything you can do on the graphical environment you can also do on the commandline. That does not mean you have to do it that way.
  4. Linux looks old-fashioned on the desktop.
    Look yourself and decide: http://www.ubuntu.com/desktop/why-use-ubuntu, http://www.kde.org/screenshots/, http://www.xfce.org/about/screenshots, http://lxde.org/image/tid/1, http://www.linuxmint.com/screenshots.php, http://www.gnome3.org/, http://www.enlightenment.org, - All this can be used in Ubuntu - you can choose!
    Oh, you want Mac-style toolbar on the bottom - or Windows 7 like - look here for example: http://www.omgubuntu.co.uk/2010/04/you-choose-the-best-dock-for-ubuntu-poll/ - again: You choose, what you find efficient and cool!
    What is true, that some older applications are looking ugly because they use old interfaces (sometimes when searching in the repository and try new apps I happen to get such an old-style thingy), but the major part looks very nice.
  5. There are so many variants (of Ubuntu itself and even more if you look at other Linux distributions) so there will be never be a standard.
    The core for Linux is the same for all and the most differences are not in the system but just in the desktop environment or GUI presentation. But this is for your freedom and you can anyway start multiple applications using different GUI frameworks. Keep in mind that all people like to work differently. Everybody has his own preferred way of doing things. Hence should be you computer: It should support you by doing the work they way you like!
  6. Ubuntu is not compatible with Windows.
    This can't be said so generally. It is applications that are not compatible, file formats or protocols and you have to look at those separately. For example: Many widely used file formats (as JPG, PNG, TIFF, PDF, RTF, MP3, AVI and many more) can be handled without problems on Ubuntu. Even the DOC, XLS, PPT Formats can be handled quite good in the meantime. It is Microsoft that continously invents new formats and changes existing formats (see the latest DOCX which is different in MS Office 2007 and 2010, so that you need to save it in a compatible form from within 2010 if you want it to be displayed in the same manner with 2007 - .docx is not .docx!). Ubuntu better supports more open standards than Windows does (e.g. look at the MIME-Format - this is the format used to send e-mails over the internet - and look what you get from Outlook)!
  7. Ubuntu is developed only by students in their spare time.
    Canonical is the company behind Ubuntu, but Ubuntu is based on Debian (look in particular at http://www.debian.org/partners/ for example) and that all is Linux. And many big companies are contributing to Linux! So, if this ever was true, it is not any more since quite a while (see http://www.techrepublic.com/article/linux-standard-gains-big-name-backers/5365462 for example).
  8. Ubuntu is free and hence must be very buggy.
    Wherever software is developed, bugs are introduced. There are not more or less bugs in Ubuntu than on Windows - IMHO. Windows is used by more people and companies and hence there is a higher probability that bugs get found but for Ubuntu it is extremely easy to get involved, report bugs and get in touch with the developers and hence get the bugs fixed. So I think we are pretty at the same level here and there although I think, Ubuntu is more stable (of course ;-) ). And why it is free is because of the Open Source idea where people pay for work being done (new features, bugfixes,...) and not for ... (yes for what?). See "The Open Source idea" for details.
These are just the first examples that come to my mind.

Related posts: Document file format, The community, Going Linux, The Open Source idea, Why companies do not use Linux on the desktop, Distribution choice, Outlook Calendar Meetings, The individual desktop, Efficient desktop environment, A few Linux related videos.

2010-12-16

Ubuntu 10.04 & docking station part 2

As you might already know, I am using my Ubuntu laptop also with a docking station and external monitor. When I am in the office I dock it in leaving it closed and use only the external monitor (that is by the way a behaviour I can see at several customers also - having no fixed machine any more and dock in the closed notebook).

I had an issue I already described earlier - see part 1: Ubuntu 10.04 with docking station.

Since then I had several issues of having TV1 noticed by accident even when doing nothing or same with my internal laptop screen (LVDS1) when I am working with the external monitor only. The annoying things are three when this happens:
  • I can accidently move the mouse out of the window taking a while to bring it back.
  • In my compiz I have defined that right-clicking on the border of the screen switches to the next desktop. That does not work any more as the border is not reached when I move the moust to the border of the visible screen.
  • Windows may be displayed on the invisible part of the screen so I have them in the task bar but don't see them on screen.

Now I am pretty sure that it is the screensaver that is the culprit here. Disabling the screensaver never brought the issue back again. Only drawback: When I leave the machine I manually have to lock the screen pressing CTRL+ALT+L.

Same thing of second monitor accidently recognized happened in about 75 % when starting TeamViewer (which is my favorite remote assistence tool). Today I finally filed a bug and guess what - problem already solved (thanks to Daniel Stiefelmaier at TeamViewer support)!
Dear Martin,

I found a possible solution to that. Please open a console and run
WINEDEBUG=xrandr teamviewer&
Then take a look at the log:
cat ~/.teamviewer/6/winelog
You should see some xrandr lines. Then run
/opt/teamviewer/teamviewer/6/bin/.regedit
Create the key HKEY_CURRENT_USER\Software\Wine\X11 Driver
there, create a String "UseXRandR" and set its value to "N".
Close the registry, and repeat the other commands:
WINEDEBUG=xrandr teamviewer&
cat ~/.teamviewer/6/winelog
Now, there should be no xrandr lines.
Yeah, that did it!

Related posts: Ubuntu 10.04 with docking station (part 1), Ubuntu 10.04 experiences, OpenOffice and LibreOffice starts slow.

2010-12-10

The community

In the last months I have been a participant in several communities, forums and the like. And I also have left some. I want to share some experiences:
  1. The community behind a software product (or any other thing) is a crucial factor for success of the product and motivation of the members.
  2. The spirit of the community is important. For the Ubuntu community (to give an example) there is the code of conduct to which most members admit to. It is the philosophy behind the group, a big picture that holds the people together.
  3. Nobody knows everything. With the contribution and help of each single community member the community gets smart.
  4. In good communities, members focus on the matter, not on blaming other persons or other products - their main target is to solve problems. Of course I like that. :-)
  5. In good communities it is easy to get involved and it is easy to be integrated (if you handle the members with respect).
  6. In good communities you are respected and your opinion is valued.
  7. There is a mass contribution effect in larger communities: While a company could hardly finance project teams with more than 30 or so members, in a big community there are many people adding value - even if it is a small contribution for each person, those contributions some up to enormous results.
There are two communities that I am proud to be in - the Ubuntu community and the Java community. I do not only participate in forum posts etc - I am also attending local events. Those events are usually very interesting from the technical point of view and also from the way community members deal with each other.

Don't forget, that no product and no system can be successful without the people behind it! - It's all about the people!

Related posts: The Open Source idea, The Open Source movement, Paying for free and Open Source, User lock down, Going Linux, The future of Java, Popular Ubuntu desktop myths.

2010-11-04

Self-Healing Linux

Until yesterday I only occassionally read about it, but yesterday I experienced my Ubuntu workstation self-healing from freeze.

I did not take care about how many applications were running and as doing a lot of things in parallel that all take quite a while (downloads in background, file copy operations and installations within virtual machines) I completely forgot about how many virtual machines were started. I was about to start another one when everything started to get really slow. I have 4 GB memory and a small swap partition (because during normal work I hardly get the memory of my Ubuntu full).

The memory at this time really got filled up completely and everything got veeery slow. I wasn't either able to switch windows. I was able to switch to the text console which also was very slow.

I wanted to login and kill a few tasks when I got messages broadcasted to my text console saying that the memory was exhausted. Shortly afterwards I got messages that the system identified Firefox and Thunderbird doing nothing and they were closed (maybe because just consuming memory at this moment). And finally it told that the last VirtualBox machine was consuming a lot of system resources and - was killed.

Flup, flup, everything was fine again. - And hadn't either time to do it manually. And it was doing exactly what I would have done manually - killing the last started virtual machine and closing the applications that were doing nothing (downloads were already finished).

That is simply awesome!

2010-10-18

Locale configuration on Ubuntu

OK, first I was annoyed that changing the date format to ISO (yyyy-mm-dd) is not so easy on Ubuntu as it was on Windows. Yes, but - as usual in the Linux world - you are much more flexible on Ubuntu.

I am a special case: I want my menus and environment in english, I am located in Austria (so I want currency in Euro, thousands separator is dot and not comma, ...) but the date format I like to have in ISO format (and not the german default dd.mm.yyyy) because I find the ISO format simple the most practical (well, I am working in IT and the ISO format is the best to sort if you have just plain text). Under Windows I had a german OS (because I needed to support mostly users with german version) and changed the date format in the international settings.

Situation under Ubuntu is different: You install an english base system and install whatever languages you like through:
  1. "System - Administration - Language Support"
  2. Click "Install/Remove languages..."
  3. Choose the language(s) you want to support - every user can choose the language he/she likes at login (last used language is remembered as preselection).
  4. In the "Language for menus and windows" list you can drag and drop languages to specify priorities. The language the user chooses at login is taken first of course, but usually the language dragged to first place here is the default for new users. Attention: When installing a new language, it is usually put on top and somehow the system tries now logging in all existing users with that language (if they don't change it at login) - so doing changes here overwrites the last remembered language for the users. This behavior might be desired or not...
  5. In the text tab you can change the country you are in (this is similar to the Windows international settings - but you can't override parts of the country settings here.
So first, I found that I have less options than under Windows - until I discovered these options that you can set in your /etc/default/locale (a plain text file):
 LANG="en_US.UTF-8"  
 LC_CTYPE="en_US.UTF-8"  
 LC_NUMERIC="en_US.UTF-8"  
 LC_TIME="en_US.UTF-8"  
 LC_COLLATE="en_US.UTF-8"  
 LC_MONETARY="en_US.UTF-8"  
 LC_MESSAGES="en_US.UTF-8"  
 LC_PAPER="en_US.UTF-8"  
 LC_NAME="en_US.UTF-8"  
 LC_ADDRESS="en_US.UTF-8"  
 LC_TELEPHONE="en_US.UTF-8"  
 LC_MEASUREMENT="en_US.UTF-8"  
 LC_IDENTIFICATION="en_US.UTF-8"  
 LC_ALL=  
So you can really define the behavior of plenty of formattings!
The content of my etc/default/locale is now (LANG and LANGUAGE was set when I changed settings in the GUI, LC_DATE and LC_TIME I have added manually:
 LANG="de_DE.utf8"  
 LANGUAGE="en"  
 LC_DATE="en_DK.utf8"  
 LC_TIME="en_DK.utf8"  

I have added LC_DATE myself (just a wild guess because it is not mentioned in the list above - which I found on the internet), for Thunderbird for example LC_TIME was sufficient.

Probably this obsoletes post "Firefox change default page format" (but did not check).

Related posts: Firefox change default page format, OpenOffice and LibreOffice starts slow, Default paper size in Open Office, Normal.dot in OpenOffice or LibreOffice.

    2010-09-26

    Install NetBeans on Ubuntu 10.04

    Why should one do a description of installing NetBeans on Ubuntu - it's in the repositories and just a few clicks?

    The reason is: Installing it through the repositories you will get problems later when trying to upgrade NetBeans with the builtin-update tool. Apart from this I prefer to download the full package from http://netbeans.org/downloads/index.html and deactivating the modules I do not need - at the moment. I always make sure that the sun (or now Oracle) JDK is installed (there were problems in the past with OpenJDK - and although they should be solved I still go with the Sun/Oracle one.

    Preparations:
    • You can install the Sun/Oracle JDK through the repositories or do the manual install.
    • To make sure, the correct Java is used, install galternatives (then available through Applications-System Tools-Alternatives Configurator) and then go through each item in the list on the left. There are quite many Java related tools that - after installing the Sun/Oracle JDK now offer that one as second alternative. For all the Java related tools select the new alternative from Sun/Oracle JDK.
    • If you manually installed new JDKs - e.g. after an update has been released, you might have to change the symlink accordingly at /usr/lib/jvm/java-6-sun using the ln command, eg:
      cd /usr/lib/jvm
      sudo ln -s java-6-sun-1.6.0.20 java-6-sun

    So here are my steps for the NetBeans installation:
    1. I create a folder under opt for NetBeans:
      sudo mkdir /opt/netbeans
      I don't use the profile folder for installation because this reminds me too much of Windows. In the profile folder there should only go data and I backup this folder more often than other ones. It does not make sense backup the programs all the time.
       
    2. Then I set the permissions for the normal user:
      sudo chgrp theuser /opt/netbeans
      sudo chmod ug+rwx /opt/netbeans
      If you want to have more users work with NetBeans then replace theuser with a group that all the users are member of - however this solution is only if you trust those users regarding updating and activating plugins etc. Otherwise install as a user with sudo permissions and do not set the permissions above to prevent other users from updating.
       
    3. Then I install all NetBeans components (running the installer as normal user) in that folder (/opt/netbeans). There will be usually a subfolder for netbeans (including version in the folder name) and also for Tomcat and Glassfish.
       
    4. I also extract the javadoc downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html into /opt/netbeans as jdk-6-docs or so. In former times I put it under the jdk folder but as I upgrade the JDK itself more often than the documentation this always needed additional work to move the doc to the new folder or change links when they got broken after deleting older javadoc.
       
    5. To make the javadoc available in NetBeans launch NetBeans and go to Tools-Java Platforms, switch to the javadoc tab and add the javadoc root folder - in my case /opt/netbeans/jdk-6-docs.
       
    6. When I add external libraries (Tools-Libraries) I also save/extract them previously to another folder - not within my profile (for reasons I mentioned earlier) - of course an option would be /opt/libs or so - I have a completely different separate folder for shared data and libraries that I backup from time to time (less often than profile data).
    Related posts: The IDE and the libraries, The programming language.

    2010-09-10

    Shell scripting your desktop windows

    In Java my limits are often what is offered in every OS - and what is inside the JVM.

    One thing, I often needed in the past under Windows is to get the title (or other information) of the active window. I was using Windows API to get the information needed. Under Linux/Ubuntu things are different - and more complicated due to different desktop environments, I thought. And how to access those APIs with Java?

    Well, it turned out, that I am completely wrong and once again was trapped in my old habits from Windows.

    Linux offers commandline tools - not only to get window information - no, also to manipulate windows, move them to different desktop etc. As I could start an application on a different machine and showing the window on my machine, I can either see the machine name in window lists. A commandline program can be easily used from within Java and output can be retrieved easily. Awesome!

    It again turns out, that Microsoft Windows is totally poor in commandline tools. However, I could implement a similar small exe that gets me the active window title through API on windows and does console output that can be retrieved by a Java application or can be used in batch files.

    If you are a Linux user, have a look at the following commands:
    • wmctrl
    • xprop
    • xwininfo
    All these tools can be used even from within shell scripts - awesome!

    With xprop -root you get exhaustive information about windows.
    Using xprop -root | grep _NET_ACTIVE_WINDOW\(WINDOW\) you get the active window handle. You can then use the address in wmctrl -l | grep theaddress. The only quirks is that in wmctrl the address might have an additional 0 after 0x so you should search for the part after 0x only in the output of wmctrl.

    2010-09-04

    The Dell Latitude 2110 and Ubuntu 10.04.1

    Despite the rumors that Dell does not offer Ubuntu any more, I was able to get the Dell Latitude 2110 with Ubuntu (netbook remix) preinstalled - so (again) no Microsoft tax paid. ;-)

    I must admit, that they first did not want to give me the full featured thing (the optional Ubuntu version comes without webcam), but I insisted and got the thing with webcam and Ubuntu preinstalled. In reality they could have shipped without OS, the first thing anyway was putting the latest Ubuntu 10.04.1 LTS Lucid Lynx on it (because it came with 9.10 which worked out-of-the-box on delivery).

    Installation of 10.04.1 needed a few quirks: After I installed from an USB stick, I had to add the following additional repositories to get the WLAN to work:
    • deb file:///media/yourusbsticksname lucid main
    • deb file:///media/yourusbsticksname lucid restricted
    After that I could go to System->Administration->Hardware Drivers and searching it found the driver for the WLAN. I was fearing more trouble with the WLAN as this is quite usual (not only for Linux) in the netbook world to have troubles with the WLAN (as far as I have read in forums). But just adding the USB-stick as repository is not much trouble (although it took me a while to find out ;-) ).

    Webcam worked out-of-the-box (I was assuming to get problems with that because missing in the Ubuntu variant by default, but as working, I think there are just political reasons that they omit the web cam for the Ubuntu variant by default).

    Anyway, what did not work out-of-the-box was the built-in microphone: Again, I had to add another repository and install a single patch from there (see Bug #563215 and below):
    • ppa:ubuntu-audio-dev

    Then install this package:
    sudo apt-get install linux-alsa-driver-modules-$(uname -r)
    In addition to that I had to go into terminal window and run "alsamixer" - it shows more volume nobs that you might have known or guessed. I had to push up two from the input section. I guess Skype did that after installation as by default it sets the option allowing the program to manipulate audio settings (I already had this several times on other Ubuntu installations that Skype modified the mixer settings messing them up).

    Finally I had to plug in a headset just for a few seconds - then also the external microphone worked. Strangely it did not work until I plugged in the headset's mic in once. Since then it works. But I have to say that speakers and microphone are not top-level. The speakers could be louder and mic could be better also - so in noise environments (I have two little children around ;-) ) you should use a headset.

    My two mobile internet sticks work too - just not with autoconnect (it seems both try to connect - same happens on my main Lucid notebook also so guess it is a general issue introduced a short while ago - having configured just one works fine).

    The netbook feels very well made. The keyboard is big enough to be used without hassle and it feels robust (as usually for Dell Latitude keyboards). I have ordered the bigger battery which adds a little to weight and size of course. The bigger battery extends versus bottom so it makes the keyboard getting a slightly more diagonal position so now the netbook does not lie flat on the table. This way it is more ergonomic IMHO. Time estimated with fully charged battery pack is more than 6 hours. The only thing: It was harder to find a matching case with the extended battery. The normal small bags for 10,1" notebooks were fitting only very tight which was a hassle. Finally I bought a larger bag where now also fit more other things.

    Related posts: Ubuntu compatible hardware, About Dell, The hardware, The mobile device, Going Linux, The sad thing about Linux..., Use cases for netbooks.

      Ubuntu compatible hardware

      In the last months I faced several different hardware environments and experienced several issues when installing Ubuntu. For example: Since 2005 I always recommended NVidia and told people to better stay away from ATI. But lately I had problems with a machine with NVidia and on the other hand heard from a friend about an Ubuntu machine with ATI running flawlessly. So I started to fear for issues no matter what hardware I recommend.

      I talked with several people and sent out emails and the result is a collection of links that help a lot. First of all - what I did not know - there is an Ubuntu certification for hardware - and there is more:

      And more hardware help is available here:
      Related posts: The hardware, Why Linux?, Going Linux, The sad thing about Linux, About Dell, Ubuntu 10.04 experiences, The Dell Latitude 2110 and Ubuntu 10.04.1, Use cases for netbooks, The truth about hardware support.

      2010-08-05

      Screencast recording on Ubuntu 10.04 (and 9.10)

      Creating screencasts is not only modern - often a short 2-minute video can be more helpful as a 2 page documentation.

      There are two major screencast recording tools available in Ubuntu. That said, I always had troubles with them because I do want sometimes different behaviour or I had issues with the sound. I want to give a very short overview to make it more easy for you to choose the right tool in the right moment and to get the output you want:
      • gtk-recordmydesktop
        +
        Very easy interface
        + Works out-of-the-box
        - Option to follow mouse available and keeps the mouse always in the center of the frame (I think, this disturbs, when watching the video).
        - Cannot export/save as MPEG-4 or AVI or anything else - just .ogv (the open format)
         
      • XVidCap
        + Can produce different formats (MPEG-4 is the default, but you can switch to .ogv also)
        + Option to follow mouse available and keeps the frame steady until you move the mouse near the frame border (this way it is more easy for the user to follow the video instructions - you should only make sure that the border of the video is not to near to your primary working area otherwise you get a similar effect as with gtk-recordmydesktop)
        - The GUI is slightly less intuitive
        - Using the package from the Ubuntu 9.10 or 10.04 repository does not bring you sound support (at least not when trying to create MPEG-4). You have to install the .deb package manually by downloading it from sourceforge (current version is yet 1.1.7 - although the same version seems to be in the repository, that is a different one and does not work - strange, but fact).

      I basically use both applications. When I produce local screencasts for end-users that I just save on their local machine for later reference I use gtk-recordmydesktop and just leave it as ogv. That used to work even when Skype + TeamViewer is running and I did the recording remotely. It even recorded my sound coming through Skype! When I want to upload a video to YouTube (or vimeo and others), XVidCap is better because it immediately produces MPEG-4 which fits better for YouTube and similar services (I tried uploading an ogv file from gtk-recordmydesktop to YouTube which failed to replay correctly - indeed it is not mentioned on the appropriate help page).

      Especially for the case(s) you prefer gtk-recordmydesktop you might need to convert the created video to the finally desired format. I have seen many ways (reading blog posts and watching screencasts), e.g. using WinFF, VLC Media Player and using Devede. Using Devede was the only one that worked for me (see http://vodpod.com/watch/3665200-converting-your-ogv-files-to-mpeg4-).

      In any case you should have the ubuntu-restricted-extras installed (using synaptic package manager or sudo apt-get install ubuntu-restricted-extras) for doing video or audio stuff. I would also install ffmpeg.

      I also usually have to put the sound input to a high level otherwise when replayed on several machines (e.g. notebooks or external monitors with poor speaker power), even putting the volume to highest level brought only low level sound.

      Final note: It might be necessary to quit Skype (if you have it running) to avoid sound or video juddering.

      Related post: Ubuntu 10.04 with docking station.

      2010-08-02

      Ubuntu 10.04 with docking station

      After installing Ubuntu 10.04 I lost proper dual monitor handling for my use case. Basically I want to use my notebook on the road as is and in the office I want to put it into the docking station while having the lid always closed.

      Ubuntu 10.04 Lucid Lynx does not handle this properly any more. I found out that also in 9.10 it was probably pure luck for me because I upgraded from 9.04 and had some fixed entries in the xorg.conf.

      But anyway, the xorg.conf file is legacy and there is now gdm with xrandr.

      I found out that many have the same use case as I have and have problems. Some solutions are particular to NVidia cards, but I have an Intel. Thanks to Nylex in the Linuxquestions-Forum + Ubuntu XOrg documentation, I could find the solution:

      I had to put this into the file /etc/gdm/Init/Default before the line starting with /sbin/initctl (why the TV1 is there also look below in update 3):
      xrandr | grep "HDMI1 connected "
      # 0 is returned on success
      if [ $? -eq 0 ]; then
      xrandr --output HDMI1 --mode 1680x1050 --rate 60 --primary --output LVDS1 --off --output TV1 --off --output VGA1 --off --output HDMI2 --off --output DP1 --off --output DP1 --off --output DP2 --off --output DP3 --off
      else
      xrandr --current | grep "VGA1 connected "
      if [ $? -eq 0 ]; then
      xrandr --output VGA1 --mode 1680x1050 --rate 60 --primary --output LVDS1 --off --output TV1 --off --output HDMI1 --off --output HDMI2 --off --output DP1 --off --output DP1 --off --output DP2 --off --output DP3 --off
      else
      xrandr --current | grep "TV1 connected "
      if [ $? -eq 0 ]; then
      xrandr --output LVDS1 --mode 1440x900 --rate 60 --primary --output HDMI1 --off --output TV1 --off --output VGA1 --off --output HDMI2 --off --output DP1 --off --output DP1 --off --output DP2 --off --output DP3 --off
      fi
      fi
      fi

      What it does is: Using xrandr it probes whether an external monitor is attached (whether HDMI or VGA) and if so it turns off the LCD display of the laptop so it is not used. You need to adapt the resolution to fit your needs.

      [Update]
      I had some cases when (maybe because of timing at startup) it did not work (sometimes it worked after gdm service restart then but not always) added --preferred and --primary to the xrandr call above and I added the script below to System->Preferences->Startup applications:
      #!/bin/sh
      xrandr --current | grep "HDMI1 connected "
      # 0 is returned on success
      if [ $? -eq 0 ]; then
      sleep 5s
      xrandr --output HDMI1 --mode 1680x1050 --rate 60 --primary --output LVDS1 --off --output TV1 --off --output VGA1 --off --output HDMI2 --off --output DP1 --off --output DP1 --off --output DP2 --off --output DP3 --off
      else
      xrandr --current | grep "VGA1 connected "
      if [ $? -eq 0 ]; then
      sleep 5s
      xrandr --output VGA1 --mode 1680x1050 --rate 60 --primary --output LVDS1 --off --output TV1 --off --output HDMI1 --off --output HDMI2 --off --output DP1 --off --output DP1 --off --output DP2 --off --output DP3 --off
      else
      xrandr --current | grep "TV1 connected "
      if [ $? -eq 0 ]; then
      sleep 5s
      xrandr --output LVDS1 --mode 1440x900 --rate 60 --primary --output HDMI1 --off --output TV1 --off --output VGA1 --off --output HDMI2 --off --output DP1 --off --output DP1 --off --output DP2 --off --output DP3 --off
      fi
      fi
      fi


      [Update 2]:
      It still did not work 100%. Sometimes when I moved the mouse outside the desktop it was gone so I found the laptop monitor being still active (so I could move windows over there and they were gone). I could immediately notice that after login when the workspace icons on the bottom right were displayed with increased width. It helped, explicitly turning of LVDS1 display (the laptop screen) in the script (see appropriate options in the updated script above).
      [Rest of update 2 removed because of update 3]

      [Update 3]:
      It turned out that (occasionally) on boot it recognized another monitor to be active, after first being the LVDS1 it happened also being the TV1 (occassionally) - and I don't know why because I never attached a TV to it. Anyway, I have added the options to turn that off explicitly also to the scripts (see updated gdm default script portion and startup script above).

      Apart from that sometimes occassionally a re-evaluation of available displays might be triggered by an application (e.g. opening and closing the laptop lid or manually calling xrandr without parameters or starting arandr or other applications when started the first time). Such a re-evaluation can also occur right after graphical login and then your initial gdm xrandr modifications are forgotten. Therefore it helps having that script at hand (I have it in /opt) and added to the gnome menu under "Other" to run it when necessary on demand.

      Apparently also a timing issue remained (I assume that because of the fact, that the startup applications are started in no particular order and all asynchroneously). However, adding a line with "sleep 5s" to the script (only to the additional script and not to the gdm init!!!) helped. I currently use a 10 seconds delay (subject to change maybe) but in your case less might be sufficient or more might be required (for me 5 seconds was not enough to make it work each boot).

      For you it might be necessary to switch additional displays explicitely off (as I did with TV1 for example).

      Oh, and BTW:
      In System->Preferences->Power Management make sure that lid closed action is "Blank Screen". I made a lot of tests with setting to nothing (only possible via gconftool-2) but after all maybe the above setting is the better one.

      If in your case the resolution(s) are not set correctly you can do this here in this script also. Use man xrandr or look at https://wiki.ubuntu.com/X/Config/Resolution#Adding%20undetected%20resolutions for more information on the appropriate xrandr commands.
      I noticed some flickering and login screen displayed in lower resolution, so I added --mode 1680x1050 to the xrandr call in both cases (in both scripts) which is the resolution of my external monitor.

      Honestly, using this script, I feel better than previously on Ubuntu 9.04 or 9.10 where I got it to work by accident after moving around monitors in the config (although in reality they were positioned the other way round). As I found out today, I wasn't either the only one with that experience (see http://ubuntuforums.org/showthread.php?t=1110407) although I am used to be the non-standard user. - With my use case of having the lid closed all the time when in the docking station I am by far not alone as I noticed and some either downgraded to 9.10 because they did not get it to work.

      Many, many thanks again to Nylex and the Ubuntu documentation team!

      Related links:
      Related posts: Ubuntu 10.04 with docking station part 2, Firefox change default page format, Ubuntu 10.04 Experiences, OpenOffice and LibreOffice starts slow.

      2010-05-26

      Ubuntu 10.04 Experiences

      More than a month passed since I posted the last time and the reason was that I collected a lot of experience participating with testing of the Ubuntu 10.04 Lucid Lynx Long Term Support version (and I also have been ill in the meantime). After the release at the end of April Ubuntu was a lot in the news. At that time I already had made about 4 or 5 test installations. Since the release I installed Ubuntu on several different hardware environments - older and very new. So just about a month after the release I already done plenty installations and tested the new versions of several applications.

      I am very well known for finding bugs - and this was one of the reasons why I started participating with testing. Other reasons were:
      • I get a lot of free (but priceless) support from the Linux/Ubuntu community in the forums and at Launchpad so wanted to give something back.

      • After upgrading from 9.04 to 9.10 I experienced several issues with mobile Internet USB sticks. This seems to be a difficult topic because there are many different versions and types of modems out there in the wild, providers and manufacturers only support Windows officially and there are local differences (it looks like different countries and phone/mobile providers sometimes have different variants of firmware). Therefore I found it important to help out. So I either invested in a second different modem model and different provider.

      • In former times on my home PC I switched to every new Fedora version (then stopped because simply too much work, upgrading every 6 months). When I switched for my work notebook to Ubuntu I also upgraded as soon as the next version was available - it worked quite flawless but again some work involved. Therefore I decided with Ubuntu 10.04 to stick to LTS versions only which means: Only update each 2 or 3 years according to Ubuntu release cycles. And so it became quite important for me to get a stable version.

      To give a short review:
      1. Already since Ubuntu 9.04 Jaunty Jackalope Ubuntu has everything on the desktop that I need for my daily work and for what I am doing at home even older versions did it. And basically, the OS itself was not the major component where I was waiting for new features, it was the applications. For example, the last thing I waited for, was the TeamViewer getting a Linux version. That is clearly out of Ubuntu scope because the TeamViewer isn't either in the repositories.

      2. The biggest and best new feature in my opinion: Ubuntu only comes with Open Source drivers (this is a need according to the licence under which Ubuntu is released) but after the first restart it immediately recognizes if there is a (better) but proprietary driver for some of your hardware components available out there and offers you a one-click download+installation of those. Awesome!
        Problem: I had one laptop where the WLAN built-in card wasn't working out-of-the-box. So I had to attach it to real network to download the alternate driver. Once installed it worked well. I had two machines with NVidia card where the one-click installation brought the better driver with all fancy desktop effects. I remember this was a little more work in the past (even if not so much). Another issue I had (until applying all recent updates) was cracking noise of the speaker when shutting down. The tipping point (or question) here is: Why are vendors using such shitty hardware that does not offer open source drivers or behave in a non-usual manner (the cracking noise)? For example HP is very good in printers but horrible in notebooks - especially when it comes to Linux support. The webcam on the other hand worked out-of-the-box on the HP while I had an issue with another external webcam although just not working in Skype (while that was the main application that needed it) which was fixable by simply changing the way skype is started.

      3. Current status with mobile internet: If you own one of the supported/tested/working versions of modems, it works flawless - less work to setup as on Windows and seamlessly integrated (no extra application running) and autoconnecting as soon as you plug in the stick. Current status: Some mobile modems might not work out-of-the-box in 10.04. In the best case (if it is not working immediately), a single one-time sudo apt-get install usb-modeswitch (or installing usb-modeswitch using the GUI) is sufficient to make it work. In more particular cases you might need to add some config rules. Regarding the mobile internet working out-of-the-box probably 9.04 was the best release so far - but some newer (and maybe more buggy) modems (or modem firmwares respectively) were not available in these times...

      4. On my about 5 year old home PC I had Fedora 7 or 9 installed and after it got Ubuntu 10.04 now it starts and runs a lot faster. Think twice about that: Older hardware and new Linux version starts and runs faster. I never ever experienced that on Windows. Basically I do not use Hibernate any more because writing the whole memory to disk is much more time consuming than shutting down and starting up.

      5. I don't like the colors of the new theme, I hate the buttons on the left and they removed a button in Nautilus I often used (where I now only have the menu or keyboard shortcut any more). So basically I find the new theme being bullshit. But this can be changed easily through System-Preferences-Appearance and chosing e.g. ClearLooks theme. However, I have added a repository which offers a lot of new cool themes - the Bisigi themes. And the balanzan is my favorite.

      6. Partner and extra repositories have been enhanced - a lot of applications - like Skype or Google Earth can now be installed with less hassle.

      7. I found a lot of bugs - which I wondered as it is an LTS release and should be reliable. One issue was with using the Alternate version to setup a software RAID. The positive: It took about two weeks to fix and it took so long not because of the developers but because I didn't have so much time for testing (basically only in the late evenings). That confirms my former experience with 9.04 and 9.10 that bugs are fixed quite fast. - I say "quite" because it depends on the project. Kernel developers by tendency respond faster than others. When I report bugs in Ubuntu I am directly at the bug tracker together with the developers. That way I really feel a community member in the meantime. Where on Windows you need to pass a selection process or know some people guiding you to the right place getting a contributor, in the Linux world it just happens. When a program crashes you can send an automated bug report by single click - similar to Windows - but then the bug tracker opens and you are right there in the middle of the community and have the developers at hand. Given that direct contact to developers and other contributors I want to ask you for one thing: Treat them well - they work for you!

      8. The first time for backing up I did not work with disk images (where I use CloneZilla usually). I only backed up the home folder (while not logged in as user but as root from a text console via CTRL+ALT+F1 to avoid locking of files) and saved the list of installed packages with dpkg --get-selections. And the restore worked flawless. So backing up data and list of installed packages is really an alternative to have a backup that is not tied to the hardware in any way (but even using disk images portability is better than for Windows machines). Well - this is nothing new with 10.04 and you can do it since ages, but I never tried it before.
      In one case I had the chance of trying to setup the same use cases on two machines with identical hardware while one kept on Windows 7 and the other with Ubuntu 10.04. Result: With both machines the desired workflows could be implemented (home user with home office - email, internet, watching videos, print, scan, writing documents basically). Setting up was a little easier on Windows 7 because of the proprietary drivers needed (for the HP laptop) on Ubuntu as well as several restricted extras for playing mp3 and videos. The next time I will prepare a shell script for installing all that stuff at once (on FreshUbuntu podcast I heard, that such a thing already exists). That said, on Windows 7 a lot of applications need to be installed afterwards (like a serious zipping tool or image viewer) to make life easier. And not to forget, that the Windows 7 installation (to save the user from paying extra money) Open Office was installed instead of the Microsoft product and Firefox+Thunderbird - all extra Open Source downloads. Under Ubuntu most software installations are just selecting them in the package manager and clicking "Apply". There you get a huge amount of applications quickly without paying any extra dime. So both systems fit the needs of the user but Ubuntu clearly offers more options without the need of paying extra money. One of my favorite features is to start a GUI application on a remote machine but getting the GUI delivered to my local client through secure ssh connection or using FreeNX you can use this technique for your complete desktop and make a Terminal Server out of your Ubuntu/Linux box that way.

      As a critical conclusion I can say that there are still issues that make it difficult for an end-user to get quickly up-and-running by self-installing the Ubuntu Operating System. That does not mean that there are no hardware problems on Windows (indeed I had a printer last week where the software shipped with the printer was not Windows 7 compatible + not 64-bit compatible), but Vendors simply test their stuff first of all with Windows. However, if there is an issue, tweaking Ubuntu/Linux is usually simpler than on Windows (although there are different levels of tweaking - in the worst case you need to compile something on your own, which is not so difficult as you might think). When I have a problem with Windows then the analysis takes longer and there is a lot of trial-and-error involved (although I have more than 15 years of experience with Windows) - and of course less community help. My advise:
      • Check first before you buy hardware, if it is compatible with Linux (e.g. prefer Intel graphic cards for example) - do this even if you are not considering to switch to Linux yet - you might change your mind sooner than you think!

      • If you have people with Linux knowledge around that could assist you and if you are interested in being flexible, you should try Linux/Ubuntu.

      Related posts: Why Linux?, Going Linux, Ubuntu 10.04 with docking station part 1, Ubuntu 10.04 with docking station part 2, Ubuntu compatible hardware.