LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-10-2004, 04:36 PM   #1
Timer
LQ Newbie
 
Registered: Jun 2004
Location: Catalonia
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
DGA - is really useful?


I'm doing linux graphics programming and I'm interested in getting high speed. I use XShm and I've build my own drawing algorythms, which work well for the specific task they are designed for. Everything looked fine, but then I read that speed could be improved by using DGA.

I began reading about it and it seemed to be an excellent way of drawing. But then came the bad part: DGA requires root permission. Why?! Well, if the designers did this, I suppose it was due to some reason. I downloaded a pair of samples hoping that they would get root rights and release them without annoying the user, but they didn't. An 'invalid rights' message appeared.

So if an user doesn't know the root password, how will he/she use my (wanted-to-be) DGA program? In other words: how can I use DGA with non-root users? If it's not possible, do you know any alternatives? (no OpenGL, please)

Thanks
 
Old 10-10-2004, 05:02 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
If the DGA extension is enabled in X it shouldn't require root privlages. I have run vmware on DGA in the past without running from the root account.
 
Old 10-11-2004, 04:00 PM   #3
Timer
LQ Newbie
 
Registered: Jun 2004
Location: Catalonia
Distribution: Gentoo
Posts: 25

Original Poster
Rep: Reputation: 15
OK, thanks. I'd have tried to explore wmware code to know what do they do if it had been open source. Anyway, jtshaw, could you try 'dga' in your shell? Just to know if you are requested to be root.
 
Old 10-11-2004, 04:47 PM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
In other words: how can I use DGA with non-root users?
This may be an open door, but it will run with root privileges when you install it mode 4755 (rwsr-xr-x). You could do this by having this in your Makefile:
Code:
install: yourexecutable
<tab>install -g root -o root -m 4755 yourexecutable /usr/local/bin
...though this is considered dangerous with respect to security. Like, if your program happens to have a bug that's behaving destructively or has a security hole, it will run as root, even when a normal user runs it.

Last edited by Hko; 10-11-2004 at 04:49 PM.
 
  


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
module dga missing? Tazzie76 Linux - Games 1 11-28-2004 08:26 AM
What is dga? Braveheart1980 Linux - General 1 03-17-2004 10:26 PM
dga is not working sk8ercool2001 Linux - Software 1 10-26-2003 09:38 PM
dga not working on X sk8ercool2001 Linux - Hardware 0 10-23-2003 01:30 PM
Dga? vishrut Linux - Software 2 12-26-2002 08:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:17 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