PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 25, 2012, 04:33:14 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: [ solved ] New KDE-mini install, odd konsole problem  (Read 277 times)
wedgetail
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 2110


Any Bugs in site?


« on: January 24, 2012, 10:02:15 PM »

Very recently install KDE-mini from liveCD 2011.09 fully upgraded.
Installed Opera, and what is required for running c++

Will call this KDE-mini programming C++

Custom configured Panel in order left to right.
8 dts, Konqueror-root, kwrite, Opera, konsole (from menu),Konqueror-user and widget find as a marker/border in the panel.
Konquerors have Icon changes to distinguish between user and root.

Almost standard theme, metal?? I have been snooping around looking for rounded corners on the login window (no success, but my workhorse KDE-mini has nice rounded corners where I log in, instead of rectangular).

Have added a directory under / as:
/home/gert/xC-programs/

Have a C and a C++ directory, the one I work in is:

/home/gert/xC-programs/120123-c++prog_pralellport/yya0-GLUT/ParallelPortTest

I like to start konsole in above horrible path, look in above directory with Konqueror and then > F4 or Tools > Open Terminal

Quote
[gert@localhost ParallelPortTest]$

Now I want to go root privileges but stay in the same directory as above:

Quote
[gert@localhost ParallelPortTest]$ su
Password:

[root@localhost ~]# pwd
/root
[root@localhost ~]# ls
Desktop/  Documents/  Downloads/  drakx/  Music/  Pictures/  Templates/  tmp/  Videos/ <--- this is root's
[root@localhost ~]#

Now doing an exit

[root@localhost ~]# exit
logout
..
Here 16 empty lines
..
[gert@localhost ParallelPortTest]$

So I return to where I came from, fine.  However I do not wish this directory de-tour   Cheesy

There is a setting in the konsole Profile ticked saying 'Start in same directory as current tab' oh, that is not the problem for changing to su.

Above is just warm up as it is only a bit of nuisance, now the snub, when I open a few konsole windows generally about 2 tabs at some stage something happens.  I normally find out when closing a window, then decide to open a konsole window using the copy in the panel to do so, there is a bit of dancing in the new panel position, then no smoke and no window.

Then of course few more tries before starting the head scratch exercise.  Now more than 30 sec later I get multiple konsole windows. What direction should I go?

Should just add, not predictable. If I start chasing the problem all seems to work, then settling down to carry on soon whaaam.   Angry
 
Logged

KDE & KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen
Old-Polack
Administrator
Hero Member
*****
Offline Offline

Posts: 9695


----IOFLU----


« Reply #1 on: January 25, 2012, 01:23:27 AM »

wedgetail:

Open Dolphin in your /home/gert directory. View --> Show Hidden Files, then look for the file, .bashrc, and open it with kwrite. Look for a line;

alias su='su -'

Put a comment in front of that line #

#alias su='su -'

Save the file.

Open a terminal, su to root. You should now be root in the gert directory.
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
wedgetail
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 2110


Any Bugs in site?


« Reply #2 on: January 25, 2012, 04:42:21 AM »

old-polack

I have done as you instructed:

Quote
# .bashrc

# User specific aliases and functions

# Source global definitions
## if [ -f /etc/bashrc ]; then
##   . /etc/bashrc
## fi

# comment this out old-polack suggestion
# alias su='su -'


Also decided to drop another litte section into the file, seems that some time ago I copied and article about remodeling in the .bashrc :

Quote
# If id command returns zero, you’ve root access.
if [ $(id -u) -eq 0 ];
then # you are root, set red colour prompt
  PS1="\\[$(tput setaf 1)\\]\\u@\\h:\\w #\\[$(tput sgr0)\\]"
else # normal
  PS1="[\\u@\\h:\\w] $"
fi

My old codes looked terrible on the colours I had selected, so this will have to do until I find something else. Looks terribly complicated and not my big interest just now   Cheesy

The 'cure' looks good, going back to the programming directory via Konqueror or Dolphin and then use the F4 key or Tools > Open Terminal, I can get following sequences:

Quote

[gert@localhost:~/xC-programs/120123-c++prog_pralellport/yya0-GLUT/ParallelPortTest] $su  < --- opens on this line exactly as I wanted (horrible path I chose when you have to type it)
Password:
[root@localhost ParallelPortTest]# ./ParallelPortTest  < --- when I went root privileges I stay in the same filesystem tree branch position.  Where I run a quick test on an exe file, then terminate the exe file
Using /dev/parport0 for session
^C
[root@localhost ParallelPortTest]# ls -l  < ---- you can't to too cautious, looking at my little test directory
total 104
-rwxr-xr-x 1 gert gert  7110 Jan 24 16:15 a.out*
drwxrwxr-x 2 gert gert  4096 Sep 22  2010 doc/
-rwxr-xr-x 1 gert gert   154 Jan 24 16:13 gccp*
-rw------- 1 gert gert  9851 Nov 30  2009 main.cpp
-rw------- 1 gert gert  4090 Jan 24 21:47 main.h
-rw-r--r-- 1 gert gert   317 Jan 24 16:19 Makefile
-rwxr-xr-x 1 gert gert    50 Jan 24 16:00 my_script*
-rw------- 1 gert gert  1419 Nov 28  2009 ParallelPort.cbp
-rw------- 1 gert gert  5694 Nov 28  2009 ParallelPort.cpp
-rw------- 1 gert gert  8652 Nov 28  2009 ParallelPort.h
-rwxr-xr-x 1 gert gert 25611 Jan 24 23:02 ParallelPortTest*
-rw------- 1 gert gert  1676 Sep 22  2010 README
-rw-r--r-- 1 gert gert   164 Jan 24 11:54 temp.cc
-rwxr-xr-x 1 gert gert   147 Jan 24 16:01 test1*
[root@localhost ParallelPortTest]# exit   < ---  now leaving root privileges
exit
[gert@localhost:~/xC-programs/120123-c++prog_pralellport/yya0-GLUT/ParallelPortTest] $  < --- what delight, back in the file tree where I started


Thank you.  Smiley
Logged

KDE & KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen
AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11990


Registered Linux User #490933


WWW
« Reply #3 on: January 25, 2012, 04:49:32 PM »

I have heard about this problem from one of our users Abraxas. He was following my avast installation HOWTO and he ran into "package not found" snag.

I guess it's the same problem simply because he downloaded avast package to the ~ directory and then became root by using su command and the path changed to /root.

I guess there is something in the minime version that causes this. In full KDE4 version it does not happens. If You are in /home/login/ folder and You are su-ing Yourself to root You will remain in /home/login/ folder.

Thanks for the solution Old-Polack.

Regards.

Andy
Logged

wedgetail
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 2110


Any Bugs in site?


« Reply #4 on: January 25, 2012, 06:21:21 PM »

AndrzejL

I thought I remembered having read about that, at the time I thought no more about it as mine was ok, I happened to be in KDE at the time.

Quote
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
   . /etc/bashrc
fi

$PS1 .......

As you can see the su - statement does not exist in my KDE

I will mark it solved.
Logged

KDE & KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen
Abraxas
Hero Member
*****
Offline Offline

Posts: 832


PCLinuxOS - Heck Yeah !


« Reply #5 on: January 26, 2012, 09:58:55 AM »

As AndrzejL posted, I had beem having a problem installing Avast AV, using his Tutorial - Avast (Anti Virus)
Persistently I was getting "E: Couldn't find package", after downloading 'Avast.rpm.'
I had to do a workaround, creating an Avast Directory: /home/user/Avast, and su-ing from there to complete next few steps to installing Avast! 4 linux workstations.
Andy:  
Quote
I guess there is something in the minime version that causes this. In full KDE4 version it does not happens. If You are in /home/login/ folder and You are su-ing Yourself to root You will remain in /home/login/ folder.


I'm running PCLinuxOS MiniMe (Totally Updated.)
At /home/user/ with 'hidden files' viewed, I find my .bashrc file .

Code:
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

alias su='su -'


export GTK2_RC_FILES=$HOME/.gtkrc-2.0

Following OP's instructions I'll amend .bashrc, using Kwrite, to # alias su='su -'


Thanks for your help OP, wedgetail, and AndrzejL .
Logged

PCLinuxOS KDE 4.6.5 MiniMe -- Taking Control each day - taking some deep breathes too...
I'm GMT+10 hours !
wedgetail
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 2110


Any Bugs in site?


« Reply #6 on: January 26, 2012, 09:26:52 PM »

Abraxas

When scanning some Forum topics I came across your post some time ago, at the time I was not using cli a lot but only a few days I set up a horrible path and then it hit home.

So I was delighted to get it sorted as quick as it happened. Of course always simple when you know.  Cheesy
Logged

KDE & KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen
Abraxas
Hero Member
*****
Offline Offline

Posts: 832


PCLinuxOS - Heck Yeah !


« Reply #7 on: January 27, 2012, 02:28:17 AM »

Hi wedgetail.
A good instance of what a good lot of people we have here at PCLinuxOS.  Grin

I got out the hammer and just made my install work.  Tongue
I very rarely install programmes outside of Synaptic, but Andy's Tutorials are quick and easy, plus how would we ever ever get through without the eloquent solutions old-polack comes up with.  Wink

Why did I want to install avast! Linux Home Edition ? Having been a member there for 7 years or so, and leaving the Windows Forum thought be good to help with the Linux Avast! Users.
Really we are just protecting our Windows friends by using an AV.
Also, it is very good of Avast! to put out a quality Home edition for free, which does have some impact on the amount of malware online. We all help each other.
Logged

PCLinuxOS KDE 4.6.5 MiniMe -- Taking Control each day - taking some deep breathes too...
I'm GMT+10 hours !
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM