You are not logged in.

#1 2007-07-13 12:29:46

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

[SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

Hi all,

I was a bit fed up of login managers, so I decided to get rid of GDM and go for the startx command. I have Xfce as DE, so I added the following line to .xinitrc:

exec startxfce4

I also tried with plain "startxfce4", but everytime I tried I got a permission issue on /var/log/Xorg.0.log (and all related, like Xorg.0.log.old), so I chmoded /var/log to 777, and I got the following error:

xf86OpenConsole: Cannot open /dev/tty0 (Permission denied)

I've been into the Archlinux IRC channel, and I've been suggested to chmod /tmp to 1777. I also did:

chown -c <myuser> /dev/vc/0
chown -c <myuser> /dev/vc/7

But I keep getting the same error. After reboot, these are the permissions on /dev/vc/0 and /dev/vc/7

crw-rw----  1 root  root 4,  0 2007-07-13 12:00 0
crw-rw----  1 root  root 4,  7 2007-07-13 12:00 7

So I can see they remain unchanged even though I have chmoded them to my user.

Now those are the permissions on /dev/tty

crw-rw-rw-  1 root tty       5,   0 2007-07-13 12:23 tty

If I start the GDM daemon I can login just fine, it seems I cannot start X without a login manager.

Any help is greatly appreciated,
Thanks for your time smile

Last edited by finferflu (2007-08-29 13:59:55)


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#2 2007-07-15 02:00:36

tuxing
Member
From: Berlin/Germany
Registered: 2007-06-27
Posts: 34

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

maybe /dev/tty0 is reserved for plain console logins?

as far as i know, tty7 is reserved for X. See my inittab:
my /etc/initab says "x:5:respawn:/opt/kde/bin/kdm -daemon", but i'm forced to login on X only using tty7 or /dev/vc/7 !

you may try to change inittab to spawn gettys on e.g. tty1 to tty3 and now tty4 would be free for using X (that may not be funtion!)
i hope this helps...


GNU/Linux is not only another operating system. It is freedom from any point view!

Offline

#3 2007-07-15 09:59:09

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,213

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

@ tuxing : the 5 is for RUNLEVEL 5 and that one only allows X11/graphical login , so that behaviour is correct.

finferflu, this is my /etc/inittab :

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)    Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

id:3:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

c1:2345:respawn:/sbin/agetty 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
c6:2345:respawn:/sbin/agetty 38400 vc/6 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/opt/kde/bin/kdm -nodaemon
# End of file

I DON'T use a graphical login.

Log in as root on console and try startx, you'll probably get errors due to missing packages (root is set to use windowmaker with xclock and some other stuff) but it will help to determine where your problem is.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#4 2007-07-15 17:32:31

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

@ Lone_Wolf

My /etc/inittab looks identical to yours. I have tried to pipe the output of startx to a file using

startxfce4 > startx.log

but it doesn't seem to grab all information. I have also tried checking manually, but I could not scroll up to the top to check all the output. So in my text file I got this:

/usr/bin/startxfce4: Starting X server
Agent pid 6963
You appear to be running beagle using sudo.  This can cause problems with
permissions in your .beagle and .wapi directories if you later try to run
as an unprivileged user.  If you need to run beagle as root, please use
'su -c' instead.
Beagle Daemon exited with errors.  See ~/.beagle/Log/current-Beagle for more details.
/usr/bin/ccsm
/usr/bin/compiz
/usr/bin/gtk-window-decorator
/usr/bin/kde-window-decorator
/usr/bin/emerald
/usr/bin/metacity
/usr/bin/xfwm4
Warning: Crypt::Simple not found ...
Warning: Crypt::Blowfish not found ...
Warning: FreezeThaw not found ...
Warning: Compress::Zlib not found ...

CheckGmail requires the above packages for password encryption
Please download and install from CPAN (http://search.cpan.org) if you want to use this feature ...

Warning: Gtk2::Sexy not found ...

CheckGmail uses Gtk2::Sexy for clickable URLs in mail messages
Please download and install from CPAN (http://search.cpan.org) if you want to use this feature ...

* Using the GTK Interface
Backend     : ini
Integration : true
Profile     : default
Adding plugin decoration (Window Decoration)
Initializing decoration options...done
* Searching for installed applications...
* XFCE4 is running
* No GLX_EXT_texture_from_pixmap present with direct rendering context
... present with indirect rendering, exporting: LIBGL_ALWAYS_INDIRECT=1
Backend     : ini
Integration : true
Profile     : default
Adding plugin cube (cube)
Adding plugin water (water)
Adding plugin clone (clone)
Adding plugin screenshot (screenshot)
Adding plugin video (video)
Adding plugin switcher (switcher)
Adding plugin place (place)
Adding plugin svg (svg)
Adding plugin move (move)
Adding plugin plane (plane)
Adding plugin png (png)
Adding core settings (General Options)
Adding plugin minimize (minimize)
Adding plugin fade (fade)
Adding plugin regex (regex)
Adding plugin scale (scale)
Adding plugin blur (blur)
Adding plugin zoom (zoom)
Adding plugin annotate (annotate)
Adding plugin fs (fs)
Adding plugin glib (glib)
Adding plugin resize (resize)
Adding plugin wobbly (wobbly)
Adding plugin dbus (dbus)
Adding plugin inotify (inotify)
Adding plugin rotate (rotate)
Adding plugin decoration (decoration)
Adding plugin neg (neg)
Adding plugin winrules (winrules)
Adding plugin scaleaddon (scaleaddon)
Adding plugin thumbnail (thumbnail)
Adding plugin wall (wall)
Adding plugin vpswitch (vpswitch)
Adding plugin snap (snap)
Adding plugin ring (ring)
Adding plugin text (text)
Adding plugin opacify (opacify)
Adding plugin imgjpeg (imgjpeg)
Adding plugin put (put)
Adding plugin resizeinfo (resizeinfo)
Adding plugin expo (expo)
Adding plugin animation (animation)
Adding plugin addhelper (addhelper)
Adding plugin cubereflex (cubereflex)
Adding plugin gotovp (gotovp)
Adding plugin trailfocus (trailfocus)
Adding plugin showdesktop (showdesktop)
Adding plugin group (group)
Adding plugin scalefilter (scalefilter)
Adding plugin mblur (mblur)
Adding plugin splash (splash)
Adding plugin fadedesktop (fadedesktop)
Adding plugin firepaint (firepaint)
Adding plugin extrawm (extrawm)
Adding plugin reflex (reflex)
Adding plugin fakeargb (fakeargb)
Adding plugin tile (tile)
Adding plugin snow (snow)
Adding plugin crashhandler (crashhandler)
Adding plugin bench (bench)
Initializing core options...done
Initializing screenshot options...done
Initializing video options...done
Initializing place options...done
Initializing svg options...done
Initializing move options...done
Initializing minimize options...done
Initializing resize options...done
Initializing decoration options...done
Initializing vpswitch options...done
Initializing snap options...done
Initializing ring options...done
Initializing imgjpeg options...done
Initializing put options...done
Initializing animation options...done
Initializing tile options...done
Initializing wobbly options...done
Initializing fade options...done
Initializing trailfocus options...done
Initializing group options...done
Initializing cube options...done
Initializing switcher options...done
Initializing scale options...done
Initializing rotate options...done
Initializing scaleaddon options...done
Initializing expo options...done
Initializing cubereflex options...done
Initializing scalefilter options...done
[2007-07-07 18:22] ALUNN starting, first run in 0 min.
[2007-07-07 18:22] News check
[2007-07-07 18:23] Update check
             ....  Updates: dhcpcd  gpgme  libcups  gnupg2  libassuan  pinentry  libksba

It doesn't look very interesting, does it?

@ tuxing

As I said in my post before, I have also chmowned /dev/vc/7 to my user, but that dindn't help... I don't think I actually have to run "startx" in tty7 to make it start there. I was on tty1 when I ran startx, but I got a permission issue on vc7, that's why I chowned it to my user...

Thanks for your replies, by the way smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#5 2007-07-15 18:31:55

tuxing
Member
From: Berlin/Germany
Registered: 2007-06-27
Posts: 34

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

@ Lone_Wolf
You are right!
i was confused, because i tryed some thiings about starting X on another tty.

@ finferflu
maybe you should be a member of group 'video'?

sorry, im guessing...


GNU/Linux is not only another operating system. It is freedom from any point view!

Offline

#6 2007-07-17 22:45:14

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

@ tuxing

sorry for the late reply, I was busy flying home...

anyway, adding my user to the group video didn't help, I get an error saying that:

Could not move Xorg.0.log to Xorg.0.log-old

Or something similar to that.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#7 2007-08-29 06:08:10

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

Those Xorg.X.log fies have to be owned by root:user. (Though it's not really the user, just the equally named, unique user group.)

If you want to catch all the output a program does for the next time, use this instead which will log both stdout and stderr:

program >& log

(&> works also.)

Unfortunately I don't have a solution but maybe you can get something interesting from your log files from now.

Please post then the most recent error log of your /var/log/Xorg.0.log and what you get from xfce.

Last edited by harlekin (2007-08-29 06:16:55)


Hail to the thief!

Offline

#8 2007-08-29 12:18:41

azerty
Member
Registered: 2007-08-23
Posts: 90
Website

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

finferflu, look at this thread and this blog entry. There you'll find a solution to your "Can't move Xorg.log (...)"problem.

I had the same problem with the Xorg.log a time ago, it happened after I compiled dwm.
I don't know why this problems occurs, but currently it seems to occur more often then usual, maybe a bug?

Last edited by azerty (2007-08-29 12:19:54)


Why are we here? What is the sense of life?
INVITATION TO THE TRUTH

Offline

#9 2007-08-29 13:58:59

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] startx: xf86OpenConsole: Cannot open /dev/tty0

azerty wrote:

finferflu, look at this thread and this blog entry. There you'll find a solution to your "Can't move Xorg.log (...)"problem.

I had the same problem with the Xorg.log a time ago, it happened after I compiled dwm.
I don't know why this problems occurs, but currently it seems to occur more often then usual, maybe a bug?

Wow thanks! That did the trick smile

I only had to do:

chmod u+s /usr/bin/Xorg

Thanks a lot, you don't know how much I was desiring to dump the greeter smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

Board footer

Powered by FluxBB