LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-20-2017, 08:17 PM   #1
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Rep: Reputation: 85
Problem Opening Free Pascal IDE in Terminal Emulator


I have an issue I would like to figure out. I downloaded and installed the fpc Slackbuild for Slackware 14.2 (this is a Slackware 64 14.2 fresh install, no multilib yet) from Slackbuilds.org. It comes with a minimal, terminal-based IDE called fp, which by default is installed in /usr/bin. I didn't change any of the defaults.

Well, I have never used this before, and I don't know exactly how the permissions are supposed to be set up for my non-root user to use the program. So I thought I would just test it first as root to make sure it worked, then figure out how to fix the permissions.

However, for some reason, I cannot open the fp program in a terminal emulator within X as root. I can open it as my regular user (but I can't do anything because I don't have write permissions). I can also open it as both root and regular user in the raw console. However, after I'm in X, when I attempt to open the program as root from the command line, it just hangs forever.

I have tried with XFCE Terminal and xterm with the same result.

Any idea why this is? Thanks in advance.
 
Old 03-20-2017, 08:57 PM   #2
bassmadrigal
Senior Member
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 4,190

Rep: Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161Reputation: 2161
Do you get any errors? Have you tried running it using the following command rather than just su?

Code:
su -
 
Old 03-20-2017, 09:03 PM   #3
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Original Poster
Rep: Reputation: 85
Quote:
Originally Posted by bassmadrigal View Post
Do you get any errors? Have you tried running it using the following command rather than just su?

Code:
su -
No, no errors. I also can't find a log file for this application. I should have mentioned, I also tried it with
Code:
su -
There is nothing in /var/log/messages either.

Last edited by Kallaste; 03-20-2017 at 09:05 PM. Reason: details
 
Old 03-20-2017, 11:41 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,624

Rep: Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558
As a regular user, save the file in a directory where this user has write permission. That's all, folk.

PS I have no issue to use fp as root either, jut typing "fp" too. Not that I recommend doing that of course.

Last edited by Didier Spaier; 03-20-2017 at 11:46 PM.
 
1 members found this post helpful.
Old 03-21-2017, 06:02 PM   #5
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Original Poster
Rep: Reputation: 85
Quote:
Originally Posted by Didier Spaier View Post
As a regular user, save the file in a directory where this user has write permission. That's all, folk.

PS I have no issue to use fp as root either, jut typing "fp" too. Not that I recommend doing that of course.
Thanks for your reply. That doesn't work for me though. As regular user, if I start the program while in my home directory, I cannot compile. If I do this in the raw console the compiler tells me (in the standard compiler messages section on bottom of screen) that it can't find the unit system used by my program. This is what I expected, because it does not know where the libraries are. (I haven't gotten to the part where I look this up and find out how to configure it, because the other functionality is not working yet.)

If I do the same thing while in X I have the same result, except I cannot even see the compiler messages no matter what I do. It will not bring them up--and they are supposed to be shown during a compile by default.

So if I start the program by first changing to the /user/bin directory, I can compile and run the same test program stored in my user's home directory, but I get errors saying it cannot save the configuration and desktop files. So clearly fp is still trying to save things in the root filesystem, even though I save the test pascal program in my user's home. That is why I said I still need to figure out how to work the permissions for this program.

I am also having some strange shell problems, like tab characters showing up as dots in the console out of X (when I try to change directories using TAB autocomplete) and console text superimposed on the fp gui (instead of switching to the console when it wants input, it superimposes it on the screen) when I am running that program from the console as non-root user.

Basically, the fp program works as root in a raw console, but not elsewhere.

Last edited by Kallaste; 03-21-2017 at 06:07 PM.
 
Old 03-21-2017, 06:32 PM   #6
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 4,675

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
why don't you just install Lazarus while you're at it and do your pascal coding in that? It does cli programs too.

It too is in the slackBuilds as well.

BTW my fp worked - I just tried it. fpc 3.0.2

Last edited by BW-userx; 03-21-2017 at 06:35 PM.
 
1 members found this post helpful.
Old 03-21-2017, 07:03 PM   #7
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Original Poster
Rep: Reputation: 85
Quote:
Originally Posted by BW-userx View Post
why don't you just install Lazarus while you're at it and do your pascal coding in that? It does cli programs too.

It too is in the slackBuilds as well.

BTW my fp worked - I just tried it. fpc 3.0.2
Yes, I might. Or I might just use a text editor and compile through the command line.

I would still like to know what is causing this, though. It seems like if it works for the user in X, it should work for root. And the complete functionality should be available for non-root . . . not this missing compile messages window thing, and weird shell behavior. It's just odd.

Maybe I should upgrade to -current and see if there is any difference.
 
Old 03-21-2017, 08:14 PM   #8
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,095
Blog Entries: 4

Rep: Reputation: 1447Reputation: 1447Reputation: 1447Reputation: 1447Reputation: 1447Reputation: 1447Reputation: 1447Reputation: 1447Reputation: 1447Reputation: 1447
Upgrading to -current isn't going to explain or fix anything if other people have it working on 14.2. And it works fine here on 14.2 with the new fpc-3.0.2 SlackBuild that I just approved. I get a box in the middle of the terminal window saying "The Free Pascal IDE was never started in this directory before. Do you want to create a new config file in this directory?" And so, on exit -- not before -- it proceeds to create fp.cfg, fp.dsk and fp.ini in the current directory. I wonder if you messed up these settings files by running fp with 'su' (instead of 'su -' or as your normal username), so that it would create these files owned by root in your user's home directory.

If that's not the correct explanation, you should consider learning how to use strace.
 
1 members found this post helpful.
Old 03-21-2017, 08:51 PM   #9
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Original Poster
Rep: Reputation: 85
Quote:
Originally Posted by 55020 View Post
Upgrading to -current isn't going to explain or fix anything if other people have it working on 14.2. And it works fine here on 14.2 with the new fpc-3.0.2 SlackBuild that I just approved. I get a box in the middle of the terminal window saying "The Free Pascal IDE was never started in this directory before. Do you want to create a new config file in this directory?" And so, on exit -- not before -- it proceeds to create fp.cfg, fp.dsk and fp.ini in the current directory. I wonder if you messed up these settings files by running fp with 'su' (instead of 'su -' or as your normal username), so that it would create these files owned by root in your user's home directory.

If that's not the correct explanation, you should consider learning how to use strace.
True, but I didn't know they were using 14.2. I wondered, but thought it would be quicker to test it than ask. Like I said, this is a brand new, fresh installation, and I am not attached to it. Now that you've told me it works for you, though, I don't have to bother, so thanks.

I attempted to sun it as normal user before trying root, and got permissions errors right from the start. It would not write any config files. I also just checked, and there are no files owned by root in my home.

I will look into strace . . . it seems interesting. I really want to know what this is all about.
 
  


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
[SOLVED] XFCE Terminal Emulator doesn't get focus upon opening Jefferson Slackware 1 04-23-2015 11:26 AM
LXer: Lazarus Free Pascal RAD IDE 1.0 release available for download LXer Syndicated Linux News 0 08-30-2012 11:30 AM
Reliable free terminal emulator for windows except putty and hyperterm ? Vilius Linux - Software 3 06-14-2010 10:11 PM
Have you used a free Terminal Emulator for Windows? Latitude General 7 04-13-2009 05:46 AM
LXer: Using Lazarus Free Pascal Ide with Firebird in Ubuntu Hardy LXer Syndicated Linux News 0 05-26-2008 01:50 PM

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

All times are GMT -5. The time now is 09:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration