General :: How To Launch Clean Bash Session

Apr 25, 2011

how to launch a non-login bash session that doesn't inherit its parents environmental variables, and doesn't source /etc/bashrc?

View 2 Replies


ADVERTISEMENT

General :: Launch An Application In Another X-session As Non-root?

Jan 5, 2011

How to start an X server as root with a session of non-root application?Should be something like xinit 'su -c openbox user

View 2 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 :: CentOS 5.4 - Bash Script Exits SU Or SSH Session

Apr 23, 2010

I am using CentOS 5.4. I created a bash script that does some checking before running any commands. If the check fails, it will simply exit 0. The problem I am having is that on our server, the script will exit the su or ssh session when the exit 0 is called.

#!/bin/bash
# check if directory has contents and exit if none
if [ -z "`ls /ebs_raid/import/*.txt 2>/dev/null`" ]; then
echo "ok"
exit 0
fi

Here is the output:
[root@ip-10-251-86-31 ebs_raid]# . test.sh
ok
[russ@ip-10-251-86-31 ebs_raid]$

I was removed from my sudo session, if I wasn't in the sudo session, it would have logged me out of my ssh session. I am not sure what I am doing wrong here or where to start.

View 1 Replies View Related

General :: Bash - Attaching Some Code To Session Start And End?

Jun 20, 2011

I'm trying to execute some code (let's call it login.java) when I log in and out of my linux machine. Is there any way to do this? I'm looking for perhaps a way to trigger the code? I've thought of just putting it in my .bash_login but preferably the code would launch on normal login, not when I start my terminal.

View 2 Replies View Related

Fedora :: Launch X Apps On A Remote Ssh Session?

Mar 5, 2010

Desktop computer (AMD64) running F12. Nothing unusual about it, stock install. Thinkpad laptop running Windows XP. Putty is installed, I can SSH to Fedora.

If I'm at the laptop, in a Putty session, how can I (for example) type "firefox" and have the resultant Firefox window appear on-the-laptop?

I generally have X running all the time on the desktop because I can't get the wireless network connection to function without NetworkManger (not that I really care because I'm rarely at a console screen and need net access).

View 2 Replies View Related

Ubuntu :: Launch Guest Session From Login Screen?

Jun 21, 2011

i am wondering if it is possible to do this all i can find with google is idea proposals and brainstorms i know i could make a separate account and call it guest user bu that user would get to keep data/settings where as a guest session places a temporary account in the /tmp folder which combined with a ram disk for /tmp would result in some really fast performance since i use a ssd for / which would make the traditional hdd only used for /var also since /tmp would be a ram disk it would be like the guest is using a live cd with security restrictions and performance enhancements on top of this there would be no trace of the guest on my computer after shutdown

View 4 Replies View Related

Software :: Launch Script To Be Interpreted On Screen Session?

Jan 27, 2010

I am on an xubuntu live cd setting up gentoo linux. I use screen to make sure that all my compiling and whatnot runs in the background and I won't accidently exit it. I have a script that I have written that autoruns starting my screen session, whenever I insert my thumbdrive. A seprete script should be passed along to screen telling it to chroot into my gentoo setup. However, whenever I use screen -X ./myscript.sh it says that it is an unknown command. How can I pass it along to screen?

View 1 Replies View Related

Ubuntu :: Guest Session At Login Screen - Fails To Launch GDM

Aug 2, 2011

Basically, the problem is, we have a bunch of computers in a computer lab, that we want to students to access, but not modify in ANY way. That includes backgrounds or whatnot. And after restart, any changes they may have made, change back. Also, they can't have read access to the administrator account on the computer.

This needs to give a permission denied, or something:
Code:
cd /home/(admin account username)
ls

The Guest Session is exactly what we are looking for, but try as I might, I can't get it to work. Because, we don't want to have to login as administrators, then activate guest session, just for our students to use the computers. The idea being, we can leave the computers in there, and not worry about the students breaking anything.

One thread I tried was: [URL]. However, using his method, will log the student into the account, and after about 5 seconds, log them back out.
The other method listed lower in the thread,
Code:
/usr/bin/guest-session
Seems to work, but upon logging out, fails to launch the gdm

Only way to restore is restarting the computer.

View 9 Replies View Related

CentOS 5 :: Automaticaly Launch Tomboy When The User Open Session?

Aug 5, 2010

I would love to auto-start tomboy at startup. How can I do this ? [Moderator edit: fixed Subject so nobody would expect an automatic Lunch. Is that the same as a free one? ]

View 2 Replies View Related

Fedora :: Launch A Bash Script (game) With A Shorcut?

Jun 11, 2010

I just downloaded a game Cube 2: Sauerbraten and I am trying to make a shortcut in Application->Games.

Basically to launch a game I have to double-click on a file, which is a script that invokes the rest of the game. After double clicking a dialog shows up that asks me whether I want to edit the file, run in terminal, or just run. I have no problem running it this way, but my shortcut in Applications->Games does not work. I have tried setting shortcut option to "Application" and "Application in Terminal" and nothing happens.

As of now the shortcut command points directly to that start script. I have also tried to do "sh /path/to/game" and still no success. How do I make that shortcut work?

View 4 Replies View Related

Ubuntu Multimedia :: Simultaneous Application Launch In BASH?

Feb 28, 2010

I'm trying to launch CoverGloobus (a fantastic little album art and current song display) and Rhythmbox simultaneously through a BASH script. Problem is that when I attempt to run the script the first time, CoverGloobus doesn't launch, but Rhythmbox does. Here's my script as it is right now:

Code:

#! /bin/bash
#Opens Rhythmbox and CoverGloobus
rhythmbox && covergloobus
done

I've double-checked the commands in gnome-terminal, and they're the right ones for launching the applications. Here's where it gets odd, though. The second time I run the script, CoverGloobus and Rhythmbox launch simultaneously. I've reproduced this scenario multiple times.

View 2 Replies View Related

Programming :: Write A Bash Script That Will Launch A Command?

May 15, 2011

I want to write a bash script that will launch a command when ever I plug my phone in. how would I monitor the port in a script.

View 2 Replies View Related

CentOS 5 :: Launch Bash Script On User Logon?

Nov 12, 2010

What is the best way to lauch bash script on user logon and logoff?

View 1 Replies View Related

Ubuntu :: Xsession: Unable To Launch "/usr/bin/startlubuntu" X Session

Jan 7, 2011

I'm building my own lightweight desktop with LXDE. After installing minimal Ubuntu (command line mode) from alternative CD, I installed xorg, x11 and lxde-core. After restarting I got this error when starting graphical interface:

Quote:

Xsession: unable to launch "/usr/bin/startlubuntu" X session ---
"/usr/bin/startlubuntu" not found; falling back to default session.

After clicking "Okay" button I could see LXDE interface as normal.

This is my /etc/lxdm/lxdm.conf:

Code:

[base]
# autologin=dgod
# session=/usr/bin/startlxde
# numlock=0

[code]....

View 2 Replies View Related

Software :: No Bash Completion With Apt In Su Session?

Mar 28, 2011

I have disabled root ssh logins for security. When I am logged in as a normal user over SSH and do a su into root the tab-completion stops working with apt. It still works when doing normal file-browsing, on the original user1, and it has worked previously when logged directly into root. How do I make it autocomplete again? I am using Debian Stable on a headless homeserver.

View 3 Replies View Related

Ubuntu Servers :: Bash Script To Open 1 Screen Session With Multiple Windows?

Jul 28, 2010

I am trying to write a bash script to open 1 screen session with multiple windows... each one running a different service. Is this possible? I tried several things, and I can start up multiple sessions really easy.. but not 1 session with multiple windows...

I want this so I can attach to that session and quickly move between the different windows.

View 4 Replies View Related

Fedora :: 14 - Printer HP Deskjet D1460 And - Paper As Was Clean So Clean And Remains

Dec 18, 2010

I have problem with my printer HP Deskjet D1460. My printer is configured and works. When I send a file on the print, the printer clings a sheet of paper and starts to print, but a paper as was clean so clean and remains, after printing.

View 2 Replies View Related

OpenSUSE Install :: Configured Cron To Clean /tmp Directory - Add Other Locations To Clean And Especially /var/tmp?

Oct 11, 2010

I configured cron to clean my /tmp directory, should I also add other locations to clean and especially /var/tmp.

View 4 Replies View Related

General :: Session Timeout - What Is Considered A Idle "session" ?

May 11, 2010

Info about session timeout.

I use tmout = 15 min in my /etc/profile (along with readonly tmout). i have some issues i need to address, looking for ideas.

1. what is considered a idle "session" ?

2. if i & a process to the background and do nothing is this a idle session?

3. if user uses su to a higher level, are there now two sessions? is the tmout for user suspended until su user time outs or leaves su session?

4. i have some users who will run long sql queries. is there a workaround to have the session remain active until process has finished?

View 3 Replies View Related

Ubuntu :: Difference Between Apt-get Clean And Aptitude Clean

Feb 4, 2010

Is there any difference between apt-get clean and aptitude clean? Do they both remove the same caches? Should I know any other commands for cleaning up wasted space on my ubuntu laptop?

View 1 Replies View Related

Programming :: Bash Script With Ftp Session Exiting The Script Early?

Feb 22, 2010

I got this script that backs up a server and then keeps only the last 10 backups and removes the rest.Problem is, the part where it deletes any backups older than the last 10, it never reaches that. I'm guessing it is because the ftp session somehow exits the script entirely, especially if there is a problem with the ftp session. But just to make sure, I'm wondering if you all can look at the code to see if I am making it exit accidentally.Here's the code. I left out data like ip address and directory/file names for my security purposes.

Code:
#ftp in and grab the file
ftp -in xx.xx.xx.xx << EOF

[code]...

View 5 Replies View Related

Slackware :: Script - Telnet Session Is Opened And Then Some More Commands Are Forwarded To That Session?

Apr 12, 2010

hypothetically speaking, can i write a script in which a telnet session is opened and then some more commands are forwarded to that session?

View 4 Replies View Related

Programming :: Hashing The Components Of An Tcp Session To Assign/locate The Session In A Hash Table Bucket?

Nov 10, 2010

I have a very bad attempt at hashing the components of an tcp session to assign/locate the session in a hash table bucket. I am pretty sure that it has a very high collision rate and when there are a very large number of tcp sessions my application is having to search a long linked list to find the session within the bucket.

All the hashing functions I have found take a single string input where I need to input several integers and hash them into a single result. My guess is that any real hashing function is going to produce better results than what I am currently doing.

[Code]...

View 2 Replies View Related

General :: Write A Literal Bash Command In A Bash File?

Nov 29, 2010

I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END

[code]...

View 6 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

Ubuntu :: Session Manager / Select As A Startup Session?

Nov 1, 2010

Is there a session manager I can use with 10.10? I would like to try Openbox but am not sure how to select it as a startup session. I would like to be able to choose between kde, gnome and openbox.

View 1 Replies View Related

CentOS 5 :: Writing 2nd Session Of Multi-session DVD?

Jan 22, 2010

I am putting together some new systems for my customer and I'm having some trouble with a script that we use to back up files to a DVD R. The problem is that I can't write a 2nd session to the DVD unless I eject the disk and reload it. The drives are slimline type drives, Sony BD-5730S and Teac DV-W28S-V93, so they won't reload without human intervention. Opsys is CentOS 5.4 or RHEL 5.4. I've tried both AMD and Intel based mother boards. If i try this on Fedora 11 or 12 it works fine. This works on IDE attached drives but not a SATA attached drives. Fedora appears to use something called genisoimage instead of mkisofs. I can't get genisoimage to run on CentOS or RHEL.

Here's the code to setup the test files:

rm -f /tmp/BDtest/*
mkdir /tmp/BDtest
dd if=/dev/zero of=/tmp/BDtest/blank.iso bs=10M count=1
for NUM in {1..160}

[Code].....

View 2 Replies View Related

General :: How To Clean Dish Space

Feb 4, 2009

I have a basic question regarding how to clean up linux disk space. I use "df" to check my disk and found out usage is 100%. SO I use "du -b | sort -r -n > tmp.txt" and found out that /var/spoon/clientmqueue/ has taken the biggest disk space. I deleted the file in that directory using "rm". But after that, I run "df" again, still got 100% usage.

View 2 Replies View Related

General :: How To Clean Linuk Out & Re-install

Nov 15, 2010

I bought a linuk netbook some months ago, & a friend tried to put windows in it.... Well now i cant get either on it, clean it out & re-install linuk,it does't have a a disk drive in it.

View 14 Replies View Related







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