PDA

View Full Version : Can't tweak Knoppix 7.4 LiveUSB system files in /etc/



utu
08-17-2014, 09:24 PM
.
Greetings, All.

With earlier Knoppix 6s and 7s, I became accustomed to making
small changes to certain system files to achieve some modest LiveUSB
'improvements'. For some reason, I seem to be locked out of the
ability to just go in and modify these files as I used to do.

Two specific files that are resisting my efforts are:
/etc/xdg/lxsession/LXDE/autostart (I want to add iceweasel), and
/etc/syslog-knoppix.conf (I want to add /var/log/syslog)

What has changed that I should know about? TIA.

philo
08-18-2014, 10:37 AM
Using: '/.config/.../autostart' does not work?

utu
08-18-2014, 02:16 PM
Using: '/.config/.../autostart' does not work?

Greetings, philo.

Adding @iceweasel to /etc/xdg/lxsession/LXDE/autostart doesn't work as it did previously.
/.config/.../autostart is a directory, I'll need some instructions or at least a filename to work with that.
Thanks for the hint.

utu
08-18-2014, 02:30 PM
# startup.desktop
[Desktop Entry]
Name=Startup
Exec="iceweasel"
Icon=
Type=Application

(Adapted from an old Klaus2008 posting)

philo
08-18-2014, 04:44 PM
Did you see this posting by Werner in August 2013:

http://knoppix.net/forum/showthread.php?30685-Small-customization-for-a-specific-purpose&p=129773&viewfull=1#post129773

utu
08-18-2014, 05:56 PM
Did you see this posting by Werner in August 2013:

http://knoppix.net/forum/showthread.php?30685-Small-customization-for-a-specific-purpose&p=129773&viewfull=1#post129773

Greetings, again philo.

I hadn't seen this before, but I think Werner is right here, as usual.
Without a specific page target the results are a little erratic on just what the browser will display;
often, but not always with its own 'oops' message.

I had almost come to Werner's conclusion on my own.

Thanks again for your help.

utu
08-19-2014, 01:09 AM
.
1. I have tamed Compiz to my satisfaction for now.
2. Given that, my Post #4 here now adequately fills my autostart needs.
3. I haven't a clue on how to get syslog back, and Werner's
old syslog solution doesn't work any more, either.

Werner P. Schulz
08-19-2014, 09:03 AM
I haven't a clue on how to get syslog back, ..
su
mv /etc/syslog-knoppix.conf /etc/syslog-knoppix.conf_orig
aptitude install anacron
ln -s /usr/sbin/rsyslogd /sbin/syslogd
reboot


Greetings Werner

utu
08-19-2014, 02:43 PM
Greetings, Werner, and thanks.

Using Knoppix 7.2 and previous versions of Knoppix, I created a
few useful utility functions to time (or count) things relative to time at boot
using syslog. Each syslog line entry begins with a character group
formatted similar to a date function response formatted in
hours, minutes and seconds since the time syslog started at boot.
For examples:


# Parts of my ~/.bashrc in Knoppix 7.2:

alias 'Syslog=less /var/log/syslog' # requires syslog

at.Start(){ # echo time at Start (requires Syslog)
echo -e "at Start: \c"; Syslog | grep restart | awk '{ print $3 }'
}

Boot.Time(){ # Seconds to browser on-line (requires Syslog)
echo -e "Online at: \c"; Syslog | grep avahi | awk '{ print $3 }'
at.Start
}

Disconnects() { # Wifi disconnects since boot (requires Syslog)
echo -e "Time now: \c"; date | awk '{ print $4 }'
at.Start
echo -e "Wifi disconnects: \c"; Syslog | grep -c disconnecting
}

What does a typical anacron or cron print-out (or line of output) look like?
Can you give us a Screenshot?

Werner P. Schulz
08-20-2014, 12:47 PM
'/usr/sbin/rsyslogd' succeeds '/sbin/syslogd'. But '/etc/init.d/knoppix-autoconfig' still uses '/sbin/syslogd'; therefore I suggest the use of a symlink. Perhaps in a new Knoppix version this will no longer work.

I think your bashrc will work as until now.

Cron or anacron have no print-out. With cron you can define jobs and their execution time to logrotate the output of the logfiles; this will prevent an overflow of '/var/log'. If you doesn't have a server which will run all over the time, you need anacron. It will make up these cron jobs, which could not be carried out because the computer has been shut off at the defined execution time.

utu
08-20-2014, 03:03 PM
Thanks again, Werner.
The symlink doesn't seem to work,


root@Microknoppix:/etc# ls syslog-knoppix
ls: cannot access syslog-knoppix: No such file or directory
root@Microknoppix:/etc# ln -s /usr/sbin/rsyslogd /sbin/syslogd
ln: failed to create symbolic link `/sbin/syslogd': File exists
root@Microknoppix:/etc#


but I think I may be able to rework '/etc/init.d/knoppix-autoconfig
to get what I want. Just replacing log start with 7.2 code may be enough.

Thanks for the clues.

Werner P. Schulz
08-20-2014, 03:38 PM
ls syslog-knoppixsyslog-knoppix.conf not syslog-knoppix

failed to create symbolic link `/sbin/syslogd': File existsJust looked again for it - this file doesn't exist within my DVD download of V7.4.0

What is the size and the timestamp of '/UNIONFS/sbin/syslogd'?

utu
08-20-2014, 04:10 PM
knoppix@Microknoppix:~$ sudo locate /sbin/syslogd
/KNOPPIX-DATA/sbin/syslogd
/UNIONFS/sbin/syslogd
knoppix@Microknoppix:~$ cd KNOPPIX-DATA/sbin/syslogd
bash: cd: KNOPPIX-DATA/sbin/syslogd: No such file or directory
knoppix@Microknoppix:~$ cd KNOPPIX-DATA/sbin/syslogd
bash: cd: KNOPPIX-DATA/sbin/syslogd: No such file or directory
knoppix@Microknoppix:~$ cd UNIONFS/sbin/syslogd
bash: cd: UNIONFS/sbin/syslogd: No such file or directory
knoppix@Microknoppix:~$ cd /sbin/syslogd
bash: cd: /sbin/syslogd: Not a directory
knoppix@Microknoppix:~$ ls
Desktop new.profile
dot.bashrc ok.mp3
Downloads scanlist
KNOPPIX1.components This.Knoppix.74.LiveUSB
Knoppix.7.3.Mark.4 vrms.txt
Knoppix.74.LiveDVD-size.LiveUSB.comments
knoppix@Microknoppix:~$ ls -l /sbin/syslogd
lrwxrwxrwx 1 root root 18 Aug 20 09:17 /sbin/syslogd -> /usr/sbin/rsyslogd
knoppix@Microknoppix:~$

9:17 was about two hours previously

utu
08-21-2014, 08:11 PM
.
1. Werner's suggestion for re-instating syslog in Knoppix 7's must
be applied before adding any overlays.

2. The Knoppix 7.2 .bashrc function indicated in my post #9 will not
work as is without modification in Knoppix 7.4. Adaptations which will
work are as follows:


# Excerpts from my Knoppix 7.4 .bashrc:

alias 'Syslog=sudo less /var/log/syslog' # requires syslog

at.Start(){ # echo time at Start (requires Syslog)
echo -e "at Start: \c"; Syslog | grep 'acpid: start' | awk '{ print $3 }'
}

Disconnects() { # Wifi disconnects since boot (requires Syslog)
echo -e "Time now: \c"; date | awk '{ print $4 }'
at.Start
echo -e "Wifi disconnects: \c"; Syslog | grep -c disconnecting
}


3. It may not be possible to estimate time to boot using syslog in
Knoppix 7.4.

4. Thanks again go to Werner for pointing out there are pitfalls in
using Knoppix's overlay process which must be observed.