I understand SOME of how to use screen; attaching and detaching screens, etc.
for example:
screen -d -m links cnn.com
Then I can type
screen -ls
or
screen -r
and re-attach to that session.
But what launching a batch file? Said batch file contains 2 commands; a CD command, and a command to launch Python to run a certain Python script.
Whenever I use the batch file as the command for Screen, it always exits and terminates the screen session -- there are always "0 sockets". Even though the Python script in question is very persistent, and runs indefinitely.
I am trying to convert my batch file into a .sh file and i think i have it perfect but it just will not work, so obviously not perfect. This is the code for my batch file.
[Code]....
This works perfectly on my own computer without any problems. I want to host this on my Linux VPS (CentOS 5) and need it to be converted into run.sh. This is the code for my run.sh.
I am logging the output of: top -b -n1 -c so I can keep track of which processes are using how much memory and CPU each minute. When top shows the full command line (-c), the command line text gets truncated at the edge of the screen. This is perfect when running and displaying in a terminal. However, I am sending STDOUT to a file for parsing later and want the full command name logged. Is there a way I can tell top to use a specific screen width? (I know it maxes at 512, that would be fine)
Is there a better way to achieve a similar goal: get periodic stats about which processes are running and how many resources they are consuming?
How an I tell gnome (using a script or setting in compiz settings)to only open application X on screen 1 and have it work from screen 0? example: I have nvidia dual/seperate screens runnig so I have screen 0 and screen 1 I cannot drag a window from one screen to the other I want to launch a program from screen 0 and have it open on screen 1
I want to be able to enter multiple filenames after this bash file on the command line--- file1.rm, file2.rm by putting a shift command in this file?Or even better, for this bash file to take a line by line pipe from a text file. Excuse my atechnicalness.
file: rm2avi.sh: #!/bin/bash cd /media/212EXT/data/download/convert
I am use to microsoft products. In microsoft windows, I can make a batch file that says to delete a file on the desktop during startup. would like to create a "batch file" or command that runs at logon in Ubuntu. An example:f I wanted to delete a certain file on the desktop called "new.pdf" everytime I logon,Could I make some kind of file the has the commands "rm new.pdf" in it and run it as a file during login?
I just learnt to convert a video file into mp4 format so I can watch it on my PS3. However, I have dozens of video files from my video cam, and want to convert them all. They are all in the same folder. Please can someone explain how I might be able to adapt the code below so I can convert all my files in a batch. Perhaps keeping their same name or giving them some other name, I don't mind.
I've created a .bat file with this line: start C:USERSPuttyputty.exe -ssh user@server.com -pw password
That opens a putty session and logged in it with the user and password i've already specified. But now, I want to enter a simple command like "ls -l" for example.. How can I do that?
I've also tried plink...The line in that case is this one:
and in that file "UNIX_commands.txt" I've added the following lines:
cd /projects/test ls -l
all works fine (the commands are executed) but i can't see the putty session... all i can see is the verbose in my DOS windows of the last line "ls -l"...
The putty session vanishes away. How can I have the session opened and list the mentioned directory.
I need to write a windows batch file to run unix commands by logging onto a telnet unix server. For example , I might want the batch file to log onto the unix sever, run the ls command, collect the output in a file and ftp it back to my windows desktop
This is for a live performance type of setup. I have 2 graphics cards. One is attached to 2 projectors, which are what the audience sees. The other has a single monitor, which is backstage. The 'front' graphics card is configured in Twinview, and the 'backstage' one is configured as a second X screen by the nvidia settings control panel.
What I'd like to do is launch my show program from a terminal on my backstage screen, but have it show up on the other X screen, the 'front' one. X is amazing so I'm sure it can be done, but I'm having a hard time figuring out exactly how.
Personal Best for self-solving my own thread question:
Code: DISPLAY=:0.0; xclock launches on display 0 Code: DISPLAY=:0.1; xclock launches on display 1
I need to write a batch file for windows that automatically starts the cygwin tool in windows and executes the unix scripts.Previously we had these scripts in unix server.Now we need to migrate them to Windows server.For this reason we are using cygwin tool that allows the scripts to be executed on Windows server.We had written a batch file that starts the cygwin tool,but we were not able to execute the unix scripts.How can we write a batch file such that it executes all the unix scripts in cygwin.
I have been running Ubuntu 10.04 Lucid not on a separate disc partition but installed right on my Windows (7) partition. Everything was working fine until yesterday. I restarted my computer and then the system was scanning the disc then suddenly after the disc check, the computer restarted and when it was supposed to launch Ubuntu, the screen went completely white. I tried restarting again, I manage to get to where I choose to boot with Windows 7 or Ubuntu. I choose Ubuntu and the same happens again: white screen. It doesn't go any further than this and the only thing the computer can do is boot with Windows 7. Has anyone had the same problem? Also, is there a way I can access my files (saved in Ubunutu) from Windows? If I can manage to copy these files then I don't mind reformatting the whole disc.
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
I want to launch the screen program by default and automatically every time that I open the bash terminal. How can I set this in terminal? I'm using lxterminal - terminal for lxde desktop environment.
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?
Why why why did virtualbox devs remove the VBoxRandR.sh script??
[URL]
How can I now run scripts when a screen is resized? Is there another way? I'm currently running a striped down ubuntu 10.04 x86 with fluxbox and we need to do a release ASAP!
Wen I am on the desktop I have to put the mouse on the top bar in order to see File, Edit,View, Places, Help.when I launch firefox it takes over all the screen/desktop.Is this the way unity supposed to be ?
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
I just installed Natty, its ok so far. How can I keep applications from launching full screen? I know if I resize the window below 75% or some thing like that it does not start full screen however I need the window to launch at like 85% and not full screen. This is the most frustrating thing I don't know what Canonical was thinking. I put it in if you have to however make it easy to undo..
I wanted to have some cool effects in my desktop and have just installed compiz fusion in fedora 11 (kde) but when i launch compiz fusion icon the screen just goes white and nothing appears.
I've just done a clean install of 11.4 from a Net install CD. I left it unattended while it installed, and came back to find a blank screen with just an xterm. I've rebooted it, and tried both the normal and the failsafe modes, but I just get the same result. The terminal contains the following:
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.