[Risolto] Terminale parte dalla cartella FILE DI SISTEMA
-
eduardolp3
- Entusiasta Emergente

- Messaggi: 1196
- Iscrizione: domenica 2 aprile 2006, 19:29
- Distribuzione: Manjaro 64bit
- Sesso: Maschile
- Località: Ferrara
- Contatti:
[Risolto] Terminale parte dalla cartella FILE DI SISTEMA
Cosa ho combinato?!?!?!?
Ultima modifica di eduardolp3 il mercoledì 1 marzo 2017, 11:51, modificato 2 volte in totale.
- maxbigsi
- Tenace Tecnocrate

- Messaggi: 17039
- Iscrizione: mercoledì 21 maggio 2008, 14:05
- Desktop: Xfce
- Distribuzione: MX Linux 23.2 64bit
- Sesso: Maschile
- Contatti:
Re: Terminale parte dalla cartella FILE DI SISTEMA
hai modificato il file sudoers? AmministrazioneSistema/Sudo
W il software libero..... W Ubuntu -- Ubuntu User # 31322
https://www.ergosumracalmuto.org/inform ... /index.php
https://www.ergosumracalmuto.org/inform ... /index.php
-
eduardolp3
- Entusiasta Emergente

- Messaggi: 1196
- Iscrizione: domenica 2 aprile 2006, 19:29
- Distribuzione: Manjaro 64bit
- Sesso: Maschile
- Località: Ferrara
- Contatti:
Re: Terminale parte dalla cartella FILE DI SISTEMA
No, mai fatto qualcosa del genere. Come faccio a sistemare questo pasticcio?
- Mdfalcubo
- Moderatore Globale

- Messaggi: 20420
- Iscrizione: venerdì 26 dicembre 2008, 11:17
- Desktop: Solo XFCE
- Distribuzione: Xubuntu 64 bit
- Sesso: Maschile
Re: Terminale parte dalla cartella FILE DI SISTEMA
Ubuntu o Elementary?
"Il genere umano è stimolante, è la gente che non sopporto,, (Linus - Peanuts)
-
eduardolp3
- Entusiasta Emergente

- Messaggi: 1196
- Iscrizione: domenica 2 aprile 2006, 19:29
- Distribuzione: Manjaro 64bit
- Sesso: Maschile
- Località: Ferrara
- Contatti:
Re: Terminale parte dalla cartella FILE DI SISTEMA
Elementary 0.4 Loki.
-
daigo
Re: Terminale parte dalla cartella FILE DI SISTEMA
Magari hai fatto casini con .bashrc nella tua home, posta il contenuto del file, magari qualcuno ti sa dire.
- thece
- Tenace Tecnocrate

- Messaggi: 13164
- Iscrizione: lunedì 23 aprile 2007, 14:16
- Distribuzione: Debian 12 (Bookworm) - KDE
Re: Terminale parte dalla cartella FILE DI SISTEMA
Mi sa che hai fatto saltare qualche impostazione nei Settings del tuo DE. Non penso ne nel file /etc/passwd , ne tantomeno nel file ~/.bashrc .
Comunque, per il file /etc/passwd basta controllare cosa c'è scritto con
per il file ~/.bashrc eventualmente basta ripristinarlo dal template (che dovrebbe essere /etc/skel/.bashrc), quindi dovrebbe bastare un
Comunque, per il file /etc/passwd basta controllare cosa c'è scritto con
Codice: Seleziona tutto
cat /etc/passwd | grep $USERCodice: Seleziona tutto
cp /etc/skel/.bashrc ~/.bashrc-
daigo
Re: Terminale parte dalla cartella FILE DI SISTEMA
io ho fatto una prova adesso, mettendo
in fondo a .bashrc ho il tuo stesso output il terminale si apre in /
Codice: Seleziona tutto
cd /Codice: Seleziona tutto
ubuntu@ubuntu:/$ ls
bin core home lib media proc sbin sys var
boot dev initrd.img lib64 mnt root snap tmp vmlinuz
cdrom etc initrd.img.old lost+found opt run srv usr vmlinuz.old- thece
- Tenace Tecnocrate

- Messaggi: 13164
- Iscrizione: lunedì 23 aprile 2007, 14:16
- Distribuzione: Debian 12 (Bookworm) - KDE
Re: Terminale parte dalla cartella FILE DI SISTEMA
... ovviamente ... è che quel comando non dovrebbe proprio esserci in quel file ... al limite un
ma comunque neanche questo dovrebbe esserci
Codice: Seleziona tutto
cd ~-
daigo
Re: Terminale parte dalla cartella FILE DI SISTEMA
si, non dovrebbe esserci.....ma chissà cosa ha fatto lui? non è che trafficando ce lo ha messo?
- thece
- Tenace Tecnocrate

- Messaggi: 13164
- Iscrizione: lunedì 23 aprile 2007, 14:16
- Distribuzione: Debian 12 (Bookworm) - KDE
Re: Terminale parte dalla cartella FILE DI SISTEMA
Assolutamente si. Far aprire il terminale sulla root directory lo si può ottenere in tanti modidaigo [url=http://forum.ubuntu-it.org/viewtopic.php?p=4962877#p4962877][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto:si, non dovrebbe esserci.....ma chissà cosa ha fatto lui? non è che trafficando ce lo ha messo?
-
eduardolp3
- Entusiasta Emergente

- Messaggi: 1196
- Iscrizione: domenica 2 aprile 2006, 19:29
- Distribuzione: Manjaro 64bit
- Sesso: Maschile
- Località: Ferrara
- Contatti:
Re: Terminale parte dalla cartella FILE DI SISTEMA
Grazie per le risposte,thece [url=http://forum.ubuntu-it.org/viewtopic.php?p=4962827#p4962827][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto:Mi sa che hai fatto saltare qualche impostazione nei Settings del tuo DE. Non penso ne nel file /etc/passwd , ne tantomeno nel file ~/.bashrc .
Comunque, per il file /etc/passwd basta controllare cosa c'è scritto con
per il file ~/.bashrc eventualmente basta ripristinarlo dal template (che dovrebbe essere /etc/skel/.bashrc), quindi dovrebbe bastare unCodice: Seleziona tutto
cat /etc/passwd | grep $USER
Codice: Seleziona tutto
cp /etc/skel/.bashrc ~/.bashrc
vorrei dire che non sono un utente esperto ma capisco fin dove posso andare. Non ho mai pasticciato in quella zona li, non capisco cosa può essere successo. Adesso che mi viene in mente, da qualche tempo vedo che quando metto la password di root al posto del solito spazio in bianco vengono degli asterischi tanti quanti sono il numero di caratteri della mia password.
Codice: Seleziona tutto
eduardolp3@eduardolp3-elementary:/$ cat /etc/passwd | grep $USER
eduardolp3:x:1000:1000:eduardolp3,,,:/home/eduardolp3:/bin/bash
eduardolp3@eduardolp3-elementary:/$ cp /etc/skel/.bashrc ~/.bashrc
eduardolp3@eduardolp3-elementary:/$ Codice: Seleziona tutto
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# We use preexec and precmd hook functions for Bash
# If you have anything that's using the Debug Trap or PROMPT_COMMAND
# change it to use preexec or precmd
# See also https://github.com/rcaloras/bash-preexec
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# If this is an xterm set more declarative titles
# "dir: last_cmd" and "actual_cmd" during execution
# If you want to exclude a cmd from being printed see line 156
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\$(print_title)\a\]$PS1"
__el_LAST_EXECUTED_COMMAND=""
print_title ()
{
__el_FIRSTPART=""
__el_SECONDPART=""
if [ "$PWD" == "$HOME" ]; then
__el_FIRSTPART=$(gettext --domain="pantheon-files" "Home")
else
if [ "$PWD" == "/" ]; then
__el_FIRSTPART="/"
else
__el_FIRSTPART="${PWD##*/}"
fi
fi
if [[ "$__el_LAST_EXECUTED_COMMAND" == "" ]]; then
echo "$__el_FIRSTPART"
return
fi
#trim the command to the first segment and strip sudo
if [[ "$__el_LAST_EXECUTED_COMMAND" == sudo* ]]; then
__el_SECONDPART="${__el_LAST_EXECUTED_COMMAND:5}"
__el_SECONDPART="${__el_SECONDPART%% *}"
else
__el_SECONDPART="${__el_LAST_EXECUTED_COMMAND%% *}"
fi
printf "%s: %s" "$__el_FIRSTPART" "$__el_SECONDPART"
}
put_title()
{
__el_LAST_EXECUTED_COMMAND="${BASH_COMMAND}"
printf "\033]0;%s\007" "$1"
}
# Show the currently running command in the terminal title:
# http://www.davidpashley.com/articles/xterm-titles-with-bash.html
update_tab_command()
{
# catch blacklisted commands and nested escapes
case "$BASH_COMMAND" in
*\033]0*|update_*|echo*|printf*|clear*|cd*)
__el_LAST_EXECUTED_COMMAND=""
;;
*)
put_title "${BASH_COMMAND}"
;;
esac
}
preexec_functions+=(update_tab_command)
;;
*)
;;
esac-
daigo
Re: Terminale parte dalla cartella FILE DI SISTEMA
su ubuntu è così
Codice: Seleziona tutto
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi-
eduardolp3
- Entusiasta Emergente

- Messaggi: 1196
- Iscrizione: domenica 2 aprile 2006, 19:29
- Distribuzione: Manjaro 64bit
- Sesso: Maschile
- Località: Ferrara
- Contatti:
Re: Terminale parte dalla cartella FILE DI SISTEMA
Secondo te posso usare quello di Ubuntu, oppure cambiare con il file di una Live di elementari?
Allora...
Allora...
- thece
- Tenace Tecnocrate

- Messaggi: 13164
- Iscrizione: lunedì 23 aprile 2007, 14:16
- Distribuzione: Debian 12 (Bookworm) - KDE
Re: Terminale parte dalla cartella FILE DI SISTEMA
Sicuramente puoi usare quello di Ubuntu, ma se usi quello fornito dalla tua distro (il cui template è /etc/skel/.bashrc ) è meglio.eduardolp3 [url=http://forum.ubuntu-it.org/viewtopic.php?p=4962939#p4962939][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto: Secondo te posso usare quello di Ubuntu, oppure cambiare con il file di una Live di elementari?
Comunque il tuo "problema" non è dovuto al file .bashrc che stai usando, l'impostazione l'hai sicuramente cambiata in qualche altro posto. Forse nelle impostazioni del tuo terminale?
-
eduardolp3
- Entusiasta Emergente

- Messaggi: 1196
- Iscrizione: domenica 2 aprile 2006, 19:29
- Distribuzione: Manjaro 64bit
- Sesso: Maschile
- Località: Ferrara
- Contatti:
Re: Terminale parte dalla cartella FILE DI SISTEMA
Ma hai visto che stamattina è tornato tutto apposto, da solo?!?!?thece [url=http://forum.ubuntu-it.org/viewtopic.php?p=4963019#p4963019][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto:Sicuramente puoi usare quello di Ubuntu, ma se usi quello fornito dalla tua distro (il cui template è /etc/skel/.bashrc ) è meglio.eduardolp3 [url=http://forum.ubuntu-it.org/viewtopic.php?p=4962939#p4962939][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto: Secondo te posso usare quello di Ubuntu, oppure cambiare con il file di una Live di elementari?
Comunque il tuo "problema" non è dovuto al file .bashrc che stai usando, l'impostazione l'hai sicuramente cambiata in qualche altro posto. Forse nelle impostazioni del tuo terminale?
Grazie comunque.
Devo mettere risolto visto che il problema si è soluzionato da solo?!?!?
- thece
- Tenace Tecnocrate

- Messaggi: 13164
- Iscrizione: lunedì 23 aprile 2007, 14:16
- Distribuzione: Debian 12 (Bookworm) - KDE
Re: Terminale parte dalla cartella FILE DI SISTEMA
Da solo ... non credo. Forse è stato questo comandoeduardolp3 [url=http://forum.ubuntu-it.org/viewtopic.php?p=4963027#p4963027][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto: Ma hai visto che stamattina è tornato tutto apposto, da solo?!?!?
Grazie comunque.
Devo mettere risolto visto che il problema si è soluzionato da solo?!?!?
Codice: Seleziona tutto
cp /etc/skel/.bashrc ~/.bashrc-
eduardolp3
- Entusiasta Emergente

- Messaggi: 1196
- Iscrizione: domenica 2 aprile 2006, 19:29
- Distribuzione: Manjaro 64bit
- Sesso: Maschile
- Località: Ferrara
- Contatti:
Re: Terminale parte dalla cartella FILE DI SISTEMA
Ok, metto risolto.
Grazie!
Grazie!
Chi c’è in linea
Visualizzano questa sezione: 0 utenti iscritti e 5 ospiti