Doesn't launch and gives gtk "can't open display"

Bug #30291 reported by Arktis on 2006-02-02
24
Affects Status Importance Assigned to Milestone
firestarter (Ubuntu)
Low
Unassigned
Justin Sojda (justintime) wrote :

Me too

Me too, and I can't "completely remove" Firestarter with Synaptic either.
I get a message telling me that "subprocess returned an error code 1" or something like that.

Please help!

- Ketil

Arktis (arktis) wrote :

I have recently discovered that this bug has something to do with my dual screen setup. If I change xorg.conf to use only one display, it works fine.

I should also note that I am using two seperate nvidia cards - NOT one dual head card. Maybe that has something to do with it.

Download full text (3.7 KiB)

I'm running one screen on my laptop, and I still have this problem.

- Ketil

If there could be a problem in xorg.conf, here it is:

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
        Identifier "Default Layout"
        Screen "Default Screen" 0 0
        InputDevice "Generic Keyboard"
        InputDevice "Configured Mouse"
        InputDevice "Synaptics Touchpad"
EndSection

Section "Files"

        # path to defoma fonts
        FontPath "/usr/share/X11/fonts/misc"
        FontPath "/usr/share/X11/fonts/cyrillic"
        FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
        FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
        FontPath "/usr/share/X11/fonts/Type1"
        FontPath "/usr/share/X11/fonts/100dpi"
        FontPath "/usr/share/X11/fonts/75dpi"
        FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load "i2c"
        Load "bitmap"
        Load "ddc"
        Load "dri"
        Load "extmod"
        Load "freetype"
        Load "glx"
        Load "int10"
        Load "type1"
        Load "vbe"
EndSection

Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver "kbd"
        Option "CoreKeyboard"
        Option "XkbRules" "xorg"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "no"
EndSection

Section "InputDevice"
        Identifier "Configured Mouse"
        Driver "mouse"
        Option "CorePointer"
        Option "Device" "/dev/input/mice"
        Option "Protocol" "ExplorerPS/2"
        Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
        Identifier "Synaptics Touchpad"
        Driver "synaptics"
        Option "SendCoreEvents" "true"
        Option "Device" "/dev/psaux"
        Option "Protocol" "auto-dev"
        Option "HorizScrollDelta" "0"
EndSection

Section "Monitor"
        Identifier "Generic Monitor"
        Option "DPMS"
EndSection

Section "Device"
        Identifier "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
        Driver "fglrx"
        BusID "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Default Screen"
        Device "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
        Monitor "Generic Monitor"
        DefaultDepth 24
        SubSection "Display"
                Depth 1
                Modes "1920x1200"
        EndSubSection
        SubSection "Display"
                Depth 4
          ...

Read more...

Arktis (arktis) wrote :
Download full text (3.5 KiB)

here's mine; notice that the 'screen 0 0' crap in the server layout section is is totally absent... some claimed it was the cause of the bug.

Section "Files"
 FontPath "/usr/share/X11/fonts/misc"
 FontPath "/usr/share/X11/fonts/cyrillic"
 FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
 FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
 FontPath "/usr/share/X11/fonts/Type1"
 FontPath "/usr/share/X11/fonts/100dpi"
 FontPath "/usr/share/X11/fonts/75dpi"
 # path to defoma fonts
 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
 Load "i2c"
 Load "bitmap"
 Load "ddc"
 Load "dri"
 Load "extmod"
 Load "freetype"
 Load "glx"
 Load "int10"
 Load "type1"
 Load "vbe"
EndSection

Section "InputDevice"
 Identifier "Generic Keyboard"
 Driver "kbd"
 Option "CoreKeyboard"
 Option "XkbRules" "xorg"
 Option "XkbModel" "pc104"
 Option "XkbLayout" "us"
EndSection

Section "InputDevice"
 Identifier "Configured Mouse"
 Driver "mouse"
 Option "CorePointer"
 Option "Device" "/dev/input/mice"
 Option "Protocol" "ExplorerPS/2"
 Option "Emulate3Buttons" "true"
EndSection

Section "Device"
 Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]"
 Driver "nvidia"
 BusID "PCI:1:0:0"
 Option "RenderAccel" "true"

 Option "AllowGLXWithComposite" "true"
EndSection

Section "Device"

 Identifier "NVIDIA Corporation NV18 [GeForce4 MX 4000]"

 Driver "nvidia"

 BusID "PCI:2:13:0"

 Option "RenderAccel" "true"

 Option "AllowGLXWithComposite" "true"

EndSection

Section "Monitor"

 Identifier "Generic Monitor"

 HorizSync 30.0 - 70.0

 VertRefresh 50.0 - 160.0

 Option "DPMS"

EndSection

Section "Monitor"

 Identifier "LCD-0"

 HorizSync 31.2 - 80.0

 VertRefresh 56.0 - 85.0

 Option "DPMS"

EndSection

Section "Screen"
 Identifier "Right"
 Device "NVIDIA Corporation NV34 [GeForce FX 5200]"
 Monitor "Generic Monitor"
 DefaultDepth 24
 Option "NoLogo" "true"
 SubSection "Display"
  Depth 1
  Modes "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 4
  Modes "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 8
  Modes "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 15
  Modes "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 16
  Modes "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 24
  Modes "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
EndSection

Section "Screen"

 Identifier "Left"

 Device "NVIDIA Corporation NV18 [GeForce4 MX 4000]"

 Monitor "LCD-0"

 DefaultDepth 24

 Option "NoLogo" "true"

 SubSection "Display"

  Depth 1

  Modes "1280x1024" "1024x768" "800x600" "640x480"

 EndSubSection
 SubSection "Display"

  Depth 4

  Modes "1280x1024" "1024x768" "800x600" "640x480"

 EndSubSection
 SubSection "Display"

  Depth 8

  Modes "1280x1024" "1024x768" "800x600" "640x480"

 EndSubSection
 SubSection "Display"

  Depth 15

  Modes "1280x1024" "1024x768" "800x600" "640x480"

 EndSubSection
 SubSection "Display"

  Depth 16

  Modes "1280x1024" "1024x768" "800x600" "640x480"

...

Read more...

Jurgen Depicker (jupsoleil) wrote :

Same problem. Solved it like this: I made a little script to have firestarter 'start':
#!/bin/bash
xhost
xhost +local:
sudo -k
sudo firestarter --display :0.0

Added to /etc/sudoers:
jurgen ALL=(root) NOPASSWD: /usr/sbin/firestarter

Now things work. But it shouldn't be like this, should it? I also couldn't completely remove firestarter with synaptic, besides.

Barry deFreese (bddebian) wrote :

I can't reproduce this in Dapper. Can anyone else? Thanks.

Changed in firestarter:
status: Unconfirmed → Needs Info
JoshuaPurcell (joshua-purcell) wrote :

I am also having this problem where the firestarter GUI frontend is not able to start while using sudo. I am running the most recently updated version of Dapper.

If I have no entries for firestarter in my /etc/sudoers file, then I can run "sudo firestarter" and the application starts after asking for my password.

If I have either one of the following entries in my /etc/sudoers file, the application gives me an error when running "sudo firestarter":
%admin ALL=(root)NOPASSWD:/usr/sbin/firestarter
%admin ALL= NOPASSWD: /usr/sbin/firestarter

This is the error I recieve:
    (firestarter:8362): Gtk-WARNING **: cannot open display:

The output of "echo $DISPLAY" is:
    :0.0

The output of "sudo firestarter --display :0.0" is:
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified

    (firestarter:9174): Gtk-WARNING **: cannot open display: :0.0

I had no problems with having Firestarter automatically startup (using the above method) while using Breezy. I get the above errors using an exact replica of my older /etc/sudoers file from my Breezy install. If there is any other information needed to replicate the problem then let me know.

JoshuaPurcell (joshua-purcell) wrote :

One more comment that may help...

This problem with using sudo to run firestarter happens with other programs that have the two requirements of running as root and using the X display (like synaptic for instance). This problem is not with firestarter, it relates more to sudo.

The only way I'm able to get firestarter, synaptic, or any other similar application to run using the above method is with the following line added to my /etc/sudoers:
%admin ALL=(root) ALL

If I replace the last ALL with any specific command (/usr/sbin/firestarter for example), then I start getting the error message I gave in my previous post.

JoshuaPurcell (joshua-purcell) wrote :

This is the exact line that worked for me in Breezy to bring up the Firestarter GUI without asking for a password:
%admin ALL=NOPASSWD:/usr/sbin/firestarter

This does not work for me in Dapper. This is the error I receive:
(firestarter:18882): Gtk-WARNING **: cannot open display:

In my comment directly above this one, the sudoers entry I gave allows me to bring up any command that has the requirements of running with root priveleges and using the X display. The only problem with this is that it still asks for a password (which doesn't really help). The following command allows me to run any command with similar requirements, but without asking for a password:
%admin ALL=(root) NOPASSWD: ALL

JoshuaPurcell (joshua-purcell) wrote :

This is the solution to this problem (posted in the Ubuntu forums earlier today):

In the /etc/sudoers file, there is this line:
Defaults !lecture,tty_tickets,!fqdn

This should be changed to:
Defaults !lecture,tty_tickets,!fqdn,env_keep+="DISPLAY HOME XAUTHORIZATION"

This worked for me as well as several other people who posted on the forum in this thread:
http://www.ubuntuforums.org/showthread.php?t=177738

description: updated
JoshuaPurcell (joshua-purcell) wrote :

A minor change to the line that starts with "Defaults" in /etc/sudoers is needed to correct this issue. See comments for more information.

Changed in firestarter:
status: Needs Info → Confirmed
essexman (ralphsmail) wrote :

This fix from Joshua/SqRt7744 really works:

In the /etc/sudoers file, there is this line:
Defaults !lecture,tty_tickets,!fqdn

This should be changed to:
Defaults !lecture,tty_tickets,!fqdn,env_keep+="DISPLAY HOME XAUTHORIZATION"

This problem was reported over 8 months ago and I think it is a shame that it has not been released. Please can this be released/looked at?

fralk (fmonte) wrote :

Are you sure XAUTHORIZATION is needed? this environment does not exist. I think it is enough to set:

Defaults !lecture,tty_tickets,!fqdn,env_keep+="DISPLAY HOME"

Lionel Le Folgoc (mrpouit) wrote :

Hi,

Is this bug still present on feisty (or gutsy)?
Thanks.

I can confirm that it is still present in 7.04:
http://www.howtoadvice.com/AutoFirestarter/

wyntermute (tcronk) wrote :

i can confirm i'mm having this problem with Gutsy. if anybody wants more info, send me a message with detailed instructions... i'm noobish, but definitely 1) willing to help and 2) capable of taking good directions. :D worked around by uninstalling firestarter, and then everything starts fine, but... eep! I'm not practicing safe-surf! (oh, i have a pppoe adsl connection, for whatever that's worth).

rl27 (rl27) wrote :

My Firestarter was automatically started. My problem started when i edited my /etc/sudoers to stay more secure.
I added this line: user_name ALL=(ALL) NOPASSWD: /usr/sbin/firestarter --start-hidden
:( In the next boot, the surprise! Where's firestarter?!? Heeelp!!! :)
Searching in the web i was "discovered" that the problem is that i can't run graphic apps as root, 'cause X don't give me the permissions.
So, i found this: "Type in console: xhost local:root"
Oh! It's resolved!!! :) But on the next boot... :(
The solution doesn't persist. My Firestarter is inited by "firestarter.desktop" placed in /home/user_name/.kde/.Autostart. Ok, I know. This isn't gnome! I explain. This file just is the icon that init firestarter automatically. It have an Exec option that contains the command used. The command is: "sudo /usr/sbin/firestarter --start-hidden"
So, the idea is turn the "xhost solution" persistent!
In my case, on the Exec option of the firestarter.desktop I've typed: "xhost local:root; sudo /usr/sbin/firestarter --start-hidden"
It's worked fine!!! The two commands are executed and i'm happy again! :)
Try to apply this solution in "gnome's style". I hope have helped.

Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in firestarter (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers