linux-tips -- consigli per l'uso

Pubblicità

centoventicinque

Moderatore
Staff Forum
Utente Èlite
Messaggi
8,136
Reazioni
3,731
Punteggio
198
spero di non essere l'unico a scrivere in questo post .

mi è venuta l'insana idea di scrivere qualche consiglio utile per cucirsi addosso la propria distribuzione , niente di complesso .. solo cosine utili per affinare quello che abbiamo

primo

eliminare le console virtuali , valido per tutte le distribuzioni

per chi non sapesse di cosa sto parlando , sono quelle accessibli premendo ctrl+alt+Fn

per gnome :
Codice:
sudo gedit /etc/inittab
per kde

Codice:
sudo kate /etc/inittab
per tutti

Codice:
sudo nano /etc/inittab
trovate nel file questa parte
Codice:
# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux
e fatela diventare così :

Codice:
# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux
così eliminate le console virtuali , ne rimarranno 2 per i casi d'emergenza !
si guadagna qualcosa in termini di ram libera e in secondi di avvio


se ne avete altri ben vengano, specificate magari il la distro /famiglia sulla quale funzionano
 
son solo un curioso :lol:

quando riavvio ubuntu spiego anche come avere il kernel pae alias 4 giga tondi tondi su 32 bit :lol:
 
son solo un curioso :lol:

quando riavvio ubuntu spiego anche come avere il kernel pae alias 4 giga tondi tondi su 32 bit :lol:

NON può farmi altro che piacere.
Come si fa ad aver 4gb tondi su sistema a 32bit?
Io non sono un linuziano:cav: che scandalo.(solo per questo dovrei abbandonare l'informatica):sisi: sono autocritico e quando c'è vò c'è vò:D
SAi,Linux mi piace,ma non ho il tempo per studiarlo,poi non ci sono dx e quindi►0 giochi ed, i giochi a me piacciono.:)
Poi troppe disto,però che bello hackerare nel terminale linus(si fa per dire),magari fosse facile come il dos:doh:.
Spero di riuscire come te un giorno e diventare un vero Linuxiano.
Non c'è vita informatica e hacker senza Pinguini:(ed io sono mooooolto neofita di Pinguini.
Che peccato,però studio programmazione:)e quella è uguale in tutto e per tutto da Unix a MIcrosoft:cav:
Che scarso che sono:(


Maledetta e beata informatica.
Premio nobel a tutti..
 
Quanto detto sotto non so se è applicabile a tutte le distribuzioni, ma ad arch sicuro.
Si puo' modificare il file /etc/rc.sysinit ed eliminare il codice che non serve (ad esempio il pezzo che monta i filesystem criptati).

Posto il mio :)
#!/bin/bash
#
# /etc/rc.sysinit
#

. /etc/rc.conf
. /etc/rc.d/functions

echo " "
printhl "Arch Linux\n"
printhl "${C_H2}xfra's NoteBook !!!!!!!!!!!"
printsep

# mount /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm (the api filesystems)
mountpoint -q /proc || mount -n -t proc proc /proc -o nosuid,noexec,nodev
mountpoint -q /sys || mount -n -t sysfs sys /sys -o nosuid,noexec,nodev
mountpoint -q /run || mount -n -t tmpfs run /run -o mode=0755,size=10M,nosuid,nodev
mountpoint -q /dev || mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid &>/dev/null \
|| mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
mkdir -p -m 1777 /run/lock
mkdir -p /dev/{pts,shm}
mountpoint -q /dev/pts || mount -n /dev/pts &>/dev/null \
|| mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
mountpoint -q /dev/shm || mount -n /dev/shm &>/dev/null \
|| mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev

# remount root ro to allow for fsck later on, we remount now to
# make sure nothing can open files rw on root which would block a remount
findmnt / --options ro &>/dev/null ||
status "Mounting Root Read-Only" mount -n -o remount,ro /

run_hook sysinit_start

# start up our mini logger until syslog takes over
minilogd
bootlogd -p /run/bootlogd.pid

HWCLOCK_PARAMS="--systz"
case $HARDWARECLOCK in
"") ;;
UTC) HWCLOCK_PARAMS+=" --utc --noadjfile";;
localtime) HWCLOCK_PARAMS+=" --localtime --noadjfile";;
*) HWCLOCK_PARAMS="";;
esac

if [[ $HWCLOCK_PARAMS ]]; then
stat_busy "Adjusting system time and setting kernel timezone"
# enable rtc access
modprobe -q -a rtc-cmos rtc genrtc
# If devtmpfs is used, the required RTC device already exists now
# Otherwise, create whatever device is available
if ! [[ -c /dev/rtc || -c /dev/rtc0 ]]; then
for dev in /sys/class/rtc/rtc0/dev /sys/class/misc/rtc/dev; do
[[ -e $dev ]] || continue
IFS=: read -r major minor < "$dev"
mknod /dev/rtc c $major $minor
done
fi

# Adjust the system time for timezone offset if rtc is not in UTC
# 1. Make creation time on udev nodes sane (FS#8665)
# 2. Filesystem checks can depend on system time
# 3. This also sets the kernel time zone, used by e.g. vfat
# If TIMEZONE is not set in rc.conf, the timezone stored in /etc/localtime
# is used. If HARDWARECLOCK is not set in rc.conf, the value in
# /var/lib/hwclock/adjfile is used (in this case /var can not be a separate
# partition).
TZ=$TIMEZONE hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
fi

# Start/trigger UDev, load MODULES and settle UDev
udevd_modprobe sysinit

# bring up the loopback interface
[[ -d /sys/class/net/lo ]] &&
status "Bringing up loopback interface" ip link set up dev lo

# Activate LVM2 groups if any
activate_vgs

# Check filesystems
[[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-- -f"
declare -r FORCEFSCK
run_hook sysinit_prefsck
if [[ -x $(type -P fsck) ]]; then
stat_busy "Checking Filesystems"
fsck_all >|"${FSCK_OUT:-/dev/stdout}" 2>|"${FSCK_ERR:-/dev/stdout}"
declare -r fsckret=$?
(( fsckret <= 1 )) && stat_done || stat_fail
else
declare -r fsckret=0
fi
run_hook sysinit_postfsck

# Single-user login and/or automatic reboot if needed
fsck_reboot $fsckret

status "Remounting Root Read/Write" \
mount -n -o remount,rw /

# don't touch /etc/mtab if it is a symlink to /proc/self/mounts
if [[ ! -L /etc/mtab ]]; then
stat_busy "Creating mtab"
if [[ -x $(type -P findmnt) && -e /proc/self/mountinfo ]]; then
findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab
else
cat /proc/mounts >| /etc/mtab
fi
(( $? == 0 )) && stat_done || stat_fail
fi

# now mount all the local filesystems
run_hook sysinit_premount
status "Mounting Local Filesystems" \
mount_all
run_hook sysinit_postmount

# enable monitoring of lvm2 groups, now that the filesystems are mounted rw
[[ $USELVM = [Yy][Ee][Ss] && -x $(type -P lvm) && -d /sys/block ]] &&
status "Activating monitoring of LVM2 groups" \
vgchange --monitor y >/dev/null

status "Activating Swap" swapon -a

[[ $TIMEZONE ]] &&
status "Configuring Time Zone" \
cp --remove-destination "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime

RANDOM_SEED=/var/lib/misc/random-seed
[[ -f $RANDOM_SEED ]] &&
status "Initializing Random Seed" \
cp $RANDOM_SEED /dev/urandom

# Remove leftover files
remove_leftover

if [[ $HOSTNAME ]]; then
stat_busy "Setting Hostname: $HOSTNAME"
echo "$HOSTNAME" >| /proc/sys/kernel/hostname && stat_done || stat_fail
fi

# Flush old locale settings and set user defined locale
stat_busy "Setting Locale: ${LOCALE:=en_US}"
echo "export LANG=$LOCALE" > /etc/profile.d/locale.sh &&
chmod 0755 /etc/profile.d/locale.sh && stat_done || stat_fail

if [[ ${LOCALE,,} =~ utf ]]; then
stat_busy "Setting Consoles to UTF-8 mode"
# UTF-8 consoles are default since 2.6.24 kernel
# this code is needed not only for older kernels,
# but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
for i in /dev/tty[0-9]*; do
kbd_mode -u < ${i}
printf "\e%%G" > ${i}
done
echo 1 >| /sys/module/vt/parameters/default_utf8
stat_done
else
stat_busy "Setting Consoles to legacy mode"
# make non-UTF-8 consoles work on 2.6.24 and newer kernels
for i in /dev/tty[0-9]*; do
kbd_mode -a < ${i}
printf "\e%%@" > ${i}
done
echo 0 >| /sys/module/vt/parameters/default_utf8
stat_done
fi
[[ $KEYMAP ]] &&
status "Loading Keyboard Map: $KEYMAP" loadkeys -q $KEYMAP

# Set console font if required
set_consolefont

stat_busy "Saving dmesg Log"
if [[ -e /proc/sys/kernel/dmesg_restrict ]] &&
(( $(< /proc/sys/kernel/dmesg_restrict) == 1 )); then
install -Tm 0600 <( dmesg ) /var/log/dmesg.log
else
install -Tm 0644 <( dmesg ) /var/log/dmesg.log
fi
(( $? == 0 )) && stat_done || stat_fail

run_hook sysinit_end
# vim: set ts=2 sw=2 noet:
 
innanzitutto grazie a tutti per i suggerimenti che sicuramente apporterò, mi permetto di rivolgere una critica ad arch: possibile che per installare cd c'è bisogno di smbclient?? e meno male che era KISS :doh:
 
mi sono accorto solo ora di questa guida....beh, che dire
GRAZIE CENTOVENTICINQUE!
domanda rompiscatole delle 18:40---> su ubuntu mi ricordo che si potevano scegliere quali applicazioni far partire all'avvio di Gnome...
mi pare proprio si chiamasse applicazioni all'avvio...o una cosa simile insomma!
il problema è che su gnome 3 non trovo un'opzione simile, mi sarebbe molto utile, dato che per esempio il bluetooth non lo usero' mai...
e poi volevo sapere se esiste un analogo di "ubuntu software tweak" per arch, so che non è nella filosofia arch, ma per i primi giorni mi farebbe molto comodo.
D'altronde, il mio rodaggio con ubuntu è durato ben poco...
trovato!
si fa cosi':
Codice:
gnome-session-properties
 
Pubblicità
Pubblicità
Indietro
Top