2014-08-31 11:55

Mathilde’s contribution:

This script allows you to launch a search by filesize on opensubtitles.org, with a simple right-click on a video file.

If it does not exist, create the .local/share/nautilus/scripts directory in your personnal folder (from Nautilus, you can use the Ctrl+H shortcut to display hidden files and be able to see the .local directory).

Save the subtitle file in .local/share/nautilus/scripts

Add execution permission to the script, in file properties, or running the command chmod +x ~/.local/share/nautilus/scripts/subtitle

Open Nautilus (aka “Files”). Select the film you want to search subtitles for, right-click > scripts > subtitle.
A browser window will open directly on opensubtitles.org with your search results.

NB:
By default, the script will search subtitles in english. To change the language, open the script and change the LANG variable.

Content of subtitle script:

#!/bin/bash

LANG=eng
#LANG=fr

FILE=$1
SIZE=$(stat -c %s $FILE)

xdg-open "http://www.opensubtitles.org/eng/search/sublanguageid-$LANG/moviebytesize-$SIZE"
2014-08-31 11:55 · Tags: ,
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: , ,