[kde] Re: How to make panel automatically adjust to screen size?

2011-02-02 Thread John Layt
On Wednesday 02 February 2011 01:16:24 Clemens Eisserer wrote:
> With KDE-4.6 I get the following behaviour:
> - Panel is no longer shrinked if panel-size > monitor.
> This makes it quite uncomfortable to work with, e.g. when using the
> laptop's builtin display I systray is outside the visible area.
> 
> Any ideas howto solve the tiresome problem?

That's definitely a bug.  I've no fix, but if you raise a bug on bugs.kde.org 
then it will bring it to the attention of the plasma guys so they can fix it.

Cheers!

John.
___
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


[kde] Re: How to set the KDE path?

2011-02-02 Thread Boyd Stephen Smith Jr.
In , Dotan 
Cohen wrote:
>It is rather frustrating that the Plasma Krunner (Alt-F2) does not
>follow the path configured in $HOME/.profile.

Are you using bash and have a .bash_profile?  I think .bash_profile is 
preferred by bash (and things trying to emulate bash's behavior) when 
both .profile and .bash_profile exist.

>The lead Plasma developer mentions that the user can configure the KDE
>path by placing an executable in ~/.xinitrc
>https://bugs.kde.org/show_bug.cgi?id=263883
>
>However, it "doesn't work". Googling the issue I see lots of people
>asking and the answer is usually to configure the path in
>.bash_profile or .profile. That does not work in KDE 4.x, I assume
>that it worked in 3.x by the age of those posts.
>
>So, what is the correct syntax for configuring the KDE path in
>~/.xinitrc? Thanks!

Don't use that.

If you need to set up global environment variables for your KDE 
sessions, use ~/.kde/env/$whatever.sh.

Those files should be sourced by /usr/bin/startkde which should be used 
by most (if not all) Xsession files that bring up a KDE SC 4 session 
(something involving plasma-desktop or plasma-netbook).

[It's possible this is a Debian-ism, but I thought the startkde script 
was provided by the kdebase package of KDE SC.]

I use kdm-4 and it has this annoying habit of sourcing both may .profile 
and my .login well before the session is even partially ready.  As a 
result, for each login, I get two dialog boxes that have no window 
decorations, don't seem to accept focus (sloppy or clicky), and expect 
some password input that they won't let me provide.  Luckily, hitting 
the [Esc] key while the pointer is over those dialogs can dismiss them.

My preferred shell is zsh, so I guess I can migrate some of this stuff 
to my .zshrc file; I don't *think* that get sourced anywhere by kdm-4 
along the way.  I think the same thing can be accomplished in bash and 
ksh.
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/


signature.asc
Description: This is a digitally signed message part.
___
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[kde] Re: How to set the KDE path?

2011-02-02 Thread Dotan Cohen
>> This is the whole point. What does KDE read to set the PATH? For
>> instance, the path that the Krunner dialogue looks for apps? And why
>> isn't this configurable in System Settings?
>
> I think what kevin is saying is the KDE does not do anything to the PATH 
> variable. It leaves it as the responsibility of the shell in which it itself 
> is being executed.
>

Let's word it a little differently: If the user wants Krunner to open
$HOME/.bin/firefox when he enters "firefox" into the KRunner dialog,
where does he configure that?

Krunner: the Alt-F2 dialogue.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
___
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


[kde] Re: How to set the KDE path?

2011-02-02 Thread Dotan Cohen
On Wed, Feb 2, 2011 at 11:00, Boyd Stephen Smith Jr.
 wrote:
> In , Dotan
> Cohen wrote:
>>It is rather frustrating that the Plasma Krunner (Alt-F2) does not
>>follow the path configured in $HOME/.profile.
>
> Are you using bash and have a .bash_profile?  I think .bash_profile is
> preferred by bash (and things trying to emulate bash's behavior) when
> both .profile and .bash_profile exist.
>

I am specifically referring to the Krunner (Alt-F2) dialogue.


>>So, what is the correct syntax for configuring the KDE path in
>>~/.xinitrc? Thanks!
>
> Don't use that.
>
> If you need to set up global environment variables for your KDE
> sessions, use ~/.kde/env/$whatever.sh.
>

Do you know the syntax? It is not the bash syntax. Thanks.


> I use kdm-4 and it has this annoying habit of sourcing both may .profile
> and my .login well before the session is even partially ready.

According to the lead Plasma dev, KDE should not source .profile.


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
___
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[kde] Re: How to set the KDE path?

2011-02-02 Thread Kevin Krammer
On Tuesday, 2011-02-01, Dotan Cohen wrote:
> On Tue, Feb 1, 2011 at 21:06, Kevin Krammer  wrote:
> > On Tuesday, 2011-02-01, Dotan Cohen wrote:
> >> On Tue, Feb 1, 2011 at 18:24, Kevin Krammer  wrote:
> >> > That never worked because e.g. .bash_profile is only read by
> >> > interactive shells (see man bash) and the shell running
> >> > /usr/bin/startkde is not interactive.
> >> 
> >> Of course, .bash_profile is for bash as the name implies. But what
> >> about .profile? Would it not make sense for KDE to respect that?
> > 
> > KDE is started through a script called startkde.
> > This is executed by a shell interpreter, whatever /bin/sh points to.
> > 
> > This shell might not read .profile, bash for example only does this for
> > interactive login shells. Nothing KDE can do about that.
> 
> This is the whole point. What does KDE read to set the PATH?

When a process is created, it gets the current environment of its parent 
process (well, the parent can pass a modified env if it chooses to).
The process itself then reads the environment through system API, e.g. 
getenv()

So if you run any program from within an interactive shell, it basically sees 
the environment of the shell at that point. If the shell's environment is 
altered afterwards, this will have no effect on the already running process.

So the environment for KDE base processes is the one which they are started 
in.
In case of a KDE workspace session, this is the environment which is present 
inside the startkde script. Which in turn is also running with the environment 
which was valid at its start.

Now the script's code or the interpreter running the script can alter this 
environment and any process started after such a change sees the new one 
(remember any process started before a change sees the old one).

The KDE environment extender mechanism uses that by having the startkde script 
source (include into itself) all files with extension .sh in any of its "env" 
directories.

> For
> instance, the path that the Krunner dialogue looks for apps?

A combination of paths in $PATH and KDE specific "non-interactive-binaries" 
paths.
See kde4-config --path exec

> And why
> isn't this configurable in System Settings?

Maybe to avoid misunderstanding when such a change only effects KDE programs 
an no non-KDE programs.
You could try a wish list item on bugs.kde.org for making the KDE specific 
search list configurable.

> >> > For KDE one can additional use KDE's environment extender mechanims,
> >> > i.e. putting a file (with .sh extension) into $HOME/.kde/env
> >> 
> >> Do you know the syntax? It is not the bash syntax. Thanks.
> > 
> > Somthing like this:
> > 
> > export PATH=$HOME/.bin:$PATH
> 
> Thanks, but that has no effect in, for instance $HOME/.kde/env/path.sh
> which has been chmodded +x and the system restart.

That should have worked. I've used that myself several times. The files in 
there are just read, so executable shouldn't be necessary either.

Check that your setup is actually using $HOME/.kde/ some distributions patched 
KDE to make it something different.
See kde4-config --localprefix

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.
___
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[kde] Re: How to make panel automatically adjust to screen size?

2011-02-02 Thread Guido Pinkernell
Am Mittwoch, 2. Februar 2011, 02:16:24 schrieb Clemens Eisserer:
> Hi,
> 
> I have a laptop with a 1280x800 display, but when I'm at home I use an
> external 1920x1200 monitor.
> Is there any way to make my panel automatically adjust to the screen size?

> With KDE-4.6 I get the following behaviour:
> - Panel is no longer shrinked if panel-size > monitor.
> This makes it quite uncomfortable to work with, e.g. when using the
> laptop's builtin display I systray is outside the visible area.

If this is a bug (I've seen this on my 4.6 a few times) then at least there is 
a workaround: Start your laptop without the having external monitor connected. 
When KDE is up, then connect. A message window should appear asking you 
whether to enable/adapt the external monitor. If it doesn't, start krandr 
(install before, if necessary) and follow instructions.

Guido
  
___
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


[kde] Re: How to set the KDE path?

2011-02-02 Thread Boyd Stephen Smith Jr.
In , Dotan 
Cohen wrote:
>On Wed, Feb 2, 2011 at 11:00, Boyd Stephen Smith Jr.
>
> wrote:
>> In , Dotan
>> 
>> Cohen wrote:
>>>It is rather frustrating that the Plasma Krunner (Alt-F2) does not
>>>follow the path configured in $HOME/.profile.
>>>
>> Are you using bash and have a .bash_profile?  I think .bash_profile is
>> preferred by bash (and things trying to emulate bash's behavior) when
>> both .profile and .bash_profile exist.
>
>I am specifically referring to the Krunner (Alt-F2) dialogue.

Still.  My question is surprisingly valid.  I've found an annoying little 
script in /etc/kde4/kdm/Xsession that tries to emulate the behavior of your 
shell configured in /etc/passwd.  So, the shell you set with chsh can, 
absurdly, affect how your KDE SC environment behaves.

>>>So, what is the correct syntax for configuring the KDE path in
>>>~/.xinitrc? Thanks!
>>>
>> Don't use that.
>> 
>> If you need to set up global environment variables for your KDE
>> sessions, use ~/.kde/env/$whatever.sh.
>
>Do you know the syntax? It is not the bash syntax. Thanks.

Works for me here:
$ cd ~/.kde/env
$ ls
gtk-qt-engine.rc.sh  keychain-start.sh  ssh-askpass.sh
$ cat *
#! /bin/sh

# Make sure our customised gtkrc file is loaded.
if [ -r "$HOME"/.gtkrc-2.0-kde ]; then
GTK2_RC_FILES=$HOME/.gtkrc-2.0-kde; export GTK2_RC_FILES
elif [ -r "$HOME"/.gtk_qt_engine_rc ]; then
GTK2_RC_FILES=$HOME/.gtk_qt_engine_rc; export GTK2_RC_FILES
fi
#! /bin/sh
# Starts keychain or initializes the environment, but requires no 
interactivity.
if [ -x /usr/bin/keychain ]; then
eval "$(/usr/bin/keychain --eval --quiet --inherit any-once --stop 
others --noask --lockwait 0)"
fi
#! /bin/sh

if [ -x /usr/bin/ksshaskpass ]; then
SSH_ASKPASS=/usr/bin/ksshaskpass; export SSH_ASKPASS
elif [ -x /usr/bin/x11-ssh-askpass ]; then
SSH_ASKPASS=/usr/bin/x11-ssh-askpass; export SSH_ASKPASS
elif [ -x /usr/lib64/ssh/x11-ssh-askpass ]; then
SSH_ASKPASS=/usr/lib64/ssh/x11-ssh-askpass; export SSH_ASKPASS
elif [ -x /usr/bin/ssh-askpass ]; then
SSH_ASKPASS=/usr/bin/ssh-askpass; export SSH_ASKPASS
elif [ -x /usr/lib64/ssh/ssh-askpass ]; then
SSH_ASKPASS=/usr/lib64/ssh/ssh-askpass; export SSH_ASKPASS
fi


>> I use kdm-4 and it has this annoying habit of sourcing both may .profile
>> and my .login well before the session is even partially ready.
>
>According to the lead Plasma dev, KDE should not source .profile.

I happen to agree with him.  But, that's not my experience using KDE SC 4 on 
Ddebian Squeeze.  The file /etc/kde4/kdm/Xsession installed by the kdm 
package contains the following (plus other stuff):
# Note that the respective logout scripts are not sourced.
case $SHELL in
  */bash)
[ -z "$BASH" ] && exec $SHELL $0 "$@"
set +o posix
[ -f /etc/profile ] && . /etc/profile
if [ -f $HOME/.bash_profile ]; then
  . $HOME/.bash_profile
elif [ -f $HOME/.bash_login ]; then
  . $HOME/.bash_login
elif [ -f $HOME/.profile ]; then
  . $HOME/.profile
fi
;;
  */zsh)
[ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
emulate -R zsh
[ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
zhome=${ZDOTDIR:-$HOME}
# zshenv is always sourced automatically.
[ -f $zdir/zprofile ] && . $zdir/zprofile
[ -f $zhome/.zprofile ] && . $zhome/.zprofile
[ -f $zdir/zlogin ] && . $zdir/zlogin
[ -f $zhome/.zlogin ] && . $zhome/.zlogin
setopt shwordsplit noextendedglob
;;
  */csh|*/tcsh)
# [t]cshrc is always sourced automatically.
# Note that sourcing csh.login after .cshrc is non-standard.
xsess_tmp=`mktemp /tmp/xsess-env-XX`
$SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) 
source ~/.login; /bin/sh -c export -p >! $xsess_tmp"
. $xsess_tmp
rm -f $xsess_tmp
;;
  *) # Plain sh, ksh, and anything we do not know.
[ -f /etc/profile ] && . /etc/profile
[ -f $HOME/.profile ] && . $HOME/.profile
;;
esac
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/


signature.asc
Description: This is a digitally signed message part.
___
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.