Howto: use audio-convert in Thunar
February 18, 2008 at 1:09 pm | Posted in programs, scripts, tips and tricks, xubuntu | 7 CommentsTags: actions, audio-convert, nautilus, scripts, thunar, xfce, xubuntu
One of the best scripts for GNOME’s file manager Nautilus is audio-convert. audio-convert is a program that lets you convert mp3s to oggs, wavs, and vice versa. For me, it’s one of the main reasons I use Nautilus. Now, though, I can also use it with Thunar too. Here’s how:
1) If you haven’t already, install audio-convert. To do so, open up a terminal (Xfce Menu > Accessories > Terminal) and run the following:
sudo apt-get install nautilus-script-audio-convert
2) Next, open up the Thunar file manager and go to Edit > Configure custom actions…. Click the Add (plus) sign and put in the following:
a) Under the Basic tab:
Name: audio-convert
Command: /usr/share/nautilus-scripts/ConvertAudioFile %f
b) Under the Appearance Conditions tab:
Put a checkmark next to Audio files. Click Ok and exit out of the actions manager.
Now you can right click any audio file and go to audio-convert. audio-convert will do the work from there. Enjoy!
Howto: Speed up shutdown/reboot
September 4, 2006 at 5:14 pm | Posted in scripts, tips and tricks, xubuntu | 5 CommentsThis script will speed up your shutdown and reboot process anymore, by removing the programs listed on https://wiki.ubuntu.com/Teardown.
You can download it here: Service_tune.tar.gz. Then run in the terminal (Xfce menu > System > Terminal):
tar -xvf Service_tune.tar.gz
sudo ./remove_shutdown_services.sh
Enjoy.
Script: Auto-install add-ons for Xubuntu
September 1, 2006 at 3:59 pm | Posted in scripts, xubuntu | 10 CommentsHere you have it.
This script will install everything for you: Beep-Media-Player, a Beep-Media-Player skin, aMSN, an aMSN skin, fix the CD-ROM eject problem, auto-install autologin, install IceWM, remove the system beep, install codecs, install special settings, install prelink/preload, install Flash/Java, install Ivman, set up giFT, install fonts, install extra archive support, install search with Thunar, install Opera and set it up with Xubuntu, install dash, update Xarchiver….if it can be done, it’s done. Things I’m missing are original Firefox and Thunderbird icons, extra Beep-Media-Player plugins, and perhaps tweaking xorg.conf, adding Xarchiver thunar-archive-plugin support and stopping Thunar from loading twice.
It is strongly recommended to run this after a fresh installation, some things may not work as intended otherwise. You might want to remove some options (e.g. install OpenOffice or gnome-games) beforehand.
I have no guarantee that this will work on your system!!! USE AT YOUR OWN RISK!
*ahem* Let’s get to the fun stuff. Here’s how to install it:
wget http://samztercomix.com/kim/tech/linux/programs/install-all.sh
chmod +x ./install-all.sh
./install-all.sh
Enjoy!
Known limitations:
• You’ll have to manually add menu entries to IceWM with iceme. While a good selection of apps are listed there, I can’t include every program in the menu.
• If something goes wrong during installation, you may need to edit the code to repair it. (remove any line beginning with if, else, and fi.) You may also have to remove files in ~/.install-all/backup
.
I understand loading IceWM isn’t everybody’s cup of tea; just replace xinit
with startxfce4
in ~/.bash_profile
.
If you find any more bugs, please let me know!
Script: Remove X/K/Ubuntu
August 30, 2006 at 3:39 pm | Posted in scripts, xubuntu | Leave a commentIf for whatever reason you aren’t satisfied with Xubuntu, it is easily removable. It’s doable with apt-get, but if you’d prefer, you can use this script:
Debuntu: Script to remove Kubuntu, Xubuntu or Ubuntu in full
It also works for regular Ubuntu (although he does not recommend it). Kubuntu support is also available. Instructions are in the link.
How to: Search for files with Thunar
July 12, 2006 at 9:39 am | Posted in scripts, tips and tricks, xubuntu | 14 CommentsAt long last! Using this, you can right-click anywhere on Thunar and search for files. You can also run it by itself (by running bash ~/.bash-scripts/search-for-files
).
1) Open up the terminal (Xfce menu > System > Terminal). First, we make a place for the script to stay. Then, we edit the script:
mkdir ~/.bash-scripts
mousepad ~/.bash-scripts/search-for-files
2) Paste the following into the file, and save it. (You can change the options at the top if you wish.)
#!/bin/bash
#search-for-files
# change this figure to suit yourself - I find zenity dies from about 1000 results but YMMV
maxresults=500
# again, change the path to the icon to suit yourself. But who doesn't like tango?
window_icon="/usr/share/icons/Tango/scalable/actions/search.svg"
# this script will work for any environment that has bash and zenity, so the filemanager is entirely down to you! you can add extra arguments to the string as long as the last argument is the path of the folder you open
filemanager="thunar"
window_title="Search for Files"
srcPath="$*"
if ! [ -d "$srcPath" ] ; then
cd ~/
srcPath=`zenity --file-selection --directory --title="$window_title - Look in folder" --window-icon="$window_icon"`
fi
if [ -d "$srcPath" ] ; then
fragment=`zenity --entry --title="$window_title - Name contains:" --window-icon="$window_icon" --text="Search strings less than 2 characters are ignored"`
if ! [ ${#fragment} -lt 2 ] ; then
(
echo 10
O=$IFS IFS=$'\n' files=( `find "$srcPath" -iname "*$fragment*" -printf \"%Y\"\ \"%f\"\ \"%k\ KB\"\ \"%t\"\ \"%h\"\\\n | head -n $maxresults` ) IFS=$O
echo 100
selected=`eval zenity --list --title=\"${#files[@]} Files Found - $window_title\" --window-icon="$window_icon" --width="600" --height="400" --text=\"Search results:\" --print-column=5 --column \"Type\" --column \"Name\" --column \"Size\" --column \"Date modified\" --column \"Path\" ${files[@]}`
if [ -e "$selected" ] ; then "$filemanager" "$selected" ; fi
) | zenity --progress --auto-close --pulsate --title="Searching..." --window-icon="$window_icon" --text="Searching for \"$fragment\""
fi
fi
exit
3) Make it so that Thunar is able to run the script:
chmod a+x ~/.bash-scripts/search-for-files
4) You need to put this script within Thunar’s right-click menu. Paste the following code into the terminal in order to backup the menu config and edit the current one.
cp ~/.config/Thunar/uca.xml ~/.config/Thunar/uca.xml.old ; mousepad ~/.config/Thunar/uca.xml
5) Scroll to the end of the file. Before where it says , paste in the following:
<action><icon>/usr/share/icons/Tango/scalable/actions/search.svg</icon><name>Search for Files</name><command>bash ~/.bash-scripts/search-for-files %f</command><description>Search this folder for files</description><patterns>*</patterns><directories/></action>
Save and exit.
6) To use it, open up Thunar, right click, and click on Search for Files
. Type in a filename to search, and click Ok. A list of files will show up; clicking on one of them will show the directory the file is found in.
(Credit goes to lapsey at http://ubuntuforums.org/showthread.php?t=214059)
Mini-script: List the contents of a package
July 10, 2006 at 12:23 am | Posted in scripts, xubuntu | Leave a commentIf you’re like me, you don’t want to load up Synaptic to list the contents of a package. This script will let you do that quick and easily:
#!/bin/sh
# Check for dependencies
if [ -z "`which zenity`" ]; then
xmessage "zenity is required for this program."
exit;
else
SEARCH=`zenity --title "Search package files" --entry --text "Enter search term here:"`
fi
if [ "$SEARCH" ]; then
zenity --text-info --filename=/var/lib/dpkg/info/$SEARCH.list
fi
Save it under the filename list
. Then run:
chmod +x list && sudo cp ./list /usr/bin/list && rm list
Enjoy!
Create a free website or blog at WordPress.com.
Entries and comments feeds.