General :: Bash Script - Obtain Current Workdirs Of All Konsole Terminal/sessions?

Jan 15, 2011

I am trying to write a bash script that would save the current state of my konsole terminals and sessions. I'm using KDE3.X and for some reason the "profile" save does not save the current working directories... Anyway, I would like to know if there is an elegant way to obtain the current workdir of each terminal and session ? I've managed to do something with a clever use of DCOP extended functions, but it requires me to start every konsole with the --script option enabled, and I don't want to do that.

View 9 Replies


ADVERTISEMENT

Programming :: Referring To The Current Terminal In A Bash Script?

Dec 22, 2010

I've got some bash scripts that I'm testing which operate on different screen sessions under different usernames. In order to check the status of them, however, I have to attach the screen sessions to my current terminal.

I run into problems, though; I only allow SSH to my machine from one username; the others shouldn't need SSH access. So, I log in as one user, and su into whichever user I need. Without performing a chmod o+rw on the terminal before I su into a different user, screen complains that it can't reattach to my terminal, because the user trying to make it attach doesn't have the permissions to do so.

Seeing as I forget to do this a lot, I wanted to make a script that I'd run on log-in to do this for me. Unfortunately, I don't know if there's a bash variable that refers to the current terminal - I can't always guarantee that I'll be logging in to /dev/pts/0, especially if my internet connection gets cut and I leave a hanging terminal...

Is there a variable for that or a way to refer to it in a script? If not, how do I work around that?

View 4 Replies View Related

General :: Set The Title In The Top Of Konsole Terminal?

Apr 8, 2011

I use kde3.3. How could I set the title in the top of konsole terminal. for example, i would like to have the file name printed if I open the file using vi or vim.

View 4 Replies View Related

General :: Keep Bash History Across Sessions?

Nov 17, 2010

I am working on a x86 target running fedora 9.

Whenever I reboot it, my history returns to some state, and I do not have commands I did in the sessions before the reboot.

What I have to change to have updated history I had before reboot?

View 2 Replies View Related

General :: Modify The Konsole Terminal Setting?

Apr 4, 2011

Where could I modify the konsole terminal setting?

I would like change my default setting in the terminal.

My current terminal konsole is as below
usrname:machinename[line]: current_path :

I would like to shorten it because the current_path is too long and i find it quite messy...

View 6 Replies View Related

General :: Gnome-terminal Is Starting Up In - Konsole And Xterm Start Up In ~ As Desired

Aug 2, 2010

For some reason my gnome-terminal is starting in / when it should be ~ I have checked /etc/profile, ~/.bashrc and /etc/passwd and everything seems fine as far as i can tell Konsole and xterm are starting up with the working dir to my home dir (as set by /etc/passwd) But im at a loss to see where gnome-terminal is starting in / if i enter cd with no argumants in gnome-terminal it is switching to ~ fine, so i dont think its mistaking my home dir for /

View 2 Replies View Related

General :: Shell Script To Source An Env File And Open A Kde Konsole Terminal

Jan 27, 2011

I am trying to write a .sh script that will source a file containing evnironment variables and then open a konsole terminal session that will have those settings.

View 2 Replies View Related

General :: Xvnc Sessions Do Not Allow Program Or Terminal Launching?

Feb 12, 2010

I just added 8 additional vncserver sessions(Xvnc) (using a well-documented procedure my predecessor used) to my RH Enterprise 2.4.21-4 (OK it went by fast) server. This brings the number of session listed in my /etc/sysconfig/vncservers file to ~32. Applications and terminals now seem to choose if they will open or not in the Xvnc session and not all sessions start at boot. I can start them manually, and they will work, but then they stop working properly. You can open a session, view the active desktop, click on menus and associated drop-down items to try and open apps, but the apps/terminals just won't open. Is there a limit to the number Xvnc Sessions that can be managed? If so, what is it? This happens whether I try to connect from a Winddows box or another Linux box.

View 3 Replies View Related

General :: Launch Multiple Screen Sessions From A Single Bash Script?

Jul 11, 2011

I've written a script (that doesn't work) that looks something like this:

#!/bin/sh
screen -dmS "somename" somecommand
for i in {0..5}; do
screen -dmS "name$i" anothercommand $i
done

For some reason, if I copy and paste this into a terminal, it creates 7 detached screen sessions as I expect. If I run it from within a script, however, I get only the first session, "somename," when I run screen -ls.

Edit: If the same can be accomplished another way (e.g. with multiple screen windows instead of sessions), I would be open those solutions as well.

View 3 Replies View Related

General :: Link Terminal Sessions - Show Logged In As The Same User?

Jun 7, 2011

I was doing some rather lengthy procedures using a terminal. Then I wrote script using Kate, and input it into that terminal, and then realized that I was logged in as a normal user in that terminal as opposed to a superuser, which is how I was logged in at the other terminal. I've never noticed this before because I've never done anything that takes this long.

Is there any way to link all terminal sessions in such a way that they all show me logged in as the same user? I don't even know if this is even important, but I don't want to risk losing any things that I had done.

View 2 Replies View Related

General :: Using Script To Automatically Record Terminal Sessions When A User Logs In?

Mar 3, 2010

I'm trying to set up automatic recording of user sessions when they login without their knowledge. I tried sticking the script command into /etc/profile and but that didn't really work. I also tried /etc/bashrc but that had the same affect.I have also tried setting the shell in /etc/passwd to SHELL=/bin/bash /usr/bin/script -q /testing.txt.

View 8 Replies View Related

Programming :: Kill Pids For All Sessions For A Specific User Except Their Current One?

Oct 20, 2010

I have several users on handhelds and they like to let their sessions time out. Their zombie processes then cause record locks.I've come up with calls for killing the pids for any prior sessions started by a given user. This procedure would be executed in the .bash_profile.

View 3 Replies View Related

Slackware :: Konsole - Terminal - In Kde After Update

Jan 31, 2010

At yesterday night i run a slackpkg update and then slackpkg upgrade-all. i deselect all kernel related entries,and all others ( dont remeber precisely, but approx 15 - 20 packages, i e kde related) i get to update.

After that i shut system down and going to sleep. today i start my eeepc 900 with slackware 13.0 after that update and see i cannot run "Terminal" link on desktop. ok, go to "start", "system", "konsole terminal". from first look in konsole window i see whatever not ok - window background is grey, not black as usual.
when i run mc in this window, look like a monitor contrast is set to minimum, and brightness to maximum - very hard to see files, etc. all is very much light and small contrast.

I check kde windows - all its ok, brightness and contrast in konkueror windows and overall is ok -as same as previously times. i switch to ctrl-alt-f6 to native console - again, all is ok - background is black, all is ok.

i e problem is only with Konsole-Terminal under KDE. looks for configfiles / etc - nothing faund. no man entry for terminal nur console.

View 3 Replies View Related

Fedora :: Is Konsole Most Feature Rich Terminal?

Jun 16, 2011

I've been looking for a alternative terminal to work in while using F15. I've done some Googleing and came across Konsole as being the most feature rich terminal. I'd like a terminal that provides a lot of features so I could possibly increase my efficiency. If something is KDE like Konsole does that mean I have to install the whole KDE environment? If so is there any Fedora terminal alternatives?

View 7 Replies View Related

Slackware :: KDE Terminal Emulator / Konsole Bitch

Mar 1, 2011

I know this is strictly a KDE problem, but I don't want to create another account anywhere and get the KDE spam, etc.

But if anybody who reads this list has the ear of (or is) a KDE person, a minor bitch with KDE in 13.0 and 13.1 is that if you were using Konsole terminals at the time of shutting down KDE, when next you start KDE, it replaces them with Terminal Emulators.

View 11 Replies View Related

Programming :: Bash Script - Grepped A Log File To Obtain Every Line That Contains A Word

Dec 8, 2010

I have grepped a log file to obtain every line that contains a word (let's call it 'blah'). I now want to only display a list of entries within that search result that feature the word 'host' anywhere in the line, and I also want to display the single word *after* 'host' (up until the next space). So, the end result will look like this:

[Code]....

View 8 Replies View Related

Ubuntu :: 9.10 - How To Get Sessions Through Terminal

Feb 9, 2010

Where is sessions in 9.10? How do i get it, Is it called something different.

View 5 Replies View Related

OpenSUSE :: 11.3 Kde4 - Prevent Konsole/htop/bash To Use Bold Character?

Aug 9, 2010

As exposed in a previous thread : 11.3 64b nvidia kde4 : font color bug in konsole I have a problem in the konsole terminal . I chose the Fixed [misc] font and i want the size 3. But for some unknown reasons konsole wants to display some chracaters and some words in bold . As This font doesn't exist in size 3 in bold, it displays the bold characters in size 7, which is the smallest available bold size for this font set (Fixed [Misc]) . It makes any of these bold characters unreadable as they are too large compared to the room they have to be displayed. How can i prevent konsole , bash , htop or any program responsible for this behaviour, to display such bold character ?

View 3 Replies View Related

Software :: Terminal And Konsole Windows Show Strange Characters

Oct 1, 2009

When I open a terminal or konsole window, output (either STDOUT or STDERR) sometimes contains funny characters instead of something meaningful. Can someone explain how I might correct this situation?

ANALYSIS:
One very repeatable example involves using the manual page command

Code:
man set... man page output ...upstart - event-based init daemon

In my copy of the output, there are several problems in the very first screen. In the synopsis section, there is "{ value | ?value? ..." Replace the '?' with a lower-case-a-under-a-carat character (a-hat).
I suspect the garble character might be apostrophe in real life.

In other places, I see var?/able or how?/ever or trans?/action where the '?' is again a-hat and the '/' represents end of line or newline. I suspect the garble character might be a hyphen in real life.

All of this suggests that there is a conflict between the character stream written to STDOUT by the man command and the character-display settings (is that "code page" or similar?) of the specific terminal or konsole in use.

In specific, I use konsole v1.6.6 from KDE v3.5.10. In general, I'm running Ubuntu Hardy (v8.04.3 LTS).

View 5 Replies View Related

General :: Redirect Standart Output To Current Terminal?

Apr 17, 2010

i have a process launch by another app, i want to see the output (that is in console) in a terminal (gnome-terminal or tty); how can i capture de standart I/O from a process. my process (aria2) is launch by firefox and the output of ps is like:

# ps aux | grep aria2
dorian 30289 2.8 0.1 12148 4048 ? D 07:08 0:03 aria2c --continue -d /home/downloads/so/suse --referer=http://software.opensuse.org/112/en

...is running but i cant see the output (download state), how can i capture or redirect standart I/O to my terminal to get something like the output of:

$ aria2c --continue -d /home/downloads/so/suse --referer=http://software.opensuse.org/112/en --load-cookies=/tmp/flashgot.h2fnxf84.default/cookies --input-file=/tmp/flashgot.h2fnxf84.default/flashgot.fgt
[#1 SIZE:6.7MiB/4,289.3MiB(0%) CN:5 SPD:25.3KiBs ETA:48h01m01s]

View 1 Replies View Related

General :: Bash History And Keeping Track Of Current Working Directory?

Jun 8, 2010

I would like to keep track of not only what bash commands I used and when, but also where they were issued from, i.e. what was the current working directory when I issued "foobar" on a particular day and time. Can we ask bash history to keep track of working directories too? I have tried to get an idea of this reading the enormous "man bash", but I don't seem to have an answer yet either way.

View 11 Replies View Related

General :: Configure Bash Prompt To Show Current / Parent Directory Only

Oct 15, 2010

I would like to modify Bash Prompt so it does not show the whole $PATH but just the current and parent directory. I am using Ubuntu.

View 3 Replies View Related

Ubuntu :: How To View Previous Terminal Sessions

Nov 10, 2010

I often use the terminal to shut down my system whilst watching TV in bed, I use SUDO AT TIME and HALT.This works a treat most of the time, but a couple of time this week I have woken in the night and the PC/TV is still running? Maybe I mis typed somthing? Is there any way I can view previous terminal sessions to check ???

View 4 Replies View Related

Ubuntu :: Automatically Save Terminal Sessions?

Nov 23, 2010

i'd like to ask how could I save my Terminal Sessions to a text file or something like the option we could do at Putty or Kitty?

View 1 Replies View Related

Programming :: Bash Script To Test For Open FTP Sessions From Specific Clients?

Apr 8, 2009

I look after a server which accepts automatic overnight PASV FTP uploads from remote clients. When the uploads are complete, my Bash script copies the files to another location. The problem is, my script needs to be a bit smarter when it comes to detecting active FTP sessions.

I was using:

Code:

netstat -n | grep ":21 " | grep ESTABLISHED

to test if there were active sessions, but came unstuck when a local user left an unrelated FTP session active. The result - my script hung around all night thinking there was an active upload from a remote client. My server is behind a firewall, so remote clients all show an internal (NAT) address,so I can't differentiate by source IP address.I can't install LSOF or FUSER for security reasons. Is there a way I can test for active FTP sessions from specific users? I am running Red Hat Enterprise Linux Server release 5.2 (Tikanga).

View 7 Replies View Related

General :: Bash - Using Terminal Vs KDE?

Mar 18, 2010

Im used to using nautilus within centos but have recently just got a VPS and quickly realising that using a KDE is unacceptable in this environment. Although I do find it so much quicker doing things like folder permissions in KDE rather than typing it all out in the terminal? Everyone I speak to says, use the terminal and I should learn this way as opposed to using the KDE, but theres certain things I just dont get

How is it possible to make quick changes to scripts and viewing them in a browser etc , without a mouse or using KDE? and only using a terminal?? I am wondering how to develop websites just using the terminal?

How can it be quicker to type out/view permissions etc in the terminal when its instant and just a few clicks in the KDE?

View 3 Replies View Related

General :: Bash - Detect When A Terminal Gets Focus?

Jun 23, 2011

I want to be able to time how long I spend in front of a terminal. I'm thinking the best way will be to have some sort of timer that starts and stops when the terminal gains/loses focus. And it will have to work with multiple terminals...

I'm using GNOME.

View 3 Replies View Related

General :: [Bash] Send Command To Another Terminal?

Sep 10, 2010

I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).I can write from A to B using redirection e.g. echo "test" > /dev/pts/1How do I run a command from A on B? e.g. "clear"Basically I'm putting the 2 terminals side by side, and using terminal B to display the contents of the current working directory, by running the following in A:export PROMPT_COMMAND="ls -a > /dev/pts/1"but this fills up the screen pretty fast. I was actually looking for a way to clear up the second terminal.

View 6 Replies View Related

Debian :: Change Dragora Bash Terminal To Default Jessie Terminal

Feb 29, 2016

I mainly use debian jessie , recently i have installed daragora as my second os to get a feel of gnu/linux . the problem is that dragora uses bash , and it's commands are different from debian jessie terminal is there a way that i can use the same commands here in dragora?

View 4 Replies View Related

Ubuntu :: Bash Broken, Lost Functionality In Terminal (gnome-terminal)?

Dec 10, 2010

Linux-goers. I did some research on this, but I am still fairly new to Linux. In Ubuntu 10.10 (Maverick), I accidentally overwrote my "/bin/bash" file. Dude, using "sudo" with a small typo can work disasters. Bash is now broken in the Terminal (gnome-terminal). Terminal itself still works fine, technically, but bash is still hosed/broken. Here is what I did to try to fix it: Booted from Ubuntu 10.10 live CD. Mounted my Ubuntu partition and manually copied the good/fresh "bash" file onto my hard drive. Verified copy was successful. Didn't help, as you see. Reinstalled "gnome-terminal" using synaptic package manager. Tried to reinstall bash via synaptic, it failed with error, "E: /var/cache/apt/archives/bash_4.1-2ubuntu4_i386.deb: subprocess new pre-removal script returned error exit status 2"

In Terminal, all basic commands work as far as I can tell. ("ls", "pwd", navigation, etc.) Here are some problems:My "username@computername" does not display in the prompt; only the $ sign. Bash keyboard shortcuts such as uparrow and tab do not work. Instead, each inserts a key code. I can't even move the cursor left/right. Aliases (a function of bash and .bashrc) are broken, of course. My sanity level decreases when I use Terminal now. For what it's worth, even with "sudo" I get a "permission denied" error when trying to run Google Chrome! I read something about a ".bashrc" file being a possible problem, but I don't know how to make it work, or the file's proper locations in Ubuntu 10.10. Is there something I can do with a "make" or "apt-get install" command or something?? Could this simply be a permissions problem? Is the link to "/bin/bash", "/bin/sh", or a ".bashrc" file broken? Guide me, oh Linux gurus.

P.S. I always wondered what exactly bash was and how it was different from the basic terminal. LoL, this is an excellent way to demonstrate the difference, and I WANT IT BACK!

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved