PDA

View Full Version : Adding commands to shutdown and reboot



jvfc678
10-19-2014, 02:23 AM
Im trying to add this command
aumix -S
To a shutdown and reboot sequences, I tried a few things but it didn't really work. Anyone know how to?

utu
10-19-2014, 02:59 PM
Greetings jvfc678,

As one suggestion, read up on /etc/rc.local. Then ..
you can probably add aumix setting just before exit 0 to the /etc/rc.local
you already have.

First, cp /etc/rc.local /etc/rc.local.orig , in case you need it sometime later,
then use sudo laumeafpad /etc/rc.local to do the editing,
and save the edited /etc/rc.local, of course.

You may probably also edit .aumixrc directly.
See man aumix.

utu
10-19-2014, 03:21 PM
There is a simpler way.

Call up aumix from the Main Menu;
Make a few changes (or not) using the GUI;
Save.

This automatically creates & saves .aumixrc.
Otherwise, there is no .aumixrc unless this has been done.

utu
10-19-2014, 03:50 PM
First, cp /etc/rc.local /etc/rc.local.orig , in case you need it sometime later,
then use sudo laumeafpad /etc/rc.local to do the editing,
and save the edited /etc/rc.local, of course.


I never noticed the second line got screwed up. It should have read:

then use sudo leafpad /etc/rc.local to do the editing,

My bad.
Any way, use the aumix gui approach, it's easier.

jvfc678
10-19-2014, 04:16 PM
I actually tried the gui approach but... It didn't work it dosent load the sound volume, i think theres somthing wrong with my .aumixrc file when i have time i take a look at this thanks everyone. Also i liked the Reply where utu said about the rc.local thing thank you man. But you guys did understand where im going with this right? Im trying to save the sound volume everytime i reboot or shutdown the computer

utu
10-19-2014, 04:25 PM
I actually tried the gui approach but... It didn't work it dosent load the sound volume
If you did a save with the gui, and if your persistence is working,
Then that approach should work ok.

For the /etc/rc.local approach, FWIW, Here's the tail end of my /etc/rc.local:


amixer sset 'PCM' 100%; amixer sset 'Speaker' 100%; amixer sset 'Master' 80%
# Leave with "OK" status
exit 0

jvfc678
10-25-2014, 04:47 PM
Isnt that just setting the volume to 100%? Thats not what i want. The things is: lets say i set the volume to 36, then i turn off my computer, next time i turn it back on I want it to be the same volume. Not having to go to aumix and clicking save
But thanks for the replies utu, it really helped me to find the file i wanted :)

utu
10-25-2014, 05:58 PM
You're welcome.


Isnt that just setting the volume to 100%?

Actually, this setting in /etc/rc.local maxes out the Speaker and PCM,
and only establishes an initial value for Master (on my hardware).
Any subsequent adjustment of the panel volume control gui sets the value
of Master to some lesser or greater value; the changed value of volume
is retained on reboot, whatever it is.

One may use alsamixer on a command line to view all this more clearly.

jvfc678
10-25-2014, 11:15 PM
I didn't even do anything and every time i start the system the volume is at a 100% i don't want that i want ALSA to save the volume automatically every time i change the volume, so when i start the system again it will be the same volume

utu
10-26-2014, 01:07 AM
Do you have a persistence file?
Is it working?

jvfc678
10-26-2014, 01:11 AM
i actually installed it on my pen-drive(no persistence i really installed it) and it saves my files and changes on exit

utu
10-26-2014, 04:11 AM
.
Greetings again, jvfc678.

It's not clear to me what you have for a system.

From another thread it seems you didn't set up via a flash-knoppix approach,
and beyond that it's not clear just how you set up Knoppix.
Whatever your system is, it does appear NOT to save changed audio settings.
This is hard to understand if indeed other changes are saved.

I think the experts (I'm not one) might start with asking you to tell us
what you get with the command


df -kTh

so the main elements of your install become apparent.

If your 'install' is one like a poor-man's install, these begin with a
wholesale resurrection of the LiveDVD image, which will overwrite anything
in its memory space. It takes a persistence file to re-create any changes
in this instance. This case would behave exactly the same as operating with
a LivedVD; that is, no changes get saved (or they are wiped out on re-boot).

My system is a LiveUSB on an SDHC card, set up with reiserfs persistence
using flash Knoppix. I don't have your problem. I can't help thinking you
might find it easier just to go back and make a flash-knoppix LiveUSB with
persistence rather than try to get to the bottom of the current symptoms you describe.

jvfc678
10-26-2014, 03:37 PM
Hey utu thanks for awnsering, here is the output:


Filesystem Type Size Used Avail Use% Mounted onrootfs rootfs 2.0G 44K 2.0G 1% /
/dev/sdc1 vfat 4.4G 4.0G 381M 92% /mnt-system
tmpfs tmpfs 3.1G 0 3.1G 0% /ramdisk
/dev/cloop iso9660 11G 11G 0 100% /KNOPPIX
/dev/sdc2 reiserfs 3.2G 1.2G 2.0G 36% /KNOPPIX-DATA
unionfs aufs 3.2G 1.2G 2.0G 36% /UNIONFS
unionfs aufs 3.2G 1.2G 2.0G 36% /usr
unionfs aufs 3.2G 1.2G 2.0G 36% /home
tmpfs tmpfs 20M 2.9M 18M 15% /run
tmpfs tmpfs 20M 2.9M 18M 15% /UNIONFS/var/run
tmpfs tmpfs 10M 0 10M 0% /UNIONFS/var/lock
tmpfs tmpfs 100M 52K 100M 1% /UNIONFS/var/log
tmpfs tmpfs 2.0G 8.0K 2.0G 1% /tmp
udev devtmpfs 20M 0 20M 0% /dev
tmpfs tmpfs 2.0G 27M 2.0G 2% /dev/shm
none tmpfs 4.0K 0 4.0K 0% /sys/fs/cgroup
tmpfs tmpfs 396M 4.0K 396M 1% /run/user/1000

What i did was get my brothers pen-drive, put knoppix on there.
then i formatted MY pen-drive, clicked on lxde menu>>knoppix>>install to a flash disk and choose MY drive
I also have a windows harddisk and a files harddisk

utu
10-26-2014, 04:28 PM
.
That looks pretty good to me.
You've got persistence & it's saving stuff.
How about your audo stuff. is that behaving now?

In the future, you may want to leave a little more space for /mnt-system.
(Just use a litlle less persistence, so if you want to save something more on fat32, you can.)

jvfc678
10-28-2014, 05:23 PM
One thing i noticed when i played music (in chrome for example) i looked up on alsamixer and more controls appeared, after that i ran
sudo alsactl store
Im gonna reboot the computer and see what happens

jvfc678
10-31-2014, 08:55 PM
its still 100%...

utu
10-31-2014, 10:33 PM
1. How do you change audio volume settings?
2. How do you save volume settings if changed?

utu
11-01-2014, 08:35 PM
1. How do you change audio volume settings?
2. How do you save volume settings if changed?

In addition to /etc/rc.local,
I use the alsamixer gui that comes up using alsamixer in a terminal window, to observe,
set and record most alsamixer settings. See the attached png.
This gui shows graphically all the audio settings.

I use the volume control applet on the lxpanel to change and/or mute the volume control.

jvfc678
11-01-2014, 09:08 PM
In addition to /etc/rc.local,
I use the alsamixer gui that comes up using alsamixer in a terminal window, to observe,
set and record most alsamixer settings. See the attached png.
This gui shows graphically all the audio settings.

I use the volume control applet on the lxpanel to change and/or mute the volume control.
to change volume i just mess around with the LXDE plugin233

utu
11-01-2014, 09:51 PM
to change volume i just mess around with the LXDE plugin233

I have no experience with the png you show for a Volume Control applet.

The one I use is the standard lxpanel applet supplied with Knoppix.
If missing, thie applet I use may be added with
Right Click lxpanel>Add/Remove Panel Items>Panel Applets>Volume Control>Add

You might try that.

jvfc678
11-02-2014, 11:41 PM
I have no experience with the png you show for a Volume Control applet.

The one I use is the standard lxpanel applet supplied with Knoppix.
If missing, thie applet I use may be added with
Right Click lxpanel>Add/Remove Panel Items>Panel Applets>Volume Control>Add

You might try that.
That is the same one Im using on the image

utu
11-03-2014, 01:22 AM
.
This shows what I get with a right-click of the speaker symbol on my lxpanel.
I don't know what your .png applies-to.

Werner P. Schulz
11-03-2014, 08:38 AM
..to change volume i just mess around with the LXDE pluginIt would be very helpfull not only draw a red frame around the symbol but also use the right mouseclick. The right mouseclick is the most important feature of the mouse.

If you did so, you'll get the option "Volume Controll" settings (alsamixer).

Read the manpage of alsamixer and try the effects with the keys F1 - F6 within this tool.

utu
11-03-2014, 02:01 PM
click of the speaker symbol
Thanks for the correction, Werner.

right-click gets choices, including alsamixer; left-click gets volume control.

jvfc678
11-04-2014, 10:38 PM
Yes i know right-click opens the options menu and then there is a option called "Volume Control Settings" which opens up alsamixer, but not even that works... And you gave me a good idea about the manual page of alsamixer i didn't taught about that...
Also utu how did you took that screenshot of the volume plugin? When i tried to take it it just goes away lol, also mine one is in the wrong place, it dosen't stick to the panel, it floats a few pixels above the panel lol

utu
11-05-2014, 01:15 AM
the volume plugin... dosen't stick to the panel, it floats a few pixels above the panel...

I don't know about floating, but my left-click on the lxpanel speaker icon
gives a 'slider' control to change volume and a check-box to mute or un-mute.
This control appears just above the lxpanel; it requires another click
of the speaker icon to make this gui disappear.

A right-click of the lxpanel speaker icon gives an alsamixer gui in the upper-
left screen space. The alsamixer gui displays all the alsa parameters,
but also allows these to be changed either with the arrow & function keys
and to select functions or to change values, or check-boxes to mute or to
enable different audio system elements. Use frame controls to get rid of this gui.

FWIW, I find it comforting to bring up alsamixer by a command in an lxterminal
and then to use a left-click of the lxpanel speaker icon. Any changes made in this
way via the Volume Control gui are reflected immediately on the alsamixer gui.

In my case, whatever audio system changes are made as described here
are captured by persistence and are thus retained on reboot.
This is the Knoppix default situation as far as I am aware.

utu
11-05-2014, 03:39 AM
.
FWIW, It's possible to display both the AlsaMixer gui & the VolumeControl gui
from the lxpanel speaker icon alone, that is, without recourse to a separate
lxterminal command. And, esc is another way to close the AlsaMixer gui.

jvfc678
11-06-2014, 04:40 PM
I actually found out how to take the picture I just set a delay, and open the plguin

...In my case, whatever audio system changes are made as described here
are captured by persistence and are thus retained on reboot.
This is the Knoppix default situation as far as I am aware.
Well that certainly dosen't happen to me


Any changes made in this
way via the Volume Control gui are reflected immediately on the alsamixer gui.
But that does happen to me, weird isn't it?

What i meant about the floating plugin is this:
237
And my card model is also in the picture

utu
11-06-2014, 05:52 PM
.
And a nice desktop it is.

The only thing that might explain what's happening is that you may have
installed an unnecessary new gui, that might be over-shadowing the default volume control.

You could start over with a noimage cheatcode to see if things behave differently now that
you know what to look for.

Or start over with a new LiveUSB, heaven forbid.

jvfc678
11-11-2014, 09:43 PM
.
And a nice desktop it is.

The only thing that might explain what's happening is that you may have
installed an unnecessary new gui, that might be over-shadowing the default volume control.

You could start over with a noimage cheatcode to see if things behave differently now that
you know what to look for.

Or start over with a new LiveUSB, heaven forbid.
I didn't install any new GUIs, I only installed ALSAequal but that isn't the source of the problem because it did the same thing even when I didn't had any equalizer.
Also do you think it has to do with my card or driver that Im using like you saw in the screenshots? But i also don't think that is the case because i used the same flash disk i use
on the screenshots you saw earlier on my brothers laptop with a different card and the problem still persists. What it could be?

utu
11-11-2014, 11:16 PM
.
I am all out of ideas.

It is my experience that it is default Knoppix LiveUSB-with-persistence behaviour that volume control setting changes, by either of the guis that arise from either right-click or left-click of the panel speaker icon, are retained via persistence on reboot.

lspci | grep audio indicates my audio device is an
Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03).

If you were to make an new KNOPPIX LiveUSB with persistence, made no change in its initial configuration, and if your audio device is like mine, I can see no reason your LiveUSB would act differently than mine.

If your hardware or software configuration differs from mine, then obviously some configuration difference may explain a performance difference. ANY difference in configuration may explain different performance. You are in the best position to know what differences there might be in your configuration and a default Knoppix configuration.

utu
11-12-2014, 04:58 PM
I didn't install any new GUIs, I only installed ALSAequal

An alsaequal plugin is available via Synaptic, but not installed by default in Knoppix 7.4.

Charles Eidsness has a nice site (C) 2008 at http://www.thedigitalmachine.net/alsaequal.html
He has some helpfpul reference and tutorial material and form with which one may submit comments.
Previous comments and responses are also shown there.

jvfc678
11-14-2014, 10:09 PM
An alsaequal plugin is available via Synaptic, but not installed by default in Knoppix 7.4.
But just after running:

sudo apt-get update
I think the fresh install will solve this...

jvfc678
12-03-2014, 09:04 PM
Hey utu I just did a fresh install on knoppix again and guess what? I didn't mess around this time and the volume problem is still there; it just dosen't save it no matter what i do!
I also discovered why the volume plugin on the panel was floating... It was because of a compiz plugin called Place Windows, that i activated, that plugin allows you to always place windows on the center of the screen rather than on the top left hand corner wich really annoys me that why i activated it.
But seriosly now I don't know what to do anymore about this volume thing, I was looking at the lxde autostart commands and I noticed this that comes by default:

@lxpanel --profile LXDE
Do you think disabling this will make any difference?

jvfc678
12-03-2014, 09:17 PM
I also found this:240
There are two options: Alsamixer and Other do you think changing "Audio Manager" to alsamixer will make a difference

utu
12-03-2014, 11:58 PM
.
I contacted alsaequal's author who noted the following:

Alsaequal may not work with all GUI-based volume controls,
it depends on how they were implemented. (He's) only ever used it
with the alsamixer command line tool.

Werner P. Schulz
12-04-2014, 11:29 PM
@lxpanel --profile LXDE
Do you think disabling this will make any difference?
Don't play with this.

Please start again the alsamixer as within your posting #28 => use F1 to read the "Help" => move through all the controls => if one is red => decrease the value of this control. Exit with [Esc] and save the settings with

su
alsactl store
Go to the Menu => Preferences => Default applications for LXSession => Autostart => type "alsactl restore" (without " ") and use the Add-button

Reboot.

jvfc678
12-07-2014, 11:33 PM
Don't play with this.

Please start again the alsamixer as within your posting #28 => use F1 to read the "Help" => move through all the controls => if one is red => decrease the value of this control. Exit with [Esc] and save the settings with

su
alsactl store
Go to the Menu => Preferences => Default applications for LXSession => Autostart => type "alsactl restore" (without " ") and use the Add-button

Reboot.
I Must be the unluckiest person on earth now the add button on LXSession Autostart tab dosen't work, seriosly i didn't even do anything all the previous installs of knoppix on my flash drive (the same one im using right now) were working fine because I even set up there my keyboard layout, BUT NOW THIS BUTTON DON'T DO ANYTHING, nothing no new commands appear this time i tried adding the keyboard layout and restart the computer and guess it, NOTHING HAPPENS.
Help!?

Werner P. Schulz
12-08-2014, 12:07 AM
Did you ever test your RAM with "memtest", your download with "md5sum" and your DVD or USB-stick with "knoppix testcd"?

Cheatcodes (http://knoppix.net/wiki/Cheat_Codes)

jvfc678
12-08-2014, 12:22 AM
Did you ever test your RAM with "memtest", your download with "md5sum" and your DVD or USB-stick with "knoppix testcd"?

Cheatcodes (http://knoppix.net/wiki/Cheat_Codes)
Well the "knoppix testcd" said "All files are okay..." the memtest im gonna do it tomorrow
But there isn't a text file of the lxsession-default-apps that you can edit adn add the startup commands in it?

Werner P. Schulz
12-08-2014, 09:30 AM
'/home/knoppix/.config/lxsession/LXDE/autostart'

jvfc678
12-14-2014, 07:48 PM
'/home/knoppix/.config/lxsession/LXDE/autostart'
thanks i try it now

jvfc678
12-23-2014, 01:27 PM
Ok it works now everytime i run the command:

alsactl store
It saves my volume, but... How do i make to save it automatically(like every time I change volume) without having to run the command everytime on the terminal?