LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-19-2013, 09:03 AM   #1
liberalchrist
Member
 
Registered: Jun 2011
Location: Clover, SC
Distribution: Slackware Current & FreeBSD
Posts: 122

Rep: Reputation: 26
My long used su command no longer works.


I always appreciate any help I'm given. A long while back, I used "sudo" to run gparted from my fluxbox menu. This seemed to do all I wanted and I was satisfied. Sometime later, I found there was some particular feature that was unusable and required using "su" directly. Later, I started using fbpanel in e16 instead of fluxbox and was able to use the following command in a menu item to start gparted as root: 'xterm -geometry 20x2 -e su -c gparted'. This command opened a small window where I entered my password, then gparted opened with full functionality. After recent upgrades, this no longer works. The password window opens and accepts the password, but gparted fails to open. Running the command in terminal gives no error message. Simply running 'su -c gparted' in an xterm works as normal.

Anybody have any ideas about what has changed? I know I could install gksu, but I really preferred this low tech method instead of adding more software.

Thanks in advance
 
Old 05-19-2013, 09:25 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,537

Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Some window managers like to replace xterm with a symlink to their own terminal emulator. I've never used fluxbox, so I don't know if it does.

What you gave seems to be valid on my KDE system.
 
Old 05-19-2013, 09:35 AM   #3
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Single quotes around the argument for -e wouldn't go amiss.
 
Old 05-19-2013, 09:52 AM   #4
torimus
Member
 
Registered: Apr 2013
Distribution: Slackware
Posts: 81

Rep: Reputation: Disabled
put command passed to xterm's -e in quotes (single or double)
don't know what are your environment settings but i'd try to pass -l option to su to load root's login environment
 
Old 05-19-2013, 10:59 AM   #5
liberalchrist
Member
 
Registered: Jun 2011
Location: Clover, SC
Distribution: Slackware Current & FreeBSD
Posts: 122

Original Poster
Rep: Reputation: 26
Thanks to all of you, but neither suggestion fixed the problem. The original syntax worked for about one year in both fluxbox and fbpanel. I also tried with full path. I'm running 'current', so I feel sure it's some recent change.

Last edited by liberalchrist; 05-19-2013 at 11:07 AM.
 
Old 05-19-2013, 11:20 AM   #6
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,047

Rep: Reputation: 170Reputation: 170
I got it to run by issuing:

Code:
$ xhost +
firstly, then your xterm command.

So it may ultimately be an XAUTHORITY issue. Some permanent remedies may be found here:

https://wiki.archlinux.org/index.php...X_apps_as_root

Use care when using xhost, you may want to invoke xhost - when your operation finishes.

cheers,
 
Old 05-19-2013, 11:58 AM   #7
liberalchrist
Member
 
Registered: Jun 2011
Location: Clover, SC
Distribution: Slackware Current & FreeBSD
Posts: 122

Original Poster
Rep: Reputation: 26
Mrclisdue,

Thanks for your suggestion. Unfortunately, xhost + did not change the result, nor did changing /etc/profile (this caused X to fail with a 'No protocol' message). This has already taken too much time for such a minor problem and I know that simpler solutions are available.

Thanks for all your time folks, I'll just mark this one solved.

Last edited by liberalchrist; 05-19-2013 at 11:59 AM.
 
Old 05-19-2013, 12:10 PM   #8
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,047

Rep: Reputation: 170Reputation: 170
Fair enough, but I'm still a bit curious why *it works for me*, and not for you...so, could it also involve dbus....?

Do you happen to have this in your ~/.fluxbox/startup:

Code:
# Start DBUS session bus:
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
   eval $(dbus-launch --sh-syntax --exit-with-session)
fi
?

because it could involve a combo of dbus and xauth?

For the record, the message that I got before issuing xhost + was:

Quote:
Unable to register terminal service: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
cheers,
 
Old 05-19-2013, 12:37 PM   #9
liberalchrist
Member
 
Registered: Jun 2011
Location: Clover, SC
Distribution: Slackware Current & FreeBSD
Posts: 122

Original Poster
Rep: Reputation: 26
mrclisdue,

I am no longer using fluxbox as per my original post. I used the menu item in question successfully with my current setup only a few days ago. This seems to have changed with this weeks updates. This thread, http://www.linuxquestions.org/questi...helper-819838/ seems to be relevant. I just tried gksu and got the same result they did. This is really just an inconvenience, I only use gparted occasionally. Like any OCD computer geek, I just have a hard time relaxing when I can't figure things out.

P.S., No, I don't have the code you mentioned in either ~/.fluxbox/startup or any of my .xinitrc's.

Thanks

Last edited by liberalchrist; 05-19-2013 at 12:44 PM.
 
Old 05-19-2013, 12:45 PM   #10
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,047

Rep: Reputation: 170Reputation: 170
Quote:
Originally Posted by liberalchrist View Post
...Like any OCD computer geek, I just have a hard time relaxing when I can't figure things out....
cheers to that! who hasn't had these niggling things that often take months (years!) to rectify only to discover in some obscure post somewhere that it's often as simple as <insert foo foo bar bar hyphen tilde tic here> and it's solved?

cheers,
 
Old 05-19-2013, 02:49 PM   #11
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,047

Rep: Reputation: 170Reputation: 170
Quote:
Originally Posted by liberalchrist View Post
mrclisdue,

...P.S., No, I don't have the code you mentioned in either ~/.fluxbox/startup or any of my .xinitrc's.
Hey, I just picked up on this; the slackbuild, here:

https://github.com/vmj/slackbuilds/b...16/xinitrc.e16

includes:
Code:
# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --exit-with-session /usr/bin/e16
else
  exec /usr/bin/e16
fi
So, perhaps....

cheers,
 
Old 05-20-2013, 01:32 AM   #12
mancha
Member
 
Registered: Aug 2012
Posts: 290

Rep: Reputation: Disabled
What you notice is indeed because Pat recently upgraded the shadow
package to version 4.1.5.1.

Shadow 4.1.5 corrected a long-standing tty-hijacking security flaw
in su -c (CVE-2005-4890). In short, previous behavior gave the
su -c command a controlling tty which provided it with ioctl
access to /dev/tty.

To prevent this, shadow no longer forwards the controlling terminal
to commands executed with -c.

--mancha
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DVB usb device no longer detected as a DVB , but as V4L., so no longer works vdemuth Slackware 4 12-21-2008 06:31 PM
su no longer works BashTin Slackware 13 08-01-2007 09:33 PM
my rpm command no longer works Niceman2005 Linux - General 3 07-07-2006 06:31 PM
Command No Longer Works carlosinfl Debian 2 11-02-2005 01:40 PM
upgraded to 2.6.9, "less" command no longer works kersten78 Slackware 2 10-21-2004 06:45 PM


All times are GMT -5. The time now is 07:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration