How do I set-up to launch my DE with ck and dbus from bash?
What I am currently trying to accomplish is to start Xfce or Fluxbox from the command line (and run level 3). I've discovered there are several other packages/apps needed to be launched with either. The normal installed setup is to boot into run level 5, where I get the login screen which has a menu to select the DE/WM of my choice. Presumably this selection also loads the other necessary apps that make any DE a usable system. For example, I've found it necessary to startx & Xfce using the following command placed in ~/.xinitrc
exec ck-launch-session dbus-launch startxfce4 The trouble is startx only works for one DE/WM at a time, and I wish to retain the option to select my DE/WM from a list of options (currently Xfce and Fluxbox). My first thought: what is the equivalent of the above command I can run from bash prompt? If I had this, I could write an alias to put in .bashrc... |
Quote:
Code:
select wm in Xfce Fluxbox nothing; do So startx will give the choice to launch a WM or another. |
@berbae: clever and quick. However it did not work as written. Bash scripting is not my bag--if that is what this is... Will you provide more information and I can research your solution?
|
I know it doesn't work as written : I wrote the 'echo' command instead of the 'exec ...' command to be executed, just to test the choices. The working writing would be :
Code:
select wm in Xfce Fluxbox nothing; do In case of problem, post your entire .xinitrc file, and error messages after you launched startx. |
Quote:
|
So does it work now ?
And if so, please mark the thread as SOLVED (and click Yes to the 'Did you find this post helpful?' question, thanks). |
Its not working. Instead I enter startx command. The screen blanks out from the command line as if something is happening. The command line returns with this printed,
Quote:
|
In fact that approach doesn't seem to work, sorry.
It's because the .xinitrc script is called by xinit after the X server is launched. So it cannot be used to run an interactive bash command when the graphical environment is already started. So you were right to say "startx only works for one DE/WM at a time". The only way I see now is to create several .xinitrc, with different names of course, for each WM, and pass one as parameter to startx, using a new script, for example named 'startwm', which you run instead of startx : Code:
#!/bin/bash Code:
#!/bin/bash Code:
#!/bin/bash That's something you could try. Tell me if that works. |
Kudos! It does indeed work.
All worked as expected save for one bit. When I logout back to runlevel 3, I get "#?" prompt. Its a good thing you added 3, else I'd have been in a loop! I didn't get to programming via CS, so I'm surprised by your kung-fu. The double ;; and the lack of {} is strange to me. What is this style? |
All times are GMT -5. The time now is 04:35 PM. |