Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old May 13th, 2008   #21
dwitkin
5 Cups of Ubuntu
 
Join Date: Apr 2008
Beans: 18
Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

Quote:
Originally Posted by dwitkin View Post
Hello. Just wanted to say that I also experience the screen turning black at a certain point, but it doesn't appear to be a Compiz issue. I read earlier in this thread that the thinking was the screen turns black due to Compiz, so I uninstalled Compiz. I still get the same black screen issue in this order: (1) I get the wallpaper, as expected, almost immediately after entering my pasword; (2) about 10 seconds later, I get a completely black background but I can see the panels and a few programs that show windows as they start up (note: my login / background color is set to Brown, I believe, not black); (3) About 10 seconds later, I get the wallpaper again.

Any other ideas on how to address the issue?

Thanks.
Ignore my post above about Compiz not being the issue. I must have not fully re-booted before or something. In any case, Compiz is uninstalled and I am no longer experiencing the black screen issue... So, I guess Compiz is the culprit.

Aside from the black screen interaction with Compiz, this hack works great. Thanks.
dwitkin is offline   Reply With Quote
Old May 18th, 2008   #22
peakpc
Just Give Me the Beans!
 
peakpc's Avatar
 
Join Date: Feb 2007
Beans: 71
Ubuntu 9.10 Karmic Koala
Talking Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

This trick works very well for me in Hardy with compiz-fusion it even works with webiulder (background picture changer so I have a differnt desktop every hour) I just had to make sure that all my desktop photos were sized to 1280X800 (laptop screen size) now I have to pick out a new splash screen...as the old one was geared to blend in with the black screen I had before (got rid of the ugly brown color a while back)
peakpc is offline   Reply With Quote
Old May 18th, 2008   #23
hollerith
5 Cups of Ubuntu
 
hollerith's Avatar
 
Join Date: May 2006
Beans: 34
Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

I'm having a problem with gnome is obscuring the rootwindow with the desktop background. I turned off nautilus show_desktop and I still see the wallpaper specified in Appearance Preferences/Backgrounds. This hack for setting the rootwindow with xsetroot or xloadimage or xscreensaver-getimage doesn't work for me as they all behind the wallpaper. Is there a gdm setting 'use real root window not a virtual one'. How you guys don't have this problem?
hollerith is offline   Reply With Quote
Old May 19th, 2008   #24
peakpc
Just Give Me the Beans!
 
peakpc's Avatar
 
Join Date: Feb 2007
Beans: 71
Ubuntu 9.10 Karmic Koala
Smile Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

Hey Kirsis this how to works great, Is there a way to get the current background (mine changes) to be directed to the gdm login screen? maybe some modification of your code in the background area of the greeter's .xml file? any help would be appreciated.
peakpc is offline   Reply With Quote
Old June 17th, 2008   #25
peakpc
Just Give Me the Beans!
 
peakpc's Avatar
 
Join Date: Feb 2007
Beans: 71
Ubuntu 9.10 Karmic Koala
Smile Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

I have given this some further thought and have some new questions?

Can this script be modified to run before the GDM login?

Can the background image in the Login be made transparent (png instead of jpg)?

I don't understand everything your script is doing exactly, yet. but I do like it!
peakpc is offline   Reply With Quote
Old June 17th, 2008   #26
kirsis
Just Give Me the Beans!
 
kirsis's Avatar
 
Join Date: Dec 2006
Location: Riga, Latvia
Beans: 74
Ubuntu Karmic Koala (testing)
Send a message via MSN to kirsis Send a message via Skype™ to kirsis
Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

peakpc:

It's possible to make the script run before GDM, most things are on GNU/Linux systems Don't think GDM'd honor transparency in a background PNG, though.

If you want it to set the background of your GDM login screen, your best bet would be to run it before GDM (as an init script, thus - as root), extract the path to the background image as in this script (though you'd have to manually specify the user, whose background should be chosen) and make a link between that image and the background image of your GDM theme.

This would break, though, if you'd change your GDM theme (as it'd likely look for the background elsewhere and you'd have to adjust the script)

Probably not worth the hassle
kirsis is offline   Reply With Quote
Old July 12th, 2008   #27
mike-uk
First Cup of Ubuntu
 
Join Date: Jul 2008
Beans: 3
Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

kirsis - first of all I would like to thank you for your solution; It worked perfectly
Excuse my ignorance but is it possible to have the compiz-fusion splash appear during this period
Just looking for something animated.
mike-uk
mike-uk is offline   Reply With Quote
Old July 21st, 2008   #28
vexorian
Has an Ubuntu Drip
 
vexorian's Avatar
 
Join Date: Apr 2006
Beans: 785
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

This doesn't seem to be working for me, out of the box that is, I noticed that script is run by root, not by my user, so it wasn't getting any background file and it was placing a primary_color that was totally different from mine, I had to use "sudo -u myUserName" It works, but it won't work for multi user...

Edit: GDM documentation to the rescue!

This version of the script should work on more situations (aka when there are many users and each has a different wallpaper), for example if root's wallpaper is different to what you really want... Hey, at least you don't have to manually add and remove -tile when you change that option of your wallpaper...

Code:
#!/bin/sh
#
# Note that output goes into the .xsession-errors file for easy debugging
#

# gdm always runs PostLogin as root, the USER variable is set to point out the user name.
# that, and sudo are enough to get the correct configuration.

# Extract the wallpaper filename
WALLPAPER=$(sudo -u $USER gconftool-2 --get /desktop/gnome/background/picture_filename)
# Extract the picture option (important so we know if -tile should be used)
MODE=$(sudo -u $USER gconftool-2 --get /desktop/gnome/background/picture_options)
# Extract the primary_color (in case the wallpaper image cannot be used)
PRIMARY_COLOR=$(sudo -u $USER gconftool-2 --get /desktop/gnome/background/primary_color)

# Check if the wallpaper file exists. If yes - draw it, if no - use primary background color
if [ -e "$WALLPAPER" ] && [ -f "$WALLPAPER" ] ; then

    # if mode is "wallpaper", use the -tile option
    if [ "$MODE" = "wallpaper" ]; then
        xsetbg -tile -onroot "$WALLPAPER"
    else
        xsetbg -fullscreen -onroot "$WALLPAPER"
    fi
else
    xsetroot -cursor_name left_ptr -solid "$PRIMARY_COLOR"
fi

exit 0
A lot of thanks since I only needed to do small tweaks to the script to make it work, the rest are things that I wouldn't be able to know that existed, like the whole utility to draw on the background and the GDM scripting. My desktop quality of life has improved a lot now that the background is loaded just after you make a succesful login.
__________________

Vista: Because XP was too good for Microsoft's standard.

Last edited by vexorian; July 21st, 2008 at 09:21 AM..
vexorian is offline   Reply With Quote
Old July 21st, 2008   #29
kirsis
Just Give Me the Beans!
 
kirsis's Avatar
 
Join Date: Dec 2006
Location: Riga, Latvia
Beans: 74
Ubuntu Karmic Koala (testing)
Send a message via MSN to kirsis Send a message via Skype™ to kirsis
Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

That's pretty cool, vexorian. Updated the first post to point to here.

edit: odd, though, that it was ran by root. '~' should've worked in PostLogin
kirsis is offline   Reply With Quote
Old July 21st, 2008   #30
vexorian
Has an Ubuntu Drip
 
vexorian's Avatar
 
Join Date: Apr 2006
Beans: 785
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: (GDM) Show the user wallpaper/background color, while logging in

Well, I don't know, but GDM's documentation actually says postlogin is run for root. This doesn't explain how ~ has worked for so many people...

It seems [xsetbg -onroot "$WALLPAPER"] needs to change to [xsetbj -fullscreen -onroot "$WALLPAPER"]
__________________

Vista: Because XP was too good for Microsoft's standard.
vexorian is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:25 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry