change "startx" command | edit: and "ls" [SOLVED]
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
change "startx" command | edit: and "ls" [SOLVED]
I know this is a little ODD of a request, but how do you go about changing the startx command? For example, instead of startx, I want to type startxx to get into the GUI.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 5 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: change startx command
Easy:
Just type that on the terminal to have it work immediately. If you want it to work after reboot, add that line to your ~/.bashrc file.
If you don't want startx to work anymore, that is something different...
Code: Select all
alias startxx="/usr/bin/startx"
If you don't want startx to work anymore, that is something different...
Re: change startx command
not quite what I was looking for, but it pointed me in the right dir. thank you. renaming startx in /usr/bin to startxx worked more permanently (alias only works for current session?).
Re: change startx command
Well, I didn't want to suggest that as it may break things (i.e., anything that needs to run startx now can't). Like I wrote, edit your ~/.bashrc to make the alias work after reboot.lvleow wrote:not quite what I was looking for, but it pointed me in the right dir. thank you. renaming startx in /usr/bin to startxx worked more permanently (alias only works for current session?).
Re: change "startx" command | edit: and "ls"
If I edit the bashrc and still put in startx, it'll work right? I don't want that. I want to script a custom error when the input is startx. Besides, what applications might use startx? If you're in the GUI, there's no need for it. And if you're in command, what kind of program wants to interrupt what it's doing and start the GUI? I'm kind of curious, cause I'd prefer not to get that error while doing something in either, so I can just avoid those kinds of apps?
Also, is there a way to rename "ls" to lets say "lss"? Also having ls playback a custom script error? Are there any applications that might use this command as well?
I know, I'm weird. hahaha
Also, is there a way to rename "ls" to lets say "lss"? Also having ls playback a custom script error? Are there any applications that might use this command as well?
I know, I'm weird. hahaha
Re: change "startx" command | edit: and "ls"
I suggest you read up on the Bash alias command.lvleow wrote:If I edit the bashrc and still put in startx, it'll work right? I don't want that. I want to script a custom error when the input is startx. Besides, what applications might use startx? If you're in the GUI, there's no need for it. And if you're in command, what kind of program wants to interrupt what it's doing and start the GUI? I'm kind of curious, cause I'd prefer not to get that error while doing something in either, so I can just avoid those kinds of apps?
Also, is there a way to rename "ls" to lets say "lss"? Also having ls playback a custom script error? Are there any applications that might use this command as well?
I know, I'm weird. hahaha
Basically you could do in your ~/.bashrc:
Code: Select all
alias startxx="/usr/bin/startx"
alias startx="echo do not use startx"
alias lss="/bin/ls"
alias ls="echo do not use ls"
If you want this to apply system-wide, for all users on the machine, you have to add the lines to the /etc/bash.bashrc file. The ~/.bashrc is only for your user.
Re: change "startx" command | edit: and "ls"
thank you, I appreciate your help.