Search Results

Search found 5695 results on 228 pages for 'logoff scripts'.

Page 17/228 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Contract-Popup at Login

    - by Steve
    I want to give my notebook to guests of my little Hotel as an extra service. I love the Ubuntu guest-account and I think that this is the best possible way to help my guests get free internet-access. I found out how to "design" their user-accounts with /etc/skel, but unfortunately I have no clue, how to show them a small introduction to the system and a kind of user-agreement "contract" when they login. I read of xmessage, but this is too minimalistic. I'd like to implement some pictures. Does anyone have any idea of how to make this possible? Would it be possible that the user is logged out automatically if he rejects the user-agreement? Thank you so much in advance, Steve.

    Read the article

  • Script / App to unRAR files, and only delete the archives which were sucessfully expanded.

    - by Jeremy
    I have a cron job which runs a script to unrar all files in a certain directory (/rared for argument's sake) and place the expanded files in /unrared. I would like to change this script so that it deletes the original rar archives from /rared only if they successfully extracted. This does not mean that unrar has reported that they have been fully extracted, because I have had data corruption during decompression before. Ideally (pie-in-the-sky, just to give you an idea of what I'm shooting for,) the unrar program would include this functionality, comparing an expected md5sum value with the actual md5sum value and only deleting the archive if they match. I don't mind scripting this entire process if I have to, but there must be a better way than unraring twice and comparing md5sums.

    Read the article

  • Select (loop) or command not working in shell-script

    - by user208098
    I've been tinkering with Linux and Unix for years but still a novice in my mind and recently find myself trying to be more pro with it as I work in IT. So with that notion I'm studying shell scripting. I've hit a snag in ubuntu using the latest version 13.10 Saucy. When I use the select command in a sh script it doesn't work, depending on how I format the command it will either return Unexpected "do" or Unexpected "done". See the following two examples: This section of code produces an unexpected "do" error: #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit do case $opt in "option1") echo "you chose choice 1" ;; "option2") echo "you chose choice 2" ;; "option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done This section of code produces an unexpected "done" error. #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit ; do case $opt in "Option1") echo "you chose choice 1" ;; "Option2") echo "you chose choice 2" ;; "Option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done When I enter these parameters into the command line interactively or manually I get the desired result which is a list of choices to choose from. However when executed from a script I get the before mentioned errors. Also a side note I have tried this in Fedora as a script and it worked perfectly so my question is why isn't it working in Ubuntu, is this a difference between RHL and Debian? Or is it a bug in the latest version of Ubuntu? Thanks in advance for any help! KG

    Read the article

  • An "Invoke Update Manager to update everything and shutdown" script after idle for x minutes?

    - by unknownthreat
    I have Ubuntu 10.10 installed on a machine for my parents. The thing is they never request updates from Update Manager even the manager itself prompted them so. Moreover, when they are done with whatever they are doing on Ubuntu, they always leave the computer on. And I always have to come back and shut the machine down. Sometimes, the computer even sit idle for hours. So I want to know whether this is possible in Ubuntu. I am thinking of a script that will be activated after the machine is idle for x minutes. When x minutes have elapsed, Update Manager will automatically update everything listed. (I recall that you need the admin password for this, so is there a workaround?) After all the updates are done, the machine will automatically shutdown. Is this possible?

    Read the article

  • How to pass results of bc to a variable

    - by shaolin
    I'm writing a script and I would like to pass the results from bc into a variable. I've declared 2 variables (var1 and var2) and have given them values. In my script I want to pass the results from bc into another variable say var3 so that I can work with var3 for other calculations. So far I have been able write the result to a file which is not what I'm looking for and also I've been able to echo the result in the terminal but I just want to pass the result to a variable at moment so that I can work with that variable. echo "scale=2;$var1/var2" | bc

    Read the article

  • How to script a reinstall (apt repo's and installed packages)

    - by Kurtosis
    I need to wipe my hard drive and reinstall Ubuntu. /home is on a separate partition, so I can back that up to a backup drive, then copy it back to the wiped drive, install ubuntu, and point it at the existing /home, no problem. However, I also want to script a reinstall of all my apt repo's and the packages I currently have installed, so I don't have to waste hours doing that manually. Anyone know a good way to do this? PS - At least, I'm pretty sure I have to wipe the drive. Need to install Windows 7, and only have an HP system restore disk that formats the whole drive, and not a legit Windows 7 install disk that lets me install on a single partition. If somebody know a way to trick the system restore disk to install only to a single partition, I'd love to hear it.

    Read the article

  • Please help for change wallpaper on terminal where image from http (ubuntu 12.04)

    - by Yan Fachmi
    I need to change the background of my desktop in Ubuntu 12. 04 with a command in terminal, in order to make a script with bash. Does anyone know how to do it? but i want the image from internet... i know if i use local image would like this : gsettings set org.gnome.desktop.background picture-uri file:///home/icorner/wallpaper/curr.jpg but if i use something like this wont work gsettings set org.gnome.desktop.background picture-uri http://www.sergiuhelldragoon.com/wp-content/uploads/2012/04/dota_2_wallpaper_1_1280x800_by_zadelim.jpg Please anyone or somebody?... Thanks & regards, Yan Fachmi

    Read the article

  • Where does a file copy to when I scp it?

    - by user2413
    Hi forum, i have this file myfirst.txt located on a cluster of computers down the hall, i.e.: myname@login1:~> ls myfirst.txt which i want to download to the home directory: scp [email protected]:myfirst.txt . to which i get: myfirst.txt 100% 1828 1.8KB/s 00:00 now where (on my home computer) is this myfirst.txt file ? i can't find it. It's not visible when i click 'show hidden files' either. Tia,

    Read the article

  • Logging every time a command is run

    - by Tom D
    I want to log every time I run a certain type of command in the terminal. For example, every time I run: sudo apt-get install [something] I want to add [something] to a log file in my home directory that will look like the following: [timestamp] [something] 2012-10-02 mysql-server 2012-10-03 ruby1.9.1 2012-10-06 gedit-plugins 2012-10-07 gnome-panel synaptic What's the easiest way to make this happen automatically?

    Read the article

  • Init.d script gets return code 1 when calling itself, how can I get output?

    - by Per
    My question is, how can I modify the script so that it will tell me what goes wrong? The scenario is this: I'm trying to get Sonatype Nexus to start as a service in Ubuntu 10.04, and it just will not work. (I'm not looking for help on how to run Nexus, but on how to get some useful output from a script) It works when invoking it with sudo /etc/init.d/nexus start but fails when using sudo service nexus start I have run the update-rc.d command on it, and done everything according to instructions. The nexus init.d-script has a point where it calls itself when it detects that it should run as another user ('nexus'): su -m $RUN_AS_USER -c "\"$REALPATH\" $2" which expands to su -m nexus -c '"/opt/nexus-2.0.2/bin/jsw/linux-x86-64/nexus" start' when adding the -x debug flag to the script. This command results in return code 1. It never executes - I've set -x debug flag on the script, placed echo commands with redirect to file at the start of script to trace, etc. I cannot get any output telling me why the command will not execute. I've tried appending redirect to file after the above script line, inside the quotes, outside, any way I could imagine. All info I can get is by inserting a line echo $? after the su line, which outputs '1'. Is there a way I can see what happens when the su command runs?

    Read the article

  • How to access shared folders in Ubuntu VM(Oracle Virtualbox) and link them to the home folder(Answered)

    - by Njihia
    I have configured a shared folder between the Windows host and Ubuntu guest. The folder mounts at start up but its empty(It also has a padlock sign.). I have to run the command below to access its content(the padlock sign disappears). sudo mount.vboxsf media ~/media How can i configure it to be run automatically at start up. I've tried adding to the start up programs but nothing happens. Am new to Linux so try to put your answer in a layman's language. Thanks.

    Read the article

  • How to set system-wide proxy address using shell script?

    - by skg
    I want to set system Proxy address through my Qt application. So i was wondering if i could write a script which can be executed by my application every time to change the proxy address. I tried : #! /bin/sh echo "# Generated by Application" export $1 echo "Proxy Address ${1} but this script was not successful. I think it was unable to execute "export" command. Can anyone help me resolving this issue ?

    Read the article

  • How to prevent script not to stop after apt-get?

    - by Eonil
    I keep some bash snippets and copy&paste them when I needed for management. But I discovered apt-get cancels script execution. Here's my script where problematic. apt-get -y install gcc g++ make cmake perl cd ~/ mkdir t1 cd t1 I copy & paste this script on OS X Terminal to Ubuntu 12.04 LTS server (fresh install on VM) Script always stop after apt-get finished. I run this command with root account like this. ssh user1@server <password…> sudo su <password…> apt-get -y install gcc g++ make cmake perl cd ~/ mkdir t1 cd t1 Can this be a problem? Or why my script stops after apt-get finished, and how to make it to continue?

    Read the article

  • Program/Wrapper (how do you call it) to automate a certain script

    - by user10324
    In this question a script is provided, that minimizes all the other windows except the active one. But the thing is, to trigger this script a (shortcut) key-combination has to be pressed. I would love it, if it would be possible to automate this behavior, i.e. no matter what I do, only the active window is not minimized. This way I cannot view more then one open window at the same tine, which is what I'm after. Is it possible to write a script, that does this ? I a question I asked a while ago (where I learned about the above script), someone said, the proper way to do this, would be through a wrapper through which every program starts. I would also be very happy with a more sloppy solution, like activating this script 100 times per second (simulating pressing the shortcut combination a 100 times per second), if it is feasible - although I was warned, that that may not be a very good idea.

    Read the article

  • Installer script removed a buch of 64-bit files and replaced them with 32-bit ones, how do I get them back?

    - by ILikePizza555
    I ran this installer script to get some drivers for my printer, however I noticed that it started removing some of my programs, as well as 64-bit system files, and started replacing them with 32-bit ones! Luckily, I managed to cancel the operation before it did any serious damage. I also noticed that offical PPA's for 32-bit files were added. Should I remove them? So how do I get these files back?

    Read the article

  • How to configure screens in console or create screen configuration profiles?

    - by uncle Lem
    I have two monitors and integrated GPU (Intel® HD Graphics 4600). It works fine for work or movies, but if I launch games in fullscreen mode - I get artifacts, glitches and so on. Temporary disabling second monitor solve this problem, but then I have to enable it back, and set its properties manually (by default, additional screen attaches its left-top corner to main monitor's right-top corner, but I need it to be left-bottom and right-bottom corners). So I need some kind of automatization here. Best option - tool to create and swap between some kind of config profiles. Or, maybe, some console manipulations which I can put into script files would be fine too. (Ubuntu 13.04, if it matters)

    Read the article

  • Cannot get script to run at startup (tried all the simple answers)

    - by Carey Head
    I have Ubuntu Desktop 12.04 LTS running great on an older Acer desktop. I want to use this machine as an in-home server for hosting Minecraft. The command to start the Minecraft server is java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui and that works great when I cd into the correct directory and execute the above. I created a script to do this: #!/bin/bash cd /home/myuser/minecraft-server1 java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui & cd /home/myuser/minecraft-server2 java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui & exit 0 I made this .sh file executable, and it too runs great when I start it manually from the terminal. The problem I'm having is getting these to execute at startup. I have my user account on this machine to auto login. I have tried the following: Adding the following to "Startup Applications" : sh /home/myuser/myscript.sh (Nothing happens on reboot) Adding the same to /etc/rc.local (Nothing happens on reboot). I even tested this one by running /etc/rc.local from the terminal, and it executed great. Just not at boot/auto login Added the lines from the script directly to rc.local (Nothing happens on reboot). I can't help but think that there's something I'm missing. The script executes great when run manually, but will not run at boot/auto login. Many thanks in advance.

    Read the article

  • Is Job Running?

    - by Derek D.
    The following SQL Server script works to determine if a particular job is currently running. This feature is nice to have if you do not want jobs to step over one another. I frequently will use this script as the first step of the job. If it is currently running, then the [...]

    Read the article

  • Editing a command-line argument to create a new variable

    - by user1883614
    I have a bash script called test.sh that uses command-line argument: lynx -dump $1 > $name".txt" But I need name to be created from the argument by specific keywords in the argument. An example is: http://www.pcmag.com/article2/0,2817,2412941,00.asp http://www.pcmag.com/article2/0,2817,2412919,00.asp Both are two separate articles but are the difference can only be seen in those 12 characters. How do I create a variable from a url for those 12 characters? So that when I run test.sh in Terminal: ./test.sh http://www.pcmag.com/article2/0,2817,2412941,00.asp there is a text file saved as 0,2817,2412941,00?

    Read the article

  • Why does printf report an error on all but three (ASCII-range) Unicode Codepoints, yet is fine with all others?

    - by fred.bear
    The 'printf' I refer to is the standard-issue "program" (not the built-in): /usr/bin/printf I was testing printf out as a viable method of convert a Unicode Codepoint Hex-literal into its Unicoder character representation, I was looking good, and seemed flawless..(btw. the built-in printf can't do this at all (I think)... I then thought to test it at the lower extreme end of the code-spectrum, and it failed with an avalanche of errors.. All in the ASCII range (= 7 bits) The strangest thing was that 3 value printed normally; they are: $ \u0024 @ \u0040 ` \u0060 I'd like to know what is going on here. The ASCII character-set is most definitely part of the Unicode Code-point sequence.... I am puzzled, and still without a good way to bash script this particular converion.. Suggestions are welcome. To be entertained by that same avalanche of errors, paste the following code into a terminal... # Here is one of the error messages # /usr/bin/printf: invalid universal character name \u0041 # ...for them all, run the following script ( for nib1 in {0..9} {A..F}; do for nib0 in {0..9} {A..F}; do [[ $nib1 < A ]] && nl="\n" || nl=" " $(type -P printf) "\u00$nib1$nib0$nl" done done echo )

    Read the article

  • How to execute a scipt just by double clicking like .EXE files in Windows?

    - by maythux
    How can I make a bash script executable by double clicking just like .exe files in Windows? I tried creating a launcher and assigning the script to it, but there are two consequences: the terminal twinkles, disappears, and nothing is done. you must specify to run in terminal in order to work. I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu. Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?

    Read the article

  • How can I change a folder's icon by using a script?

    - by Usul Muhadiv
    I have in my Profile folder "Home" some specials folders as "Wallpapers", "TXT", etc. and y use for those an personalized icon, the problem is that any time I reinstall Ubuntu, I have to assign again the icon to that particular folder, and with the years an the installs the number of folders are increasing. So I need a automatic way to assign those custom icons to those special folders, Its any way to do that? PS: I hope somebody could help me. Regards Muhadiv

    Read the article

  • Periodic script execution

    - by Vagelism
    I made a script that sends my local sensors temperature to a server in the internet and then I can see a graph of it. Everything works fine when I execute it manully. I have the latest ubuntu version. When it comes to run periodically every minute with crontab then nothing works. It doesnt send anything. I tried to run it as SUDO and as user, I tried to add it in the crontab file to run it from several locations like /bin/myscript.sh , /user/Desktop and many others...Nothing seems to work. Any Idea how to solve it? Thank you!

    Read the article

  • need a different backup solution

    - by DigitalJedi
    I just built a new media/backup server using Ubuntu 12.04 64bit. I installed a hard drive to be used only for music, pictures, and videos and formatted it fat32 so my 1 and only Windows PC could map those folders as netshares. My laptop, also running Ubuntu 12.04, is what I am using the most so new media is first downloaded on my laptop. I've already got the music, videos, and pictures folders from my server mounting as shares on my laptop on boot thanks to some fstab edits and sshfs. Now I'm wanting either an app or script that could backup any new files I add to my local media folders to the mounted folders on my server. I've been Googling all day and found a few apps like rsync but they seem to have issues with ext4 to vfat backups. I thought maybe a script would be best but I'm new to scripting in Linux and don't want to mess anything up. Basically I am looking for something that will backup only newly added files to the server. I figure I could schedule it once a week. There are some stipulations. For example, my local music folder has over 700 folders for each artist/band then sub folders inside those for albums. I want something smart enough to only copy newly added content so I'm guessing the modified date would probably be a good condition if I were scripting. I'm rambling. Any suggestions would be GREATLY appreciated. I'm not finding anything to suit my needs. I'm almost to the point of just learning bas scripting so I can write something but then it will be a couple weeks or so before I have a possible solution and I'd like something in place sooner.

    Read the article

  • Multisystem Script won't work! "Syntax error:redirection unexpected" Worked 2 days ago?

    - by user74005
    this is my first question. I use Multisystem all of the time and have installed it on both Kubuntu and Ubuntu and have used it with no issues. I wiped my hard drive to try some new OSs I'm now using the exact same OS (Ubuntu 12.05) I used to load my USB stick to begin with and now I'm getting this ridiculous syntax error. I know the script is correct, I'm following the exact same steps I used to get to this point and I'm getting different results ?!?! I'm very confused by this. I have no clue how to begin addressing this issue. I get the same syntax error on Kubuntu now too, which did have multisystem installed. I run "sh install-depot-multisystem.sh" and get "Syntax error:redirection unexpected", this worked literally 2 days ago. The only thing that has changed is my face has grown some more facial hair and my head hurts from bangin it against the wall over this issue. The OS is exactly the same, the script is the same; but now it won't install. I'm lost and really hoping someone can help. Append Just to append to this a bit https://lists.ubuntu.com/archives/ub...er/000264.html I needed to do a chmod 777 on the script, I'm still getting a syntax error on Kubuntu...but it did install successfully. I'll mark this as resovled! Thanks anyway, I'll try to spruse up on my Linux skills.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >