Portál AbcLinuxu, 23. listopadu 2026 14:14
na KDEckach
Nejsem linux guru, ale nejake jadro uz jsem prelozil a desktop vyladil celkem solidne vcetne tvkarty, takze nejsem uplny zacatecnik a pritom jsem
zacatecnik.
Tak trochu nyni resim problem jak provadet nektere operace ihned po spusteni systemu automaticky abych je nemusel delat rucne.
Uz mam predstavu o tom, jak to v linuxu chodi se spoustenim app po najezdu systemu prostrednictvim /etc/rc1.d atd.. vim zhruba jak to funguje a procesy ktere nechci aby bezely umim vypnout ci naopak zapnout.
Narazim ale na "spoustu" drobnosti, ktere jsou ve winech celkem elegantne vyreseny souborem autoexec nebo v menu po spusteni.
Chci se tedy zeptat zda existuje nejake misto kam vepsat prikazy, ktere by se mely provest po spusteni systemu.
Napr.
a) (nejak to jde asi automountem - zatim nechci resit)
mountovani disku z jinych partici. mount /dev/hda4 /mnt/e atd...
b) aliasy. nyni je mam zapsane v /etc/profile ale tohle nastaveni mi zase neprebira terminal v xkach
c) spusteni nejake aplikace po prihlaseni. Ale tak aby se spustila pouze jednou. Ne v kazde konsoli jak se to deje s nastavenim v /etc/profile
atp...
existuje nejaka takova moznost ?
PS: Nemusite odpovidat na ty tri body ktere jsem nastinil bohate bude stacit odpoved na hlavni tema
dik.
                                                                            s pozdravem MMartin
a) viz. man fstab. do /etc/fstab napises, jake zarizeni se ma kam pripojit a kdyz to chces pripojit hned pri bootu, zadas option auto (4. sloupec tabulky)
b) viz. man bash. profile se cte jen pri spusteni login shellu, aliasy zadej do .bashrc, v profile je vetsinou radka source ~/.bashrc ktera zajisti ze se aliasy nactou jak pro login tak pro non-login shell
c) nevim, holt budes muset asi v profile otestovat, jestli uz dana aplikace neni spustena.
start, který se spouští po startu binárky, nebo při restartu.
Různé desktopy (KDE, GNOME) mají svá 'Spustit při startu' - jen je najít.
BTW, jak jsi přišel na to, že se 'odborník' (čili nezačátečník) pozná podle toho, že přeložil jádro? Já už se snad ani za začátečníka nepovažuju, ale překládání jader je činnost, kterou (na desktopu) až na výjimky nechápu a absolutně mě nezajímá (ta výjimka je exotický hw, no flame). Moc jsem jich za život nezkompiloval (taky nejsem žádný odborník
).
a vyladeni opravdu trochu prida vykonu, ale ted je otazka jestli ty male procenta hraji roli...
btw. muj notebook ma bez patchu problem nabehnout v FB a to nemluvim o ACPI (kde jsem na hledani slusneho patche rezignoval a nechavam ho logovat chybove hlasky - jenom, kdyz se umi sam vypnout....)
na KDEckach
Myslim, ze spis pouzivas KDE na Debianovi...
(imho je to dobra volba)
P.S.: Kompilovanie jadra mnohi beru ako 'cierny pasik v karate'
ale to je omyl. Nie je to ekvivalent 'chapania systemu' je to len vec, do ktorej sa pustaju ti lepsi pretoze chapu system. Ale chapanie systemu nie je absolutne nevyhnutne pre kompilovanie jadra

. s timhle trochu vzdalene souvisi adresar /etc/skel, viz 'man useradd'./etc/inittab, od toho jsou rc.* adresare Debianu nebo rc.d/rc.* soubory Slacku.
. Po nekolikerem prekladu jsem prisel na to, ze na tom opravdu neni nic sloziteho a mnoho zajimavejsich a mnohem (promne zatim)slozitejsich hracek ceka na vyreseni - jako treba problem ktery jsme tu resili.
Jeste jednou dik Vam vsem za odpovedi.
.bash_profile pouzit .profile, pak se vsechno v tom provede i kdyz je bash volan jako sh.
INVOCATION
A login shell is one whose first character of argument zero is a -, or
one started with the --login option.
An interactive shell is one started without non-option arguments and
without the -c option whose standard input and output are both con-
nected to terminals (as determined by isatty(3)), or one started with
the -i option. PS1 is set and $- includes i if bash is interactive,
allowing a shell script or a startup file to test this state.
The following paragraphs describe how bash executes its startup files.
If any of the files exist but cannot be read, bash reports an error.
Tildes are expanded in file names as described below under Tilde
Expansion in the EXPANSION section.
When bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes com-
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable. The --noprofile option may be used when the
shell is started to inhibit this behavior.
When a login shell exits, bash reads and executes commands from the
file ~/.bash_logout, if it exists.
When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
these files exist. This may be inhibited by using the --norc option.
The --rcfile file option will force bash to read and execute commands
from file instead of /etc/bash.bashrc and ~/.bashrc.
When bash is started non-interactively, to run a shell script, for
example, it looks for the variable BASH_ENV in the environment, expands
its value if it appears there, and uses the expanded value as the name
of a file to read and execute. Bash behaves as if the following com-
mand were executed:
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
but the value of the PATH variable is not used to search for the file
name.
If bash is invoked with the name sh, it tries to mimic the startup
behavior of historical versions of sh as closely as possible, while
conforming to the POSIX standard as well. When invoked as an interac-
tive login shell, or a non-interactive shell with the --login option,
it first attempts to read and execute commands from /etc/profile and
~/.profile, in that order. The --noprofile option may be used to
inhibit this behavior. When invoked as an interactive shell with the
name sh, bash looks for the variable ENV, expands its value if it is
defined, and uses the expanded value as the name of a file to read and
execute. Since a shell invoked as sh does not attempt to read and exe-
cute commands from any other startup files, the --rcfile option has no
effect. A non-interactive shell invoked with the name sh does not
attempt to read any other startup files. When invoked as sh, bash
enters posix mode after the startup files are read.
Já myslím, že líp už to ani není možné napsat.
man bash hned ve druhy odpovedi
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.