Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th December 2007, 02:09 AM
Olin Shivers Offline
Registered User
 
Join Date: Dec 2007
Posts: 1
Angry xterm -C switch doesn't work under Fedora

xterm has a -C option that causes it to run as a "console" --
that is, the xterm displays messages sent to the console. This
is a handy thing -- I usually run a small console xterm in one
corner of my laptop's screen, so that I can see things that are
going on in my system.

Unfortunately, this functionality seems to be broken under Fedora.
Now, when this feature *usually* breaks, it's *usually* due to
/dev/console permission problems. But not this time -- gdm properly
gives me ownership of /dev/console when I log in:

% ls -l /dev/console
crw------- 1 shivers root 5, 1 2007-12-11 15:31 /dev/console
%

Nonetheless, when I run xterm -C I get an error message:

% xterm -C
xterm: cannot open console: Operation not permitted

and the xterm doesn't display any console messages. Furthermore, when
I search for operations on /dev/console with strace I get these:

% strace xterm -C 2>&1 | fgrep dev/console
stat64("/dev/console", {st_mode=S_IFCHR|0600, st_rdev=makedev(5, 1), ...}) = 0
access("/dev/console", R_OK|W_OK) = 0
%

What's weird is that, according to strace, the access() call is *winning* --
zero return means access is permitted.

One more odd sympton: if I run xterm -C as root, then
- I *don't* get the "cannot open console" error message (which is good);
- strace says the stat64() call happens, but the access() call isn't even made (which is odd);
- the xterm does *not* display console messages (which is bad).

Here's an example:
# strace xterm -C 2>&1 | fgrep console
stat64("/dev/console", {st_mode=S_IFCHR|0600, st_rdev=makedev(5, 1), ...}) = 0
#

I also observe, by the way, that the venerable xconsole program has similar
kinds of lossage. Xconsole is nice because it's not interactive -- it's
display-only. This is nice, because I hack my gdm scripts so that the
login panel puts an xconsole in the lower right corner of the screen. That
way, you can see what's happening on the machine, even if you aren't logged
in and can't run any commands. But under Fedora, this doesn't work and I
can't figure out why.

Does anyone have any suggestions? Should I file a bug report to Fedora?

I realise that this kind of UI is pretty old-school -- most people get their
notifications one painful, intrusive pop-up at a time via a notification
applet in a gnome panel, instead of simply having them neatly stream by on
a console. Call me traditional. It's a documented feature in these apps; it
should work.

-Olin
Reply With Quote
  #2  
Old 12th December 2007, 03:01 AM
FriedChips's Avatar
FriedChips Offline
Registered User
 
Join Date: Jul 2007
Location: Indiana USA
Posts: 1,715
Quote:
Originally Posted by Olin Shivers
Should I file a bug report to Fedora?
That would be my only suggestion for you.. Let the dev's know so then it will work for everyone.
__________________
The answer to all of lifes questions are buried somewhere in the Google search engine.

Code:
[Stephen@localhost ~]$ whatis this?
this?: nothing appropriate
Reply With Quote
  #3  
Old 12th December 2007, 03:18 AM
leadgolem's Avatar
leadgolem Offline
Registered User
 
Join Date: Apr 2005
Location: Littleton, CO
Age: 28
Posts: 2,855
Hmm, very interesting.
Code:
xterm -C
xterm: cannot open console: Operation not permitted
[leadgolem@localhost ~]$ su
Password: 
[root@localhost leadgolem]# xterm -C
Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
__________________
Only two things are infinite, the universe and human stupidity, and I am not sure about the former. -Albert Einstein-
yum -y --enablerepo=morals install honesty&
remove piratedcontent
S.C.O.U.R.G.E. Heroes of lesser renown, contributor.
Wine Basics Logitech g15 How-To Community made packages.
Reply With Quote
  #4  
Old 12th December 2007, 04:35 AM
stevea's Avatar
stevea Online
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,302
It works perfectly when you stop the console-kit
Quote:
service ConsoleKit stop
If you probed a little harder (try "strace -f") You'd see that xterm creates child process and this child attempts and fails with the system call setpgid(0,0) and also a close (which I doubt its the problem). The child correctly reports the "not permitted" message.

Quote:
lsof /dev/console
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
gdm-binar 2341 root 6w CHR 5,1 211 /dev/console
gnome-key 2387 stevea 6w CHR 5,1 211 /dev/console
console-k 6571 root 9r CHR 5,1 211 /dev/console
So console-kit process is already reading /dev/console. Doing so again would make a mess. And yo ucan't change the pgid of console-kit from root. You may disagree with the "xterm -C" or console-kit design, but it isn't an error.

No problem here - move along.
Reply With Quote
  #5  
Old 12th December 2007, 04:38 AM
kadambi Offline
Registered User
 
Join Date: Oct 2007
Posts: 120
Doesn't work for me either. I see the same behavior.
__________________
----------------------------------------------------
F9
MB: ASUS M2A-VM HDMI AMD 690G microATX
Processor: AMD 64 X2 6000+ 3GHz
Memory: CorsAir PC6400 800MHz, 4GB
HDD: Samsung 250 GB SATA HDD
ATI X1950Pro PCIe (Running Xorg Radeon)
Reply With Quote
Reply

Tags
fedora, switch, work, xterm

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
switch user in KDE doesn't work mha Using Fedora 0 19th September 2008 09:07 AM
fedora 9, "switch user" doesn't work Sirian Using Fedora 0 18th May 2008 10:03 AM
--aid switch doesnt work with rpm command getnag Using Fedora 3 16th January 2007 04:47 AM
telnet or xterm clients that work with OpenVMS mykle Using Fedora 6 11th May 2006 08:43 PM
[How-To] Switch DE/WM's when switchdesk doesn't work jayemef Guides & Solutions (No Questions) 0 14th December 2004 02:08 PM


Current GMT-time: 21:10 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat