Archive

Posts Tagged ‘ubuntu’

Ubuntu 10.04 Lucid on ASUS UL20A

August 20th, 2010 subogero 4 comments

Well, Jaunty was not able to use the full (you know what I mean) resolution of my new TV, so I thought it was time to upgrade. I started Lucid Lynx from a live USB, attached the TV and, to my utter amazement, I was immediately presented with 2 073 600 deep purple pixels.

Upgrade time! Or even more than that. Time to reorganize my partitions. All I left was the original 200 GB home partition, now mounted as “/public”, mainly for my strictly legal (in Hungary) music and movies. If you live in the US of A, do not do this! The monopolists will confiscate your possessions, kill your family and jail you for 2000 years.

Anyway, 65 GB of unused Windows 7 (which I had no other choice than to pay for) was permanently removed, replaced by a new “/home” partition. The remaining 50 GB became “/” (root for starters).

Installation went like a breeze, as usual with Ubuntu. WLAN connected immediately. The telly as an external full high definition monitor? You betcha. Import stuff from old user profile, apt-get all the important packages (gimp, development stuff, openarena), compile and install the freshest hypest midnight commander, and there you go.

One thing. The bloody LCD brightness buttons. They did not work at all. Nor could I set brightness any other way, including the GUI and my Jaunty hack. Nice. This is the point where most people start thinking about suicide.

Others, however, use Google. Which reveals the solution immediately in the form of an Ubuntu wiki page:

acpi-backlight=vendor

has to be added to the GRUB kernel command line. Since then it works beautifully, even the flickering of my Jaunty hack is a thing of the past.

Apple vs Ubuntu

February 11th, 2010 subogero Comments off

Apple’s products are simply beautiful. Mac mini, iPod Nano, MacBook or iPhone: anything they do, they do it with style.

Except, they don’t always work, apparently. During the weekend’s skiing/snowboarding trip, one of us wanted to transfer some important photos (showing just-about-to-fall snowboarders) from her iPhone (gorgeous pink cover) to her MacBook (gorgeous flat chassis). No way.

So we connected the iPhone to my Ubuntu-driven notebook, the “Apple Inc. iPhone” icon promptly appeared on the desktop, and in a few minutes time the compromising pictures were transferred to the MacBook travelling on board of a carefree pendrive.

Categories: Uncategorized Tags: , , , ,

Jaunty Keyboard Layout Settings

December 28th, 2009 subogero Comments off

As I’ve mentioned my laptop came with a Hungarian keyboard, which will be changed to a US version as soon as the part arrives (6 weeks). In the meantime I’m trying very hard to live with this one. I’ve learned to use the awkward Alt-Gr key to access trivial characters like backslash, tilde or square brackets.

But there are limits. The “qwertz” stuff. The swapped “z” and “y” keys. It’s an abomination. So I went to System/Preferences/Keyboard and I found an abundance of layout settings Windows users can’t even dream of. Of course there is a Hungarian “qwerty” layout. Many, actually. When you choose a layout you get an illustration of the entire keyboard. So it was not difficult to find variant “Hungary 102/qwerty/comma/Dead keys”.

However wonderful this nice GUI for keyboard settings is, it suffers from a general illness of Linux GUI programs. They are fantastic but, in the absence of enforced corporate QA, they never get finished. This one is not finished either. The “Apply System-wide” button has stopped working. So the login screen has been still using a “qwertz” layout.

Until now. But “Config Wizard” has solved it. All these GUIs are just smart config-file editors. But never as smart as a text editor. I guess that’s the main reason those GUIs are never finished. You develop them and, at 90% completness, you realise any text-editor is better.

Anyway, this is the location of the keyboard layout config files:

User:

~/.gconf/desktop/gnome/peripherals/keyboard/kbd/%gconf.xml

System-wide (login screen):

/etc/default/console-setup

Ubuntu 9.04 Jaunty on Asus UL20A

December 11th, 2009 subogero 7 comments

I’ve just purchased an ASUS UL20A-2X022V notebook. Or netbook. I don’t know. It’s actually the best of both worlds. On one hand, it has a small 12″ display, weighs in at 1.5 kg, has no CD/DVD drive, and runs 5 to 7 hours on battery. On the other hand, its small display’s resolution is 1366×768, it has a Core 2 Duo ULV SU7300 processor, 3 GB RAM, a 320 GB hard disk and a fully functional keyboard with all the special keys on the right side.

A short summary of how the different hardware components work with ubuntu:

Component                    Status  Notes
------------------------------------------
Intel Core2 Duo ULV SU7300   OK
12.1" WXGA LED display       OK      resolution autodetected
Intel GMA 4500MHD graphics   OK
3 GB RAM DDR2 800 MHz        OK
HD 320 GB 5400rpm SATA       OK      install with manual partitioning
battery Li-ion 5600 mAh      OK
power management             OK      battery life 5-6 hours
ethernet Atheros 8131        OK      see below
WLAN Atheros 9285 802.11bgn  OK      see below
Bluetooth                    OK
Sound AC'97 16bit            OK      Audacious mp3, speaker or headphone
Synaptics touchpad           OK      scrolling OK too, see below
webcam                       OK      see below
card reader                  OK
Linux kernel                 2.6.28-17

It came with Windows 7 Home Premium, which is a joke. A huge monster of an OS with the functionality of Google Chrome OS: it has a web browser.

First thing was to install ubuntu 9.04 Jaunty Jackalope. As the laptop has no CD drive I had to create a bootable Ubuntu 9.04 LiveUSB on my other ubuntu-box. The tool to use is usb-creator, which uses the iso image of the ubuntu LiveCD.

I installed ubuntu with manual partitioning. I shrank the Win7 partition from 80GB to 50GB (automounted to /windows), added a 2GB ext3 swap partition, a 50GB ext3 root partition and the rest as a /home partition. The boot menu was added, and even Win7 ran fine after a chkdisk.

The network cards were not detected upon installation. Neither LAN, nor WLAN. So there I was with no connectivity, reading with a sad irony all those posts about fixing this with apt-get xxx-backports and the likes.

I ended up downloading compat-wireless-2.6.30.tar.bz2 on another box to a USB stick, and then unpacking and compiling it on the laptop. I realised too late these kernel modules were for a newer kernel. Nevertheless I did “make install”, I did “make unload” and I did “insmod ath9k.ko”. It did not work due to incompatible kernel versions. I sadly rebooted to Windows, but later gave it another try. Miraculously, all network cards worked like a breeze! Don’t ask me why…

Touchpad: everything works, but it’s hard to feel where is the scrolling area. And the left button is too hard.

Keyboard (Hungarian): OK, but it will be swapped for a US layout, whose Hungarian is worse, but speaks better Code.

Webcam: I installed the UCview package to record videos with it. Skype works too.

I downloaded all the updates, then SynapticPackageManaged Rhytmbox/Evolution out, Audacious/Thunderbird in, I installed basic development stuff, and last but not least git-cloned and compiled the newest Midnight-Commander master with utf8-support.

One more thing: it is very very quiet. Summary? Bloody marvelleous!

Linux On Laptops

Categories: Uncategorized Tags: , ,

Ubuntu vs XP Reboot Time

August 15th, 2009 subogero Comments off

I’ve just measured full reboot times with Ubuntu and Windows XP on the same machine.
Bonus: reboot times with Ubuntu Jaunty on Asus UL20A laptop (its BIOS is extremely fast too).

                             Ubuntu       XP  |  Ubuntu ASUS UL20A
----------------------------------------------|-------------------
boot from BIOS until login     26 s     29 s  |                17s
boot from login until ready    16 s     39 s  |                15s
reboot until BIOS              19 s     35 s  |                12s
----------------------------------------------|-------------------
overall reboot without BIOS    63 s    103 s  |                44s

No comment.

Categories: posts Tags: , ,

Automount an NTFS Partition

August 14th, 2009 subogero 4 comments

As I have a Windows-Ubuntu side-by-side installation with a boot menu, I still store a lot of data on the NTFS partition. I know, I know…

Ubuntu endeavours to give satisfaction, so you can see all detected storage devices in the “Main Menu” under “Places”. Click your NTFS partition, and it’s mounted automatically to /media/disk/.

But if you want to access these files from another program before clicking it in “Places”, it does not work. So I googled “automount ntfs partition” and there it was.

I added the following line to “/etc/fstab”:

# <file system> <mount point>   <type>  <options>                <dump>  <pass>
/dev/sda1       /media/disk     ntfs    users,defaults,umask=000 0       0

I rebooted. I did not work. It took me a few days until I realised one cannot mount something in a non-existent directory. When you click your NTFS partition in “Places”, Ubuntu not only mounts it, but creates the mount-point directory “/media/disk” first. But just adding something to “/etc/fstab” does not create directories. People would talk. Eyebrows would be raised.

After a

sudo mkdir /media/disk

and a reboot it worked perfectly.

This must be ridiculously obvious to a Hacker, but the post may help a Newbie or two like myself.

Categories: posts Tags: , ,

Gnome Main Menu Icon Size – Solved

August 10th, 2009 subogero Comments off

The problem with the Main Menu’s huge icons and spacing is solved. I’ve just found the tool called GNOME Color Chooser. Go to the “Icon” Tab.

sudo apt-get install gnome-color-chooser
Categories: posts Tags: ,

The g Page

August 7th, 2009 subogero Comments off
G’s goal

“g” is a general-purpose command-line launcher for Gnome/Linux, an extended “gnome-open” which can open URLs, files or even programs in a new window. A bit like Windows “start”, just better.

“g” will open a new terminal window.

“g <CLI program>” will open it in a new fully independent terminal window.

“g <GTK+ program>” will open it in a fully independent window.

“g <URL>” will open it with the preferred application.

By an “independent window” I mean two things:

The starting terminal is not blocked while the started app is running;

Closing the starting terminal does not kill the started app.

Bonus: start a Google search for “foo bar” in your preferred browser with

g -g foo bar
Installation:

Download g.tar.gz and extract files in a new directory, preferably “g”.
Type “sudo make” for installation.
Enjoy.

Lessons learned:

How to decide if an argument of a shell-script is a program?

which $1
#prints the location of the command, or nothing if not a command

How to check if a shell-script has no arguments at all?

if [ $# -eq 0 ]

How to check if the last command returned no error in its exit status?

if [ $? -eq 0 ]

The trickiest: how to tell if a command is a terminal- or a GTK+ application?

Search for “libgtk-x11″ in it if it’s a compiled program.
Search for the respective gtk dependency if it’s an interpreter-script:

import gtk # Python
use Gtk2   # Perl

“g” knows these two at the moment, but the list should be extended to all known interpreted languages and graphical toolkits. Actually it should work the other way around, detecting terminal-only applications. But for instance Gimp contains the strings “stdin”, “stdout”, “stderr” and “printf” so I gave up.

I’ve created my first ever very officially looking manual page for “g”, credit goes to Jens Schweikhardt’s very helpful LINUX MAN PAGE HOWTO.

Tao in g

There is more Tao in “g” than in Windows “start”:

Try to start a native Windows program from command line which DOES NOT become fully detached, but blocks your command-line until it closes and returns an exit-status. Hmmm? On Linux, just omit “g”.

On Windows, the commands are scattered around in thousand folders, not listed in the PATH variable. On Linux, on the other hand, all commands are on the PATH, as there are only a few standard places to store them: /bin:/usr/bin:/usr/local/bin. So “g” can access them all.

View the manual page?

man g

Finally, how do you edit the “g” script itself?

g gedit g

There is Tao in Windows start

August 7th, 2009 subogero Comments off

We all remember from the Tao of Programming when the master programmer avoided an embarrassing question about the presence of Tao in DOS. The good news is there is definitely Tao in Windows (but not too much).

It’s called “start“.

It’s not the Start Menu, but a command-line keyword, obviously. I’ve come to appreciate its beauty only after having spent some weeks with Ubuntu. I kept looking for something similar on the internet, and all I found was the “gnome-open” command. Still, the blog-post has ecstatic comments.

I tried “gnome-open”. It opened any file or URL with the associated program as an independent process. So far so good. Until I tried to start a program with “gnome-open”. No way. This was the moment I discovered Tao in Windows’ “start”. Let’s see:

“start” without arguments will open a new terminal window.

“start” with a CLI program as an argument will open it in a new fully independent terminal window.

“start” with a Windows program as an argument will open just that in a fully independent window.

“start” with a file or URL as an argument will open it with the preferred application.

“gnome-open” can do the latter, but not the first three options. So I decided to write my Linux-version of “start” called “go”. Please go to the page.

Back to Windows. The famous “start” has a significant drawback. As in Windows nearly none of the applications are on the PATH, start’s capabilities are just a tiny bit limited. Not so with “go”.

Everything Can Be Solved in Linux, Except…

August 4th, 2009 subogero Comments off

I still have a few problems I can’t solve. One is The Ubuntu-Firefox Font-Size Disaster. The whole internet is full of it, but no one seems to know the solution.

The problem is that on many web-pages the fonts are incredibly small. The funny thing is that Firefox on Windows displays theses pages perfectly. There are dodgy workarounds like overriding the web-page’s font settings or zoom in (and out, and in), but I can say only two words: Come On!

The other problem is the spacing and icon-size of the Ubuntu Main Menu. This monstrously huge and wasteful spacing even remains when I disable the menu icons altogether. Again, I found a lot of websites about themes and metacities and gtk, but I still have to figure out what these mysterious things mean. At least it all seems to be text-based, so I’ll find the solution one day…

Categories: posts Tags: , , ,