Powered By

Powered by Blogger

Tampilkan postingan dengan label tips n tricks. Tampilkan semua postingan
Tampilkan postingan dengan label tips n tricks. Tampilkan semua postingan

Jumat, 29 April 2011

How To Reset Unity, Launcher Icons Or Compiz In Ubuntu

If you're using Unity and you want to reset Unity to its default settings, want to reset the Unity Launcher icons or you've changed some Compiz settings which have messed up Ubuntu and want to reset everything, here's how to do it.


Reset Unity


If you want to reset Unity (this will only reset the Unity settings in CompizConfig Settings Manager and leave the other CCSM settings intact), open a terminal (or press ALT + F2) and enter:
unity --reset


Reset Unity Launcher icons


If you want to reset the Unity Launcher icons (dock bar on the left) to their initial state, run the following command:
unity --reset-icons



Reset Compiz in Ubuntu 11.04


Reset Compiz

Resetting Compiz in Ubuntu 11.04 is a bit different then in older Ubuntu versions because its settings in gconf are under /apps/compiz-1 and not under /apps/compiz like before.

Warning: only do this if you really must and have no other option! Use both commands, or else you might not see the Unity launcher and top panel anymore! Use it at your own risk.

To reset all the Compiz settings (this includes all the plugins settings, etc.) to the default values, open a terminal (don't run it with ALT + F2! The top panel and launcher will disappear after running the first command but will show up after the second one so use a terminal) and type:
gconftool-2 --recursive-unset /apps/compiz-1
unity --reset

If something doesn't look right after this, log out and log back in.

Kamis, 28 April 2011

Things To Tweak / Fix After Installing Ubuntu 11.04 Natty Narwhal

A note before reading this post: before giving up on Unity without giving it a try... don't. Try Unity for a few days - yes, it's not a finished product but it's actually quite interesting - and if you don't like it then switch.

If you've just upgraded to Ubuntu 11.04 Natty Narwhal, there are probably a few things you'll miss, so here is how to get them back as well as some other things you may find useful.



Install CompizConfig Settings Manager and Tweak Unity to better suit your needs:

CompizConfig Settings Manager


sudo apt-get install compizconfig-settings-manager

Then search for CompizConfig Settings Manager in Dash and you'll find the Unity-related options under the "Unity" Compiz plugin. Some other options are under other plugins so check those out too.

Using CCSM, you'll be able to tweak the Unity launcher reveal mode, hide behavior, change some Unity-specific keyboard shortcuts, change the Unity launcher icon size, the top panel opacity, tweak various animations and more.




Another tool for configuring some hidden Unity settings is Dconf-editor.

Dconf-editor

To be able to use it you must firstly install dconf-tools:
sudo apt-get install dconf-tools

Then press ALT + F2, enter "dconf-editor" and look under desktop > unity.





Using an AMD (ATI) graphics card with the latest Catalyst 11.04 and experience bad performance / lag?

CCSM

To get better performance, install CompizConfig Settings Manager (see the first tip in the post for installing it), then open it from Dash and go to the "OpenGL" plugin and uncheck the "Sync to VBlank" option.

(fix thanks to SarfzStrife)





Is Dash displaying your hidden / private files or your porn?

Activity Journal

Until Zeitgeist Global Privacy is released, install Activity Journal (don't use the version in the official Ubuntu 11.04 Natty Narwhal repositories - that doesn't seem to work), go to its Preferences and on the Plugins tab, enable "Blacklist Manager" (seems you have to double click the checkbox to enable it) - now a new "Blacklist" tab should be displayed. Here, click the add button and enter the path to your private files (porn). If you want to block all files, use "*" for the path.

You can also clear the Zeitgeist history (this is the history of recent files that's display in Dash) by using the following commands:
rm ~/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon --replace

(via AskUbuntu)




Want to monitor the RAM / CPU usage?

Ubuntu 11.04 system monitor indicator

Yes, the Unity top panel doesn't support any kind of applets, just AppIndicators. Luckily, there's an AppIndicator that displays the RAM and CPU usage. Install it using the commands below:
sudo add-apt-repository ppa:alexeftimie/ppa
sudo apt-get update
sudo apt-get install indicator-sysmonitor

Then, launch System Monitor Indicator from Dash.





Want the regular Firefox 4 menu like on Windows?

Firefox 4 menu

In Firefox, go to the Addons Manager and disable the Global Menu Bar Integration extension, restart Firefox, then right click the menu and deselect the Menu Bar.






Do you use Dropbox and the AppIndicator doesn't show up on the Unity panel?

Dropbox AppIndicator

Fix it using the following commands:
cd
wget http://webupd8.googlecode.com/files/fixdropbox
chmod +x fixdropbox
./fixdropbox

Dropbox will now start with a 20 seconds delay! That's so it always starts, without this most of the time it won't show up!





Ubuntu One is displayed on the Unity launcher and the Messaging Menu (why the...?) yet both entries are totally useless - none displays the current sync status.

UbuntuOne Indicator

If you use Ubuntu One, make it usable by installing the Ubuntu One AppIndicator:
sudo add-apt-repository ppa:rye/ubuntuone-extras
sudo apt-get update
sudo apt-get install ubuntuone-indicator

Then launch it from the Dash.




Missing a quick way to access your Downloads / Pictures / Documents / Videos folders?

Home folder quicklists

Sure, you can access them via Dash but for a quicker solution, add quicklists to the Nautilus Home folder launcher (which is displayed by default on top of the Unity launcher) by running the following command (copy all the text as a single command!) in a terminal:

echo "[Desktop Entry]

Name=Home Folder
Comment=Open your personal folder
TryExec=nautilus
Exec=nautilus --no-desktop
Icon=user-home
Terminal=false
StartupNotify=true
Type=Application
Categories=GNOME;GTK;Core;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-Ubuntu-Gettext-Domain=nautilus

X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads
[Videos Shortcut Group]
Name=Videos
Exec=nautilus Videos
TargetEnvironment=Unity


[Documents Shortcut Group]
Name=Documents
Exec=nautilus Documents
TargetEnvironment=Unity

[Music Shortcut Group]
Name=Music
Exec=nautilus Music
TargetEnvironment=Unity

[Pictures Shortcut Group]
Name=Pictures
Exec=nautilus Pictures
TargetEnvironment=Unity

[Downloads Shortcut Group]
Name=Downloads
Exec=nautilus Downloads
TargetEnvironment=Unity" | sudo tee /usr/share/applications/nautilus-home.desktop

If the quicklists don't show up, you may need to log out or restart Unity.

(tip via AskUbuntu)





Want to remove Unity Places Files / Applications shortcuts from the Unity Launcher?

Unity launcher

Clicking the Ubuntu logo in the top left corner of the screen and then "More Apps" or "Find in Files" will let you access the Unity Places Files / Applications. You can also directly search in Dash for an application name. However, 2 more shortcuts are placed on the launcher that serve the same purpose: Unity Place Files / Applications:

Unity place files applications


Since vertical space is important even on a large monitor, if you can find your way without these 2 Unity places, you'll probably want to remove them. Here's how to do it:

- firstly make a backup of the original files (the following commands will back them up in the "backups" folder in your home directory):
mkdir ~/backups
cp /usr/share/unity/places/applications.place ~/backups/
cp /usr/share/unity/places/files.place ~/backups/

Now, to hide Unity Place Files icon, run this command:
sudo sed -i '14i ShowEntry=false' /usr/share/unity/places/files.place

And to hide the Unity Place Applications icon, run this:
sudo sed -i '12i ShowEntry=false' /usr/share/unity/places/applications.place

Only run the above 2 commands once! Then log out and log back in or run "unity --replace".

If you want to restore the icons, remove the first "ShowEntry=false" entry in these two files:
  • /usr/share/unity/places/applications.place
  • /usr/share/unity/places/files.place

Or restore your backup:
sudo cp $HOME/backups/*.place /usr/share/unity/places/

(tip thanks to Richard Arkless; via Ubuntuforums)






By default, LibreOffice doesn't uses the AppMenu (Global Menu) which makes it inconsistent with the rest of the desktop.

LibreOffice appmenu

But you can manually install AppMenu support for LibreOffice:
sudo apt-get install lo-menubar

Note: it seems the LibreOffice AppMenu doesn't always work ok so if you're experiencing any issues with it, simply uninstall it (use "remove" instead of "install" in the above command).






Can't get the time indicator to display the weather?

Weather Indicator

That's because it doesn't support it. But you can get the weather in your panel by installing Weather Indicator which is available in the official Ubuntu 11.04 repositories:
sudo apt-get install indicator-weather

Once installed, run it from Dash.





Ubuntu Software Center doesn't let you install some application you really like, displaying the following error: "The package is of bad quality"? Install the .deb using DPKG, like so:
sudo dpkg -i PACKAGENAME.deb

Gdebi

Or use Gdebi to install .deb files instead of Ubuntu Software Center.





Dash takes the whole screen size? This happens for some smaller screen laptops or netbooks.

Ubuntu 11.04 Dash

This won't work for any computer (like 10'' netbooks) but if you have a big enough resolution (like 1366x768), you can make Dash smaller (like in the screenshot above) by running the following command:
gsettings set com.canonical.Unity form-factor "Desktop"

In case you want to revert this change, use:
gsettings set com.canonical.Unity form-factor "Automatic"





By default, to access the Software Sources (where you can see and add repositories and PPAs) you must open Ubuntu Software Center and only then access Software Sources.

Software Sources

Fix this by searching for "Main Menu" in Dash, then enable "Software Sources" under System > Administration.




Do you miss an "show desktop" icon on the Unity Launcher?

Show desktop Unity

Run the following commands in a terminal:
sudo apt-get install wmctrl
cd
wget http://webupd8.googlecode.com/files/showdesktop.tar.gz
tar -xvf showdesktop.tar.gz && rm showdesktop.tar.gz
sudo mv showdesktop /usr/local/bin/

Then navigate to your home folder and drag and drop the "showdesktop.desktop file on your Unity launcher. Or use SUPER + D keyboard shortcut to show/hide the desktop.






Want the systray (notification area) back?

Unity Systray

Enable it for all applications using the following command:
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

Then log out and log back in.

Important: if AppIndicators stop working or you can't enable the systray using the above command (it seems that sometimes changing this via command line fails), see: How To Re-Enable The Notification Area (Systray) In Ubuntu 11.04, For All Applications and try to only whitelist a few applications.






Don't like the AppMenu (GlobalMenu)?

Disabled AppMenu

Uninstall it:
sudo apt-get remove appmenu-gtk indicator-applet-appmenu indicator-appmenu

Then log out and log back in.

But this will probably remove the ubuntu-desktop meta package. If you want, you can also disable it, either for all applications or only some: Disable The AppMenu (Global Menu) In Ubuntu 11.04.






Are the external devices / mounted partitions cluttering your Unity launcher?

Mounted drives Unity launcher
Hide them:
gsettings set com.canonical.Unity.Devices devices-option "Never"






Hate the new overlay scrollbars?

Ubuntu regular scrollbars

Remove them:
sudo apt-get remove overlay-scrollbar liboverlay-scrollbar-0.1-0

Just like with AppMenu, this may remove the ubuntu-desktop meta package. If that's the case, disable the overlay scrollbars instead of removing them: How To Disable The Overlay Scrollbars In Ubuntu 11.04 [Quick Tip]





Missing your favourite applet? Try finding an AppIndicator equivalent: there's a huge list on AskUbuntu and we've also posted more in-depth posts on most of them.





And of course, the "ultimate fix": don't like Unity but want to use Ubuntu 11.04? Unity doesn't work with your computer's hardware? You have 3 options:

Classic Ubuntu 11.04

- in the login screen, select the "Ubuntu Classic" session and everything will look like in Ubuntu 10.10 (except for updated packages and overlay scrollbars).



Unity 2D

- use Unity 2D:
sudo apt-get install unity-2d

Then in the login screen, select Unity 2D instead of "Ubuntu" session.



GNOME Shell

- install GNOME 3 with GNOME Shell via GNOME 3 PPA (warning: you won't be able to use Unity after using this PPA) or if you want to use both Unity and GNOME Shell, compile it yourself (this will allow you to easily switch back to Unity if you want).



Do you know something else that needs tweaking / fixing in Ubuntu 11.04 Natty Narwhal? Let us know in the comments!

Selasa, 19 April 2011

How To Display An Icon Only For The MeMenu [Quick Tip]

MeMenu Ubuntu icon only

Want to display an icon only for the Ubuntu MeMenu (the indicator that displays your status)? Just run the following commands in a terminal:

gconftool -s /system/indicator/me/display --type int 0
killall gnome-panel

For me, the MeMenu dissapeared completely (in Ubuntu 10.10) after running the first command but a panel restart fixed it. However, setting it back to "1" didn't require a panel restart.

[via AskUbuntu]

Senin, 18 April 2011

Get Evolution To Minimize To The Messaging Menu Instead Of Closing [Patched Evolution Indicator]

Evolution Indicator

I've seen numerous requests for making Evolution minimize to the Messaging Menu when closing the main window but for whatever reason, this wasn't implemented in Ubuntu.

But I've recently discovered a PPA for Ubuntu 10.10 Maverick Meerkat (I've only tested it in Ubuntu 10.10 and Evolution 2.30.3!) that provides a patched Evolution Indicator which allows you to close the main Evolution window yet still get new email notifications - basically the Evolution window is minimized to the Messaging Menu (Evolution Indicator) instead of closing.

Install the patched Evolution Indicator in Ubuntu 10.10 using the following commands:
sudo add-apt-repository ppa:goehle/goehle-ppa
sudo apt-get update
sudo apt-get install evolution-indicator

There is one bug though: when you click "Compose New Message" or "Contacts" in the Messaging Menu, both the main Evolution Window and the contacts / new mail windows open. But that's nothing major so if you're among those who were waiting for this feature ever since Ubuntu got the Messaging Menu / Indicators, I'm sure this won't stay in your way of using this patched Evolution Indicator.



Bote: Unfortunately there is no patched Evolution Indicator for Ubuntu 11.04 Natty Narwhal yet.

Kamis, 14 April 2011

How To Install .Deb Files When Getting "The package is of bad quality" Error In Ubuntu Software Center

Ubuntu Software Center - error installing .deb

When trying to install a .deb file using Ubuntu Software Center in Ubuntu 11.04, you may get an error like the following:

The package is of bad quality

The installation of a package which violates the quality standards isn't allowed. This could cause serious problems on your computer. Please contact the person or organisation who provided this package file and include the details beneath.

See these examples: 1, 2, 3, 4 and many others (those are links to comments by users having this issue). After some recent updates, the error is not so often as it used to, but it's still annoying and it stops you from installing various applications.

There's no way to fix it unless those who have created the .deb fix it, but you can still install these packages by not using Ubuntu Software Center for installing .deb files. You can install .deb files either by using "dpkg" or Gdebi.


Note: sometimes, those packages are indeed of bad quality, but most of the times are just simple errors in the package description and such, which do not affect you. Either way, install them at your own risk!


1. Install .deb files using dpkg.

Assuming you've downloaded the .deb in your ~/Downloads folder, run the following commands in a terminal to install all the .deb files:

cd ~/Downloads
sudo dpkg -i *.deb
sudo apt-get install -f

(the last command is required for installing the dependencies)


2. Install .deb files using Gdebi (this was the default behavior until Ubuntu Software Center was made default).

Install .deb GDEBI

Firstly, install Gdebi by clicking the button below:


You can also install it using a terminal:
sudo apt-get install gdebi gdebi-core

You can then right click a .deb file and select "Open with Gdebi Package Installer".

If you want, you can set Gdebi default for installing .deb files instead of Ubuntu Software Center: right click a .deb file, select "Properties", go to the "Open With" tab and select "GDebi Package Installer" instead of "Ubuntu Software Center". Click "Close" and double click the .deb file - it should now open with GDebi and not Ubuntu Software Center:

Gdebi

Minggu, 10 April 2011

How To Disable The Overlay Scrollbars In Ubuntu 11.04 [Quick Tip]

regular scrollbar Ubuntu 11.04

About a month ago we wrote about getting all applications to use the new overlay scrollbars in Ubuntu 11.04 but now that the overlay scrollbars are default, we got an email about removing them.

So, for everyone searching for this, here's how to disable the overlay scrollbars in Ubuntu 11.04. Simply open a terminal and copy/paste the following commands:
sudo su
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars

Then restart your computer.

Minggu, 27 Maret 2011

Fix Skype Menus With Dark Themes (Like Ambiance) [Quick Linux Tip]

Skype menu dark themes

By default, Skype doesn't play very nicely if you use a theme with dark menus. This is a serious inconvenient since Skype is a very popular application and the default Ubuntu theme - Ambiance - uses dark menus. But this is actually very easy to "fix".

To make the Skype menu readable when using a dark theme, go to the Skype options (you need to be logged in to do this) and on the "General" tab, under "Choose style" select "Desktop settings":

Skype options


Then, click "Apply" and restart Skype. The Skype menus should now be readable.

Minggu, 20 Maret 2011

Install Nautilus Elementary 2.32.2 In Ubuntu 11.04 Natty Narwhal And 10.10 Maverick Meerkat

Nautilus Elementary screenshot

Since Nautilus Elementary 2.32.2 has just been uploaded to the PPA for Ubuntu 11.04 Natty Narwhal and 10.10 Maverick Meerkat, I had to write a new post about installing it as well as some extra goodies.

Nautilus Elementary 2.32.2 comes with all the features the previous version had (but no new features) as well as many bug fixes. Also, the search is not using Zeitgeist anymore.


Install Nautilus Elementary 2.32.2 in Ubuntu 11.04 and 10.10


Add the Nautilus Elementary PPA and install the latest 2.32.2 in Ubuntu 11.04 Natty Narwhal and 10.10 Maverick Meerkat using the following commands:
sudo add-apt-repository ppa:am-monkeyd/nautilus-elementary-ppa
sudo apt-get update
sudo apt-get dist-upgrade

"sudo apt-get dist-upgrade" is required because Nautilus Elementary has some extra dependencies: ne-terminal-config and xterm.

Once installed, you must restart Nautilus using the following command:
nautilus -q


Extra options provided by Nautilus Elementary


So what does Nautilus Elementary provide that makes it so cool? On a first look you'll notice a revamped sidebar [1 - screenshot below] where in which the "Personal", "Devices" and "Network" categories have an expander. But that's just the beginning. Read on!


Tweaks


Nautilus Elementary

For some cool tweaks, head o head over to Edit > Preferences and you'll notice a new "Tweaks" tab. Here you can:
  • enable RGBA transparency (this doesn't work for me, I'm not sure why)
  • change the toolbar orientation to vertical
  • show breadcrumbs for the pathbar (your theme needs to support this) [2]
  • show zoom slider [3]
  • show mini view widget [4]


If you use a theme that doesn't support breadcrumbs, check out these 2 posts: Nautilus Elementary Breadcrumbs For Any Theme and Victory: Yet Another Nautilus Elementary Breadcrumbs Hack For Any Theme - it only takes a couple of commands to get any theme to use breadcrumbs with Nautilus Elementary.


ClutterFlow


Now head over to a folder where you have some pictures / wallpapers and press F4. This is ClutterFlow:

Nautilus Elementary Clutterflow


If you get a black region instead of ClutterFlow, open a terminal and paste this:
echo "export CLUTTER_VBLANK=none" | sudo tee -a /etc/environment

Then log out and log back in.


Embedded terminal


Nautilus Elementary

Nautilus Elementary also comes with an embedded terminal. Select View > Embedded Terminal or press F7. Navigating through folders, the Nautilus Elementary terminal will change folders too. And you can configure it: right click it and select "Configure Terminal". Here you can choose to show scrollbar, the default terminal height, colors and font.


Configurable toolbar


Nautilus Elementary

You can right click anywhere next to the toolbar / menubar and then select to hide various elements of the UI such as the main toolbar, side pane, menubar or statusbar. But don't worry, hiding the menubar will display an extra button on the toolbar and you can re-enable it temporarily by pressing F8.

And finally: you can customize the toolbar any way you want. You can even add the "Edit location" button that was removed from the upstream Nautilus. Simply right click the toolbar and select "Customize toolbar":

Nautilus Elementary


Gloobus Preview


Gloobus Preview

Nautilus Elementary comes with built-in Gloobus Preview keyboard shortcut: if you've installed Gloobus Preview, press SPACE to preview a picture, some document, music or video file, etc.

Gloobus Preview is designed to enable a full screen preview of any kind of file:

Gloobus Preview


Gloobus Preview is available in the Nautilus Elementary PPA for Ubuntu 11.04 Natty Narwhal too (it has just been uploaded). Install it using the following command:
sudo apt-get install gloobus-preview


Uninstall Nautilus Elementary and install the upstream Nautilus back


Something went terribly wrong or you just don't like Nautilus Elementary? You can easily revert to the Nautilus version in the official Ubuntu repositories using the following commands:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:am-monkeyd/nautilus-elementary-ppa

Then, restart Nautilus (or log out and log back in):
nautilus -q

Senin, 07 Maret 2011

Firefox 4: Get Tabs In The Title Bar (Like Chrome)

Firefox 4 Ubuntu Tabs In The Title Bar

If you like how Chrome displays the window controls (close, minimize and maximize buttons) next to the tabs and want this in Firefox, you'll be glad to know it's quite easy to achieve.


Before we proceed, here are a couple of screenshots using Ambiance and Orta Stylish themes (these are styles for the buttons only):

Firefox 4 no titlebar buttons Ubuntu

Firefox 4 tabs in titlebar screenshot Ubuntu



How it works


What you'll get: window controls (close, minimize, maximize buttons) next to the Firefox menu and no titlebar for maximized Firefox windows only. Unmaximized windows will still have the regular window titlebar and buttons (unless you apply the tweaks at the end of the post).

Using Stylish, you'll also get those buttons to integrate with Ambiance and Orta GTK themes. Unfortunately for now these are the only 2 styles available so if you use a different theme, the buttons won't respect your GTK theme.

There is another way of doing this: using Window Applets but that's for those that use a Gnome Panel on top. If you don't use a Gnome Panel, then the instructions in this post will allow you to still have window buttons in Firefox while removing the titlebar.


Get the window controls next to the Firefox 4 menu and remove the Firefox titlebar


1. For this you'll need the latest Firefox 4 (either from the Mozilla daily PPA or from HERE), Stylish and Hide Caption Titlebar Plus Firefox extensions. Install them, restart Firefox 4 and proceed to step 2.

2. In Firefox 4, go to Addons, select the Hide Caption Titlebar Plus extension and click "Preferences". Here, on the "Look & Feel" tab, set the following:
  • Show Firefox 4's titlebar: Disabled
  • Uncheck "New Firefox 4's option: Place Tabs in the Titlebar
  • Skin for minimize, max & close buttons: "Auto. Current theme's skin"
  • Minimize, Max & Close Buttons located at top-right corner: Disabled
  • Uncheck Floating buttons appears when hovering micro-button or main menu is activated

Here's a screenshot with the exact settings:

HCTP look feel tab


On the "Look & Feel 2" tab (yes, another Look & Feel tab):
  • Uncheck: Enable custom Firefox Application "Home" button

Here's a screenshot for this too:

HCTP settings


3. Right click on the tab bar and select customize, then drag and drop the "[hcp] Min, Max, Close Buttons" item next to the Firefox menu:

Firefox 4 HTCP dragndrop


4. Now you should see some buttons next to your Firefox menu but they look ugly. To get some nice looking Ambiance-style buttons, install HCTP Ambiance theme. There's also an Orta HCTP theme (only enable one!).

Update: here's another Orta style with a modified alignment which looks better (thanks to Janhouse!).


5. Install CompizConfig Settings Manager:
sudo apt-get install compizconfig-settings-manager


CCSM screenshot

And go to the "Window Decorations" plugin settings and under "Decoration windows", enter:
any & !(class=Firefox & state=maxvert & role=browser)

Important: "class=Firefox" is for those using Firefox 4 stable from the FF stable Ubuntu PPA. If you're using Minefield, replace "Firefox" with "Minefield".

Now when you maximize Firefox, the titlebar should be removed and the window buttons should be displayed next to the Firefox menu (or wherever you've placed the buttons).


Apply this for unmaximized Firefox windows too


If you want to remove the window titlebar and get the close, minimize and maximize buttons for unmaximized Firefox windows too, in step 5 above, instead of "any & !(class=Firefox & state=maxvert)" use:
any & !(role=browser & class=Firefox)

You'll also need to edit the Ambiance / Orta Stylish user style to get the buttons on unmaximized Firefox window: Go to Addons > User Styles, then right click "HCTP Ambiance theme" or "HCTP Orta theme", select "Edit" and then:

- for Ambiance, remove the following code (you should find it somewhere near the end of the file):

/*Hide Buttons when unmaximized */
#main-window[sizemode="normal"]
.hc-mmcbuttons-cls
{
display:none !important;
}

Then click save.


- for Orta there are 2 steps:

1) search for "#main-window[sizemode="maximized"] #TabsToolbar{" (it should be somewhere near the top of the file) and remove "#main-window[sizemode="maximized"]" so that the line looks like this:
#TabsToolbar{

2) then, just like for Ambiance, remove the following code (you should find it somewhere near the end of the file):
/*Hide Buttons when unmaximized */
#main-window[sizemode="normal"]
.hc-mmcbuttons-cls
{
display:none !important;
}

Then save.


Credits for the instructions and user styles: arzali @ Ubuntuforums.

Minggu, 06 Maret 2011

How To Add Minimize And Maximize Buttons Back In Gnome Shell

Gnome Shell buttons

As you probably know, Gnome Shell has removed the minimize and maximize buttons and the windows now only have a close button, but just as it was when the window controls to the left, you can change this.

When Gnome 3.0 will be released, you should be able to add back the minimize and maximize buttons from the "GNOME Plumbing" panel in the Control Center or using "gsettings" (command line tool). Until then, if you use Gnome Shell in Ubuntu 10.10, you can set it to use "minimize, maximize, close" buttons using the following command:

gconftool-2 -s -t string /desktop/gnome/shell/windows/button_layout ":minimize,maximize,close"

You can change the button order in the above command. For instance, to set the buttons to the left side of the window like in Ubuntu 10.10, you would have to edit the command like this: "close,minimize,maximize:".

You can also do this the visual way: press ALT + F2 and enter "gconf-editor", then navigate to desktop > gnome > shell and change the "button_layout" value as explained above.

Update: a new tool has been created for adding back the Minimize and Maximize buttons in GNOME shell as well as many other options like changing the theme, icons, fonts and much more. See GNOME Tweak Tool.

Kamis, 24 Februari 2011

Get Notifications With A Close Button In Ubuntu

Awn notification daemon

A lot of people want a close button for the Ubuntu notifications but unfortunately this won't happen - they don't want NotifyOSD to be customizable. But you can get notifications that have a close button by using the AWN Notifications Daemon.

We have a patched NotifyOSD that provides options to move the notifications to a different corner and such, but unfortunately it doesn't have an option to add a close button, however not many people are aware of the "Notification daemon" Avant Window Navigator applet. This applet has been around for a long time and it replaces NotifyOSD, providing some cool customizations (and of course, the notifications have a close button!): you can place the notifications anywhere on the screen, you can set it to display an icon in AWN that you can use to turn the notifications on/off with a click, set a sound for the notifications, specify custom colors for the notifications (or use the AWN theme colors), transparent (gradient factor) and more.

There's only one feature missing in the AWN Notification Daemon: there's no option to configure the font size. You can configure the font color, make the text body bold, but you can't change the font size and while the notifications look ok when using the default Ubuntu 10.10 font size (11 - but it looks ok with a font size of 10 too), it looks kind of small on my system with my preferred font size (9).


How to configure AWN Notification Daemon


Gconf editor AWN notifications daemon

To use the Avant Window Navigator Notification Daemon applet, simply install Avant Window Navigator and all the extra applets and add the "Notification Daemon" to the dock.

AWN Notification Daemon applet doesn't have a settings dialog, but you can tweak it using Gconf Editor. To customize it, press ALT + F2 and enter:
gconf-editor

Then navigate to apps > awn-applet-notification-daemon (this is for the latest AWN from the AWN trunk PPA, it may be apps > avant-window-navigator > awn-applet-notification-daemon on older versions of Avant Window Navigator). Clicking a key will display its description at the bottom so you'll know how to tweak it. The most important key is: "kill_standard_daemon" - make sure this is enabled or else the AWN notifications won't work.

For instance, "override_x" is the horizontal position on the screen (for which I've used "1900" because my screen width is 1920 and I want the notifications to be displayed on the right), "override_y" is the vertical position (for which I've used "30" so the notification dialog is displayed in the top right corner) and "gradient_factor" is the transparency. That should be enough to get you started.

To customize the colors, uncheck the "use_theme" box, then specify a "text_colour" and "bg_colour" and so on.

An important feature you may want to turn on is "show_icon". This will display an icon on your Avant Window Navigator dock which you can then click to temporarily disable/enable the notifications.


How to test the notifications


When you configure the AWN Notification Daemon notifications, you'll want to see how they look. You can send a test notification by using "notify-send". To use it, install the following package:
sudo apt-get install libnotify-bin

Then copy/paste the following command in a terminal (this is the command I've used for the screenshot in this post, you can tweak it any way you want):
notify-send --icon="chromium" "Notification title" "Test notification - body text"



Want the regular NotifyOSD notifications back? Simply remove the applet from Avant Window Navigator.