Friday Dec 04, 2009

Bash Completion on OpenSolaris

Bash Completion Initial Configuration

Bash completion has finally arrived on OpenSolaris - as of snv_126!

Unfortunately, for some reason it's not enabled by default - but it's not that difficult to enable it, the simple steps are:
  1. Create /etc/bash/bash_completion:

    # cp /etc/bash/bash_completion.example /etc/bash/bash_completion

  2. Edit ${HOME}/.bashrc and add lines like:

    if [ -f /etc/bash/bash_completion ]; then
        . /etc/bash/bash_completion
    fi
That's about it - if you then either source /etc/bash/bash_completion in your current shell, or start a new terminal, you should then be able to do things like:
  • ssh <TAB><TAB>
    <list of known hosts>
  • su - <TAB><TAB>
    <list of users in /etc/password>
  • evince <TAB><TAB>
    <list of dirs, ps and pdf files in current directory>
and so on...

Adding other completions

Of course these are only the default completions, it's possible to add many more! The simplest way to do this is to place a file in /etc/bash/bash_configuration.d and these files will be sourced automatically if you added the lines mentioned above to your .bashrc file.

A useful one for those of us using Mercurial is the version you get in /usr/demo/mercurial - this can be copied in and hey presto you have completion of the mercurial commands:
  • # cp /usr/demo/mercurial/bash_completion /etc/bash/bash_completion.d/
So if you again source /etc/bash/bash_completion, you will then pick this up and get:
  • $ hg <TAB><TAB>
    active       bisect       cddlchk      copyright    hdrchk       init         mv           permchk      reparent     showconfig   update
    add          blame        checkout     cp           heads        jstyle       nits         pull         resolve      st           verify
    ...

It's possible to add more completion for various commands, for example you could create one for zfs, zpool, pkg, etc. - the possibilities are to numerous to mention, but here are a few I found:

Enjoy :)

Friday Aug 03, 2007

Network Auto-Magic UI Preview (0.1)

In recent times I've been working on a UI for Network Auto-Magic (NWAM) Phase 1.

As you probably know by now, NWAM Phase 0 went into SXDE 2, and is only enabled by default when you install by selecting the "Solaris Developer Express" option in the boot menu on the install DVD.

When the NWAM service is running, we have the ability to be able to switch between a wired and wireless network with minimal effort, simply by plugging/unplugging the network cable, but this is only a small part of what NWAM is attempting to achieve, and I said, only Phase 0!

The NWAM team are now focused on Phase 1, more details of which can be found out at the NWAM pages at opensolaris.org.

As part of NWAM Phase 1, there is the introduction of a UI to manage the NWAM configuration. At the moment NWAM Phase 1 itself isn't ready for general use, but in the meantime, we've been trying to still make progress on the UI front using stubs (as opposed to the new APIs that NWAM will provide), and focus on the UI elements as outlined in the current UI Spec (1.4).

We think that we've mad some good progress here, but as you can guess, there is still quite a way to go - but we would love to hear your feedback with what we've done so far - the best place for this is on the  nwam-discuss at opensolaris dot org alias.

So down to business, you can download a tarball with both SPARC and x86 binaries in it at:
You will need to be running a system with at least GNOME 2.18 in it, which should be the case from Solaris Nevada build 67 onwards. If in doubt, you can check this by running:
  • /usr/bin/gnome-about --version
To run the demo (preview?) we should start by extracting the tarball as follows:
  • gzip -cd nwamui_preview_2007_08_03.tgz | tar xvf -
This will create a directory called nwamui_preview_2007_08_03, so you need to then change directory into that, and run the run_demo.sh script as follows:
  • cd ./nwamui_preview_2007_08_03
  • ./run_demo.sh
This should present you with a new "globe" entry in the notification tray on your GNOME Panel, try right-clicking on it to get a menu:



Or simply clicking on it will launch the "Network Preferences". You can edit the wider network configuration by selecting the "Network Preferences" from the pop-up menu.

Please take some time to try things out, but also please remember that this is all done using stubs, so nothing is saved, and there will be inconsistency between the panel presence and the preferences dialogs, not to mention that there are quite likely  bugs in there... 

Enjoy ;)

Wednesday Nov 29, 2006

Finally managed to finish the update to the Solaris Desktop Gaps document.



It's taken longer than expected, mainly due to other tasks taking up my time, but I've managed to update the Solaris Desktop Gaps document.at OpenSolaris.org.

I would be very interested in your feedback, be it good or bad. Also if there are areas not mentioned, or you disagree with the recommendations, please let me know and I'll see what I can do to address your concerns.

I hope you agree that Solaris/OpenSolaris has come a long way in the last year - and I can guarantee that there's better to come!

Enjoy...

P.S. - I'd like to thank the many people that provided me with input, without you the document would never have been done.





Tuesday Nov 08, 2005

The Future Desktop on Solaris (...?)

Over the last few months I've been tasked with looking at the desktop on Solaris and figuring out what it is that discourages people from using Solaris as a desktop instead of Linux (and in someways even MS Windows and MacOS/X) and to then look at how we could enable users to have a better experience on Solaris. As a result of this I have produced a document which has beem made public at the Desktop community at Open Solaris.org:

Solaris Desktop Gaps Analysis

Usability of Solaris, from the kernel to the desktop level is being heavily invested in at the moment. There is a lot happening right now, and from a desktop perspective there are quite a few gaps that need to filled.

What I want to really do is to spark some discussion. So I ask that you read the document and I would love to hear your comments, but I do ask people to keep it constructive... ;)

Thursday Jun 23, 2005

What Source Control Managment s/w to use for Open Solaris?


Open Solaris is currently getting a lot of attention, especially from developers.

Contributing to Open Solaris is something I'm sure many of them would love to be able to do. For the moment, there is a process underway that enables this to occur on a limited scale, through the use of Sun internal "sponsors" - we've currently had several patches provided by external contributors and some already committed. While this will tide things over until we've got a suitable SCM in place, it doesn't scale well, so what do we do?

Well now we get to the point of this entry, James Gosling has asked for your advice on the SCM to use so if you want to influence it please do comment... If you don't, please don't complain if it doesn't go your way... I've done my part, so go do yours.

Open Solaris - the desktop?

My own personal wish for OpenSolaris is that it will finally enable Sun to provide a desktop solution that will compete with Linux and Windows. Solaris is a good OS, but it's been highly server focused for some time now, which means that while it supports hotplugging of disks and CPU units, functionality that is really good for a server to stay up 24x7x365, it fails to provide the good enough support for things that really matter to the desktop (or laptop) user like PCMCIA, hotpluggable devices, wireless networking or even ACPI power saving.

As someone said to me today, if you were to take OpenSolaris and put opensource tools and desktop on top of it (some porting will be required, but not for everything) then how would your average user tell the difference between, for example, a GNOME desktop running on SuSE Linux and OpenSolaris? In the end Linux is really just a kernel - everything else that surrounds it are libraries and applications - OpenSolaris, even in it's current form, is a kernel and the tools for the kernel, if you put the same libraries and applications on top of it you can have a desktop that can compete with Linux in the desktop market.

SchilliX has made a head start on this already, with Open Solaris now in a form that you can boot from a Live CD. Jeorg has done some good work on this, and is making good headway at achieving what I've already described... I'm sure that there will be others, maybe even Sun could do this, afterall we do intend on posting the rest of the sources of Solaris in the near future, such as JDS so it will quickly be come a fairly complete OS sooner rather than later...

About

dar

Search

Categories
Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
News

No bookmarks in folder

Blogroll

No bookmarks in folder