[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: impostare iron come browser predefinito



On 15/02/2012 09:36, enrico tognoni wrote:
On 14/02/2012 20:40, Davide Prina wrote:
forse ti conviene usare l'opzione: --install

ho provato: (prima ho creato il link symbolic)
update-alternatives --install /etc/alternatives/iron iron
/usr/share/iron/iron
ho provato anche questo:
sudo update-alternatives --install /etc/alternatives/x-www-browser iron
/usr/share/iron/iron

mi sa che hai fatto qualche errore

$ man update-alternatives
[...]
       --install link name path priority [--slave link name path]...
Add a group of alternatives to the system. link is the generic name for the master link, name is the name of its sym‐ link in the alternatives directory, and path is the alternative being introduced for the master link. The arguments after --slave are the generic name, symlink name in the alternatives directory and the alternative path for a slave link. Zero or more --slave options, each followed by three arguments, may be specified. Note that the master alterna‐ tive must exist or the call will fail. However if a slave alternative doesn't exist, the corresponding slave alterna‐ tive link will simply not be installed (a warning will still be displayed). If some real file is installed where an alternative link has to be installed, it is kept unless --force is used.

If the alternative name specified exists already in the alternatives system's records, the information supplied will be added as a new set of alternatives for the group. Otherwise, a new group, set to automatic mode, will be added with this information. If the group is in automatic mode, and the newly added alternatives' priority is higher than any other installed alternatives for this group, the symlinks will be updated to point to the newly added alternatives.
[...]

se non capisci cosa significano link, name, path, priority, ... cerca un esempio!

$ update-alternatives --query x-www-browser
Link: x-www-browser
Status: auto
Best: /usr/bin/epiphany-browser
[...]

quindi epiphany-browser è un esempio

$ apt-file search /usr/bin/epiphany-browser
epiphany-browser: /usr/bin/epiphany-browser
epiphany-browser-dbg: /usr/lib/debug/usr/bin/epiphany-browser
$ cd /tmp
$ apt-get download epiphany-browser
Scaricamento di:1 Scaricamento di epiphany-browser 3.2.1-2 [1445 kB]
Recuperati 1445 kB in 5s (252 kB/s)
$ ar x epiphany-browser_3.2.1-2_amd64.deb
$ tar zxvf control.tar.gz
./
./postrm
./prerm
./md5sums
./postinst
./preinst
./control
$ cat postinst
#!/bin/sh
set -e

PRIO=85
for alt in x-www-browser gnome-www-browser; do
    update-alternatives --install \
        /usr/bin/$alt $alt /usr/bin/epiphany-browser $PRIO \
--slave /usr/share/man/man1/$alt.1.gz $alt.1.gz /usr/share/man/man1/epiphany-browser.1.gz
done

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section

da cui vedi che cosa hai sbagliato nell'uso dei parametri

Attenzione che con i comandi che hai dato hai modificato dei link simbolici errati. Ti conviene eseguire la riconfigurazione dei browser che hai installato per sistemarli (più dovresti cancellare quelli che hai creato in più).

Usa l'istruzione
$ update-alternatives --query x-www-browser
per verificare se quello che hai fatto ha dato dei risultati

Attenzione a fare test che possono comprometterti il corretto funzionamento del sistema, forse sarebbe meglio se ti installi una Debian molto base con debootstrap e fai i test li

per saperne di più:
$ apt-cache show debootstrap
# apt-get install debootstrap
$ man debootstrap

Ciao
Davide

--
Dizionari: http://linguistico.sourceforge.net/wiki
Petizione contro il formato ms-ooxml:
http://www.noooxml.org/petition
Non autorizzo la memorizzazione del mio indirizzo su outlook


Reply to: