LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-31-2005, 07:17 PM   #1
Snipersnest
Member
 
Registered: Jan 2005
Location: SC
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 269

Rep: Reputation: 30
SU Shell script


I'm wondering if someone could tell me how to su root in a small launcher for my desktop.

I put wine on my computer but it installed to the root folder... so now I have to login as root to run the installed programs.

Is there a simple script I could make to launch a program on my desktop as root? I want to use this program

/root/.wine/drive_c/Program\ Files/Adobe/Photoshop/Photoshop.exe
 
Old 01-31-2005, 07:25 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Why not either move and change the permissions or change the ownership or group ownership to allow others to execute it as themselves? Running things as root can lead to security risks.
 
Old 01-31-2005, 08:55 PM   #3
Snipersnest
Member
 
Registered: Jan 2005
Location: SC
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 269

Original Poster
Rep: Reputation: 30
If I want to set the permissions to the /root folder so I can access it with my user what would I set it to? Or how would I go about doing it?
 
Old 02-01-2005, 12:45 AM   #4
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
first change the owner..

chown you <nameoffile/dir>

and change the group..

chgrp users <nameoffile/dir>

then move it to your home directory and you'll be able to run it without root.
 
Old 02-01-2005, 12:47 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You're not going to like this, but from the security point of view, I'd de-install, re-install as another user.
It's possible to alter the permissions/ownerships using chmod & chown, but allowing anybody other than root into that area is a really BAD idea (imho).
 
Old 02-01-2005, 07:02 AM   #6
Snipersnest
Member
 
Registered: Jan 2005
Location: SC
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 269

Original Poster
Rep: Reputation: 30
lol when I try to remove it with rpm -e 200501110-winehq.i686.rpm it comes back saying its not installed... Not to mention I did install it as my user not as root...but it still installed it to my root folder.
 
Old 02-01-2005, 07:14 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by Snipersnest
lol when I try to remove it with rpm -e 200501110-winehq.i686.rpm it comes back saying its not installed... Not to mention I did install it as my user not as root...but it still installed it to my root folder.
rpm -qa | grep winehq

You have to be exact with the name in the rpm database. That command should list it for you as how it is in the rpm database. Then take that name and use the rpm -e
 
Old 02-01-2005, 07:51 AM   #8
Snipersnest
Member
 
Registered: Jan 2005
Location: SC
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 269

Original Poster
Rep: Reputation: 30
Oh thats strange...I thought it would use the same name as the RPM I installed.... hmm I'll have to sneak home to give it a try in a bit :P
 
Old 02-01-2005, 08:45 AM   #9
Snipersnest
Member
 
Registered: Jan 2005
Location: SC
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 269

Original Poster
Rep: Reputation: 30
[root@localhost ~]# rpm -qa|grep winehq
wine-20050111-1fc3winehq
[root@localhost ~]# rpm -e wine-2005011-1fc3winehq.rpm
error: package wine-2005011-1fc3winehq.rpm is not installed


What now?
 
  


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
Shell script inside shell script treotan Linux - General 4 02-19-2009 06:34 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
[SHELL SCRIPT] Write at the right of the shell window Creak Linux - General 2 04-02-2004 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:06 PM.

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