LinuxQuestions.org
Review your favorite Linux distribution.
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 09-23-2009, 04:19 PM   #1
AGazzaz
Member
 
Registered: Nov 2005
Location: Egypt
Distribution: Fedora 17 KDE
Posts: 393

Rep: Reputation: 31
Errors with fwfstab (Python)


Hello,
I am trying to run a software called fwfstab and it is an editor of the /etc/fstab file

i get this error when running it:
Code:
# fwfstab
No protocol specified
/var/lib/python-support/python2.6/gtk-2.0/gtk/__init__.py:72: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Traceback (most recent call last):
  File "fwfstab-runapp.py", line 28, in <module>
    import fwfstab
ImportError: No module named fwfstab
How can I solve this problem?

PS: I edited the fwfstab launching file in /usr/local/sbin because it was pointing to a wrong path.
 
Old 09-23-2009, 04:24 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Please forgive me for asking, but why on earth does one need a GUI tool to edit an fstab file?

I'm very curious

BTW - it kinda looks like the $DISPLAY is not set, and things go downhill from there.

Sasha
 
Old 09-23-2009, 05:03 PM   #3
AGazzaz
Member
 
Registered: Nov 2005
Location: Egypt
Distribution: Fedora 17 KDE
Posts: 393

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by GrapefruiTgirl View Post
Please forgive me for asking, but why on earth does one need a GUI tool to edit an fstab file?

I'm very curious
I started looking after this thread

beside if you search for all of my topics in this forum you will find that I ask a question about fstab with every distro I install and every time it is a different problem with a different way to solve it

the bottom line is: If there is one thing I really hate about linux is the fstab file, and I was very happy to find a GUI tool to solve this problem for me.

Quote:
BTW - it kinda looks like the $DISPLAY is not set, and things go downhill from there.

Sasha
Thank you, but, What is $DISPLAY? and how can I solve this problem?
 
Old 09-23-2009, 05:46 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Quote:
Originally Posted by AGazzaz View Post
If there is one thing I really hate about linux is the fstab file, and I was very happy to find a GUI tool to solve this problem for me.

Thank you, but, What is $DISPLAY? and how can I solve this problem?
OK, thanks for that explanation

It was more a guess on my part about the $DISPLAY variable, based on my experience trying to start or run applications for which I want/need root priveleges. It also may be another environment variable *related* to the display, preventing the application from making a connection with the X server.

As you see below is an example of what I get if I try to start konqueror as root, from the wrong environment:
Quote:
bash-4.0# konqueror
No protocol specified
konqueror: cannot connect to X server :0.0
bash-4.0#
As the error message is similar (in bold there) it makes me suspect an environment variable.

The $DISPLAY variable itself, is the :0.0 and this describes the screen you are looking at. It means "device zero, screen zero" (or vice versa).

I suspect you have one of the `su` tools, like kdesu, or gtksu, or one of those, on your system. Perhaps trying to execute the fwfstab via one of those means, will set the proper variable? Something like:

shell$ gtksu /path/to/fwfstab

and see if that works?

I do not know exactly which "protocol" is used between applications and X itself, but if I can figure out exactly what's missing, I'll be sure to update here.


Sasha
 
Old 09-23-2009, 06:06 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Try this:

user$ su - #don't forget that dash at the end
Password: ********

root# DISPLAY=:0.0
root# xhost +
access control disabled, clients can connect from any host
root# ./path/to/fwfstab

.. and it may now start.

NOTE: There are possibly security implications of using `xhost` like this; please research `xhost` before assuming that this is entirely safe!!

When you're done, you can do:

root# xhost -

..to restore access control.

Sasha
 
Old 09-23-2009, 06:17 PM   #6
AGazzaz
Member
 
Registered: Nov 2005
Location: Egypt
Distribution: Fedora 17 KDE
Posts: 393

Original Poster
Rep: Reputation: 31
Thank you for your help Sasha,

I found I have kdesudo not kdesu and here is the output:

Code:
$ kdesudo /usr/local/share/fwfstab/fwfstab-runapp.py
Traceback (most recent call last):
  File "/usr/local/share/fwfstab/fwfstab-runapp.py", line 28, in <module>
    import fwfstab
ImportError: No module named fwfstab
and when I tried the set of commands you gave me I got this output:
Code:
ahmad@ahmad-laptop:~$ su -
Password:
root@ahmad-laptop:~# DISPLAY=:0.0
root@ahmad-laptop:~# xhost +
xhost:  unable to open display ""
Judging from how things are going I thing you should know that I am using xfce on Kubuntu, I found KDE 4.x is unusable for the time being so I installed xfce in currently using it.
 
Old 09-23-2009, 06:45 PM   #7
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
Quote:
Originally Posted by AGazzaz View Post
Thank you for your help Sasha,
No problem -- I only hope that the help actually helps in the end

Quote:
I found I have kdesudo not kdesu and here is the output:

Code:
$ kdesudo /usr/local/share/fwfstab/fwfstab-runapp.py
Traceback (most recent call last):
  File "/usr/local/share/fwfstab/fwfstab-runapp.py", line 28, in <module>
    import fwfstab
ImportError: No module named fwfstab
OK, with or without the proper root privelege and/or environment variables, the above does look like a missing piece of your program, UNLESS that's happening because without root privelege, the program cannot read/access that module thing.
Quote:
and when I tried the set of commands you gave me I got this output:
Code:
ahmad@ahmad-laptop:~$ su -
Password:
root@ahmad-laptop:~# DISPLAY=:0.0
root@ahmad-laptop:~# xhost +
xhost:  unable to open display ""
Ok, the above I find weird; it worked perfectly on my system because we set DISPLAY before running the `xhost` command. Maybe it would help if you EXPORT the display variable, like so:

shell# export DISPLAY=:0.0

.. and maybe not, but worth a try.
Quote:
Judging from how things are going I thing you should know that I am using xfce on Kubuntu, I found KDE 4.x is unusable for the time being so I installed xfce in currently using it.
Ok, thanks for clearing that up! I am in the same boat; I use Slackware, with KDE installed, but I am using Xfce desktop too. I still use some KDE apps, including `kdesu` to start things as root.

I will go over the sequence of the commands above again on my system, to make sure I gave you them in the right order, and update again shortly

Sasha

Last edited by GrapefruiTgirl; 09-23-2009 at 06:46 PM.
 
Old 09-23-2009, 06:55 PM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
My mistake -- I'm sorry, I gave the commands in the wrong order.

Here goes:

user$ xhost +
user$ su -
Password ********

root# DISPLAY=:0.0
root# ./path/to/fwfstab

..should go now

Here's the exact quote from my console (note I'm testing with konqueror as the fwfstab program):

Code:
bash-4.0$ xhost +
access control disabled, clients can connect from any host
bash-4.0$ su -
Password: *************

The past always looks better than it was.
It's only pleasant because it isn't here.
                -- Finley Peter Dunne (Mr. Dooley)

root@reactor:~# DISPLAY=:0.0
root@reactor:~# konqueror
Sasha
 
Old 09-24-2009, 04:43 AM   #9
AGazzaz
Member
 
Registered: Nov 2005
Location: Egypt
Distribution: Fedora 17 KDE
Posts: 393

Original Poster
Rep: Reputation: 31
Unfortunately it did not work.
When I woke this morning I decided to end this situation, so I searched for another tool and I found one calledysdm I configured fstab and also it did not work as there was problems with the links from my C:\ drive to /home/ahmad/.opera

so I removed the lines that the tool added and I guess I will keep writing my password 2 times every time I boot my computer
Quote:
No problem -- I only hope that the help actually helps in the end
Thank you very much for your help Sasha, and do not be disappointed it really did help me stop wasting my time, and I made a decision to change this distro to something more fun
 
  


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
Python errors when make KDE3.5.4 gmick Linux - Software 0 08-19-2006 11:19 AM
python errors coffeedemon Linux - Newbie 2 05-07-2006 03:18 PM
Python Errors - Ipodder snowman156 Slackware 3 12-09-2004 09:47 PM
Bittorrent: python errors davoman Linux - Software 2 04-16-2004 02:45 PM
python errors xconspirisist Linux - Software 1 02-16-2004 06:00 AM

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

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