2010-01-26 23:51

Under Ubuntu, or any distribution using Gnome, you can do almost anything without using the command line.

To configure some things, you still have to edit a configuration file. To configure your desktop, a lot of online documentation still requires you to to edit /etc config files.

To help non linux experts, you can try the nautilus-gksu package. It permits you to edit any file as administrator with a simple right-click on the file.

Personnaly, I prefer launching Nautilus as root, as it allows more than simple file edition power (permission change, deleting…).

I create a launcher for this task, a bit like the Administrator Terminal in Applications > System Tools:

  1. Right-click on the panel > Add to panel, Custom Application Launcher.
  2. Name: Nautilus superuser
  3. Command: gksu nautilus

Et voila.

2010-01-26 23:51 · Tags: , ,
2010-01-26 23:09

In some modern distributions like Ubuntu, there are preconfigured user directories like Desktop, Download, Documents, Images, Music, Vidéos.

ubuntu_user_dirs.png

You can remove some of the directories you don’t use, or rename some of them.

If you change their name, you can set their new place in your ~/.config/user-dirs.dirs file:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Bureau"
XDG_DOWNLOAD_DIR="$HOME/telech"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/public"
XDG_DOCUMENTS_DIR="$HOME/docs"
XDG_MUSIC_DIR="$HOME/zic"
XDG_PICTURES_DIR="$HOME/images"
XDG_VIDEOS_DIR="$HOME/cine"

Then restarting Nautilus should be sufficient. Otherwise restart your Gnome session.

References:

2010-01-26 23:09 · Tags: , ,
2010-01-02 14:43

Looking for a simple and lightweight terminal, I found urxvt.

xvt and rxvt don’t support Unicode characters. You have to use urxvt :

aptitude install rxvt-unicode

Not that I find xterm too slow for my use. My “geek curiosity” took over. I don’t like terminal tabs but instead open plenty of different terminal windows. urxvt could certainly do the job.

Then you can customize urxvt using the ~/.Xdefaults file :

vi ~/.Xdefaults
Rxvt*scrollBar: False
Rxvt*background: black
Rxvt*foreground: white
Rxvt*geometry: 110x35

The geometry I use allow me to open 4 terminal windows in my screen.

Note: you can also put parameters in ~/.Xresources but you’ll have to restart X or use the xrdb -merge ~/.Xresources command to load parameters.

I also suggest you the use of a keyboard shortcut to start your terminals. In Gnome :

  1. Set your default terminal in System > Preferences > Prefered Applications
  2. Then in System > Preferences > Keyboard Shortcuts, set the Start Terminal entry. I use Alt+X.

References :

2010-01-02 14:43 · Tags: , , ,
2009-12-10 20:36

Under Ubuntu, the keyring is automatically locked by default while hibernating. When starting Ubuntu after hibernation, it prompts you for the keyring password.

To disable this lock:

  1. Go in Applications > System Tools > Configuration Editor
  2. Uncheck /apps/gnome-power-manager/lock/gnome_keyring_hibernate

Note: you can also launch the config editor with the gconf-editor command.

Reference:

  • A “lock” search in the configuration editor.
2009-12-10 20:36 · Tags: , , , ,
2009-12-10 00:23

When you have enabled automatic login under Gnome/Ubuntu, the window asking your password to unlock the keyring at startup is very annoying ! Network-manager needs it to be able to use the Wifi keys.

If your keyring password is the same as your login password, the keyring is unlocked automatically when you type in your password to log in. This is not possible with autologin.

A solution is to put an empty keyring password. This is bad for security of all your passwords.

The best solution would be to store the wifi keys in the default keyring, and to store all the other passwords in another keyring. Maybe I didn’t check correctly, but from what I seen most applications only use the default keyring.

Average solution: put a “foo” password to the default keyring, unlocked at Gnome startup by a script. This is better than an empty password.

Here is my solution:

We change the default keyring password:

  1. Go in Applications > Accessories > Passwords and encryption keys (don’t loose 2 hours like me looking for it in System > Preferences, where it should be)
  2. Right click on the default keyring > Change password

We then create the python script with the following code:

vi ~/.lordiam.py
#!/usr/bin/python
import gnomekeyring
#gnomekeyring.lock_sync(None);
gnomekeyring.unlock_sync(None, 'mypassword');

We prevent other user from reading the file:

chmod 700 ~/.lordiam.py

We test it. Expect 0 as return code (the warning is normal):

~/.lordiam.py
echo $?

Now, we add the script at startup in System > Preferences > Startup Applications:

Command: /home/USER/.lordiam.py

Finally, we reboot the PC to test the whole thing.

Notes:

  • The fact that the script is called before network-manager start is a chance. I didn’t found how to put a priority on it in the Gnome startup programs.
  • What is the ‘login’ keyring for ? From what I understand, it is for storing passwords which will be forgotten at session end.
  • For the script, we choose a common name, less remarkable than unlock_keyring.py. We also put the script as hidden file. It is better than nothing.

References:

  • apt-get source libpam-gnome-keyring
  • apt-get source python-gnomekeyring
2009-12-10 00:23 · Tags: , , ,
2009-10-23 14:32

Here is how I configured dual screen under Debian unstable.

Xrandr

By default, the video card displays the same on both screens.

We first type the xrandr command to show the available video outputs.

Then, we issue the magical command:

xrandr --output DVI-1 --left-of DVI-0

Notes:

  • If xrandr displays an error, add the Virtual parameter to the /etc/X11/xorg.conf file and restart X (see below).
  • Try --right-of if it’s inverted !

Xorg settings

And to set the changes permanently, we edit /etc/X11/xorg.conf:

Section "Device"
        Identifier      "ATI Technologies Inc RV380 [Radeon X600 (PCIE)]"
        Driver          "ati"
 
        Option          "Monitor-DVI-0" "Screen 1"
        Option          "Monitor-DVI-1" "Screen 2"
EndSection

Section "Monitor"
        Identifier      "Screen 1"
EndSection
Section "Monitor"
        Identifier      "Screen 2"
        Option          "RightOf" "Screen 1"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "ATI Technologies Inc RV380 [Radeon X600 (PCIE)]"
        Monitor         "DELL 1704FPT"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1280x1024" "1152x864" "1024x768" "800x600" "720x400" "640x480"
                Virtual         2560 1280
        EndSubSection
EndSection
  • In the “Device” section, we list the different screen as “Monitor-OutputName”.
  • Then we put one section by screen, setting the second screen position.
  • The subsection “Screen > Display” must contain the “Virtual” parameter with a pixel area big enough to contain both resolutions.

Note: you can also try the graphical grandr frontend.

Gnome panels

You now have two screen under Gnome : a main one and a second.

If you want your panels on the other screen, just move them (right click on panel > Properties, uncheck Extend, move the panel, check Extend again).

I also suggest you to add another panel with a new window list on your second screen.

References:

2009-10-23 14:32 · Tags: , , ,
2009-08-10 10:28

When printing an image under Gnome (Eye of Gnome or eog), I did’nt find how to put the page in landscape mode.

Solution: before printing, just rotate the image in eog, then print the image.

2009-08-10 10:28 · Tags: ,