Mostrando postagens com marcador linux. Mostrar todas as postagens
Mostrando postagens com marcador linux. Mostrar todas as postagens

domingo, 28 de outubro de 2012

Ubuntu Server distribution upgrade

Doing a distribution upgrade is easy in the graphical user interface.  On a "headless" Ubuntu Server, you probably don't have a graphical user interface available, and you need to perform a few easy steps.

First you need to check 2 things:
  • The package "update-manager-core" needs to be installed.  Just run the following command: (it will install it, if it is not already)
    sudo apt-get install update-manager-core
  • On Ubuntu Server, the update channel is usually "LTS" (Long Time Support) which will upgrade only to the major release of Ubuntu Server.  Probably, you want to set this to "normal", to allow an upgrade to every distribution upgrade.  To do this open the file "/etc/update-manager/release-upgrades", and change the line "Prompt=lts" to "Prompt=normal".
    For example, with pico:
    sudo pico /etc/update-manager/release-upgrades

    Change the Prompt setting to "normal".

    Press Ctrl-X, press "Y" to confirm and press enter to confirm the filename.

Then the distribution upgrade can be started by running this command:
sudo do-release-upgrade -d 

It is not "recommended" to do a distribution upgrade remotely over ssh.  The "do-release-upgrade" command above checks on this, and gives a warning.  However, I didn't have any problem doing the upgrade remotely over ssh.

segunda-feira, 15 de outubro de 2012

LibreOffice doesn't appear in alt-tab view

I have an annoying problem with Unity on Ubuntu: it often happens that LibreOffice/OpenOffice Calc or Writer windows don't appear in the alt-tab application switching.
Googling the problem learned me that it is a known problem: https://bugs.launchpad.net/bamf/+bug/1026426
The good news is that it is solved in Ubuntu 12.10, and a patch will be available for 12.04 LTS. A workaround is to restart Unity:
  • Start a command window (Ctrl-Alt-T)
  • Run:
    unity --replace & disown

sábado, 21 de julho de 2012

Gource video of FxGqlC 2.2

I refreshed the Gource video of FxGqlC to reflect the latest version:





This time, the video was created on Ubuntu, and it is even simpler then on Windows.  These are the commands that I've run in a terminal window:

  • sudo apt-get install gource
  • sudo apt-get install ffmpeg
  • cd ~/Projects/FxGqlC
    (the GIT-directory where the FxGqlC source code is located)
  • gource -s 0.25 -title 'FxGqlC' -i 1000 -o /tmp/fxgqlc-gource.ppm
    (-s 0.25 to speed up to 4 days per second, -i 1000 to prevent fading out of idle items)
  • avconv -y -r 25 -f image2pipe -vcodec ppm -i /tmp/fxgqlc-gource.ppm -vcodec wmv1 -r 25 -same_quant /tmp/fxgqlc-gource.wmv
  • upload the video /tmp/fxgqlc-gource.wmv to youtube
Initially, I used ffmpeg as on Windows which worked without problems, but I got this warning:
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.

Migrating to "avconv" was no problem, since the exact same parameters could be used with it, except for the parameter -sameq which is replaced by -same_quant.

Clock problem when running Windows and Linux on same computer

When you install both Windows and Linux on the same machine (using dual/multi-boot), you get into an annoying problem with the system time:

  • Linux uses the internal clock as UTC/GMT
  • Windows uses the internal clock as Local Time.
On my box, in Belgium, this currently gives a difference of 2 hours (1 hour + 1 hour for daylight saving time) between my Windows 7 and Ubuntu.  After some time, the time is corrected because the operating systems syncs its time with an NTP-server on the internet.  But after booting into the other operating system, the problem repeats itself evidently.

This problem can be solved either in Windows or in Ubuntu.  I have chosen to change the Windows configuration:
  • Start regedit.exe
  • Go to the key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
  • If it doesn't exist, add a new key (or change the existing):
    Set "RealTimeIsUniversal" as DWORD to "1"
  • Reboot
You can also solve it in Linux:
  • Open the file "/etc/default/rcS". When using a graphical shell like Unity or Gnome:
    • start a terminal window by pressing Ctrl-Alt-T
    • run "sudo gedit /etc/default/rcS" 
  • Look for the line "UTC=yes", and change it to "UTC=no"

terça-feira, 3 de julho de 2012

The following packages have been kept back

When executing "sudo apt-get upgrade" on a Ubuntu server, you can get the message:
The following packages have been kept back

This means that certain updates require system changes.  You can install the packages by executing this command:
sudo apt-get dist-upgrade

quarta-feira, 9 de maio de 2012

Connecting to a Cisco VPN from Linux

On Windows, you can use the Cisco AnyConnect VPN client to connect to a Cisco VPN.

The alternative on Linux to connect to a Cisco VPN is to install the package "openconnect".
You can do this by opening a console window (Ctrl-Alt-T) and run this command: (Ubuntu)
sudo apt-get install openconnect

To set up the VPN to server MyServer on port 12000, run this command:
sudo openconnect MyServer:12000
The openconnect executable stays running.

Before you can use the remote network, you probably need to add an IP route. When the remote network is 192.168.2.0 with network mask 255.255.255.0, you can execute this command (in a new terminal window):
sudo route add -net 192.168.2.0 netmask 255.255.255.0 tun0

To disconnect the VPN connection, press Ctrl-C to terminate openconnect (or kill this process).

domingo, 15 de janeiro de 2012

Wrong keys auto-typed by KeePass/KeePassX in Ubuntu

When not using the United States keyboard layout (such as azerty or qwertz), KeePass and KeePassX type the wrong keys when using the auto-type feature.  E.g. the 'Q' is typed instead of the 'A' when the keyboard layout is azerty.
As far as I found on forums, this is due to a bug in Unity, the user interface used in Ubuntu. Luckily, there is an easy workaround.

Open a terminal window (Ctrl-Alt-T), and run the following command:
setxkbmap <your 2-digit keyboard layout code>
 E.g. for Belgium having an azerty keyboard layout with keyboard code "be", you should run:
setxkbmap be
This command can be run automatically, when any user is logging on to the system.  This is done with a ".desktop" file, similar to the procedure in my post "Automatically start Empathy at login to Ubuntu".

To create this file, follow these steps:

  • Open a terminal window (Ctrl-Alt-T)
  • Create the file "/etc/xdg/autostart/setxkbmap.desktop", by running this command:
    sudo gedit /etc/xdg/autostart/setxkbmap.desktop
  • Copy this text as contents for the file:  (replace "be" with your own keyboard layout)
    [Desktop Entry]
    Version=1.0
    Encoding=UTF-8
    Name=Fix keyboard settings
    Exec=setxkbmap be
    Terminal=false
    Type=Application
  • Save and Close the file.
Log out and log in again (or reboot), and the auto-type feature should work.

quinta-feira, 3 de novembro de 2011

Automatic start of Empathy when logging into Ubuntu

Empathy is a chat application compatible with Facebook, Google Talk, ...  It is installed by default in the current releases of Ubuntu.  
It is currently impossible to configure Empathy to start it when you log on to Ubuntu. With an easy workaround, it can be started automatically:
  • Start a terminal window (e.g. Ctrl-Alt-T)
  • Run: "sudo cp /usr/share/applications/empathy.desktop /etc/xdg/autostart"