Ubuntu :: Writing A Script To Automatically Change Computer Name?
Apr 6, 2011
In order to effectively change the computer name of an Ubuntu system, I've been told I need to edit /etc/hosts and /etc/hostname.I can set up a script that I have on the administrator desktop, and just double click it and put in the computer name I want to change it to, and it save hosts + hostname and then reboot the system?
Set up new Ubuntu 10.10 and it's all fine but the bug I encounter from time to time. Out of the blue, I can't switch languages, neither by keyboard shortcuts, nor from the panel icon. It happens in random time, and it must be some 10.10 bug, for it never happened on 10.04.
I installed the webilder application to automatically change the wallpaper, preferences you've specified the directory where the images but I can not change the background. Does anyone know why not change?
I want to write a single shell script that allows me to, once executed from a panel launcher, change the image preview setting between "local files only" and never. Right now i have two tiny scripts, one for local files only and another one for never, that is:
[Code]...
and the other says string "local_only". But that means i need to have two launchers, because i don't know how to write the condition <<when set to never, change it to local only. And is it possible to make a script that also changes the launcher's icon when the preview config is set to one or the other value? That way i'd know what it is set to just by looking at it. It would act as a diagnostic and therapeutic tool XD
I have a relatively common problem, but I don't seem to identify it's source. I have a SAMBA server on my LAN to which there are mapped a few shares as network drives in windows xp (as Y: ) and mounted as CIFS in linux [as /y]. The problem is that every time I save a file [either windows xp or linux] on the mapped drive / mounted folder, our IDEs alert us that the file changes right after the save. I am running SAMBA 3.3.2.
How to turn on system on particular time? I have to start download process at morning 2'o clock. I can use crontab to schedule my download but how to turn on system automatically?
My hard drive crashed and I put in my old one. Re-installed Ubuntu and now my wireless don't connect. I have to choose my network, then enter my password to get it to work.
I have 2 computers, one running Ubuntu 9.10. I don't often use this one and rather than turning on the power point & having the computer automatically comen, as my Windows machine does, you had to press the power button to switch it on.As of yesterday - after not using it for some time - it turned itself on when I turned the main power point at the wall on to use my other computer. Thought maybe the button was knocked, but this has happened twice since. Seems it's mysteriously changed to automatic start up I can't work out how to change this. Can someone tell me what settings need to bechanged to have it not turn itself on until asked, please?
Actually when I am working on internet.. The computer closed all programs and a black screen appeared asking me login : and Password after it... later It showed me that there are some update packages ... I didn't know how to get out of that except to restart ...
I'm looking for a program or script that will automatically shut down my computer at specified times. The thing is, if I happen to be using the computer at those times, I want it to ask me if I want to shut down before it does it.
Something like I want the computer to shut down at 9 am every day. When it's 9am, a prompt pops up and says, "Do you want to shut down or continue running? If you do not answer, the computer will automatically shut down in 10 seconds." Not sure if something like this is out there or not.
I just reinstalled OpenSUSE 11.3 GENOME on my computer (Compaq Armada E500 w/512 MB RAM, 30GB HD, and Linksys WPG54v2 wireless card). After futzing around for several hours on two different evenings, I got it working all by myself! The only thing is,ow I have to manually connect to my wireless network every time,which gives me a a great sense of accomplishment. I start the computermber having to edit a script somewhere to make it connect automatically on system startup, but I can't remember what it is I'm supposed to edit or how I'm supposed to edit it
i want my computer to function as an alarm clock, i want it to be shut down but start up automatically at a desired time (i'll also have tomboy notes display reminders of what i need to do for the day) this would be a great program
I've an Blade 1500, sparc64 IIIi with 2 hard disks and 2go of RAM. The computer run with debian 7.7.0 and BSD (opensxce) for each hard disks.
1/ When it's run under BSD there are no problems, the uptime are on many hours. 2/ when it's run under debian with XFCE x-window, the uptime is 4 hours 30 minutes and computer reboot automatically !
Into the control panel i've deactivate the hibernation, screensaver and power management ! I want to find the files for manage the time down. I think that the problem is in XFCE window manager.
Is it possible to automatically run a program on a USB Flash drive upon plugging it on a computer?the program should create a text file inside the USB flash drive as i plug it on the computer? Is this possible? how can i do this? autorun.inf doesn't work. Are there any solutions? by the way, i am using kernel 1.0 on my computer...
I am considering trying out gentoo linux on my machine and wanted it to compile while I was gone (going to be gone for a week). I just want to make sure that my system will not MELT while I am not there to make sure everything is okay. I have a pentium 4 prescott. Will my computer automatically shut itself down if it overheats? I've heard its supposed to but sometimes is too late. Can I trust it?
So I have Windows 7 and Ubuntu dual booted on my computer, and the default is Ubuntu. I was wondering if it was possible to make it such that the default is the last booted system? As in, if I was in Windows, and restarted, then GRUB would highlight Windows.The mainmotivation is to for when the computer restarts automatically (say after an update). I may not be around during the 10 seconds before it boots into Ubuntu.
I have my 10.04 set up with english (us and gb) as well as spanish languages installed.
I have firefox 3.6.3 compiled and installed for a 64 bit system. The firefox source code comes only with en-US locale, so I obtained en-GB.jar and es-ES.jar (as well as their manifests) from firefox.com and added them manually to my chrome directory.
This had worked in the past, when I'd logout and switch the gnome locale to es-ES firefox would come up in es-ES etc, but for some reason firefox will only start up in en-US now.
How can I fix this to match the desired behaviour?
I am currently storing most of my dotfiles in a git repository to make keeping them in sync across all my computers easier. I've just recently acquired a Macbook so now have to have all my dotfiles supporting the differences between Linux and Darwin. The first incompatability that I have encountered is colour coding ls, in Linux this is the flag --color=auto and for Darwin it is -G.
My first attempt at making my .zshrc portable is to do the following: case `uname` in Darwin) alias ls='ls -FG' ;; Linux) alias ls='ls -F --color=auto' ;; esac
Once I find a few more things to change I'll probably pull the computer specific stuff out to separate files to keep it a bit cleaner. What I'm mainly wondering is if there is a better way to do this other than using `uname` to determine which stuff to run.
I've created a set of users using the newusers command. Unfortunatelly ive messed up and added all users to the 1000 group as primary group instead of giving the group argument as null what would add them to a new group. To make things clear:
I need to create the missing groups. A simple fix could be do a for loop creating a group with the name of each user in my file and then adding the users to it. Are there any dangers of doing it? What impact could this change have? Are there any safer ways?
A combination of the following commands:
Quote:
Add users to a group with the gpasswd command:
# gpasswd -a [user] [group]
To delete existing groups:
# groupdel [group]
To remove users from a group:
# gpasswd -d [user] [group]
If the user is currently logged in, he/she must log out and in again for the change to have effect.
Quote:
for i in (names) do groupadd $i gpasswd -a $i $i
Assuming I've created all users in group 1000 I could remove them from it with
i am using squid proxy on centos 5.x release with stable version. during installation time i fixed date time region.it was basicaly gmt +3:00 hours. so everything was fixed, now since past few days every 24 hours it change its time automaatically. this looks like it take update somewhere from internet or internally something is mess up.could someone guide me how to fixed permanantly date time. even either restart the machine or passing 24 hours it do never change it. etc
I searched the forums for a long time and could not found any relevant informationI am new to ubuntu (10.10 64bit) and I just want to know if it is possible, like it is in win7 (sorry!), if I can plug in my hdmi cord and have the laptop speakers and display disable, and have the external display and its spears enabled.
I'd like to tweak my Conky so it automatically displays the days of the week correctly. So for example, if TODAY were Tuesday, it would look like this:
Tuesday
Wednesday
Thursday
Friday
[etc.]
And then tomorrow, *automatically*, it would look like this:
Wednesday
Thursday
Friday
[etc.]
I know I can get it to display *today's* date like this:
when i was sleeping my computer restarted itself and when i signed back in all the windows were huge. the resolution is set at 900x600 and no other option makes the windows smaller.
Ive installed maverick meerkat on my mid 2009 mbp and now whenever i start the computer it automatically boots into ubuntu instead of my mac os 10. how do i go about changing the boot sequence without having to install refit and pressing the option key all the time.p/s: i dont like using refit because it takes 30 seconds just for the option screen to appear on boot up.
I was a bit hasty hitting "Okay" when I installed 10.4 and, as a result, I have a ridiculously long computer name.How can I change it?I have read a number of posts quite critical of this release. I love it. For the first time since I switched to Nvidia graphics cards I can get a graphical environment - straight out of the box.
im new to Ubuntu. can i change the computer's name after install the OS? currently it displays neosharky - laptop and i want to change it to Neo Sharky. can it be done?
i,m having problem when i changed my HD (ubuntu 10.4 installed) from dell Gx620 to new dell gx740. My ubuntu cannot boot even on the bios setup my HD detected. Anyone can help pl response i dont want to loose my existing data.