Announcement

Collapse
No announcement yet.

[Solved-kindof]Possible to run a script after kdm starts but before kde desktop?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Solved-kindof]Possible to run a script after kdm starts but before kde desktop?

    A known bug in KDE4 seems to be that does not handle dual screens properly.

    https://bugs.launchpad.net/ubuntu/+s...ta/+bug/211682

    I have Kubuntu Gutsy kde4 installed to an external USB drive on my Asus EEEPC, and only use the external drive when I am using my significantly larger monitor. In other words, I don't see myself needing to use the KDE4 if the pc is is detached from the USB.

    Hardy does the same thing... FYI, and this does NOT happen if I choose kde3 for my desktop.

    I has thought about putting it in /.kde4/Autostart but those things start AFTER the desktop loads... or they seem to.

    I am looking to run a script that runs an xrandr bash file I created that shuts off the internal screen as soon as I login.

    I have the script, and it works fine if I call it and the internal display shuts off so I and was thinking if I had it shut off before the desktop loads but after X starts... it might configure properly.

    Scripts that run as soon as I log in where I might call another script rc.local runs before X... or so it seems.

    I can do a cp filename.bak and restore it from the command line in the event I can't get something to work so I am willing to experiment.

    I thought by having x ignore the internal screen in xorg.conf, it would not use it... but this does not seem to work and it it is up and running with my desktop.

    Relevant part of xorg.conf

    Section "Device"
    Identifier "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
    Driver "intel"
    BusID "PCI:0:2:0"
    Option "monitor-VGA" "SyncMaster"
    Option "monitor-TV" "TV"
    Option "monitor-LVCD" "LVCD"

    EndSection

    Section "Monitor"
    Identifier "SyncMaster"
    Option "DPMS"
    EndSection

    Section "Monitor"
    Identifier "TV"
    Option "Ignore" "true"
    EndSection

    Section "Monitor"
    Identifier "LVCD"
    Option "DPMS"
    Option "Ignore" "true"
    EndSection

    Solution: see my post on launchpad:
    https://bugs.launchpad.net/ubuntu/+s...682/comments/5

    #2
    Re: Possible to run a script after kdm starts but before kde desktop?

    I have never done this, but a few pointers as to how I would do it.

    Try adding a line to call you script in /usr/share/xsessions/kde4.desktop

    This is the file that initiates the call from the login manager.

    If that does not work, try adding it at the start of /usr/lib/kde4/bin/startkde as this is just a shell script.

    Please post back on how you get on, it would be interesting.

    Comment


      #3
      [solved-kindof]Possible to run a script after kdm starts but before kde desktop?

      I got this to work BUT be sure that you DO NOT want your internal monitor to work while working with an external monitor. Not that you can't fix it, but you'll either have to edit the mentioned file in failsafe mode, or you'll need to be connected to your monitor again...

      Nothing worked and then I had forgotten something.

      /home/user/.bashrc

      So I added the xrandr command there, at the very beginning.

      For anyone reading this who wants to set up ONLY the external monitor in KDE4, you can do this and if you wipe out your /home/user/.kde4 directory BEFORE logging in, your desktop will be "normal" although you will lose any settings you had for kde4 so perhaps while logged out of kde4, rename your /home/user/.kde4 directory so that you still have your files just in case you need one of them.

      Keep in mind that if you so happen to log in with the internal lvds screen active, your desktop will look weird again and you'll have to do this process again, or switch between renaming your "backed up" .kde4 and your new .kde4 home directories.

      Comment


        #4
        Re: [Solved-kindof]Possible to run a script after kdm starts but before kde desk

        Solution: see my post on launchpad:
        https://bugs.launchpad.net/ubuntu/+s...682/comments/5

        Comment

        Working...
        X