[opensuse-arm] Re: [obs submit-request 139673] openSUSE:12.2:ARM/JeOS: created by Guillaume_G
![](https://seccdn.libravatar.org/avatar/3faa48f7f462ca17481ecd1e2f45d53f.jpg?s=120&d=mm&r=g)
On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote:
home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS
https://build.opensuse.org/request/show/139673
Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default * Boot in runlevel 5 (gfx mode) instead of 3 (default)
++++++ config.sh --- config.sh +++ config.sh @@ -88,8 +88,26 @@ #-------------------------------------- # XXX only do for XFCE image types if [ -e /etc/sysconfig/displaymanager ]; then - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist
In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block
+ grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) + if [ "$grep_result" == "" ]; then + echo '
Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify.
+## Path: Desktop/Window manager +## Description: +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) +## Default: xfce +## Config: profiles,kde,susewm +# +# Here you can set the default window manager (kde, fvwm, ...) +# changes here require at least a re-login +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager + else + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce + fi +# We want to start in gfx mode
Wrong indent :)
+ baseSetRunlevel 5 + suseConfig
Do we need this really? Alex
fi
#======================================
To REVIEW against the previous version: osc request show --diff 139673
To ACCEPT the request: osc request accept 139673 --message="reviewed ok."
To DECLINE the request: osc request decline 139673 --message="declined for reason xyz (see ... for background / policy / ...)."
To REVOKE the request: osc request revoke 139673 --message="retracted because ..., sorry / thx / see better version ..." -- Hermes messaging (http://hermes.opensuse.org) openSUSE Build Service (https://build.opensuse.org/) Collaboration: http://en.opensuse.org/Build_Service/Collaboration
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/eeee970188aaff5989ec40df8a5a46d9.jpg?s=120&d=mm&r=g)
Le 29/10/2012 15:59, Alexander Graf a écrit :
On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote:
home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS
https://build.opensuse.org/request/show/139673
Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default * Boot in runlevel 5 (gfx mode) instead of 3 (default)
++++++ config.sh --- config.sh +++ config.sh @@ -88,8 +88,26 @@ #-------------------------------------- # XXX only do for XFCE image types if [ -e /etc/sysconfig/displaymanager ]; then - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist
In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block
In our case it is _not_ defined. On my host x86 computer it is defined (with kde4).
+ grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) + if [ "$grep_result" == "" ]; then + echo ' Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify.
We need to define DEFAULT_WM since it is not defined in our case.
+## Path: Desktop/Window manager +## Description: +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) +## Default: xfce +## Config: profiles,kde,susewm +# +# Here you can set the default window manager (kde, fvwm, ...) +# changes here require at least a re-login +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager + else + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce + fi +# We want to start in gfx mode Wrong indent :)
+ baseSetRunlevel 5 + suseConfig Do we need this really?
runlevel 5 is needed to boot in gfx mode. For suseConfig, I guess we need to call it to update all settings? Guillaume
Alex
fi
#======================================
To REVIEW against the previous version: osc request show --diff 139673
To ACCEPT the request: osc request accept 139673 --message="reviewed ok."
To DECLINE the request: osc request decline 139673 --message="declined for reason xyz (see ... for background / policy / ...)."
To REVOKE the request: osc request revoke 139673 --message="retracted because ..., sorry / thx / see better version ..." -- Hermes messaging (http://hermes.opensuse.org) openSUSE Build Service (https://build.opensuse.org/) Collaboration: http://en.opensuse.org/Build_Service/Collaboration
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/3faa48f7f462ca17481ecd1e2f45d53f.jpg?s=120&d=mm&r=g)
On 29.10.2012, at 16:08, Guillaume Gardet wrote:
Le 29/10/2012 15:59, Alexander Graf a écrit :
On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote:
home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS
https://build.opensuse.org/request/show/139673
Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default * Boot in runlevel 5 (gfx mode) instead of 3 (default)
++++++ config.sh --- config.sh +++ config.sh @@ -88,8 +88,26 @@ #-------------------------------------- # XXX only do for XFCE image types if [ -e /etc/sysconfig/displaymanager ]; then - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist
In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block
In our case it is _not_ defined. On my host x86 computer it is defined (with kde4).
Would be interesting to find out who wrote it there.
+ grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) + if [ "$grep_result" == "" ]; then + echo ' Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify.
We need to define DEFAULT_WM since it is not defined in our case.
So it's never defined? Unconditionally cat the file into place then :).
+## Path: Desktop/Window manager +## Description: +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) +## Default: xfce +## Config: profiles,kde,susewm +# +# Here you can set the default window manager (kde, fvwm, ...) +# changes here require at least a re-login +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager + else + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce + fi +# We want to start in gfx mode Wrong indent :)
+ baseSetRunlevel 5 + suseConfig Do we need this really?
runlevel 5 is needed to boot in gfx mode.
Yes, that part is clear :).
For suseConfig, I guess we need to call it to update all settings?
I don't think we need to call suseConfig. All the bits should take their runtime configuration from the sysconfig files we modify above. Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/eeee970188aaff5989ec40df8a5a46d9.jpg?s=120&d=mm&r=g)
Le 29/10/2012 16:10, Alexander Graf a écrit :
On 29.10.2012, at 16:08, Guillaume Gardet wrote:
Le 29/10/2012 15:59, Alexander Graf a écrit :
On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote:
home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS
https://build.opensuse.org/request/show/139673
Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default * Boot in runlevel 5 (gfx mode) instead of 3 (default)
++++++ config.sh --- config.sh +++ config.sh @@ -88,8 +88,26 @@ #-------------------------------------- # XXX only do for XFCE image types if [ -e /etc/sysconfig/displaymanager ]; then - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block In our case it is _not_ defined. On my host x86 computer it is defined (with kde4). Would be interesting to find out who wrote it there.
I guess YaST manages this file.
+ grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) + if [ "$grep_result" == "" ]; then + echo ' Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify. We need to define DEFAULT_WM since it is not defined in our case. So it's never defined? Unconditionally cat the file into place then :).
Ok. So then, we have to take care if we add some packages which define it! ;)
+## Path: Desktop/Window manager +## Description: +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) +## Default: xfce +## Config: profiles,kde,susewm +# +# Here you can set the default window manager (kde, fvwm, ...) +# changes here require at least a re-login +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager + else + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce + fi +# We want to start in gfx mode Wrong indent :)
oups. :)
+ baseSetRunlevel 5 + suseConfig Do we need this really?
runlevel 5 is needed to boot in gfx mode. Yes, that part is clear :).
For suseConfig, I guess we need to call it to update all settings? I don't think we need to call suseConfig. All the bits should take their runtime configuration from the sysconfig files we modify above.
I used this page: http://en.opensuse.org/SDB:KIWI_Cookbook_GNOME_System where you can read: baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM gnome baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER gdm baseSetRunlevel 5 suseConfig It is also written: The baseSetRunlevel function set the default runlevel of the appliance, in this case we want a full multiuser graphical environment with network, thus we set the runlevel to be 5. After the changes to the configuration files we call suseConfig to apply the changes to the system. So, I guess we need it. Guillaume
Alex
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/3faa48f7f462ca17481ecd1e2f45d53f.jpg?s=120&d=mm&r=g)
On 29.10.2012, at 16:20, Guillaume Gardet wrote:
Le 29/10/2012 16:10, Alexander Graf a écrit :
On 29.10.2012, at 16:08, Guillaume Gardet wrote:
Le 29/10/2012 15:59, Alexander Graf a écrit :
On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote:
home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS
https://build.opensuse.org/request/show/139673
Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default * Boot in runlevel 5 (gfx mode) instead of 3 (default)
++++++ config.sh --- config.sh +++ config.sh @@ -88,8 +88,26 @@ #-------------------------------------- # XXX only do for XFCE image types if [ -e /etc/sysconfig/displaymanager ]; then - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block In our case it is _not_ defined. On my host x86 computer it is defined (with kde4). Would be interesting to find out who wrote it there.
I guess YaST manages this file.
+ grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) + if [ "$grep_result" == "" ]; then + echo ' Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify. We need to define DEFAULT_WM since it is not defined in our case. So it's never defined? Unconditionally cat the file into place then :).
Ok. So then, we have to take care if we add some packages which define it! ;)
Not really. We simply always overwrite it *shrug*. Shouldn't be too bad really.
+## Path: Desktop/Window manager +## Description: +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) +## Default: xfce +## Config: profiles,kde,susewm +# +# Here you can set the default window manager (kde, fvwm, ...) +# changes here require at least a re-login +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager + else + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce + fi +# We want to start in gfx mode Wrong indent :)
oups. :)
+ baseSetRunlevel 5 + suseConfig Do we need this really?
runlevel 5 is needed to boot in gfx mode. Yes, that part is clear :).
For suseConfig, I guess we need to call it to update all settings? I don't think we need to call suseConfig. All the bits should take their runtime configuration from the sysconfig files we modify above.
I used this page: http://en.opensuse.org/SDB:KIWI_Cookbook_GNOME_System where you can read: baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM gnome baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER gdm baseSetRunlevel 5 suseConfig
It is also written: The baseSetRunlevel function set the default runlevel of the appliance, in this case we want a full multiuser graphical environment with network, thus we set the runlevel to be 5. After the changes to the configuration files we call suseConfig to apply the changes to the system.
So, I guess we need it.
Ok :) Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/eeee970188aaff5989ec40df8a5a46d9.jpg?s=120&d=mm&r=g)
Le 29/10/2012 16:22, Alexander Graf a écrit :
On 29.10.2012, at 16:20, Guillaume Gardet wrote:
Le 29/10/2012 16:10, Alexander Graf a écrit :
On 29.10.2012, at 16:08, Guillaume Gardet wrote:
Le 29/10/2012 15:59, Alexander Graf a écrit :
On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote:
home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS
https://build.opensuse.org/request/show/139673
Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default * Boot in runlevel 5 (gfx mode) instead of 3 (default)
++++++ config.sh --- config.sh +++ config.sh @@ -88,8 +88,26 @@ #-------------------------------------- # XXX only do for XFCE image types if [ -e /etc/sysconfig/displaymanager ]; then - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block In our case it is _not_ defined. On my host x86 computer it is defined (with kde4). Would be interesting to find out who wrote it there. I guess YaST manages this file.
+ grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) + if [ "$grep_result" == "" ]; then + echo ' Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify. We need to define DEFAULT_WM since it is not defined in our case. So it's never defined? Unconditionally cat the file into place then :). Ok. So then, we have to take care if we add some packages which define it! ;) Not really. We simply always overwrite it *shrug*. Shouldn't be too bad really.
Yes, you're right.
+## Path: Desktop/Window manager +## Description: +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) +## Default: xfce +## Config: profiles,kde,susewm +# +# Here you can set the default window manager (kde, fvwm, ...) +# changes here require at least a re-login +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager + else + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce + fi +# We want to start in gfx mode Wrong indent :) oups. :)
+ baseSetRunlevel 5 + suseConfig Do we need this really? runlevel 5 is needed to boot in gfx mode. Yes, that part is clear :).
For suseConfig, I guess we need to call it to update all settings? I don't think we need to call suseConfig. All the bits should take their runtime configuration from the sysconfig files we modify above. I used this page: http://en.opensuse.org/SDB:KIWI_Cookbook_GNOME_System where you can read: baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM gnome baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER gdm baseSetRunlevel 5 suseConfig
It is also written: The baseSetRunlevel function set the default runlevel of the appliance, in this case we want a full multiuser graphical environment with network, thus we set the runlevel to be 5. After the changes to the configuration files we call suseConfig to apply the changes to the system.
So, I guess we need it. Ok :)
Patch updated: https://build.opensuse.org/request/show/139686 Guillaume
Alex
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/3faa48f7f462ca17481ecd1e2f45d53f.jpg?s=120&d=mm&r=g)
On 29.10.2012, at 16:32, Guillaume Gardet wrote:
Le 29/10/2012 16:22, Alexander Graf a écrit :
On 29.10.2012, at 16:20, Guillaume Gardet wrote:
Le 29/10/2012 16:10, Alexander Graf a écrit :
On 29.10.2012, at 16:08, Guillaume Gardet wrote:
Le 29/10/2012 15:59, Alexander Graf a écrit :
On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote:
> home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS > > > https://build.opensuse.org/request/show/139673 > > Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default > * Boot in runlevel 5 (gfx mode) instead of 3 (default) > > ++++++ config.sh > --- config.sh > +++ config.sh > @@ -88,8 +88,26 @@ > #-------------------------------------- > # XXX only do for XFCE image types > if [ -e /etc/sysconfig/displaymanager ]; then > - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager > - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager > + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm > +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block In our case it is _not_ defined. On my host x86 computer it is defined (with kde4). Would be interesting to find out who wrote it there. I guess YaST manages this file.
> + grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) > + if [ "$grep_result" == "" ]; then > + echo ' Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify. We need to define DEFAULT_WM since it is not defined in our case. So it's never defined? Unconditionally cat the file into place then :). Ok. So then, we have to take care if we add some packages which define it! ;) Not really. We simply always overwrite it *shrug*. Shouldn't be too bad really.
Yes, you're right.
> +## Path: Desktop/Window manager > +## Description: > +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) > +## Default: xfce > +## Config: profiles,kde,susewm > +# > +# Here you can set the default window manager (kde, fvwm, ...) > +# changes here require at least a re-login > +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager > + else > + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce > + fi > +# We want to start in gfx mode Wrong indent :) oups. :)
> + baseSetRunlevel 5 > + suseConfig Do we need this really? runlevel 5 is needed to boot in gfx mode. Yes, that part is clear :).
For suseConfig, I guess we need to call it to update all settings? I don't think we need to call suseConfig. All the bits should take their runtime configuration from the sysconfig files we modify above. I used this page: http://en.opensuse.org/SDB:KIWI_Cookbook_GNOME_System where you can read: baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM gnome baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER gdm baseSetRunlevel 5 suseConfig
It is also written: The baseSetRunlevel function set the default runlevel of the appliance, in this case we want a full multiuser graphical environment with network, thus we set the runlevel to be 5. After the changes to the configuration files we call suseConfig to apply the changes to the system.
So, I guess we need it. Ok :)
Patch updated: https://build.opensuse.org/request/show/139686
Awesome! Thanks a lot! Mind to do the same change for Factory as well? :) Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/eeee970188aaff5989ec40df8a5a46d9.jpg?s=120&d=mm&r=g)
Le 29/10/2012 16:44, Alexander Graf a écrit :
On 29.10.2012, at 16:32, Guillaume Gardet wrote:
Le 29/10/2012 16:22, Alexander Graf a écrit :
On 29.10.2012, at 16:20, Guillaume Gardet wrote:
Le 29/10/2012 16:10, Alexander Graf a écrit :
On 29.10.2012, at 16:08, Guillaume Gardet wrote:
Le 29/10/2012 15:59, Alexander Graf a écrit : > On 29.10.2012, at 15:30, <guillaume.gardet@opensuse.org> wrote: > >> home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS >> >> >> https://build.opensuse.org/request/show/139673 >> >> Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default >> * Boot in runlevel 5 (gfx mode) instead of 3 (default) >> >> ++++++ config.sh >> --- config.sh >> +++ config.sh >> @@ -88,8 +88,26 @@ >> #-------------------------------------- >> # XXX only do for XFCE image types >> if [ -e /etc/sysconfig/displaymanager ]; then >> - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager >> - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager >> + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm >> +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist > In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block In our case it is _not_ defined. On my host x86 computer it is defined (with kde4). Would be interesting to find out who wrote it there. I guess YaST manages this file.
>> + grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) >> + if [ "$grep_result" == "" ]; then >> + echo ' > Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify. We need to define DEFAULT_WM since it is not defined in our case. So it's never defined? Unconditionally cat the file into place then :). Ok. So then, we have to take care if we add some packages which define it! ;) Not really. We simply always overwrite it *shrug*. Shouldn't be too bad really. Yes, you're right.
>> +## Path: Desktop/Window manager >> +## Description: >> +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) >> +## Default: xfce >> +## Config: profiles,kde,susewm >> +# >> +# Here you can set the default window manager (kde, fvwm, ...) >> +# changes here require at least a re-login >> +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager >> + else >> + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce >> + fi >> +# We want to start in gfx mode > Wrong indent :) oups. :)
>> + baseSetRunlevel 5 >> + suseConfig > Do we need this really? runlevel 5 is needed to boot in gfx mode. Yes, that part is clear :).
For suseConfig, I guess we need to call it to update all settings? I don't think we need to call suseConfig. All the bits should take their runtime configuration from the sysconfig files we modify above. I used this page: http://en.opensuse.org/SDB:KIWI_Cookbook_GNOME_System where you can read: baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM gnome baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER gdm baseSetRunlevel 5 suseConfig
It is also written: The baseSetRunlevel function set the default runlevel of the appliance, in this case we want a full multiuser graphical environment with network, thus we set the runlevel to be 5. After the changes to the configuration files we call suseConfig to apply the changes to the system.
So, I guess we need it. Ok :) Patch updated: https://build.opensuse.org/request/show/139686 Awesome! Thanks a lot!
Mind to do the same change for Factory as well? :)
Done: https://build.opensuse.org/request/show/139699 ;) Guillaume
Alex
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (2)
-
Alexander Graf
-
Guillaume Gardet