You are not logged in.

#26 2009-12-06 10:29:20

fastfret79
Member
Registered: 2009-09-05
Posts: 87

Re: Arch xdm-theme

Very nice theme - I switched over to xdm from slim just to try this out!

I have dual monitors on twin view: one widescreen lcd @ 1440*900 and and an old crt @ 1280*960 and the theme seemed to fit quite well spanning both screens.

I may have a play and set it so it's just on one screen as this would be my personal preference

Offline

#27 2009-12-06 17:57:11

the_isz
Member
Registered: 2009-04-14
Posts: 270

Re: Arch xdm-theme

B wrote:

I like the work you guys have done with this, I am running into a small problem though. The Arch SVG looks a bit too big for my taste, but when I check the original SVG it seems a lot smaller than the scaled one that's in /var/cache. I assume Xsetup is where the magic happens, but I'm not sure how to get a smaller image (or reposition it, so I can move the login stuff more towards the center of the screen)... Could someone give some pointers?

Hey B,

maybe I'm a bit confused here, but what do you mean by "the original SVG seems a
lot smaller"? How do you compare the size of a SVG? It's scalable, so it doesn't
really have a comparable size, or does it?

What the script does is determine your current screen resolution and create an
appropriate png file matching it in /var/cache, using your screen space as good
as possible. The screenshot you've posted seems reasonable to me, but that's a
matter of taste.

Well, as you probably figured yourself, moving the login widget is easy by
modifying the Xresources file. The image is more difficult to move, as you would
either have to adapt the background setting tools (feh, display, etc) or the
created image itself.
The former one is difficult, as the different tools don't have the same set of
functionality, the latter one because rsvg-convert doesn't have the feature and
you would have to manipulate the image afterwards.

So, to conclude: Moving the background image is not an intended part of the
theme and I don't have a good idea of how to allow it and keep it simple at the
same time. Sorry sad

If you'd like a personal solution: You can modify the width computation for the
outcoming image by adapting the following line in the Xsetup file:

rsvg-convert -a --background-color="#000000" -f png -w $((${RESOLUTION[0]}/3*2)) -o ${IMAGEFILE} ${SVG_FILE}

Like, don't use /3*2 but another value, like /3 to make the image smaller.

As for the movement: You could create your own image file and place it in
/var/cache/xdm-arch-theme and just put some extra black space underneath the
logo. That would still center the image, but the logo would appear further up on
the screen. It's just an idea, though...

B wrote:

Also, I've set Dejavu Sans to be used for the clock and buttons, but they still look horribly big (I'm a nitpicker, I know). Yet xfontsel didn't show any font sizes that I could select. Is there a way around this? Changing the xfontsel-generated string by hand just seems to reset XDM to the default (crappy) font.

Phew, I don't know what to suggest here... If xfontsel doesn't show any font
sizes to select then maybe you have a problem with your fonts? I really don't
know, sorry sad

Gen2ly wrote:

Nice.  Basic themes just appeal more to me.  Still amazes me the xdm is still the default login manager for Linux.

Thanks.

fastfret79 wrote:

Very nice theme - I switched over to xdm from slim just to try this out!

Nice to hear and good luck with your experiments!

Offline

#28 2009-12-06 18:04:20

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819

Re: Arch xdm-theme

the_isz wrote:
B wrote:

I like the work you guys have done with this, I am running into a small problem though. The Arch SVG looks a bit too big for my taste, but when I check the original SVG it seems a lot smaller than the scaled one that's in /var/cache. I assume Xsetup is where the magic happens, but I'm not sure how to get a smaller image (or reposition it, so I can move the login stuff more towards the center of the screen)... Could someone give some pointers?

Hey B,

maybe I'm a bit confused here, but what do you mean by "the original SVG seems a
lot smaller"? How do you compare the size of a SVG? It's scalable, so it doesn't
really have a comparable size, or does it?

Excellent point you're making tongue. What I did was open the original SVG in Mirage, open the image in /var/cache/xdm-arch-theme/ and look tongue. And the latter looked definitely bigger.

If you'd like a personal solution: You can modify the width computation for the
outcoming image by adapting the following line in the Xsetup file:

rsvg-convert -a --background-color="#000000" -f png -w $((${RESOLUTION[0]}/3*2)) -o ${IMAGEFILE} ${SVG_FILE}

Like, don't use /3*2 but another value, like /3 to make the image smaller.

As for the movement: You could create your own image file and place it in
/var/cache/xdm-arch-theme and just put some extra black space underneath the
logo. That would still center the image, but the logo would appear further up on
the screen. It's just an idea, though...

I'll give that a shot, thanks.

B wrote:

Also, I've set Dejavu Sans to be used for the clock and buttons, but they still look horribly big (I'm a nitpicker, I know). Yet xfontsel didn't show any font sizes that I could select. Is there a way around this? Changing the xfontsel-generated string by hand just seems to reset XDM to the default (crappy) font.

Phew, I don't know what to suggest here... If xfontsel doesn't show any font
sizes to select then maybe you have a problem with your fonts? I really don't
know, sorry sad

It's okay wink. Probably just a font limitation...


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#29 2010-01-08 14:01:02

cappucco
Member
Registered: 2009-10-09
Posts: 13

Re: Arch xdm-theme

Hello,

I like this theme. I switched from slim to xdm as I have seen this.
Now I have two questions:
1.) Is it possible, to change the default locale, used by xclock in xdm to german? So that I have the german translated xclock according to my system? If i call xclock under X, it uses my german locale...

2.) Is it possible to set a default user, so that the usernames field is filled out with the default username. I don´t want "autologin", just the prefilled username field.

Regards and thanks in advance
Juergen

Offline

#30 2010-01-08 14:06:44

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: Arch xdm-theme

cappucco

I actually asked about this in comment to the AUR package. Let's see. Waiting for a reply. Also a proper session-chooser would be nice. I'm trying to find out how I can pass the session name as argument to use my switch case in xinitrc. I'm not sure how xdm is calling the session.


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#31 2010-01-08 14:25:45

the_isz
Member
Registered: 2009-04-14
Posts: 270

Re: Arch xdm-theme

cappucco wrote:

Hello,

I like this theme. I switched from slim to xdm as I have seen this.
Now I have two questions:
1.) Is it possible, to change the default locale, used by xclock in xdm to german? So that I have the german translated xclock according to my system? If i call xclock under X, it uses my german locale...

2.) Is it possible to set a default user, so that the usernames field is filled out with the default username. I don´t want "autologin", just the prefilled username field.

Regards and thanks in advance
Juergen

Hi cappucco,

nice to hear you like the theme.

The layout of the xclock widget is determined by the Xresources file, which
you'll find under /etc/X11/xdm/arch-xdm, specifically the .XClock.Clock.strftime
setting. According to strftime's manpage, this should already make use of your
locale. I assume you don't have the right locale set in you rc.conf. Can you
check this please?

Concerning the default user setting:

I don't yet know about a way to make xdm do this, but I'll see if I can find any
information on this.

sHyLoCk: I already noted something about the session-chooser on the AUR page.
Even before you wrote your comment wink

Offline

#32 2010-01-08 14:32:36

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: Arch xdm-theme

Ah I missed that,sorry tongue


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#33 2010-01-08 14:34:08

the_isz
Member
Registered: 2009-04-14
Posts: 270

Re: Arch xdm-theme

sHyLoCk wrote:

Ah I missed that,sorry tongue

No problem cool

Offline

#34 2010-01-08 14:50:06

cappucco
Member
Registered: 2009-10-09
Posts: 13

Re: Arch xdm-theme

the_isz wrote:

I assume you don't have the right locale set in you rc.conf. Can you
check this please?

Concerning the default user setting:

I don't yet know about a way to make xdm do this, but I'll see if I can find any
information on this.

Hi,

my locale settings are OK AFAIK:
rcconf:
LOCALE="de_DE.UTF-8"

I don´t have any problems with locale settings on my system, but just with xclock in xdm. But don´t worry, this is just cosmetic and I can live with the english clock...

Juergen :-)

Offline

#35 2010-01-11 08:35:56

cappucco
Member
Registered: 2009-10-09
Posts: 13

Re: Arch xdm-theme

Hello all,

I find this errormessage in the xdm.log, everytime I boot my machine with this xdm-theme:

XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"

      after 87 requests (83 known processed) with 0 events remaining.

xkill:  killing creator of resource 0xa00016
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"

      after 503 requests (56 known processed) with 0 events remaining.

xkill:  killing creator of resource 0x80000b

This is related to the xkill command for the buttons and for the clock. The xserver seems to look for this tasks although they are killed. I tried to find a solution for this, but I´m not very familiar with these things.

Do you guys have any ideas for this?

Regards
Juergen

Offline

#36 2010-01-11 09:21:11

the_isz
Member
Registered: 2009-04-14
Posts: 270

Re: Arch xdm-theme

cappucco wrote:

Hello all,

I find this errormessage in the xdm.log, everytime I boot my machine with this xdm-theme:

XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"

      after 87 requests (83 known processed) with 0 events remaining.

xkill:  killing creator of resource 0xa00016
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"

      after 503 requests (56 known processed) with 0 events remaining.

xkill:  killing creator of resource 0x80000b

This is related to the xkill command for the buttons and for the clock. The xserver seems to look for this tasks although they are killed. I tried to find a solution for this, but I´m not very familiar with these things.

Do you guys have any ideas for this?

Regards
Juergen

Don't remember seeing this before... I'll look into it, as I will look into the
locale problem, but I'm pretty busy at the moment. Sorry for this sad

Offline

#37 2010-01-11 13:07:03

fauxdeluxe
Member
From: en_GB.UTF-8
Registered: 2010-01-10
Posts: 11

Re: Arch xdm-theme

Really liking this. Great work. My XDM login of choice from now on. smile


Enter any 11-digit prime number to continue...

Offline

#38 2010-01-11 16:40:23

fabertawe
Member
From: Lloegr
Registered: 2009-11-24
Posts: 258

Re: Arch xdm-theme

Just wanted to say thanks for this, I've switched from GDM and really like it. The graphic's lovely.


i7 4790K 4.4GHz, ASRock Z97 Extreme6, 16GB 2400MHz, GTX 970, Arch x86_64

Offline

#39 2010-01-17 14:53:06

mar77i
Member
Registered: 2009-02-16
Posts: 19

Re: Arch xdm-theme

Okay, the only other way I could think of this is as follows:

/etc/X11/xdm/arch-xdm/Xsetup, line 39

NEWSESS=/tmp/.newsess
[ -f "$NEWSESS" ] && rm "$NEWSESS"
/etc/X11/xdm/arch-xdm/buttons &

/etc/X11/xdm/arch-xdm/buttons

#!/bin/bash

which xmessage >> /dev/null 2>&1 || exit 1

NEWSESS=/tmp/.newsess

session=session
# display when a .newsess is set
if [ -f "$NEWSESS" ]; then
        userwm=$(<"$NEWSESS") userwm="${userwm%.desktop}"
        session="session(${userwm##*/})"
fi

xmessage -buttons "$session,reboot,halt" "$@" "";
case "$?" in
        101)
                # twm is present on most arch installs w/o a *.desktop file
                buttons=(twm)
                launchers=(twm)
                for df in /etc/X11/sessions/*.desktop; do
                        launchers[${#launchers[@]}]="$df"
                        df="${df%.desktop}" df="${df##*/}"
                        buttons[${#buttons[@]}]="$df"
                done
                IFS=,
                xmessage -buttons "${buttons[*]}" "$@" ""
                # I could think of a way to delete the file on purpose after a while
                # But I just haven't got a clue if it's necessary, since we remove it in Xsetup
                echo "${launchers[$(( $? - 101 ))]}" >"$NEWSESS"
                exec $0 "$@" &
                ;;
        102)
                /sbin/reboot
                ;;
        103)
                /sbin/halt
                ;;
esac

$HOME/.xsession

NEWSESS=/tmp/.newsess
[ -f "$NEWSESS" ] && cat "$NEWSESS" >"$HOME/.xsession-current"

session=$(<"$HOME/.xsession-current")
[[ -f "$session" ]] && exec $(sed -rn "s/^[Ee]xec=(.*)$/\1/p" "$session") \
        || exec "${session:-twm}"

When starting this config for the first time, you'll be starting twm unless you set your default session.

Edit
btw, the xdm-arch/Xsetup script works with bash only anyway, since someone is using arrays wink

Last edited by mar77i (2010-03-23 18:55:28)


<rickh> f(Arch) = ((Gentoo - Compiletime) + (Slackware + Depency resolution and Downloading))

Offline

#40 2010-01-18 07:13:22

the_isz
Member
Registered: 2009-04-14
Posts: 270

Re: Arch xdm-theme

Bad news, everyone...

I checked the xdm man page several times now and I don't see any possibility to
setup a default login name, except for using a different greeter lib. If it
weren't for security reasons, I'd even consider that, but as your user
credentials are probably as important to you as mine are to me, I'll give up on
this topic for now.

As for the session chooser:

I'll check mar77i's solution as soon as I find the time and I've come up with an
idea myself, too. I'll see which one matches the K.I.S.S. principle better and
will keep you updated smile

Offline

#41 2010-08-16 22:07:45

legitimus maximus
Member
Registered: 2010-08-11
Posts: 7

Re: Arch xdm-theme

so I just switched from bloated gdm to xdm and installed this theme using the aur.

I am running a wide monitor at 1152x864

it shows the arch logo was oversized in the middle, and the login stuff on top of it off center.

I don't really know anything about xdm, but this theme was so awesome looking that I had to try it out.

so how do I change the size of the logo and position of the login?  remember, its a wide display at 1152x864

Last edited by legitimus maximus (2010-08-16 22:08:58)

Offline

#42 2011-02-10 07:59:03

the_isz
Member
Registered: 2009-04-14
Posts: 270

Re: Arch xdm-theme

legitimus maximus wrote:

so I just switched from bloated gdm to xdm and installed this theme using the aur.

I am running a wide monitor at 1152x864

it shows the arch logo was oversized in the middle, and the login stuff on top of it off center.

I don't really know anything about xdm, but this theme was so awesome looking that I had to try it out.

so how do I change the size of the logo and position of the login?  remember, its a wide display at 1152x864

I answered a similar question above already. There's no direct way of
influencing the image generation, but maybe the post will give you an idea of
what you can do.

As to the position of the login: Have a look at
/etc/X11/xdm/arch-xdm/Xresources. You'll find several lines that define the
vertical position of the login at the very top of it. As you'll notice, your
vertical screen resolution isn't there yet, so just add it and try which
position fits the login nicely. And once you got it, please let me know so I can
add it to the next theme release smile

Offline

#43 2011-11-17 15:53:57

jwm-art
Member
Registered: 2011-02-01
Posts: 84

Re: Arch xdm-theme

XDM Forgive me for I have sinned. I will never leave you again.

Great work on the theme!

James

Offline

#44 2012-12-04 13:09:29

jwm-art
Member
Registered: 2011-02-01
Posts: 84

Re: Arch xdm-theme

I've been messing around this morning trying to get a bit of custom colour into the arch-xdm-theme (available from AUR) as I've bored of the black background. Turns out quite tricky to do. I cant get the feh or display commands to change the colour of the root window and simultaneously apply a background image. Both commands overwrite a background colour set with xsetroot when applying a background image.

However the xv command can change the colour of the root window and apply a background image at the same time.

I have changed the Xresources file so that the background colour is specified only once via wildcard and then the Xsetup grabs the colour value (using awk) and applies it to the image etc. It also includes the colour value into the cached image filename.

Also changed the buttons file to use systemctl so poweroff button works again.


Xsetup:  (change my *jwm paths as applicable)

#!/bin/sh

# Get the background color from the Xresources file:
BGCOL=`awk -F'background:' '{print $2}' /etc/X11/xdm/arch-xdm-jwm/Xresources | tr -d '[[:space:]]'`

# display, feh, and xv, all reset the root window color when
# they set an image which we don't want. It seems only xv can
# set the root background color and image at the same time.
if ! which xv >> /dev/null 2>&1;
then
BGCOL="#000000"
fi

# set the root window color
xsetroot -solid ${BGCOL} -cursor_name left_ptr

SVG_FILE=/etc/X11/xdm/arch-xdm/Archlinux-official-fullcolour.svg

# identify resolution
declare -a RESOLUTION
RESOLUTION=( $(xrandr -q | head -n1 | sed -e 's/.*current \([1-9][0-9]\+\) x \([1-9][0-9]\+\).*/\1 \2/') )

CACHE_DIR=/var/cache/xdm-arch-theme
IMAGEFILE=${CACHE_DIR}/arch_logo_${RESOLUTION[0]}x${RESOLUTION[1]}-${BGCOL###}.png

# create cache dir if necessary
if [[ ! -d ${CACHE_DIR} ]]; then
  mkdir -p ${CACHE_DIR}
fi

# check whether image file already exists
if [[ ! -f ${IMAGEFILE} ]]; then
  rsvg-convert -a --background-color=${BGCOL} -f png -w $((${RESOLUTION[0]}/4*2)) -o ${IMAGEFILE} ${SVG_FILE}
fi

# try different methods to set the background
if which xv >> /dev/null 2>&1; then
        # xv detected
        # xv spits out an error when using -quit, but it still does the job, so...
        xv -rbg ${BGCOL} -root -quit -rmode 5 ${IMAGEFILE} >> /dev/null 2>&1
elif which display >> /dev/null 2>&1; then
        # imagemagick detected
        display -background ${BGCOL} -backdrop -window root ${IMAGEFILE};
elif which feh >> /dev/null 2>&1; then
        # feh detected
        # feh gives error if $HOME isn't set, so...
        HOME=/root feh --bg-center ${IMAGEFILE};
fi

/etc/X11/xdm/arch-xdm/buttons &

xclock &

Xresources:

#if ( HEIGHT == 1080 )
# define LOGIN_POS_Y 740
#elif ( HEIGHT == 1024 )
# define LOGIN_POS_Y 635
#elif ( HEIGHT == 900 )
# define LOGIN_POS_Y 615
#elif ( HEIGHT == 800 )
# define LOGIN_POS_Y 550
#elif ( HEIGHT == 768 )
# define LOGIN_POS_Y 520
#elif ( HEIGHT == 600 )
# define LOGIN_POS_Y 400
#elif ( HEIGHT == 480 )
# define LOGIN_POS_Y 315
#endif

*borderWidth: 0
*frameWidth: 0
*foreground: #1793d1
*background: #041702 

! The description of these resources is found in the xdm man page
xlogin.Login.greeting:
xlogin.Login.namePrompt:        Username:\040
xlogin.Login.passwdPrompt:      Password:\040
xlogin.Login.fail:              incorrect
xlogin.Login.greetFace:         Terminus-14:style=Bold
xlogin.Login.promptFace:        Terminus-12:style=Bold
xlogin.Login.face:              Terminus-10
xlogin.Login.failFace:          Terminus-14:style=Bold
xlogin.Login.greetColor:        #4d4d4d
xlogin.Login.promptColor:       #4d4d4d
xlogin.Login.failColor:         red
xlogin.Login.width:             400
xlogin.Login.height:            150
xlogin.Login.y:                 LOGIN_POS_Y

xlogin.Login.innerFramesWidth:  0
xlogin.Login.sepWidth:          0

.XClock.geometry:               350x28+0-0
.XClock.Clock.analog:           false
.XClock.Clock.strftime:         (%A)\040%F\040%T
.XClock.Clock.update:           1
.XClock.Clock.render:           false
.XClock.Clock.font:             -misc-fixed-*-*-*-*-15-*-*-*-*-*-*-*
.XClock.Clock.foreground:       #4d4d4d

.Xmessage.form.message.scrollVertical:          never
.Xmessage.form.message.scrollHorizontal:        never
.Xmessage.geometry:                             -0-0
.Xmessage.form.Command.font:                    -misc-fixed-*-*-*-*-15-*-*-*-*-*-*-*
.Xmessage.form.Command.shapeStyle:              Rectangle

buttons file:

#!/bin/sh

if which xmessage >> /dev/null 2>&1; then
        xmessage -buttons reboot,poweroff "$@" "";


        case "$?" in
                101)
                        `which reboot`
                        ;;
                102)
                        `which systemctl` poweroff
                        ;;
        esac
fi

Last edited by jwm-art (2012-12-04 22:24:23)

Offline

Board footer

Powered by FluxBB