Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Tuesday, December 13, 2011

Add application to Xfce/Xubuntu session startup [Xubuntu >= 11.10]

When a user logs in, the desktop environment starts do load the necessary resources to provide its functionality. Some of this process is configurable by the user. For instance, the user can choose which applications will be run when the session is loaded.

fig.1 List of applications that will be started when the user logs in
Add Application to startup
  1. Open 'Settings Manager'
  2. Select 'Session and Startup'
  3. On the 'Application Autostart' click on the 'Add' button
  4. On the dialog that opens (fig.2) write the name of the application and the command that runs the application (description isn't mandatory).
  5. Once you click 'OK' the application will be added to the list and will automatically be started on the next session login.
fig.2 Dialog for entering the information of the startup application

Wednesday, December 7, 2011

Add support for Samba shares to Thunar [Xubuntu 11.10]

Thunar is a simple and easy to use file manager and is the default choice for Xfce.
Despite the fact the it incorporates all the main features that one would expect from a modern file manager, Thunar doesn't provide a out of the box solution for accessing remote folders (namely Samba shares).

Running the command below will add support for remote folders:
$ sudo apt-get install gvfs-backends

Accessing Samba shares with Thunar

Tuesday, December 6, 2011

Add items to Xfce Applications Menu

To add an application launcher to Xfce Applications Menu is simple; all you have to do is place the *.desktop file that launches the application in the right folder.

Create the *.desktop file
Create a text file whose extension is 'desktop', with the following content:
[Desktop Entry]
Version=1.0
Type=Application
Name=ItemName
Exec=Command
Icon=IconFile
Categories=Category;


On ItemName write the name that should be displayed on the menu. Command is the command that should be run. IconFile is the path to some *.png file. The Category dictates the sub-menu where the item will be placed. See the table bellow to see what Category value you should use.

Sub-Menu Categories
Accessories Utility
Development Development
Games Game
Graphics Graphics
Internet Network
Multimedia AudioVideo
Office Office
System System
A new item can be placed on a sub-menu by selecting the right 'Categories' value

To learn more about *.desktop files see the reference at the end of this post.

Add an item for you user only
Copy the *.desktop file to: $HOME/.local/share/applications

Add an item for all users
You'll need root privileges to do this.
Copy the *.desktop file to: /usr/share/applications

After you copy the *.desktop file the new item will be automatically added to the Applications Menu.

References:
Xubuntu : XFCE Menu Items
Customize the Xfce menu
Anatomy of a .desktop File

Saturday, November 26, 2011

Window buttons on the left side [Xubuntu]

When the Ubuntu developers moved the window buttons to the left side I liked it. Now I am accustomed to move my mouse to the upper left corner and want the same for my Xubuntu configuration.

In Gnome to accomplish such task, one had to open the gconf-editor and change the apps/metacity/general/button_layout key. In XFCE4 is a little more intuitive; you can use drag-and-drop to place the buttons where you want them.

Instructions using CLI

xfconf-query -c xfwm4 -p /general/button_layout -s "CMH|O"

Instructions using GUI

  1. Open "Settings Manager" (Applications Menu > Settings > Settings Manager)
  2. Select "Window Manager"
  3. On "Button layout" section, click and drag the buttons, laying them out as shown in the image below:


Window buttons aligned to the left


If you are not satisfied with the change and want to restore the default layout, proceed as above but arrange the buttons as shown in the image below:

Window buttons aligned to the right