tibberous Posted November 26, 2012 Share Posted November 26, 2012 I hate vi. I hate the idiots that even put a 30 year old text editor in CentOS. But mostly I hate the fact that the damn crontab never saves, and that /etc/crontab isn't used, and that crontab -e opens a file in god-damn vi. Is there anyway to make it so that crontab -e brings up nano? Or a way to make it so that crontab isn't wiped when the server is reset? Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/ Share on other sites More sharing options...
requinix Posted November 26, 2012 Share Posted November 26, 2012 (edited) man crontab -eThis option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified crontab will be installed automatically. My Ubuntu says that it'll use /usr/bin/editor as a fallback; some Googling suggests that's true for CentOS too. [edit] IIRC you can manually modify the crontab file so long as you restart/SIGHUP the cron daemon. Edited November 26, 2012 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395074 Share on other sites More sharing options...
Pikachu2000 Posted November 26, 2012 Share Posted November 26, 2012 export EDITOR=nano Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395075 Share on other sites More sharing options...
tibberous Posted November 26, 2012 Author Share Posted November 26, 2012 Thanks for the help - I did the export command but I won't know if it worked till next time, because I don't want to mess the crontab up while it's working. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395229 Share on other sites More sharing options...
Adam Posted November 26, 2012 Share Posted November 26, 2012 You need to add the export command to your bashrc file, to ensure it's exported on every start-up. You may already be exporting an EDITOR var in there you would need to replace. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395239 Share on other sites More sharing options...
tibberous Posted November 27, 2012 Author Share Posted November 27, 2012 I hate Linux! Why does stuff reset on reboot? Every year I hope Google will come out with some super-advanced server OS but they never do. I'm gonna go find my stupid bashrc file, which would be /etc/startup if Linux made any sense. Thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395375 Share on other sites More sharing options...
Adam Posted November 27, 2012 Share Posted November 27, 2012 Your .bashrc file is found in your home dir, as it's for your user only. I would drop the hate towards Linux and try and embrace it a little, if you're going to get anywhere with it. Even vim is a nice editor if you put in the effort to learn it and customise it. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395384 Share on other sites More sharing options...
Pikachu2000 Posted November 27, 2012 Share Posted November 27, 2012 Yeah, I'm the only one around here allowed to hate everything. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395385 Share on other sites More sharing options...
trq Posted November 27, 2012 Share Posted November 27, 2012 I hate Linux! Why does stuff reset on reboot? Set a variable in Window's (cmd) shell and see how long it lasts too. The issue seems to be between the keyboard and the chair. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395386 Share on other sites More sharing options...
tibberous Posted November 28, 2012 Author Share Posted November 28, 2012 [/font][/color] Set a variable in Window's (cmd) shell and see how long it lasts too. The issue seems to be between the keyboard and the chair. If somethings truely advanced, shouldn't it be easy to use? And if you make changes with msconfig, they don't revert. Crontab is a file, doesn't make sense it just disapears. I guess between Windows and Android I'm just use to OS'es not being a hodgepodge of esoterical crap. I *could* learn it, but I'd much rather see it replaced with something well designed and user friendly. Logmein shows just how well remote desktoping can work - what I'd really love to see if a server OS that you could manage though a client app. Guess as everything gets easier it just makes linux look worse. Open source sounds good in concept, but corperate software is really polished and user friendly lately... hell, anymore it's even becoming free. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395812 Share on other sites More sharing options...
Pikachu2000 Posted November 28, 2012 Share Posted November 28, 2012 (edited) I don't think it's as much a matter of ease, as a matter of what you're used to. Everyone I know thinks Mac OS is "hard" to use. Being a Linux and Mac user for the last 6 years, I think WinD'ohs is hard to use. EDIT: and really, the more granular the control you need over something becomes, the more complex it becomes to control. Edited November 28, 2012 by Pikachu2000 Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395815 Share on other sites More sharing options...
Christian F. Posted November 28, 2012 Share Posted November 28, 2012 Crontab file disappearing? Where did you get that from? No-one here has said anything about the crontab file disappearing. What they have said is that the environment variable "editor" will be reset, if you don't add it to your .bashrc file (which is in your home folder, since it's yours, btw). Same with Windows: If you use "set" in a CMD prompt to set an environment variable, it'll be lost when you close that prompt. msconfig doesn't enter the equation, as you're comparing apples to glass figurines. What you have is a case of missing knowledge, which is not a fault of the OS. So I'd advice you, as trq did, to drop the hate and stop blaming the OS for your lack of knowledge. PS: ssh is a client application, so is vi, nano, crontab and msconfig. Logmein, however, is a server and client application. Quote Link to comment https://forums.phpfreaks.com/topic/271166-how-do-you-change-the-default-editor-from-vi-centos/#findComment-1395817 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.