LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-25-2011, 09:15 AM   #16
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159

Hi,

Quote:
Originally Posted by psionl0 View Post
I tried it but I still can't open gui apps just by using su:
Code:
bash-4.1$ su -l -
Password: 

So you think that money is the root of all evil.
Have you ever asked what is the root of money?
        -- Ayn Rand

root@Greg-PC:~# mousepad
No protocol specified

(mousepad:2347): Gtk-WARNING **: cannot open display: :0.0
root@Greg-PC:~#
I know there is a work-around for this but considering how rarely I need to do this that I find it easier to remember to login as root if I am doing anything fancy.
You need to read the 'man page' again. This is the format of the 'su' command;
Quote:
su [options] [username]
You would use 'su -'to get the 'root' environment as to this explaination;
Quote:
Invoked without a username, su defaults to becoming the Superuser. The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly.
Simply you would choose either '-' to get environment for user, if nothing trails the '-' you get superuser/root. For '-l' or '--login' you would get the login for the user selected.
Quote:
-, -l, --login
Provide an environment similar to what the user would expect had the user logged in directly.

When - is used, it must be specified as the last su option. The other forms (-l and --login) do not have this restriction.
 
1 members found this post helpful.
Old 03-27-2011, 01:36 AM   #17
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
I don't know what I am missing here. Neither "su", "su -l", "su -" nor "su -l -" would allow me to run gui apps as root.

The solution was to edit the .bashrc file as explained by beowulf999.
 
Old 03-27-2011, 03:07 AM   #18
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
sudo, however, will.
 
Old 03-27-2011, 03:21 AM   #19
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Originally Posted by psionl0 View Post
I don't know what I am missing here. Neither "su", "su -l", "su -" nor "su -l -" would allow me to run gui apps as root.

The solution was to edit the .bashrc file as explained by beowulf999.
Code:
repo@cannabis ~]$ xhost +
access control disabled, clients can connect from any host
repo@cannabis ~]$ su -c program
Kind regards
 
Old 03-27-2011, 03:20 PM   #20
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
Quote:
Originally Posted by repo View Post
Code:
repo@cannabis ~]$ xhost +
access control disabled, clients can connect from any host
repo@cannabis ~]$ su -c program
Well.....you really don't what just any client to access from just any host. It is best to specify who and where explicitly. Of course, it depends on how much you are worried about security.
 
Old 03-27-2011, 04:53 PM   #21
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
xhost +local:root

perhaps
 
Old 03-27-2011, 08:39 PM   #22
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
Quote:
Originally Posted by dive View Post
xhost +local:root

perhaps
Oh, I wasn't gonna but I gotta: I think that, perhaps, I mentioned that a few posts ago.

Just sayin'.
 
  


Reply



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
pkgtool: problems with view and remove scorpion77 Slackware 4 08-11-2008 08:27 AM
pkgtool - where is it dannemil Slackware 6 11-30-2007 07:51 AM
Problems with pkgtool Pratt Slackware 12 08-18-2007 03:47 PM
pkgtool problems and fix jawkins Slackware 10 07-11-2005 07:36 PM
pkgtool problems (ATI drivers) sant-göran Slackware 1 08-08-2004 06:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:46 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration