DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Installation and Upgrading

FreeBSD Installation and Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th March 2013
wmichaelb's Avatar
wmichaelb wmichaelb is offline
New User
 
Join Date: Mar 2013
Posts: 2
Thanked 0 Times in 0 Posts
Default Newbie with X & XFCE Problem

I have a little experience with Free and PC-BSD, but wanted to work a bit with OpenBSD and xfce. I successfully installed OpenBSD 5.1, and got the 1980's style login page, so I assume that X is working. I installed the requisite set of packages for xfce (I think!). But when I go into xterm and type

startxfce4

in order to launch xfce, I'm given that desktop with xterm in the middle of it. If I close xterm, I also close xfce...@$@@%$@!$%!@%!!!

If I ctrl-alt-f1 to get tty and no xterm, and log in that way, typing startxfce4 gives me an error:

/usr/local/bin/startxfce4: starting X server

Fatal server error: server is already active for display 0.
If this server is no longer running, remove /tmp/.X0-lock

Invalid MIT-MAGIC-COOKIE Invalid MIT-MAGIC-COOKIE Invalid MIT-MAGIC-COOKIE Invalid MIT-MAGIC-COOKIE keyxinit: giving up
xinit: unable to connect to X server: Resource temporarily unavailable
xinit: xinit: server error

So as root, I rm /tmp/.X0-lock, and try startxfce4 again, and...absolutely....
nothing....happens. The system just hangs.

If I try X -configure as root from tty, I get exactly the same error. So I believe I have some sort of X setup mistake. Can someone make a suggestion? Ideally, I'd like to use a login screen to start up xfce4 automagically when I give it a username and password.

Thanks in advance!
Reply With Quote
  #2   (View Single Post)  
Old 27th March 2013
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 270
Thanked 23 Times in 23 Posts
Default

Hello and welcome to the forums.

It's not clear whether you're using FreeBSD or OpenBSD. It seems you're using OpenBSD (?) so you've posted in the wrong subforum.
Bear in mind they are two different systems with different implementations of Xorg.

Quote:
Originally Posted by wmichaelb View Post
I successfully installed OpenBSD 5.1, and got the 1980's style login page, so I assume that X is working. I installed the requisite set of packages for xfce (I think!). But when I go into xterm and type

startxfce4
I don't know if you mean a) X is already running with twm or b) you have a text-based login; you shouldn't run startxfce4 while X is already running.
With no X running, run echo "/usr/local/bin/startxfce4" > ~/.xinitrc and then run xinit.

Quote:
Originally Posted by wmichaelb View Post
I'm given that desktop with xterm in the middle of it. If I close xterm, I also close xfce...
Any application (including Xfce) will behave like that. In order to run applications separately from a virtual terminal you have to detach them first using the ampersand symbol, e.g.:
% vim testfile.txt &
And then you can close the terminal.

Quote:
Originally Posted by wmichaelb View Post
If I ctrl-alt-f1 to get tty and no xterm, and log in that way, typing startxfce4 gives me an error:

/usr/local/bin/startxfce4: starting X server

Fatal server error: server is already active for display 0.
If this server is no longer running, remove /tmp/.X0-lock
X is still running (e.g. on TTYV8 under FreeBSD by default). Either press Ctrl+Alt+Backspace to shutdown X (if your X setup allows it) or press Ctrl-Alt-F1 followed by Ctrl+C.
The X server will shutdown cleanly and you'll be able to run it again properly.

Quote:
Originally Posted by wmichaelb View Post
If I try X -configure as root from tty
You already said Xorg was running fine, so you're probably wasting your time with that command.

Quote:
Originally Posted by wmichaelb View Post
I'd like to use a login screen to start up xfce4 automagically when I give it a username and password.
Here's the FreeBSD documentation for the XDM.
http://www.freebsd.org/doc/en_US.ISO...ook/x-xdm.html
__________________
May the source be with you!
Reply With Quote
  #3   (View Single Post)  
Old 27th March 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,797
Thanked 214 Times in 189 Posts
Default

For OpenBSD, xdm(1) can be started at boot time by adding the following line to /etc/rc.conf.local:
Code:
xdm_flags=""
For automatically starting XFCE at log in from the xdm login screen, an .xsession file containing the same startup line(s) as in the .xinitrc file is needed in the $HOME directory. For example, using ln(1) to have two file names for the same file:
Code:
$ cd $HOME
$ ln .xinitrc .xsession
Quote:
... I successfully installed OpenBSD 5.1...
FYI: OpenBSD 5.1 will be end-of-life on or about 1 May 2013, when OpenBSD 5.3 is expected to be released.
Reply With Quote
  #4   (View Single Post)  
Old 29th March 2013
wmichaelb's Avatar
wmichaelb wmichaelb is offline
New User
 
Join Date: Mar 2013
Posts: 2
Thanked 0 Times in 0 Posts
Default Sorry, This Should Be in OpenBSD Forum

Thanks to both of you for your kind responses. This is my first post; hopefully I won't post in the wrong area again!

Beastie: From perusing the boot log, it appears to me that xdm is running, and that is what generates the login screen.

Ctrl+Alt+Backspace just recycles me back to the login screen again. Ctrl+Alt+F1 gives me TTY, but doesn't seem to shut X down. I log in as root, and type:

echo "/usr/local/bin/startxfce4" . ~/.xinitrc

and the system seems to "take it" without complaint. But if I then type

xinit

I get the same errors. If I log in via xdm as my standard user and type:

startxfce4 &

I get my xfce workspace, and by clicking on the top of the terminal window, it goes away. So that's what I'll do for the moment. Once I get this sorted out, I'll try a later version, and perhaps a different desktop. I chose this one from an article a couple of months ago in BSD Magazine that showed how to do this, and it was from 5.1. The necessary files are different for 5.2. The machine I'm using is specifically for this sort of experimentation, so there's no data at risk.

jggimi: If as root, I try to open leafpad to edit /etc/rc.conf.local, I get:

leafpad
No protocol specified
No protocol specified
No protocol specified
No protocol specified
leafpad: Cannot open display:

It appears to me that my X configuration is keeping me from fixing it? I'd appreciate any further direction that you can offer, and thanks again for your help!

Last edited by wmichaelb; 29th March 2013 at 02:37 AM. Reason: clarification
Reply With Quote
  #5   (View Single Post)  
Old 29th March 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,797
Thanked 214 Times in 189 Posts
Default

  1. X is already running. Stop trying to start it a second time, such as with xinit or with startx.
  2. X is running via XDM, the X Display Manager. CTRL-ALT-Backspace will merely restart it.
  3. The $HOME/.xinitrc file is used by xinit or startx -- the .xinitrc file is NOT used with XDM.
  4. Instead, XDM uses $HOME/.xsession
How to fix this:
  1. Use CTRL-ALT-F1 and log into your userid from the console.
  2. Move, Link, Copy, or otherwise replicate your .xinitrc script as .xsession instead, as I recommended above.
  3. Use CTRL-ALT-F5 to return to the XDM login screen
  4. Login.
How to stop XDM (and X) on your system, so that you can test .xinitrc scripts and get them working with startx(1) or xinit(1):
  1. Use CTRL-ALT-F1 and log into your user from the console
  2. Issue this command as root: # pkill -9 xdm
  3. Login as your standard user, if you are not already, and muck about to your heart's content.
  4. To restart XDM, X must not currently be running. Issue this command as root: # xdm

Last edited by jggimi; 29th March 2013 at 02:58 PM. Reason: clarity
Reply With Quote
Reply

Tags
x server, xfce4

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Ports are there any tools (newbie) sparky OpenBSD Packages and Ports 10 13th March 2012 01:22 AM
HOWTO: Lightest XFCE - Making XFCE lighter and faster vermaden Guides 27 2nd September 2010 12:24 PM
PF Configuration for newbie slakic OpenBSD Security 1 20th August 2009 02:35 PM
Newbie NAT problem TiN-MAN FreeBSD Installation and Upgrading 2 26th June 2008 06:42 AM
Problem for associated a program to browser on Xfce aleunix OpenBSD Packages and Ports 2 3rd June 2008 02:54 PM


All times are GMT. The time now is 12:07 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick