Author Topic: Keeping Display Settings on MyliveCD  (Read 1423 times)

Offline JeffFowler

  • New Friend
  • *
  • Posts: 4
Keeping Display Settings on MyliveCD
« on: April 12, 2012, 03:36:05 PM »
Hello everybody,
I have made a USB-based MyliveCD from a hard drive installation of PCLOS Openbox.
I made a couple of changes to settings beforehand, including Nvidia settings so that I could get full, native 1920x1080 resolution - this required a reboot to take effect of course.
Now, I know that most LiveCDs would want to keep everything hardware-independent but I'd like to keep my display settings.
=====================================================
I've tried to modify the MyliveCD script by changing the line:
               
Code: [Select]
#do_cmd("echo /etc/X11/xorg.conf >>$workdir/excludes.list");
do_cmd("echo /etc/X11/DUMMY1 >>$workdir/excludes.list");
to exclude a dummy file ("DUMMY1") I placed in the same directory instead. I also placed a second dummy file ("DUMMY2") in the directory to see if it got included in the LiveCD "/etc/X11/" - it did.
But my "xorg.conf" got replaced with some default version - so when I boot from my LiveCD I can't get 1920x1080.

I don't really know too much about all this stuff though!

Does anyone know how I can keep my settings without using a persistence option?

Thanks, Jeff.

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Keeping Display Settings on MyliveCD
« Reply #1 on: April 12, 2012, 03:45:16 PM »
On your installation, did you locked the file using chattr ?

Offline JeffFowler

  • New Friend
  • *
  • Posts: 4
Re: Keeping Display Settings on MyliveCD
« Reply #2 on: April 12, 2012, 03:55:11 PM »
Hi AS,
No, I don't know what chattr is. Am I heading in the right direction to keeping my display settings? Do you know how I can acheive this?
Thanks, Jeff.

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Keeping Display Settings on MyliveCD
« Reply #3 on: April 12, 2012, 04:11:17 PM »
Hi AS,
No, I don't know what chattr is. Am I heading in the right direction to keeping my display settings? Do you know how I can acheive this?
Thanks, Jeff.

That's the right direction, probably not enough ... now I see it is OpenBox ... I'm sure Melodie will come in your help.

AS

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Keeping Display Settings on MyliveCD
« Reply #4 on: April 13, 2012, 05:23:00 AM »
Hi AS,
No, I don't know what chattr is. Am I heading in the right direction to keeping my display settings? Do you know how I can acheive this?
Thanks, Jeff.


That's the right direction, probably not enough ... now I see it is OpenBox ... I'm sure Melodie will come in your help.

AS


Hi,

I am interested by the subject but I can't help much. I explain why:

chattr, the command to put or lift an attribute, works from install to live, but from live to next install the lock is lifted. I have given it a try to get the icons fixed in the PCLinuxOS Edu, after someone complained that his child was erasing all icons accidently. So it is a user priviledge to do so...

To explain chattr : http://www.cyberciti.biz/faq/linux-write-protecting-a-file/

To know if a file has a +i attribute, the command is "lsattr /path/to/file".

Another thing which has been tested was change the resolution in the relevant part of the rc.sysinit file : indeed, the /etc/rc.d/rc.sysinit file contains a post install part related to xorg.conf. Taco.22 had given it a try and that didn't work, he still could not get a high resolution for his screen.

I talk about after install because I would suppose if a setup is done for the Live CD, it might be wished to get the same after install as well.

I don't know if there are other files in which some information are provided for the screen resolutions.



melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Keeping Display Settings on MyliveCD
« Reply #5 on: April 13, 2012, 05:42:43 AM »
chattr was a my question, has nothing to do with the O-P issue.

AS

Offline JeffFowler

  • New Friend
  • *
  • Posts: 4
Re: Keeping Display Settings on MyliveCD
« Reply #6 on: April 13, 2012, 09:47:02 AM »
Hi to you both.
Thanks Melodie. It is funny; I tried all of what you have said before you even said it! Great minds think alike :).

I read up on 'chattr' (it is something I should have known about and I do now  :)) and I applied it to 'xorg.conf' (hard drive installation) to make it immutable before executing 'mylivecd' again. It sounded like a good idea but it did not give the desired end result.

Next, I pasted the contents of 'xorg.conf' over the corresponding section in 'etc/rc.d/rc.sysinit'. This also didn't work -  I think 'mylivecd' uses its own version of 'rc.sysinit'.

Whichever way it happens, 'XFdrake' (or something) seems to generate a fresh 'xorg.conf' upon every USB boot; the modification time matches the boot time, and the contents of 'xorg.conf' change depending on the hardware (as one might suspect!)
=====================================================
One way to get full resolution on a USB Live boot (Nvidia) is to make your changes as normal using 'Control Center'. When PCLOS tells you to reboot for settings to take effect, you can just log-out and back in again. Voila - full resolution.

=====================================================
I agree with you, Melodie, it is a very interesting topic. By changing a lot of stuff within the 'mylivecd' script, I'm sure one could do all sorts of magic  :D

Again, thank you. It has been a bit of a pleasure for me to experiment so far.

Jeff.

=====================================================
ps. There are other things I find odd about the PCLOS OB install. Alt-Tab switching doesn't seem to work. Sometimes mouse scrolling only works up but not down. 'Htop' seems an odd choice for monitoring. But the whole thing is rather neat I think.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Keeping Display Settings on MyliveCD
« Reply #7 on: April 13, 2012, 10:55:54 AM »
ps. There are other things I find odd about the PCLOS OB install. Alt-Tab switching doesn't seem to work.


Hi,
You might add something such as this:
Quote
 <!-- Keybindings for window switching -->
  <keybind key="A-Tab">
    <action name="NextWindow">
      <finalactions>
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </finalactions>
    </action>
  </keybind>
  <keybind key="A-S-Tab">
    <action name="PreviousWindow">
      <finalactions>
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </finalactions>
    </action>
  </keybind>
  <keybind key="C-A-Tab">
    <action name="NextWindow">
      <panels>yes</panels><desktop>yes</desktop>
      <finalactions>
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </finalactions>
    </action>
  </keybind>


in the rc.xml in your ~/.config/openbox file. You can find more about Openbox in PCLinuxOS in the SE of the pclos mag:
The PCLinuxOS Magazine Openbox Special Edition

and also in the Openbox wiki documentation configuration section : http://openbox.org/wiki/Help:Contents#Examples

Quote
Sometimes mouse scrolling only works up but not down.


Can you give details about in what circumstances ? Maybe I could help you, but not without at least a few details.

Quote
'Htop' seems an odd choice for monitoring. But the whole thing is rather neat I think.


htop not only monitors but is a powerful tool to manage processes, kill, renice and such, allows to sort by type of resources used. It's sort of a small swiss knife regarding processes.

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline JeffFowler

  • New Friend
  • *
  • Posts: 4
Re: Keeping Display Settings on MyliveCD
« Reply #8 on: April 13, 2012, 01:58:42 PM »
Hi Melodie,

Thank you very much for the tip regarding keybindings. I will try this out.
=====================================================
Regarding the mouse wheel, I was looking through all the included applications with your distro and I noticed FEH was listed in synaptic. So I passed it a directory to browse through via the prompt.
I can't remember the exact arguments I supplied it was a directory (not a single image) and I told it to go full screen. The mouse wheel worked when rolled away (previous image) but did not work when rolled towards me (next image).

I'm not sure but I think something similar happened in Libreoffice Calc - which also froze executing some VB code in a spreadsheet that works fine in another distro. [I can't remember the details but if I come across it again I will send you the details.]
=====================================================
I'm sure Htop is very good but I have gotten used to a more graphical System Monitor used in another distro. I did try to kill Calc using Htop but after selecting the process with my mouse, the selection kept jumping to the process at the top of the list. Also I couldn't see a way of scrolling through the entire list of processes.
=====================================================
Another thing, I couldn't get VLC to play any video format I gave it. I did not however update anything at all.
=====================================================
None of these things are major but when a lot of little things are counted together they can determine whether you're going to stick with an OS or not. Such as the PCManFM user interface/navigation (not as freindly as Nautilus).

The great things about PCLOS (on paper) are the inclusion of Nvidia/ATI drivers, MyLiveCD, Libreoffice, Java (etc.), it does NOT use unity (:D), it's elegance!

I can ramble ;D!

Have a good evening, Jeff.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Keeping Display Settings on MyliveCD
« Reply #9 on: April 13, 2012, 02:36:02 PM »

Hi, for htop try not to use the mouse : try with the arrows of your keyboard. Once the selection is on the process you want to destroy, try first F9, and if it does not work, look at the left sidebar and select upper to 9 instead of 15 (from sigterm to sigkill, I think it must be equivalent to "kill -9"). If first does not do the second will always do. The very reason why I want htop in all my systems is it is very easy to use in a root tty, if stucked with some horrible gluing processes that freeze the screen. It is rare in my machines but sometimes I get cought in Firefox with an ugly heavy javascript I didn't see coming. Then I am happy I can login as root in a virtual console and have htop at hand to close a few applications (I also use too many greedy ones at same time sometimes).

VLC : you must add some gstreamer packages. Here is a good list, taken from the good Zen mini. :)

gstreamer0.10-faad
gstreamer0.10-ffmpeg
gstreamer0.10-lame
gstreamer0.10-neon
gstreamer0.10-plugins-ugly
gstreamer0.10-pulse
gstreamer0.10-python
gstreamer0.10-x264
gstreamer0.10-xvid

You can also get packages such as libdvdreadcss2, libdvdread3 and libdvdread4, libmatroska2... If you need a full version, there is a Openbox full by the way. Bonsai is a "do it yourself" version made easy. For purpose such as new version with a specific aim.

Quote
Regarding the mouse wheel, I was looking through all the included applications with your distro and I noticed FEH was listed in synaptic. So I passed it a directory to browse through via the prompt.
I can't remember the exact arguments I supplied it was a directory (not a single image) and I told it to go full screen. The mouse wheel worked when rolled away (previous image) but did not work when rolled towards me (next image).

Would you try the easy way ? In ~/.config/openbox/autostart.sh file there are 2 lines for feh, uncomment one and comment pcmanfm as a desktop manager. then restart X, and look.

I have installed it so that people have a choice for the background management. I have no idea how to use it currently.

Or there might be a doc at the website, a man...

For the keybindings, you will find a rc.xml file in /etc/xdg/openbox directory. The original configuration files are pretty hard to use, this is why I have provided all made ones. If you find good keybindings to use with A-tab, you can suggest them so I can add them to the next set of configuration files.

Just take care of not having the same feature provided by other ones, or two keybindings fighting...

About updates : this is the first thing you HAVE to do before installing any other program.

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode