FedoraForum.org - Fedora Support Forums and Community
Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2013
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    devilspie and startx error

    Hi guys, I've found a problem I can't resolve with extensive googling.

    I am using a Lenovo ThinkPad X200, with Fedora 19 64-bit.

    Previously, in my .bashrc I had a command
    Code:
    devilspie -a &
    to start a pretty little transparent terminal that lives on my desktop beneath all my program windows. This worked just fine.

    Recently I've started using command line a lot and wanted to login by default to just tty1, and then run
    Code:
    startx
    to get gnome going if I so desired. I also managed this just fine.

    The problem occurs as a result of these two being combined: When I login via tty, the .bashrc script gets run, but because no graphical windows are open devilspie complains and says:
    Code:
    GdK-WARNING **: cannot open display
    . Fair enough. But now, if I want to run gnome via the startx command I can't find a way to run devilspie successfully.

    I wonder if there is a script (like .xinitrc) that gnome runs automatically when it opens, so that I can simply add the line "devilspie -a &" to that file? Help appreciated.

  2. #2
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    I do not run either F19 or Gnome3 ( I run F18 and Xfce).
    For a program that requires an X server to be running, it seems to me that ~/.bashrc is the wrong place to launch it.
    Every DE has a method of add entries to it's "autostart" programs that run immediately after login. That would seem the appropriate place to add your devilspie startup command.

    For Gnome3, this link tells me how it's done.

  3. #3
    Join Date
    Sep 2013
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    I tried that and it doesn't work. When I try that, running 'ps' shows that devilspie is running but I don't see the terminal appear on the desktop.

  4. #4
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    I'm not really qualified to help you on this one. But since your borderless and transparent terminal was appearing on your Gnome3 desktop when booting directly to the GUI, I can only presume you have a configuration file already established for that to happen (~/.devilspie/somefile.ds). Here is an ArchWiki page detailing how to set that up in gnome, though that may be pre-gnome3 gnome?, in case you needed more guidance with that.

  5. #5
    Join Date
    Jul 2011
    Location
    Birmingham, UK
    Age
    44
    Posts
    2,759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    Quote Originally Posted by dapro1
    I tried that and it doesn't work. When I try that, running 'ps' shows that devilspie is running but I don't see the terminal appear on the desktop.
    Are there errors in your session log? (“journalctl _UID=1000”; replace 1000 with your UID, as reported by the “id” command.)

  6. #6
    Join Date
    Sep 2013
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    Pablo2, that's right, I even think the link you sent me is the one I used to make my .ds file. I'm not sure the problem is there though because I had devilspie working well previously.

    Gareth, I get one error when I run the command 'devilspie -a &' simply from a terminal:
    Code:
    Sep 08 12:23:29 localhost.localdomain gnome-session[9907]: Window manager warning: Log level 16: Called enable_unredirect_for_screen while unredirection is enabled.
    and when I startx:
    Code:
    Sep 07 18:20:02 localhost.localdomain gnome-session[965]: JS LOG: GNOME Shell started at Sat Sep 07 2013 18:20:02 GMT+0200 (CEST)
    Sep 07 18:20:04 localhost.localdomain gnome-session[965]: Window manager warning: Got a request to focus the no_focus_window with a timestamp of 0.  This shouldn't happen!
    Sep 07 18:20:04 localhost.localdomain gnome-session[965]: Window manager warning: CurrentTime used to choose focus window; focus window may not be correct.
    Sep 07 18:20:03 localhost.localdomain gnome-session[965]: Window manager warning: Log level 16: STACK_OP_ADD: window 0x1400001 already in stack
    Sep 07 18:20:03 localhost.localdomain gnome-session[965]: Window manager warning: Log level 16: STACK_OP_ADD: window 0x1400001 already in stack
    . Thank you!

  7. #7
    Join Date
    Dec 2006
    Posts
    2,087
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    A warning is just a warning and not a (fatal) error ;-)

  8. #8
    Join Date
    Sep 2013
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    Sure, thanks George. In which case there are no errors, but I believe those warnings to be relevant to my problem.

  9. #9
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    4,042
    Mentioned
    20 Post(s)
    Tagged
    1 Thread(s)

    Re: devilspie and startx error

    Perhaps try something like the following in .bashrc

    Code:
    if [ x$DISPLAY != x ]
    then
        devilspie
    fi
    $DISPLAY is set when X is running to something :0

    I have many ideas, even some I haven't thought of yet.

  10. #10
    Join Date
    Jul 2008
    Posts
    1,347
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    Something to keep in mind: the devilspie in the Fedora repo is a bit dated.
    There is a 0.23 version out there that using libwnck3 for better gnome3 support.
    There is also the fork named "devilspie2" which the author of devilspie encourages
    people to use now instead.

    Newer code and uses lua for config parsing instead.
    http://www.gusnan.se/devilspie2/

  11. #11
    Join Date
    Sep 2013
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: devilspie and startx error

    Managed to get this working, although I got close to giving up. I'm not really sure why it wasn't working before. I removed the devilspie command from my .bashrc and entered it into the aforementioned gnome-session-properties utility. I also ran terminator from this utility, with the option -T to specify a 'window title', so that the terminal gets picked up by devilspie.

    I ended up using devilspie instead of devilspie2, although neither of them can remove terminator from mytask switcher, but that's only a very minor issue. Thank you all.

Similar Threads

  1. Devilspie Error
    By metatron in forum Using Fedora
    Replies: 20
    Last Post: 28th December 2011, 06:22 PM
  2. startx error
    By renato.it in forum Installation, Upgrades and Live Media
    Replies: 5
    Last Post: 9th December 2007, 12:52 AM
  3. startx error
    By RiPOFF in forum Using Fedora
    Replies: 1
    Last Post: 19th June 2006, 06:51 PM
  4. startx error
    By robghealey in forum Using Fedora
    Replies: 3
    Last Post: 14th May 2004, 04:22 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •