Ubuntu :: Write Shell Script To Change Resolution?
Sep 23, 2010
Canceled a sys backup in progress now my Waste bin is at max and must be emptied.However OpenSuse 11.3 contradicts itself by claiming there is 0 in the waste bin? Perhaps there is a Bash command that would solve the problem
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
When I boot my computer I get this message: Warning Pc video resolution is out of range Change setting to recommended resolution 1280x1024 @60mh So I hit ctrl alt f1 I typed in Sudo dpkg-reconfigure xserver-xorg Nothing happens. It's been very frustrating because with everything that I've looked up it says that it's suppose to guide me through something. I desperately need my computer for school.
I'm trying to write a toy linux shell. For starters this is what I'm trying to do:
1. Start a new process with fork.
2. Execute a program in the new process with execl().
3. Redirect the output from the new process from STDOUT to another file descriptor, using dup2(2).
4. In the parent process, read the output from the child process and write it to the screen.
Creating a new process and executing a program in it is no problems, the problem is that I can't seem to capture the output from it in the parent process.
I have a question, tried to search on the Internet but it is hopeless. I want to write a shell script(bashShell) that will run commands of configuration for vim editor.For example: in the script, it will run ":let", ":set", ":highlight" to configure for vim editor. In addition to, when I searched a pattern and wrote it to file,ed vi to open it automatically. But, I couldn't highlight a word(that is the pattern I'm searching) in vim automatically
I needed Ubuntu server and recklessly picked Karmic. Hardware is some regular 775 mobo with integrated Intel graphics. Monitor is ASUS VH222D. Installation went smoothly but after that problems occurred. Shell is displayed in 1920x1080 resolution and fonts are so small almost unreadable. Grub2 looks OK, standard non-fb and so does few rows of text after loading grub but soon after that framebuffer becomes active.
dpkg-reconfigure console-setup doesn't mention resolution. Some articles are leading to grub2 gfxmode but none of manuals helped. I just cannot change grub2 menu resolution to anything else than standard console fonts (non-fb). Kernel option vga=XXX is no longer working.How to lower shell resolution? Why is this automatic???
I changed the resolution in Gnome to something that my monitor cannot recognize. However, I can get into the shell, and am wondering if their is a way to change the Gnome resolution via the shell commands.
I'm trying to write a simple shell script, its purpose is not important. The script needs to make use of the system $HOSTNAME environment variable. I had a look at this page which provides the following example.
Code: #!/bin/sh echo "You are user $UID on $HOSTNAME" echo "Your home directory is: $HOME" echo "$HOSTNAME is running $OSTYPE"
I have a number of text files throughout my /home/pjs/Documents directory tree that have execute permissions set. Almost all of my file names have spaces in them. I am trying to write a shell script that will look at each file in my Documents directory, find the ones that have execute permissions set, and run the command chmod 644. Of course, I don't want the command run on the directories.
The following script *doesn't work*, but might serve to illustrate what I am trying to do:
#!/bin/bash for x in "$(ls -R)" do if [ -f "$x" ] && [ -x $x ]; then chmod 644 "$x" fi done
I want each file and directory name to be placed, one by one, in the variable $x, and then tested with the "if" conditionals.
The first problem seems to be that, although the command "ls -R" does produce a complete list of the files and directories I need, they are not placed, one by one, in the variable x like I want them to be.
Also, I think I should use the shift command so that the option -R doesn't get included as one of the values of the variable $x, but I can't figure out where to put it.
I want to write a shell script contains python one. So,the result of python one is flv file. I want the path of this is copied into a enviroment variable that i have to pass as a flag argument of another program (to convert into mp3). To individuate the result of python script I thought to use (in PWD)
Code: ls | grep -E '^.*mp3$' But my question is: How can I copy this result into enviroment variable?
I do not know how to write either PYTHON or Bash Shell Scripting. I am to learn one for Linux Administration purpose. Which one will you recommend for a Linux Admin/Eng environment?
i have to write a shell script that will delete all the .dat files in /var/oracle/etl/incoming which the created date of the file is 7 days before the currrent date.
I don't know how to write a shell script to set security policies for Linux to start. and how. I know that there are many security policies for Linux but do not know which one best suited to write a shell script.
Am not sure of the best way to go about writing a script. All I need at the moment is to start a java http server program at startup.How should I write languagetool.sh so as to be able to stop the script execution?
I'm looking for a way to insert an SD memory card into my computer and have it copy the files from it (a specific directory) in the background while I view the images from the desktop.
I using fedora 14 and two HDD one for O.S and other for data. I manually mount the data HDD each time I put on my PC I want to write a Shell Script which will mount the data HDD on boot.
-Qjackctl has a config file which is modified each time QjackCtl is shut down. This means that whatever preset is in use when QjackCtl closes is written into the QjackCtl config file as the DEFAULT PRESET, for the next time QjackCtl starts (or at least this is how I understand it).
-I want to edit a specific line in the QjackCtl.config file, which specifies the DEFAULT PRESET. Obviously its easy to do manually, but I want to do it using a shell script which runs automatically on StartUp so that QjackCtl starts every time with the same DEFAULT PRESET, NOT the last one used.
-Unfortunately Im not at my Linux system right now (which is KXStudio/Kubuntu), but I believe the QjackCtl.config line looks something like this: DEF_PRESET=alsa (where alsa is the name of the preset)
PRESET1=alsa PRESET2=firewire
I want a shell script which changes the line DEF_PRESET=alsa to DEF_PRESET=alsa, even when it may currently exist as DEF_PRESET=firewire due to occasions when firewire was the active preset when Qjackctl was last closed. I notice that the application in KDE that enables the user to set which applications open automatically on StartUp also allows the user to select shell scripts.
Ive done some research, as a beginner, and Im led to believe I might need to use AWK and/or CHMOD. I could have a go at writing a shell script but Im always wary about experimenting with StartUp scripts/operations because obviously if I get it wrong and make my system unusable, then because its going to run first thing on each boot, Id have great difficulty disabling it.