http://www.linuxnewsblog.com - Your Daily News

Sunday, April 5, 2009

small tip, how to recreate / update openbox menu

Every day I love small window managers more and more, actually I starting to think that there is no need for Gnome or KDE, I am using latelly OpenBox and was using fluxbox before.

One of the differences between these light weight Linux window managers and the Desktops like Gnome or KDE is that when you add or install a new program it is not automatically inserted in the menus, so you need to add it manually or may have a program doing it for you.

If you are using OpenBox you need menumaker

First install it.

Arch Linux

sudo pacman -S menumaker

Gentoo Linux

sudo emerge menumaker

Once it it installed just run it:

mmaker -vf OpenBox3

For Arch Linux

mmaker -v OpenBox

For Gentoo Linux.



Read More...

[Source: Linux Blogs2k - Posted by FreeAutoBlogger]

Autodetecting and configuring multiple monitors in Ubuntu

A common problem for laptop users is that they use various display configurations. When traveling they use only the internal LCD panel, but in the office they use internal LCD panel + external display. It is pain to configure external display manually each time you plug it in.

This how to will give you instructions to create a shell script which will configure displays and Gnome panels according to the plugged in displays.

Install magnificent disper tool

Edit your sources.list file

sudo gedit /etc/apt/sources.list

add the following lines

deb http://ppa.launchpad.net/wvengen/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/wvengen/ppa/ubuntu intrepid main

Save and exit the file

Update the source list using the following command

sudo apt-get update

Install disper tool using the following command

sudo apt-get install disper

Note:- Currently disper supports nVidia only, but the author claims ATI support is possible to add by contributions.

Run the following command to autodetect displays and set the extended desktop

disper –displays=auto -e

Dispering displays is not enough. You probably want to move Gnome panels to your primary (external) display when it is plugged in.

Gnome architects have been clever. Gnome panel stores its settings in gconf registry. gconf registry is not just dummy storage backend; changing these values immediately reflect changes in applications using the registry. One of these applications is gnome-panel. This means that we can move the panels by editing its registry setting related to the monitor configuration.

Using gconf-editor command the critical settings can be found under:

/apps/panel/toplevels/bottom_panel_screen0/monitor
/apps/panel/toplevels/top_panel_screen0/monitor

Value = 0 -> panels on internal LCD
Value = 1 -> panels on External display

Let’s make a little command line script which will

a) Detect and configure monitors

b) Move gnome-panels according to the connected display count

Open monitor.sh file

sudo gedit monitor.sh

add the following lines save and exit

#!/bin/sh
#
# Detect displays and move panels to the primary display
#

# disper command will detect and configure monitors
disper –displays=auto -e

# parse output from disper tool how many displays we have attached
# disper prints 2 lines per displer
lines=`disper -l|wc -l`

display_count=$((lines / 2))

echo $display_count

echo “Detected display count:” $display_count

# Make sure that we move panels to the correct display based
# on the display count
if [ $display_count = 1 ] ; then
echo “Moving panels to the internal LCD display”
gconftool-2 \
–set “/apps/panel/toplevels/bottom_panel_screen0/monitor” \
–type integer “0″
gconftool-2 \
–set “/apps/panel/toplevels/top_panel_screen0/monitor” \
–type integer “0″
else
echo “Moving panels to the external display”
gconftool-2 \
–set “/apps/panel/toplevels/bottom_panel_screen0/monitor” \
–type integer “1″
gconftool-2 \
–set “/apps/panel/toplevels/top_panel_screen0/monitor” \
–type integer “1″
fi

Add monitor.sh to your Startup Programs in System > Services menu, so it will be run each time you login to Gnome.



Read More...

[Source: Linux Blogs2k - Posted by FreeAutoBlogger]

Autodetecting and configuring multiple monitors in Ubuntu

A common problem for laptop users is that they use various display configurations. When traveling they use only the internal LCD panel, but in the office they use internal LCD panel + external display. It is pain to configure external display manually each time you plug it in.

This how to will give you instructions to create a shell script which will configure displays and Gnome panels according to the plugged in displays.

Install magnificent disper tool

Edit your sources.list file

sudo gedit /etc/apt/sources.list

add the following lines

deb http://ppa.launchpad.net/wvengen/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/wvengen/ppa/ubuntu intrepid main

Save and exit the file

Update the source list using the following command

sudo apt-get update

Install disper tool using the following command

sudo apt-get install disper

Note:- Currently disper supports nVidia only, but the author claims ATI support is possible to add by contributions.

Run the following command to autodetect displays and set the extended desktop

disper –displays=auto -e

Dispering displays is not enough. You probably want to move Gnome panels to your primary (external) display when it is plugged in.

Gnome architects have been clever. Gnome panel stores its settings in gconf registry. gconf registry is not just dummy storage backend; changing these values immediately reflect changes in applications using the registry. One of these applications is gnome-panel. This means that we can move the panels by editing its registry setting related to the monitor configuration.

Using gconf-editor command the critical settings can be found under:

/apps/panel/toplevels/bottom_panel_screen0/monitor
/apps/panel/toplevels/top_panel_screen0/monitor

Value = 0 -> panels on internal LCD
Value = 1 -> panels on External display

Let’s make a little command line script which will

a) Detect and configure monitors

b) Move gnome-panels according to the connected display count

Open monitor.sh file

sudo gedit monitor.sh

add the following lines save and exit

#!/bin/sh
#
# Detect displays and move panels to the primary display
#

# disper command will detect and configure monitors
disper –displays=auto -e

# parse output from disper tool how many displays we have attached
# disper prints 2 lines per displer
lines=`disper -l|wc -l`

display_count=$((lines / 2))

echo $display_count

echo “Detected display count:” $display_count

# Make sure that we move panels to the correct display based
# on the display count
if [ $display_count = 1 ] ; then
echo “Moving panels to the internal LCD display”
gconftool-2 \
–set “/apps/panel/toplevels/bottom_panel_screen0/monitor” \
–type integer “0″
gconftool-2 \
–set “/apps/panel/toplevels/top_panel_screen0/monitor” \
–type integer “0″
else
echo “Moving panels to the external display”
gconftool-2 \
–set “/apps/panel/toplevels/bottom_panel_screen0/monitor” \
–type integer “1″
gconftool-2 \
–set “/apps/panel/toplevels/top_panel_screen0/monitor” \
–type integer “1″
fi

Add monitor.sh to your Startup Programs in System > Services menu, so it will be run each time you login to Gnome.



Read More...

[Source: Linux Blogs2k - Posted by FreeAutoBlogger]

Ubuntu 9.04 Beta - Expectations Too High?

Before I even get started, allow me to make the following very clear. I am a full time Ubuntu user. as a matter of fact, as I type this, I am streaming my office and desktop live via Ustream on an Ubuntu min-PC. I also have two notebooks running 8.10 with my Ubuntu desktop PC placed firmly in front of me. Clearly, obviously, I like Ubuntu and the Linux platform in general. This being said, I have yet to have a release of Ubuntu come out that was not bundled with at least one really bad regression that sends me screaming into the forums for a quick fix. Often times, the tweak is easy or unneeded. Other times, it is hardware designed explicitly for Windows.

My most recent example, problems upgrading a notebook using the OpenChrome VIA video driver. For whatever reason, I was being forced to use the alternative CD for installation AND I had to rebuild the Xorg.conf by hand as the ‘improvements” were still buggy as the existing bug reports pointed out at that time.

So you will have to excuse me if I could not give a rat’s butt about cloud computing coming to Ubuntu 9.04. While I agree that this is the next logical progression, I would also point out the single biggest upgrade Ubuntu could give its users is a longer beta period between releases. Once each release has had time to sit out in the sun for a bit, the bugs begin to take care of themselves. But right off the shelf, not so much.

And what about progress on touch screen computing? Yes, this can be done by hand…but who the hell wants to deal with that? For my money, I will hang onto my older releases longer than most as I always have while watching the progress of the new Amazon S3 stuff develop over time.

Hey, who knows, maybe I will be pleasantly surprised this time and we can not have ongoing regressions this time around to be solved later after it is released. But I guess that is part of the fun of using Linux. Just wish I could see longer development periods with this distro though.



Read More...

[Source: Linux Blogs2k - Posted by FreeAutoBlogger]