You are not logged in.
True, if you know why you might want to edit a deb file's control data you probably know how to do it - or will after you've checked out half a dozen man pages to remind yourself of the exact commands... So if you're not doing this every day it can be handy to have a script that remebers it all for you.
Occasionally you might have downloaded a deb file with a dependency that you know you don't need, can't install or maybe doesn't exist because it's mis-spelled - whatever, gdebi or dpkg won't let you install it unless you change the dependencies in the control file. If you add this script to your Thunar custom actions, for "other files", pattern "*.deb", then it will appear in the right-click menu for .deb files, and let you make a modified file in the same directory with edited control data. Be careful. Don't do this kind of thing too often, as you can get in a real mess (as I discovered yesterday trying to install a recent vlc on #! 9.04). Even so, it can come in quite handy now and then.
This script is adapted from this Ubuntu forums thread, tweaked to be usable without a terminal (using notify-send for feedback) and a couple of other what-I-like-to-think-of-as improvements 
#!/bin/bash
# edit the control data of a deb file,
# usually to get round a dependency problem
# adapted from http://ubuntuforums.org/showthread.php?t=636724
# needs libnotify-bin for notifications if used without a terminal
# choose your editor:
EDITOR=gedit
####################
[[ "$1" ]] || { echo "Syntax: $0 debfile" >&2; exit 1; }
DEBFILE="$1"
TMPDIR=$(mktemp -d /tmp/deb.XXXXXXXXXX) || exit 1
OUTPUT="${DEBFILE%.deb}".modfied-$( date +%FT%T ).deb
if [[ -e "$OUTPUT" ]]; then
echo "$0: $OUTPUT exists." >&2
rm -r "$TMPDIR"
exit 1
fi
dpkg-deb -x "$DEBFILE" "$TMPDIR"
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN
CONTROL="$TMPDIR"/DEBIAN/control
[[ -e "$CONTROL" ]] || {
echo "$0: DEBIAN/control not found in $1." >&2
[ -t 1 ] || notify-send "$1: DEBIAN/control not found."
rm -r "$TMPDIR"
exit 1
}
MOD=$(md5sum "$CONTROL")
$EDITOR "$CONTROL"
if [[ $MOD = $(md5sum "$CONTROL") ]]; then
[ -t 1 ] && echo "Not modfied."
else
[ -t 1 ] && echo "Building new deb..." || notify-send "Building new deb..." "Please wait a moment."
dpkg -b "$TMPDIR" "$OUTPUT"
[ -t 1 ] && echo "Built new debfile: $OUTPUT" || notify-send "Built new debfile:" "$OUTPUT"
fi
rm -r "$TMPDIR"
exitJohn
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Or just use the --force-depends option
Also capable of really borking your machine!
Offline
hi! thanks for the very useful post. i've just used your script as a solution to my problem. I wanted to install MIT's scratch, a tool for learning to programme. in order to get the deb to install i needed to edit the control file (more details on that here: http://forums.debian.net/viewtopic.php?f=6&t=70241. not having any idea how to do this i searched and stumbled across your post. I saved your script as a file in my /usr/bin/ folder, gave the 'users' group r+w access, made the file executable, followed your instructions, installed libnotify-bin, and it worked like a charm. thanks so much!
Offline
Glad it helped 
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.