Debian Programming :: Automate Command Line At Start-up
Jan 26, 2015
I'm trying to automate two command lines, a synclient and a syndaemon. They both work well if I type them manually in a terminal, but if I do a littre script to do this, tap to click and scrolling don't work anymore.
This is the script I wrote:
Code: Select all#!/bin/bash
synclient VertEdgeScroll=1
syndaemon -d -t -K
exit 0
So I made a chmod +x on the file, placed it in ~/bin then change PATH to include the directory. Then I added this file in "Startup applications".
The scripts run ok, mais it has a different effect than if I run the commands manually.
I have a nearly 10 years old iMac at home and installed Lenny on (somehow, I had to thrash Mac OS 9.2 :-P). Everything was successful until now, but on entering "startkde", the screen fills withkpersonalizer: cannot connect to X serverlines. Upon looking at other threads here I tried mdetect, installing X11... but to no avail
$cmd If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument".What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine.then | is not treated as an argument. Why?
I am trying to learn how to pass more than a one-command startup for gnome-terminal.
I will give an example of what I'm trying to do here:
Code: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ${0##*/} [-x] [-g] code....
However, running with the -g option to invoke gnome-terminal, I get a "There was an error creating the child process for this terminal" error.
This same error occurs if the gnome-terminal line is changed to
Code: gnome-terminal -e mcTerm
Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.
I may need to handle a Red Hat server soon and thought that has the same command line.Where do I start if I wanted to learn the command line? Especially, how do you connect to a Redhat / Fedora Server using console on windows and do C programming
i'm using ubuntu with the GUIi have a .pps (power point presentation) on the desktop. I installed the powerpoint viewer and made it the default program for opening the file.when i double click on the file everything works.my problem is i need this on a schedule so i downloaded scheduled task.in scheduled task they ask me the command line i want to execute and that's where it doesn't work. I checked the "allow executing file as program" box on the file but i get the error cannot execute binary file.
In Windows, if I have a console window open, type winmine, and press enter, Minesweeper will appear, completely separate from the cmd program. The Minesweeper instance is not tied to the command prompt in any way that I know of, with the exception of Minesweeper's parent being set to that instance of the command prompt. It's different in Linux, however.
In Linux, if I have a console window open, type emacs and press enter, Emacs will open, but it seems tied to the command line. Specifically, it appears that I can't use the command line anymore until that instance of Emacs is closed. Is there a way to replicate the Windows behavior in Linux?
Ubuntu 9.10 (Karmic Koala) 64 bitlaptop Asus f5n vidio: GeForce 7000MI try to remove piton2.6, but system freeze, after these ubuntu show massage (after reboot)"Ubuntu is running in low-grahics mode our screen, graphics card, and input device settings could not be detected correctly. You will need to configure these yourself"I press "ok"and give me next list of options"run ubuntu in low-graphics mode for just one session" -- system freeze "regonfigure graphics" -- no resultI try to reinstall graphic driver "nvidia-glx-185" -- no result
Is it possible to instruct Ubuntu to start up (GUI) Graphical User Interface mode from (CLI) Command Line Interface mode? In the old days, you can type "win" in DOS to get into Windows - something along that line. Is it possible for Ubuntu in this case?
Yes, you can reboot to switch between the modes, but shouldn't there be a command for this?
I've been searching for hours now on how to start compiz from command line and configure the plugins. I just want to use the compiz core package in Slackware (no add-ons for now). I've figured out starting compiz
Code: compiz --replace and the windows decorator
Code: gtk-window-decorator --replace kde-window-decorator --replace for gtk based or kde respectively. I know how to start the plugins (by putting their names in the compiz command), but not what all of their command line names are.
What I'm looking for is all the console names of the base plugins (and eventually the others too), the order they need to be started in (if any), how to automatically start compiz when X starts, and how to change plugin settings (all without ccsm). How to do the above stuff without the use of a graphical tool.
I'm not that familiar with sed and awk in order to be able to solve this problem on my own, so I'm calling on you for a bit of assistance. I'm writing a Nagios plugin to check our Oracle tablespaces and the output is given in one line like this: 1.04007771 TEMP 0 UNDOTBS1 .005340579 USERS 0 7 rows selected. I've been playing around with sed like below to delete the obsolete info and change every second space into a newline:
[code]...
how many tablespaces there are so I'd have to check all databases and 'hardcode' the tablespaces in my script. Is there any way to 'automate' this knowing that 'rows selected' preceded by a number is always the last line and using a sort of counter to auto-adjust the number to put in the -e 's/ / /2' part?
I'm wanting to be able to run the Open Suse start menu from the command line.king remotely, I have found that I have faster response time by only running specific X components instead of an entire desktop (particularly useful under Windows 7 Cygwin). Specifically, I'd like to invoke the start menu from a ssh command line.On Linux Mint,line command is:mintmenuWhat is the equivalent command to bring up the Slab Start Menu on Open Suse?
I just booted into Linux and the Update Manager prompted me to restart. After the restart the GRUB interface I expect to see is no longer there and now it is just a command line that says press tab for more options.I have not got a clue with shell language as I have had no time to learn it as of yet. Do I need to uninstall and reinstall Linux or is there a command that can be typed that boots up the operating system.Even better is there something I can do that can return me to seeing the interface like I was used to.
Last night my system rebooted and dropped screen resolution to 800*600. I was unable to change that from no where. I tried to install nvidia driver and now no gui, only command line. Starting xorg by using 'startx' fails. How I can get back to normal with normal resolution?At the moment I am logged in via live cd. Let me know if any log files needed (if I can locate those).
I have a GUI for Samba already as it most likely installed, the problem is I don't have a shared folder in admin menu. I have told samba what folder to share and what user to have access to it. As well I have looked at the config file to make sure what was in the gui printed into the config file. However I cannot start, stop, restart samba via command line. I will try config package and hopefully that drops down everything,
[code]...
sudo service smbd restart unrecognized service, nmbd same thing. Now it is installed, but has no script file or the script file is not in the init.d folder like it should be still trying to figure I have come to the conclusion that the daemons are not installed and am trying to figure out what those script files look like or a way to import them off a ftp, however no luck with google so far. But the scripts files don't exist on my box. how do you install samba daemons when it says samba is already installed.
I am trying to attach my server to 2 diferent networks, with fixed ip addresses, eth0 = 192.168.0.2 255.255.255.0 with gateway 192.168.0.1. This is currently working, and I can ssh o the machine on this address
eth1 = 192.168.150.5 255.255.255.0 with gateway 192.168.150.1
When I try and start eth1 with ifconfig eth1 up, I get the error message "eth1: unknown interface: no such device"
I have configured eth1 using system-config-network-tui and /etc/sysconfig/networking/devices/ifcfg-eth1 looks correct
I have a big csv-file wich is not formatted very well. I clean it up with removing a lot of html etc, but some of the lines breaks where they are not supposed to.What I want to do is to check next line, if it starts with 'PX' I don't want to do anything, but if it does not start with 'PX' I want to merge the two lines. That is removing the newline character on line one and replace it with a space.Can this be done with sed? (or maybe with perl or something, but I'm more familiar with sed)I've been looking und the net to find a solution, but to no result.
I have a problem with YaST Partitioner. When I launch it, a window opens, a dialog (to confirm that I know what I am doing) pop-ups, I choose "Yes", the application starts to initialize, and after 0.5-1s the window is closed without any error message. Does anybody know how to at least find out what is wrong? .. or how to launch it from command line to get some output?
I have a script that writes the following type lines to a file. The lines include some html tags. Here is an example:<p>Total = 5</h2></b></center>I want to keep the <p> tag, but remove the ending 3 tags. Sometimes the line can have a 1, 2, or perhaps a 3 digit Total. So I could have a Total = 125.Anyway, after the removal of the ending tags the result would be:<p>Total = 5There are some lines in the file that end with </h2></b></center> that I want to keep. These lines looks generally like this:
<p><b><center><h2>Events Summary for Sun May 02 2010</h2></center></b>
As you can see I am using sed to change the beginning and end of lines to make a very simple web page.The file actually displays ok in a browser with the extra tags on the end, but it is just sloppy work to have these unneeded tags in the output file.
I've got an install of CentOS 5.3 in a VM which was installed without X or Gnome.I've added X (yum groupinstall 'X Window System') and Gnome (yum groupinstall 'GNOME Desktop Environment) and can now run startx no problem.However on boot I get a command line login rather than the graphical login screen one normally gets if Gnome is included at install time.What do I need to do to get the graphical login after boot?
I manage to get Ethernet over Firewire working between my Windows XP desktop and my Ubuntu 10.10 laptop.However, I am getting tired of having to manually issue the ifconfig command every time.How can I automate it so that the command is done at bootup?
I'm building a script for my place of employment. The next step in it is checking what the user input was. Determining if they added a part in there or not. The script prompts for a hostname. Hostnames are localhost.localdomain. Now, I want the script to check to see if they put localdomain and if they did, not to add the domain to the /etc/sysconfig/network, but just what they entered. So say the user inputs:
I need to write a script that will take 1 command line argument. The argument will be a username. The script will determine if the user exists on the system and will print an error if it does not. If the user does exist it will determine if the user is currently logged in, if the user is not logged in it will determine the last time the user logged in and display the file in the users home directory that was most recently modified.